Full Code of fubark/zig-v8 for AI

master 168c4a868287 cached
301 files
2.0 MB
540.7k tokens
1453 symbols
1 requests
Download .txt
Showing preview only (2,165K chars total). Download the full file or copy to clipboard to get everything.
Repository: fubark/zig-v8
Branch: master
Commit: 168c4a868287
Files: 301
Total size: 2.0 MB

Directory structure:
gitextract_5ufvb6_p/

├── .gitattributes
├── .github/
│   └── workflows/
│       ├── build-single.yml
│       └── build.yml
├── .gitignore
├── .gn
├── BUILD.gclient.gn
├── BUILD.gn
├── LICENSE
├── README.md
├── V8_REVISION
├── build.zig
├── cross-macos/
│   └── sysroot/
│       └── macos-12/
│           └── usr/
│               └── include/
│                   ├── libkern/
│                   │   ├── OSAtomic.h
│                   │   ├── OSAtomicDeprecated.h
│                   │   ├── OSAtomicQueue.h
│                   │   ├── OSByteOrder.h
│                   │   ├── OSCacheControl.h
│                   │   ├── OSDebug.h
│                   │   ├── OSKextLib.h
│                   │   ├── OSReturn.h
│                   │   ├── OSSpinLockDeprecated.h
│                   │   ├── OSThermalNotification.h
│                   │   ├── OSTypes.h
│                   │   ├── _OSByteOrder.h
│                   │   ├── arm/
│                   │   │   └── OSByteOrder.h
│                   │   ├── i386/
│                   │   │   ├── OSByteOrder.h
│                   │   │   └── _OSByteOrder.h
│                   │   └── machine/
│                   │       └── OSByteOrder.h
│                   ├── mach-o/
│                   │   ├── arch.h
│                   │   ├── arm/
│                   │   │   └── reloc.h
│                   │   ├── arm64/
│                   │   │   └── reloc.h
│                   │   ├── compact_unwind_encoding.h
│                   │   ├── compact_unwind_encoding.modulemap
│                   │   ├── dyld.h
│                   │   ├── dyld.modulemap
│                   │   ├── dyld_images.h
│                   │   ├── fat.h
│                   │   ├── fixup-chains.h
│                   │   ├── getsect.h
│                   │   ├── i386/
│                   │   │   └── swap.h
│                   │   ├── ldsyms.h
│                   │   ├── loader.h
│                   │   ├── module.modulemap
│                   │   ├── nlist.h
│                   │   ├── ranlib.h
│                   │   ├── reloc.h
│                   │   ├── stab.h
│                   │   ├── swap.h
│                   │   └── x86_64/
│                   │       └── reloc.h
│                   ├── os/
│                   │   ├── _workgroup.h
│                   │   ├── activity.h
│                   │   ├── atomic.h
│                   │   ├── availability.h
│                   │   ├── base.h
│                   │   ├── clock.h
│                   │   ├── lock.h
│                   │   ├── log.h
│                   │   ├── object.h
│                   │   ├── overflow.h
│                   │   ├── proc.h
│                   │   ├── signpost.h
│                   │   ├── trace.h
│                   │   ├── trace_base.h
│                   │   ├── workgroup.h
│                   │   ├── workgroup_base.h
│                   │   ├── workgroup_interval.h
│                   │   ├── workgroup_object.h
│                   │   └── workgroup_parallel.h
│                   └── sys/
│                       ├── _endian.h
│                       ├── _posix_availability.h
│                       ├── _pthread/
│                       │   ├── _pthread_attr_t.h
│                       │   ├── _pthread_cond_t.h
│                       │   ├── _pthread_condattr_t.h
│                       │   ├── _pthread_key_t.h
│                       │   ├── _pthread_mutex_t.h
│                       │   ├── _pthread_mutexattr_t.h
│                       │   ├── _pthread_once_t.h
│                       │   ├── _pthread_rwlock_t.h
│                       │   ├── _pthread_rwlockattr_t.h
│                       │   ├── _pthread_t.h
│                       │   └── _pthread_types.h
│                       ├── _select.h
│                       ├── _structs.h
│                       ├── _symbol_aliasing.h
│                       ├── _types/
│                       │   ├── _blkcnt_t.h
│                       │   ├── _blksize_t.h
│                       │   ├── _caddr_t.h
│                       │   ├── _clock_t.h
│                       │   ├── _ct_rune_t.h
│                       │   ├── _dev_t.h
│                       │   ├── _errno_t.h
│                       │   ├── _fd_clr.h
│                       │   ├── _fd_copy.h
│                       │   ├── _fd_def.h
│                       │   ├── _fd_isset.h
│                       │   ├── _fd_set.h
│                       │   ├── _fd_setsize.h
│                       │   ├── _fd_zero.h
│                       │   ├── _filesec_t.h
│                       │   ├── _fsblkcnt_t.h
│                       │   ├── _fsfilcnt_t.h
│                       │   ├── _fsid_t.h
│                       │   ├── _fsobj_id_t.h
│                       │   ├── _gid_t.h
│                       │   ├── _guid_t.h
│                       │   ├── _id_t.h
│                       │   ├── _in_addr_t.h
│                       │   ├── _in_port_t.h
│                       │   ├── _ino64_t.h
│                       │   ├── _ino_t.h
│                       │   ├── _int16_t.h
│                       │   ├── _int32_t.h
│                       │   ├── _int64_t.h
│                       │   ├── _int8_t.h
│                       │   ├── _intptr_t.h
│                       │   ├── _iovec_t.h
│                       │   ├── _key_t.h
│                       │   ├── _mach_port_t.h
│                       │   ├── _mbstate_t.h
│                       │   ├── _mode_t.h
│                       │   ├── _nlink_t.h
│                       │   ├── _null.h
│                       │   ├── _o_dsync.h
│                       │   ├── _o_sync.h
│                       │   ├── _off_t.h
│                       │   ├── _offsetof.h
│                       │   ├── _os_inline.h
│                       │   ├── _pid_t.h
│                       │   ├── _posix_vdisable.h
│                       │   ├── _ptrdiff_t.h
│                       │   ├── _rsize_t.h
│                       │   ├── _rune_t.h
│                       │   ├── _s_ifmt.h
│                       │   ├── _sa_family_t.h
│                       │   ├── _seek_set.h
│                       │   ├── _sigaltstack.h
│                       │   ├── _sigset_t.h
│                       │   ├── _size_t.h
│                       │   ├── _socklen_t.h
│                       │   ├── _ssize_t.h
│                       │   ├── _suseconds_t.h
│                       │   ├── _time_t.h
│                       │   ├── _timespec.h
│                       │   ├── _timeval.h
│                       │   ├── _timeval32.h
│                       │   ├── _timeval64.h
│                       │   ├── _u_char.h
│                       │   ├── _u_int.h
│                       │   ├── _u_int16_t.h
│                       │   ├── _u_int32_t.h
│                       │   ├── _u_int64_t.h
│                       │   ├── _u_int8_t.h
│                       │   ├── _u_short.h
│                       │   ├── _ucontext.h
│                       │   ├── _ucontext64.h
│                       │   ├── _uid_t.h
│                       │   ├── _uintptr_t.h
│                       │   ├── _useconds_t.h
│                       │   ├── _uuid_t.h
│                       │   ├── _va_list.h
│                       │   ├── _wchar_t.h
│                       │   └── _wint_t.h
│                       ├── _types.h
│                       ├── acct.h
│                       ├── acl.h
│                       ├── aio.h
│                       ├── appleapiopts.h
│                       ├── attr.h
│                       ├── buf.h
│                       ├── cdefs.h
│                       ├── clonefile.h
│                       ├── commpage.h
│                       ├── conf.h
│                       ├── dir.h
│                       ├── dirent.h
│                       ├── disk.h
│                       ├── dkstat.h
│                       ├── domain.h
│                       ├── dtrace.h
│                       ├── dtrace_glue.h
│                       ├── dtrace_impl.h
│                       ├── errno.h
│                       ├── ev.h
│                       ├── event.h
│                       ├── fasttrap.h
│                       ├── fasttrap_isa.h
│                       ├── fcntl.h
│                       ├── file.h
│                       ├── filedesc.h
│                       ├── filio.h
│                       ├── fsgetpath.h
│                       ├── gmon.h
│                       ├── ioccom.h
│                       ├── ioctl.h
│                       ├── ioctl_compat.h
│                       ├── ipc.h
│                       ├── kauth.h
│                       ├── kdebug.h
│                       ├── kdebug_signpost.h
│                       ├── kern_control.h
│                       ├── kern_event.h
│                       ├── kernel.h
│                       ├── kernel_types.h
│                       ├── lctx.h
│                       ├── loadable_fs.h
│                       ├── lock.h
│                       ├── lockf.h
│                       ├── lockstat.h
│                       ├── log_data.h
│                       ├── malloc.h
│                       ├── mbuf.h
│                       ├── mman.h
│                       ├── mount.h
│                       ├── msg.h
│                       ├── msgbuf.h
│                       ├── netport.h
│                       ├── param.h
│                       ├── paths.h
│                       ├── pipe.h
│                       ├── poll.h
│                       ├── posix_sem.h
│                       ├── posix_shm.h
│                       ├── proc.h
│                       ├── proc_info.h
│                       ├── protosw.h
│                       ├── ptrace.h
│                       ├── qos.h
│                       ├── queue.h
│                       ├── quota.h
│                       ├── random.h
│                       ├── rbtree.h
│                       ├── reboot.h
│                       ├── resource.h
│                       ├── resourcevar.h
│                       ├── sbuf.h
│                       ├── sdt.h
│                       ├── select.h
│                       ├── sem.h
│                       ├── semaphore.h
│                       ├── shm.h
│                       ├── signal.h
│                       ├── signalvar.h
│                       ├── snapshot.h
│                       ├── socket.h
│                       ├── socketvar.h
│                       ├── sockio.h
│                       ├── spawn.h
│                       ├── stat.h
│                       ├── statvfs.h
│                       ├── stdio.h
│                       ├── sys_domain.h
│                       ├── syscall.h
│                       ├── sysctl.h
│                       ├── syslimits.h
│                       ├── syslog.h
│                       ├── termios.h
│                       ├── time.h
│                       ├── timeb.h
│                       ├── times.h
│                       ├── timex.h
│                       ├── tprintf.h
│                       ├── trace.h
│                       ├── tty.h
│                       ├── ttychars.h
│                       ├── ttycom.h
│                       ├── ttydefaults.h
│                       ├── ttydev.h
│                       ├── types.h
│                       ├── ubc.h
│                       ├── ucontext.h
│                       ├── ucred.h
│                       ├── uio.h
│                       ├── un.h
│                       ├── unistd.h
│                       ├── unpcb.h
│                       ├── user.h
│                       ├── utfconv.h
│                       ├── utsname.h
│                       ├── vadvise.h
│                       ├── vcmd.h
│                       ├── vm.h
│                       ├── vmmeter.h
│                       ├── vmparam.h
│                       ├── vnioctl.h
│                       ├── vnode.h
│                       ├── vnode_if.h
│                       ├── vsock.h
│                       ├── vstat.h
│                       ├── wait.h
│                       └── xattr.h
├── cross-windows/
│   ├── TraceLoggingProvider.h
│   ├── VersionHelpers.h
│   ├── Windows.h
│   └── src/
│       └── base/
│           └── win32-headers.h
├── parse_deps.py
├── patches/
│   ├── v8.patch
│   └── v8_build.patch
└── src/
    ├── binding.cpp
    ├── binding.h
    ├── shell.zig
    ├── test.zig
    └── v8.zig

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

================================================
FILE: .gitattributes
================================================
*.zig text eol=lf
*.md text eol=lf
*.patch text eol=lf
V8_REVISION text eol=lf

cross-macos/** linguist-vendored


================================================
FILE: .github/workflows/build-single.yml
================================================
name: Build V8 (Single)

on: 
  workflow_dispatch:
    inputs:
      host:
        type: choice
        description: Host
        options:
          - ubuntu-22.04
          - macos-12
          - windows-2019
      target:
        type: choice
        description: Target
        options:
          - x86_64-linux-gnu
          - x86_64-macos-none
          - x86_64-windows-msvc
          - x86_64-windows-gnu
          - aarch64-macos-none
      mode:
        type: choice
        description: Mode
        options:
          - release
      toolchain:
        type: choice
        description: Toolchain
        options:
          - v8
          - zig

jobs:
  build:
    name: host=${{ github.event.inputs.host }} target=${{ github.event.inputs.target }} mode=${{ github.event.inputs.mode }} tc=${{ github.event.inputs.toolchain }}
    runs-on: ${{ github.event.inputs.host }}
    env:
      ARCH_OS: >-
        ${{ fromJson('{
          "x86_64-windows-gnu": "x86_64-windows",
          "x86_64-windows-msvc": "x86_64-windows",
          "x86_64-linux-gnu": "x86_64-linux",
          "x86_64-macos-none": "x86_64-macos",
          "aarch64-macos-none": "aarch64-macos",
        }')[github.event.inputs.target] }}
      ZIG_TARGET_FLAG: >-
        ${{ fromJson('{
          "x86_64-windows-gnu": "-Dtarget=x86_64-windows-gnu -Dcpu=baseline",
          "x86_64-windows-msvc": "-Dtarget=x86_64-windows-msvc -Dcpu=baseline",
          "x86_64-linux-gnu": "-Dtarget=x86_64-linux-gnu -Dcpu=baseline",
          "x86_64-macos-none": "-Dtarget=x86_64-macos.12-none -Dcpu=baseline",
          "aarch64-macos-none": "-Dtarget=aarch64-macos.12-none -Dcpu=baseline",
        }')[github.event.inputs.target] }}
      LIB_NAME: ${{ contains(github.event.inputs.target, 'windows') && 'c_v8' || 'libc_v8' }}
      LIB_EXT: ${{ contains(github.event.inputs.target, 'windows') && 'lib' || 'a' }}
      BUILD_HOST: ${{ matrix.config.host }}
      BUILD_TARGET: ${{ github.event.inputs.target }}
      BUILD_MODE: ${{ github.event.inputs.mode }}
      BUILD_TOOLCHAIN: ${{ github.event.inputs.toolchain }}
    steps:
      - name: Clone repo.
        uses: actions/checkout@v2
        with:
          fetch-depth: 1
          submodules: recursive

      - name: Get build tag.
        shell: bash
        # Need single quotes or path sep becomes escapes on windows host. xargs does trimming.
        run: echo "BUILD_TAG=$(cat '${{ github.workspace }}/V8_REVISION' | xargs)" >> $GITHUB_ENV

      - name: Create/Update tag.
        uses: actions/github-script@v5
        with:
          script: |
            const ref = 'tags/${{ env.BUILD_TAG }}';
            const res = await github.rest.git.listMatchingRefs({
              owner: context.repo.owner,
              repo: context.repo.repo,
              ref: 'tags/${{ env.BUILD_TAG }}',
            });
            if (res.data.length > 0) {
              await github.rest.git.updateRef({
                owner: context.repo.owner,
                repo: context.repo.repo,
                ref: 'tags/${{ env.BUILD_TAG }}',
                sha: context.sha,
              });
            } else {
              await github.rest.git.createRef({
                owner: context.repo.owner,
                repo: context.repo.repo,
                // Only create needs full path
                ref: 'refs/tags/${{ env.BUILD_TAG }}',
                sha: context.sha,
              });
            }

      - name: Install zig.
        if: env.BUILD_HOST == 'ubuntu-22.04'
        run: |
          wget -c https://ziglang.org/builds/zig-linux-x86_64-0.11.0-dev.944+a193ec432.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin

      - name: Install zig.
        if: env.BUILD_HOST == 'macos-12'
        run: |
          wget -c https://ziglang.org/builds/zig-macos-x86_64-0.11.0-dev.944+a193ec432.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin
          xcode-select --print-path

      - name: Cache.
        if: env.BUILD_TOOLCHAIN == 'zig'
        uses: actions/cache@v2
        with:
          path: |-
            ~/.cache/zig
          key:
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2
          restore-keys:
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2

      - name: Cache.
        if: env.BUILD_TOOLCHAIN == 'v8'
        uses: actions/cache@v2
        with:
          # Restore sccache so subsequent runs can reuse the cache.
          # TODO: Might be useful to restore some of v8 source deps so get-v8 does less work.
          path: |-
            sccache
          key:
            # The cache can behave unexpectedly (usually happens when we change the path), so we just increase a simple id counter to create a new cache.
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-2
          restore-keys:
            # Reuse a previous cache.
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-

      - name: Install and start sccache.
        if: env.BUILD_TOOLCHAIN == 'v8'
        shell: pwsh
        env:
          SCCACHE_DIR: ${{ github.workspace }}/sccache
          # Compiling all of v8 takes up about 100M for debug builds so this is a good starting point.
          SCCACHE_CACHE_SIZE: 128M
          SCCACHE_IDLE_TIMEOUT: 0
        run: |
          $version = "v0.2.15"
          $platform =
            @{ "macOS"   = "x86_64-apple-darwin"
               "Linux"   = "x86_64-unknown-linux-musl"
               "Windows" = "x86_64-pc-windows-msvc"
             }.${{ runner.os }}
          $basename = "sccache-$version-$platform"
          $url = "https://github.com/mozilla/sccache/releases/download/" +
                 "$version/$basename.tar.gz"
          cd ~
          curl -LO $url
          tar -xzvf "$basename.tar.gz"
          chmod a+x $basename/sccache
          . $basename/sccache --start-server
          echo "$(pwd)/$basename" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

      - name: Get V8 Tools.
        run: zig build get-tools

      - name: Get V8 Source.
        run: zig build get-v8

      - name: Build release.
        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'v8'
        run: zig build -Drelease-safe ${{ env.ZIG_TARGET_FLAG }}

      - name: Build release.
        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'zig'
        run: zig build -Drelease-safe ${{ env.ZIG_TARGET_FLAG }} -Dzig-toolchain

      - name: Build debug.
        if: env.BUILD_MODE == 'debug'
        run: zig build

      - name: Copy binary.
        if: env.BUILD_TARGET != 'x86_64-windows-gnu'
        continue-on-error: true
        run: cp
          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/${{ env.LIB_NAME }}.${{ env.LIB_EXT }}
          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}

      - name: Copy binary.
        if: env.BUILD_TARGET == 'x86_64-windows-gnu'
        continue-on-error: true
        run: cp
          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/libc_v8.a
          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}

      - name: Github Release.
        uses: softprops/action-gh-release@v0.1.14
        # Github requires tags for releases.
        #if: startsWith(github.ref, 'refs/tags/')
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          body: Release
          name: ${{ env.BUILD_TAG }}
          tag_name: ${{ env.BUILD_TAG }}
          files: v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}

      - name: Stop sccache.
        if: env.BUILD_TOOLCHAIN == 'v8' && always()
        run: |
          sccache --show-stats
          sccache --stop-server


================================================
FILE: .github/workflows/build.yml
================================================
name: Build V8

on: [workflow_dispatch, push]

concurrency:
  group: my-group
  cancel-in-progress: true

jobs:
  build:
    name: host=${{ matrix.config.host }} target=${{ matrix.config.target }} mode=${{ matrix.config.mode }} tc=${{ matrix.config.toolchain }}
    runs-on: ${{ matrix.config.host }}
    strategy:
      fail-fast: true
      matrix:
        config:
          - host: ubuntu-22.04
            target: x86_64-linux-gnu
            mode: release
            toolchain: zig
          - host: macos-12
            target: x86_64-macos-none
            mode: release
            toolchain: v8
          - host: ubuntu-22.04
            target: x86_64-windows-gnu
            mode: release
            toolchain: zig
          - host: ubuntu-22.04
            target: aarch64-macos-none
            mode: release
            toolchain: zig
    env:
      ARCH_OS: >-
        ${{ fromJson('{
          "x86_64-windows-gnu": "x86_64-windows",
          "x86_64-linux-gnu": "x86_64-linux",
          "x86_64-macos-none": "x86_64-macos",
          "aarch64-macos-none": "aarch64-macos",
        }')[matrix.config.target] }}
      ZIG_TARGET_FLAG: >-
        ${{ fromJson('{
          "x86_64-windows-gnu": "-Dtarget=x86_64-windows-gnu -Dcpu=baseline",
          "x86_64-linux-gnu": "-Dtarget=x86_64-linux-gnu -Dcpu=baseline",
          "x86_64-macos-gnu": "-Dtarget=x86_64-macos.12-none -Dcpu=baseline",
          "aarch64-macos-gnu": "-Dtarget=aarch64-macos.12-none -Dcpu=baseline",
        }')[matrix.config.target] }}
      BUILD_HOST: ${{ matrix.config.host }}
      BUILD_TARGET: ${{ matrix.config.target }}
      BUILD_MODE: ${{ matrix.config.mode }}
      BUILD_TOOLCHAIN: ${{ matrix.config.toolchain }}
      LIB_NAME: ${{ contains(matrix.config.target, 'windows') && 'c_v8' || 'libc_v8' }}
      LIB_EXT: ${{ contains(matrix.config.target, 'windows') && 'lib' || 'a' }}
    steps:
      - name: Clone repo.
        uses: actions/checkout@v2
        with:
          fetch-depth: 1
          submodules: recursive

      - name: Get build tag.
        shell: bash
        # Need single quotes or path sep becomes escapes on windows host. xargs does trimming.
        run: echo "BUILD_TAG=$(cat '${{ github.workspace }}/V8_REVISION' | xargs)" >> $GITHUB_ENV

      - name: Create/Update tag.
        uses: actions/github-script@v5
        with:
          script: |
            const ref = 'tags/${{ env.BUILD_TAG }}';
            const res = await github.rest.git.listMatchingRefs({
              owner: context.repo.owner,
              repo: context.repo.repo,
              ref: 'tags/${{ env.BUILD_TAG }}',
            });
            if (res.data.length > 0) {
              await github.rest.git.updateRef({
                owner: context.repo.owner,
                repo: context.repo.repo,
                ref: 'tags/${{ env.BUILD_TAG }}',
                sha: context.sha,
              });
            } else {
              await github.rest.git.createRef({
                owner: context.repo.owner,
                repo: context.repo.repo,
                // Only create needs full path
                ref: 'refs/tags/${{ env.BUILD_TAG }}',
                sha: context.sha,
              });
            }

      - name: Install zig.
        if: env.BUILD_HOST == 'ubuntu-22.04'
        run: |
          wget -c https://ziglang.org/builds/zig-linux-x86_64-0.11.0-dev.1797+d3c9bfada.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin

      - name: Install zig.
        if: env.BUILD_HOST == 'macos-12'
        run: |
          wget -c https://ziglang.org/builds/zig-macos-x86_64-0.11.0-dev.1797+d3c9bfada.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin
          xcode-select --print-path

      - name: Cache.
        if: env.BUILD_TOOLCHAIN == 'zig'
        uses: actions/cache@v2
        with:
          path: |-
            ~/.cache/zig
          key:
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2
          restore-keys:
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2

      - name: Cache.
        if: env.BUILD_TOOLCHAIN == 'v8'
        uses: actions/cache@v2
        with:
          # Restore sccache so subsequent runs can reuse the cache.
          # TODO: Might be useful to restore some of v8 source deps so get-v8 does less work.
          path: |-
            sccache
          key:
            # The cache can behave unexpectedly (usually happens when we change the path), so we just increase a simple id counter to create a new cache.
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-2
          restore-keys:
            # Reuse a previous cache.
            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-

      - name: Install and start sccache.
        if: env.BUILD_TOOLCHAIN == 'v8'
        shell: pwsh
        env:
          SCCACHE_DIR: ${{ github.workspace }}/sccache
          # Compiling all of v8 takes up about 100M for debug builds so this is a good starting point.
          SCCACHE_CACHE_SIZE: 128M
          SCCACHE_IDLE_TIMEOUT: 0
        run: |
          $version = "v0.2.15"
          $platform =
            @{ "macOS"   = "x86_64-apple-darwin"
               "Linux"   = "x86_64-unknown-linux-musl"
               "Windows" = "x86_64-pc-windows-msvc"
             }.${{ runner.os }}
          $basename = "sccache-$version-$platform"
          $url = "https://github.com/mozilla/sccache/releases/download/" +
                 "$version/$basename.tar.gz"
          cd ~
          curl -LO $url
          tar -xzvf "$basename.tar.gz"
          chmod a+x $basename/sccache
          . $basename/sccache --start-server
          echo "$(pwd)/$basename" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

      - name: Get V8 Tools.
        run: zig build get-tools

      - name: Get V8 Source.
        run: zig build get-v8

      - name: Build release.
        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'v8'
        run: zig build -Doptimize=ReleaseSafe ${{ env.ZIG_TARGET_FLAG }}

      - name: Build release.
        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'zig'
        run: zig build -Doptimize=ReleaseSafe ${{ env.ZIG_TARGET_FLAG }} -Dzig-toolchain

      - name: Build debug.
        if: env.BUILD_MODE == 'debug'
        run: zig build

      - name: Copy binary.
        if: env.BUILD_TARGET != 'x86_64-windows-gnu'
        continue-on-error: true
        run: cp
          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/${{ env.LIB_NAME }}.${{ env.LIB_EXT }}
          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}

      - name: Copy binary.
        if: env.BUILD_TARGET == 'x86_64-windows-gnu'
        continue-on-error: true
        run: cp
          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/libc_v8.a
          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}

      - name: Github Release.
        uses: softprops/action-gh-release@v0.1.14
        # Github requires tags for releases.
        #if: startsWith(github.ref, 'refs/tags/')
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          body: Release
          name: ${{ env.BUILD_TAG }}
          tag_name: ${{ env.BUILD_TAG }}
          files: v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}

      - name: Stop sccache.
        if: env.BUILD_TOOLCHAIN == 'v8' && always()
        run: |
          sccache --show-stats
          sccache --stop-server


================================================
FILE: .gitignore
================================================
/zig-cache/
/tools/ninja_gn_binaries*
/v8-build/
/gclient/
/v8/
/zig-out/
/vendor
/libc_v8.a
/tools/


================================================
FILE: .gn
================================================
# This file is used by the GN meta build system to find the root of the source
# tree and to set startup options. For documentation on the values set in this
# file, run "gn help dotfile" at the command line.

# Use the default python3 so gn succeeds. Not sure why deno requires python2 atm.
script_executable = "python3"

# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"

# These are the targets to check headers for by default. The files in targets
# matching these patterns (see "gn help label_pattern" for format) will have
# their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check".
check_targets = []

# The secondary source root is a parallel directory tree where
# GN build files are placed when they can not be placed directly
# in the source tree, e.g. for third party source trees.
#secondary_source = "//gclient/v8"

default_args = {
  linux_use_bundled_binutils = false
  use_sysroot = false

  use_dummy_lastchange = true
  treat_warnings_as_errors = true
  v8_enable_shared_ro_heap = false
  v8_imminent_deprecation_warnings = false
  clang_use_chrome_plugins = false
  v8_monolithic = false
  v8_use_external_startup_data = false
  
  v8_use_snapshot = true
  is_component_build = false
  win_crt_flavor_agnostic = true
}


================================================
FILE: BUILD.gclient.gn
================================================
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
# Based on https://github.com/denoland/rusty_v8/blob/main/BUILD.gn
import("//build/config/host_byteorder.gni")

static_library("c_v8") {
  complete_static_lib = true
  sources = [ "../../../src/binding.cpp" ]
  deps = [
    "//build/config:shared_library_deps",
    "//:v8",
    "//:v8_libbase",
    "//:v8_libplatform",
  ]
  configs -= [
    "//build/config/compiler:default_init_stack_vars",
    "//build/config/compiler:thin_archive",
  ]
  configs += [ ":c_v8_config" ]
}

config("c_v8_config") {
  configs = [
    "//:external_config",
    "//:toolchain",
    "//:features",
  ]
  cflags = []

  # We need these directories in the search path to be able to include some
  # internal V8 headers.
  include_dirs = [
    "v8",
    "$target_gen_dir/v8",
  ]

  if (is_debug) {
    defines = [ "DEBUG" ]
  }

  if (is_clang) {
    cflags += [
      "-fcolor-diagnostics",
      "-fansi-escape-codes",
    ]
  }

  if (is_debug && is_clang && !is_win) {
    cflags += [ "-glldb" ]
  }
}

================================================
FILE: BUILD.gn
================================================
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
# Based on https://github.com/denoland/rusty_v8/blob/main/BUILD.gn
import("//build/config/host_byteorder.gni")
import("//build/toolchain/gcc_toolchain.gni")
import("//build/config/c++/c++.gni")

static_library("c_v8") {
  complete_static_lib = true

  sources = [ "../../src/binding.cpp" ]
  deps = [
    "//build/config:shared_library_deps",
    "//:v8",
    "//:v8_libbase",
    "//:v8_libplatform",
  ]
  configs -= [
    "//build/config/compiler:default_init_stack_vars",
    "//build/config/compiler:thin_archive",
  ]
  configs += [ ":c_v8_config" ]
}

config("c_v8_config") {
  configs = [
    "//:external_config",
    "//:toolchain",
    "//:features",
  ]
  cflags = []

  # We need these directories in the search path to be able to include some
  # internal V8 headers.
  include_dirs = [
    "v8",
    "$target_gen_dir/v8",
  ]

  if (is_debug) {
    defines = [ "DEBUG" ]
  }

  if (is_clang) {
    cflags += [
      "-fcolor-diagnostics",
      "-fansi-escape-codes",
    ]
  }

  if (is_debug && is_clang && !is_win) {
    cflags += [ "-glldb" ]
  }
}

# Based on template("clang_toolchain") in build/toolchain/gcc_toolchain.gni
template("zig_toolchain") {
  gcc_toolchain(target_name) {
    prefix = rebase_path("$clang_base_path/bin", root_build_dir)
    readelf = "${prefix}/llvm-readelf"
    # Is this even used?
    nm = "${prefix}/llvm-nm"

    if (current_cpu == "x64" && current_os == "linux") {
      # From //build/toolchain/linux:clang_x64

      # Output linker map files for binary size analysis.
      enable_linker_map = true
    }

    forward_variables_from(invoker,
      [
        "strip",
        "default_shlib_subdir",
        "dwp",
        "enable_linker_map",
        "loadable_module_extension",
        "use_unstripped_as_runtime_outputs",
        "cc",
        "cxx",
        "ld",
        "ar",
        "extra_cppflags",
      ])

    toolchain_args = {
      if (defined(invoker.toolchain_args)) {
        forward_variables_from(invoker.toolchain_args, "*")
      }
      is_clang = true
    }
  }
}

# Used to compile the v8 library.
zig_toolchain("main_zig_toolchain") {
  cc = zig_cc
  cxx = zig_cxx
  # ld commands in v8 use cxx with -fuse-ld
  ld = cxx
  #ar = "${prefix}/llvm-ar"
  ar = "zig ar"

  extra_cppflags = "-Wno-unused-but-set-variable"

  toolchain_args = {
    current_cpu = target_cpu
    current_os = target_os
  }
}

# Used to compile v8 snapshots/generators to run locally.
# v8_current_cpu indicates that we are still targeting a different arch but must compile tools to run on host machine.
# See gni/snapshot_toolchain.gni
zig_toolchain("v8_zig_toolchain") {
  cc = host_zig_cc
  cxx = host_zig_cxx
  # ld commands in v8 use cxx with -fuse-ld
  ld = cxx
  #ar = "${prefix}/llvm-ar"
  ar = "zig ar"

  extra_cppflags = "-Wno-unused-but-set-variable"

  toolchain_args = {
    current_os = host_os
    current_cpu = host_cpu
    v8_current_cpu = target_cpu
  }
}


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

Copyright (c) 2021 fubark

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

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

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


================================================
FILE: README.md
================================================
# zig-v8

Builds V8 from official source and provides C bindings and a Zig API. This would be used for embedding the V8 runtime into your Zig or C ABI compatible projects.

V8 is the JS/WASM runtime that powers Google Chrome and Microsoft Edge.

## Project Status
Static libs are built and released with [Github Actions](https://github.com/fubark/zig-v8/actions).
| Native | Cross Compile | Target | Demo Binary ([shell.zig](https://github.com/fubark/zig-v8/blob/master/src/shell.zig))* |
| ------ | ------ | -------- | -------- |
| ✅ | | Linux x64 | shell - 19 M |
| ✅ | ✅ | Windows x64 | shell.exe - 14 M |
| ✅ | | macOS x64 | shell - 24 M |
| ✅ | ✅ | macOS arm64 | shell - 21 M |

\* shell.zig is a JS repl and statically linked with v8. Compiled with -Doptimize=ReleaseSafe. The V8 dependency can be further reduced in size if you don't need all the features (eg. disable WASM runtime).

| Toolchain | Fresh Build* | Cached Build* |
| ------ | ------ | ------ |
| gclient, full feature + v8 toolchain | 1.5-2 hrs | with sccache: 10-20min |
| minimal feature + v8 toolchain | 40-50 min | with sccache: 5-10min |
| minimal feature + zig c++ toolchain |  | with zig caching:  |

\* Time is measured on standard Github instances.

## System Requirements
- Zig compiler (0.11.0). You can get that [here](https://ziglang.org/download/).
- Python 3 (2.7 seems to work as well)
- For native macOS builds:
  - XCode (You won't need this when using zig's c++ toolchain!)<br/>
if you come across this error:<br />
`xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`<br />
  run `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`

## Build
By default UseGclient=false in build.zig. This will pull the minimum sources and deps needed to build v8 and reduce build times.

If you want to include everything, set UseGclient=true. Build times can be quite long using gclient but afterwards rerunning "zig build" should be incremental. You can also use sccache for better incremental build times.

```sh
# Clone the repo.
git clone https://github.com/fubark/zig-v8.git
cd zig-v8

# Pull prebuilt GN/Ninja. If UseGclient=true, it also pulls depot_tools.
zig build get-tools

# Pull v8 source
zig build get-v8

# Build, resulting static library should be at:
# v8-build/{target}/{debug/release}/ninja/obj/zig/libc_v8.a
# On windows, use msvc: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-windows-msvc
zig build -Doptimize=ReleaseSafe
```
## Demo
```sh
# shell.zig is a simple JS repl.
# Assumes you've already built v8.
zig build run -Dpath="src/shell.zig" -Doptimize=ReleaseSafe

# If you built v8 using the zig toolchain, you'll need to add the flag here as well.
zig build run -Dpath="src/shell.zig" -Doptimize=ReleaseSafe -Dzig-toolchain
```

## Cross Compiling
With Zig's toolchain, we can build V8 from libstdc++ that's bundled with zig and cross compile to foreign targets/cpus! Simply amazing. Eventually, this will also replace the default V8 toolchain for native builds after further testing.
### Linux x64 (Host) to MacOS arm64 (Target)
```sh
# Assumes you've fetched tools and v8 sources. See above build steps.
# Resulting static lib will be at:
# v8-build/aarch64-macos/release/ninja/obj/zig/libc_v8.a
zig build -Doptimize=ReleaseSafe -Dtarget=aarch64-macos-gnu -Dzig-toolchain
```

### Cross compile to Windows with gnu (mingw64)
Zig comes with mingw64 source and headers so you'll be able to target Windows without MSVC.
```sh
zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-windows-gnu -Dzig-toolchain
```

## Usage

See src/shell.zig or test/test.zig on how to use the library with the Zig API as well as build.zig (fn linkV8) on how to link with the built V8 static library.

## Contributing

The C bindings is incomplete but it should be relatively easy to add more as we need them.

C API naming convention should closely follow the V8 C++ API.

## Troubleshooting

If you get an error saying that it can't find any of the following:

```

pkg-config
glib-2.0
gmodule-2.0
gobject-2.0
gthread-2.0

```

You'll need to run the following command before continuing:

```
sudo apt install -y pkg-config libglib2.0-dev
```
Or your distro's equivalent


================================================
FILE: V8_REVISION
================================================
11.1.134


================================================
FILE: build.zig
================================================
const std = @import("std");
const json = std.json;
const Builder = std.Build;
const Step = std.Build.Step;
const print = std.debug.print;
const builtin = @import("builtin");
const Pkg = std.build.Pkg;

const fs = std.fs;

pub fn build(b: *Builder) !void {
    // Options.
    //const build_v8 = b.option(bool, "build_v8", "Whether to build from v8 source") orelse false;
    const path = b.option([]const u8, "path", "Path to main file, for: build, run") orelse "";
    const use_zig_tc = b.option(bool, "zig-toolchain", "Experimental: Use zig cc/c++/ld to build v8.") orelse false;

    const mode = b.standardOptimizeOption(.{}); //FIXED
    const target = b.standardTargetOptions(.{});

    _ = createGetTools(b);
    _ = createGetV8(b);

    const v8 = try createV8_Build(b, target, mode, use_zig_tc);

    const tests = createTest(b, target, mode, use_zig_tc);
    tests.step.dependOn(v8);

    const test_step = b.addRunArtifact(tests);
    b.step("test", "Run unit tests").dependOn(&test_step.step);

    const build_exe = createBuildExeStep(b, path, target, mode, use_zig_tc);

    const run_exe = b.addRunArtifact(build_exe);
    b.step("run", "Run with main file at -Dpath").dependOn(&run_exe.step);

    b.default_step.dependOn(v8);
}

// When this is true, we'll strip V8 features down to a minimum so the resulting library is smaller.
// eg. i18n will be excluded.
const MinimalV8 = true;

// gclient is comprehensive and will pull everything for the v8 project.
// Set this to false to pull the minimal required src by parsing v8/DEPS and whitelisting deps we care about.
const UseGclient = false;

// V8's build process is complex and porting it to zig could take quite awhile.
// It would be nice if there was a way to import .gn files into the zig build system.
// For now we just use gn/ninja like rusty_v8 does: https://github.com/denoland/rusty_v8/blob/main/build.rs
fn createV8_Build(b: *Builder, target: std.Build.ResolvedTarget, mode: std.builtin.OptimizeMode, use_zig_tc: bool) !*std.Build.Step {
    const step = b.step("v8", "Build v8 c binding lib.");

    if (UseGclient) {
        const mkpath = MakePathStep.create(b, "./gclient/v8/zig");
        step.dependOn(&mkpath.step);

        const cp = CopyFileStep.create(b, b.pathFromRoot("BUILD.gclient.gn"), b.pathFromRoot("gclient/v8/zig/BUILD.gn"));
        step.dependOn(&cp.step);
    } else {
        const mkpath = MakePathStep.create(b, "./v8/zig");
        step.dependOn(&mkpath.step);

        const cp = CopyFileStep.create(b, b.pathFromRoot("BUILD.gn"), b.pathFromRoot("v8/zig/BUILD.gn"));
        step.dependOn(&cp.step);
    }

    var gn_args = std.ArrayList([]const u8).init(b.allocator);

    switch (target.result.os.tag) {
        .macos => try gn_args.append("target_os=\"mac\""),
        .windows => {
            try gn_args.append("target_os=\"win\"");
            if (!UseGclient) {
                // Don't use depot_tools.
                try b.graph.env_map.put("DEPOT_TOOLS_WIN_TOOLCHAIN", "0");
            }
        },
        .linux => try gn_args.append("target_os=\"linux\""),
        else => {},
    }
    switch (target.result.cpu.arch) {
        .x86_64 => try gn_args.append("target_cpu=\"x64\""),
        .aarch64 => try gn_args.append("target_cpu=\"arm64\""),
        else => {},
    }

    var zig_cc = std.ArrayList([]const u8).init(b.allocator);
    var zig_cxx = std.ArrayList([]const u8).init(b.allocator);
    var host_zig_cc = std.ArrayList([]const u8).init(b.allocator);
    var host_zig_cxx = std.ArrayList([]const u8).init(b.allocator);

    if (mode == .Debug) {
        try gn_args.append("is_debug=true");
        // full debug info (symbol_level=2).
        // Setting symbol_level=1 will produce enough information for stack traces, but not line-by-line debugging.
        // Setting symbol_level=0 will include no debug symbols at all. Either will speed up the build compared to full symbols.
        // This will eventually pass down to v8_symbol_level.
        try gn_args.append("symbol_level=1");
    } else {
        try gn_args.append("is_debug=false");
        try gn_args.append("symbol_level=0");

        // is_official_build is meant to ship chrome.
        // It might be interesting to see how far we can get with it (previously saw illegal instruction in Zone::NewExpand during mksnapshot_default since stacktraces were removed)
        // but a better approach for now is to set to false and slowly enable optimizations. eg. We probably still want to unwind stack traces.
        try gn_args.append("is_official_build=false");
        // is_official_build will do pgo optimization by default for chrome specific builds that require gclient to fetch profile data.
        // https://groups.google.com/a/chromium.org/g/chromium-dev/c/-0t4s0RlmOI
        // Disable that with this:
        //try gn_args.append("chrome_pgo_phase=0");
        //if (use_zig_tc) {
        // is_official_build will enable cfi but zig does not come with the default cfi_ignorelist.
        //try zig_cppflags.append("-fno-sanitize-ignorelist");
        //}

        // TODO: Might want to turn V8_ENABLE_CHECKS off to remove asserts.
    }

    if (MinimalV8) {
        // Don't add i18n for now. It has a large dependency on third_party/icu.
        try gn_args.append("v8_enable_i18n_support=false");
    }

    if (mode != .Debug) {
        // TODO: document
        try gn_args.append("v8_enable_handle_zapping=false");
    }

    // Fix GN's host_cpu detection when using x86_64 bins on Apple Silicon
    if (builtin.os.tag == .macos and builtin.cpu.arch == .aarch64) {
        try gn_args.append("host_cpu=\"arm64\"");
    }

    if (use_zig_tc) {
        // Set target and cpu for building the lib.
        // TODO: If mcpu is equavalent to -Dcpu then use that instead
        try zig_cc.append(b.fmt("zig cc --target={s} -mcpu=baseline", .{try target.result.zigTriple(b.allocator)}));
        try zig_cxx.append(b.fmt("zig c++ --target={s} -mcpu=baseline", .{try target.result.zigTriple(b.allocator)}));

        try host_zig_cc.append("zig cc --target=native");
        try host_zig_cxx.append("zig c++ --target=native");

        // Ignore "a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]"
        try zig_cc.append("-Wno-deprecated-non-prototype");
        try zig_cxx.append("-Wno-deprecated-non-prototype");
        try host_zig_cc.append("-Wno-deprecated-non-prototype");
        try host_zig_cxx.append("-Wno-deprecated-non-prototype");

        // For zlib.
        try zig_cc.append("-mcrc32");
        try zig_cxx.append("-mcrc32");

        if (target.result.os.tag == .windows and target.result.abi == .gnu) {
            // V8 expects __declspec(dllexport) to not expand in it's test in src/base/export-template.h but it does when compiling with mingw.
            try zig_cxx.append("-DEXPORT_TEMPLATE_TEST_MSVC_HACK_DEFAULT\\(...\\)=true");
        }
        if (target.result.os.tag == .windows and builtin.os.tag != .windows) {
            // Cross building to windows probably is case sensitive to header files, so provide them in include.
            // Note: Directory is relative to ninja build folder.
            try zig_cxx.append("-I../../../../cross-windows");

            // Make src/base/bits.h include win32-headers.h
            try zig_cxx.append("-DV8_OS_WIN32=1");

            // Use wchar_t unicode functions.
            try zig_cxx.append("-DUNICODE=1");

            // clang doesn't seem to recognize guard(nocf) even with -fdeclspec. It might be because mingw has a macro for __declspec.
            try zig_cxx.append("-Wno-error=unknown-attributes");

            // include/v8config.h doesn't set mingw flags if __clang__ is defined.
            try zig_cxx.append("-DV8_CC_MINGW32=1");
            try zig_cxx.append("-DV8_CC_MINGW64=1");
            try zig_cxx.append("-DV8_CC_MINGW=1");

            // Windows version. See build/config/win/BUILD.gn
            try zig_cxx.append("-DNTDDI_VERSION=NTDDI_WIN10_VB");
            try zig_cxx.append("-D_WIN32_WINNT=0x0A00");
            try zig_cxx.append("-DWINVER=0x0A00");

            // Enable support for MSVC pragmas.
            try zig_cxx.append("-fms-extensions");

            // Disable instrumentation since mingw doesn't have TraceLoggingProvider.h
            try gn_args.append("v8_enable_system_instrumentation=false");
            try gn_args.append("v8_enable_etw_stack_walking=false");
        }

        // Use zig's libcxx instead.
        // If there are problems we can see what types of flags are enabled when this is true.
        try gn_args.append("use_custom_libcxx=false");

        // custom_toolchain is how we can set zig as the cc/cxx compiler and linker.
        try gn_args.append("custom_toolchain=\"//zig:main_zig_toolchain\"");

        if (target.result.os.tag == .linux and target.result.cpu.arch == .x86_64) {
            // Should add target flags that matches: //build/config/compiler:compiler_cpu_abi
            try zig_cc.append("-m64");
            try zig_cxx.append("-m64");
        } else if (target.result.os.tag == .macos) {
            if (!target.query.isNative()) {
                // Cross compiling.
                const sysroot_abs = b.pathFromRoot("./cross-macos/sysroot/macos-12/usr/include");
                try zig_cc.append("-isystem");
                try zig_cc.append(sysroot_abs);
                try zig_cxx.append("-isystem");
                try zig_cxx.append(sysroot_abs);
            }
        }
        if (builtin.cpu.arch != target.result.cpu.arch or builtin.os.tag != target.result.os.tag) {
            try gn_args.append("v8_snapshot_toolchain=\"//zig:v8_zig_toolchain\"");
        }

        // Just warn for now. TODO: Check to remove after next clang update.
        // https://bugs.chromium.org/p/chromium/issues/detail?id=1016945
        try zig_cxx.append("-Wno-error=builtin-assume-aligned-alignment");
        try host_zig_cxx.append("-Wno-error=builtin-assume-aligned-alignment");

        try gn_args.append("use_zig_tc=true");
        try gn_args.append("cxx_use_ld=\"zig ld.lld\"");

        // Build zig cc strings.
        var arg = b.fmt("zig_cc=\"{s}\"", .{try std.mem.join(b.allocator, " ", zig_cc.items)});
        try gn_args.append(arg);
        arg = b.fmt("zig_cxx=\"{s}\"", .{try std.mem.join(b.allocator, " ", zig_cxx.items)});
        try gn_args.append(arg);
        arg = b.fmt("host_zig_cc=\"{s}\"", .{try std.mem.join(b.allocator, " ", host_zig_cc.items)});
        try gn_args.append(arg);
        arg = b.fmt("host_zig_cxx=\"{s}\"", .{try std.mem.join(b.allocator, " ", host_zig_cxx.items)});
        try gn_args.append(arg);
    } else {
        if (builtin.os.tag != .windows) {
            try gn_args.append("cxx_use_ld=\"lld\"");
        }
    }

    // sccache, currently does not work with zig cc
    if (!use_zig_tc) {
        if (b.graph.env_map.get("SCCACHE")) |path| {
            const cc_wrapper = try std.fmt.allocPrint(b.allocator, "cc_wrapper=\"{s}\"", .{path});
            try gn_args.append(cc_wrapper);
        } else {
            if (builtin.os.tag == .windows) {
                // findProgram look for "PATH" case sensitive.
                try b.graph.env_map.put("PATH", b.graph.env_map.get("Path") orelse "");
            }
            if (b.findProgram(&.{"sccache"}, &.{})) |_| {
                const cc_wrapper = try std.fmt.allocPrint(b.allocator, "cc_wrapper=\"{s}\"", .{"sccache"});
                try gn_args.append(cc_wrapper);
            } else |err| {
                if (err != error.FileNotFound) {
                    unreachable;
                }
            }
            if (builtin.os.tag == .windows) {
                // After creating PATH for windows so findProgram can find sccache, we need to delete it
                // or a gn tool (build/toolchain/win/setup_toolchain.py) will complain about not finding cl.exe.
                b.graph.env_map.remove("PATH");
            }
        }
    }

    // var check_deps = CheckV8DepsStep.create(b);
    // step.step.dependOn(&check_deps.step);

    const mode_str: []const u8 = if (mode == .Debug) "debug" else "release";
    // GN will generate ninja build files in ninja_out_path which will also contain the artifacts after running ninja.
    const ninja_out_path = try std.fmt.allocPrint(b.allocator, "v8-build/{s}/{s}/ninja", .{
        getTargetId(b.allocator, target),
        mode_str,
    });

    const gn = getGnPath(b);
    const arg_items = try std.mem.join(b.allocator, " ", gn_args.items);
    const args = try std.mem.join(b.allocator, "", &.{ "--args=", arg_items });
    // Currently we have to use gclient/v8 as the source root since all those nested gn files expects it, (otherwise, we'll run into duplicate argument declaration errors.)
    // --dotfile lets us use a different .gn outside of the source root.
    // --root-target is a directory that must be inside the source root where we can have a custom BUILD.gn.
    //      Since gclient/v8 is not part of our repo, we copy over BUILD.gn to gclient/v8/zig/BUILD.gn before we run gn.
    // To see v8 dependency tree:
    // cd gclient/v8 && gn desc ../../v8-build/x86_64-linux/release/ninja/ :v8 --tree
    // We can't see our own config because gn desc doesn't accept a --root-target.
    // One idea is to append our BUILD.gn to the v8 BUILD.gn instead of putting it in a subdirectory.
    if (UseGclient) {
        var run_gn = b.addSystemCommand(&.{ gn, "--root=gclient/v8", "--root-target=//zig", "--dotfile=.gn", "gen", ninja_out_path, args });
        step.dependOn(&run_gn.step);
    } else {
        // To see available args for gn: cd v8 && gn args --list ../v8-build/{target}/release/ninja/
        var run_gn = b.addSystemCommand(&.{ gn, "--root=v8", "--root-target=//zig", "--dotfile=.gn", "gen", ninja_out_path, args });
        step.dependOn(&run_gn.step);
    }

    const ninja = getNinjaPath(b);
    // Only build our target. If no target is specified, ninja will build all the targets which includes developer tools, tests, etc.
    var run_ninja = b.addSystemCommand(&.{ ninja, "-C", ninja_out_path, "c_v8" });
    step.dependOn(&run_ninja.step);

    return step;
}

fn getArchOs(alloc: std.mem.Allocator, arch: std.Target.Cpu.Arch, os: std.Target.Os.Tag) []const u8 {
    return std.fmt.allocPrint(alloc, "{s}-{s}-gnu", .{ @tagName(arch), @tagName(os) }) catch unreachable;
}

fn getTargetId(alloc: std.mem.Allocator, target: std.Build.ResolvedTarget) []const u8 {
    return std.fmt.allocPrint(alloc, "{s}-{s}", .{ @tagName(target.result.cpu.arch), @tagName(target.result.os.tag) }) catch unreachable;
}

const CheckV8DepsStep = struct {
    const Self = @This();

    step: Step,
    b: *Builder,

    fn create(b: *Builder) *Self {
        const step = b.allocator.create(Self) catch unreachable;
        step.* = .{
            .step = Step.init(.custom, "check_v8_deps", b.allocator, make),
            .b = b,
        };
        return step;
    }

    fn make(step: *Step) !void {
        const self: *Self = @fieldParentPtr("step", step);

        const output = try self.b.execFromStep(&.{ "clang", "--version" }, step);
        print("clang: {s}", .{output});

        // TODO: Find out the actual minimum and check against other clang flavors.
        if (std.mem.startsWith(u8, output, "Homebrew clang version ")) {
            const i = std.mem.indexOfScalar(u8, output, '.').?;
            const major_v = try std.fmt.parseInt(u8, output["Homebrew clang version ".len..i], 10);
            if (major_v < 13) {
                return error.BadClangVersion;
            }
        }
    }
};

fn createGetV8(b: *Builder) *std.Build.Step {
    const step = b.step("get-v8", "Gets v8 source using gclient.");

    if (UseGclient) {
        const mkpath = MakePathStep.create(b, "./gclient");
        step.dependOn(&mkpath.step);

        // About depot_tools: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
        const cmd = b.addSystemCommand(&.{ b.pathFromRoot("./tools/depot_tools/fetch"), "v8" });
        cmd.cwd = "./gclient";
        cmd.addPathDir(b.pathFromRoot("./tools/depot_tools"));
        step.dependOn(&cmd.step);
    } else {
        const get = GetV8SourceStep.create(b);
        step.dependOn(&get.step);
    }
    return step;
}

fn createGetTools(b: *Builder) *std.Build.Step {
    const step = b.step("get-tools", "Gets the build tools.");

    //var sub_step = b.addSystemCommand(&.{ "python", "./tools/get_ninja_gn_binaries.py", "--dir", "./tools" });
    var sub_step = b.addSystemCommand(&.{ "git", "clone", "https://github.com/denoland/ninja_gn_binaries.git", "./tools" });
    step.dependOn(&sub_step.step);

    if (UseGclient) {
        // Pull depot_tools for fetch tool.
        sub_step = b.addSystemCommand(&.{ "git", "clone", "--depth=1", "https://chromium.googlesource.com/chromium/tools/depot_tools.git", "tools/depot_tools" });
        step.dependOn(&sub_step.step);
    }

    return step;
}

fn getNinjaPath(b: *Builder) []const u8 {
    const platform = switch (builtin.os.tag) {
        .windows => "win",
        .linux => "linux",
        .macos => "mac",
        else => unreachable,
    };
    const arch = switch (builtin.cpu.arch) {
        .x86_64 => "amd64",
        .aarch64 => "arm64",
        else => unreachable,
    };
    const ext = if (builtin.os.tag == .windows) ".exe" else "";
    const bin = std.mem.concat(b.allocator, u8, &.{ "ninja", ext }) catch unreachable;
    const subFolder = std.mem.concat(b.allocator, u8, &.{ platform, "-", arch }) catch unreachable;
    return std.fs.path.resolve(b.allocator, &.{ "./tools", subFolder, bin }) catch unreachable;
}

fn getGnPath(b: *Builder) []const u8 {
    const platform = switch (builtin.os.tag) {
        .windows => "win",
        .linux => "linux",
        .macos => "mac",
        else => unreachable,
    };
    const arch = switch (builtin.cpu.arch) {
        .x86_64 => "amd64",
        .aarch64 => "arm64",
        else => unreachable,
    };
    const ext = if (builtin.os.tag == .windows) ".exe" else "";
    const bin = std.mem.concat(b.allocator, u8, &.{ "gn", ext }) catch unreachable;
    const subFolder = std.mem.concat(b.allocator, u8, &.{ platform, "-", arch }) catch unreachable;
    return std.fs.path.resolve(b.allocator, &.{ "./tools", subFolder, bin }) catch unreachable;
}

const MakePathStep = struct {
    const Self = @This();

    step: std.Build.Step,
    b: *Builder,
    path: []const u8,

    fn create(b: *Builder, root_path: []const u8) *Self {
        const new = b.allocator.create(Self) catch unreachable;
        new.* = .{
            .step = std.Build.Step.init(.{
                .id = .custom,
                .name = b.fmt("make-path", .{}),
                .owner = b,
                .makeFn = make,
            }),
            .b = b,
            .path = root_path,
        };
        return new;
    }
    fn make(step: *std.Build.Step, prog_node: std.Progress.Node) anyerror!void {
        _ = prog_node;
        const self: *Self = @fieldParentPtr("step", step);
        const cwd = fs.cwd();

        const stat = try statPathFromRoot(self.b, self.path);
        if (stat == .NotExist) {
            try cwd.makeDir(self.path);
        }
    }
};

const CopyFileStep = struct {
    const Self = @This();

    step: std.Build.Step,
    b: *Builder,
    src_path: []const u8,
    dst_path: []const u8,

    fn create(b: *Builder, src_path: []const u8, dst_path: []const u8) *Self {
        const new = b.allocator.create(Self) catch unreachable;
        new.* = .{
            .step = std.Build.Step.init(.{
                .id = .custom,
                .name = b.fmt("cp", .{}),
                .owner = b,
                .makeFn = make,
            }),
            .b = b,
            .src_path = src_path,
            .dst_path = dst_path,
        };
        return new;
    }

    fn make(step: *std.Build.Step, prog_node: std.Progress.Node) anyerror!void {
        _ = prog_node;
        const self: *Self = @fieldParentPtr("step", step);
        try std.fs.copyFileAbsolute(self.src_path, self.dst_path, .{});
    }
};

// TODO: Make this usable from external project.
fn linkV8(b: *Builder, step: *std.Build.Step.Compile, mode: std.builtin.OptimizeMode, target: std.Build.ResolvedTarget, use_zig_tc: bool) void {
    const mode_str: []const u8 = if (mode == .Debug) "debug" else "release";
    const lib: []const u8 = if (target.result.os.tag == .windows and target.result.abi == .msvc) "c_v8.lib" else "libc_v8.a";
    const lib_path = std.fmt.allocPrint(b.allocator, "./v8-build/{s}/{s}/ninja/obj/zig/{s}", .{
        getTargetId(b.allocator, target),
        mode_str,
        lib,
    }) catch unreachable;
    step.addAssemblyFile(b.path(lib_path));
    if (builtin.os.tag == .linux) {
        if (use_zig_tc) {
            // TODO: This should be linked already when we built v8.
            step.linkLibCpp();
        }
        step.linkSystemLibrary("unwind");
    } else if (target.result.os.tag == .windows) {
        if (target.result.abi == .gnu) {
            step.linkLibCpp();
        } else {
            step.linkSystemLibrary("Dbghelp");
            step.linkSystemLibrary("Winmm");
            step.linkSystemLibrary("Advapi32");

            // We need libcpmt to statically link with c++ stl for exception_ptr references from V8.
            // Zig already adds the SDK path to the linker but doesn't sync it to the internal libs array which linkSystemLibrary checks against.
            // For now we'll hardcode the MSVC path here.
            step.addLibraryPath(b.path("C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/lib/x64"));
            step.linkSystemLibrary("libcpmt");
        }
    }
}

fn createTest(b: *Builder, target: std.Build.ResolvedTarget, mode: std.builtin.OptimizeMode, use_zig_tc: bool) *std.Build.Step.Compile {
    const step = b.addTest(.{
        .root_source_file = b.path("src/test.zig"),
        .target = target,
        .optimize = mode,
    }); //FIXED

    step.addIncludePath(b.path("src"));
    step.linkLibC();

    linkV8(b, step, mode, target, use_zig_tc);

    return step;
}

const DepEntry = struct {
    const Self = @This();

    alloc: std.mem.Allocator,
    repo_url: []const u8,
    repo_rev: []const u8,

    pub fn deinit(self: Self) void {
        self.alloc.free(self.repo_url);
        self.alloc.free(self.repo_rev);
    }
};

fn getV8Rev(b: *Builder) ![]const u8 {
    var file: std.fs.File = undefined;
    if (comptime isMinZigVersion()) {
        file = try std.fs.openFileAbsolute(b.pathFromRoot("V8_REVISION"), .{ .read = true, .write = false });
    } else {
        file = try std.fs.openFileAbsolute(b.pathFromRoot("V8_REVISION"), .{ .mode = std.fs.File.OpenMode.read_write });
    }
    defer file.close();
    return std.mem.trim(u8, try file.readToEndAlloc(b.allocator, 1e9), "\n\r ");
}

pub const GetV8SourceStep = struct {
    const Self = @This();

    step: Step,
    b: *Builder,

    pub fn create(b: *Builder) *Self {
        const self = b.allocator.create(Self) catch unreachable;
        self.* = .{
            .b = b,
            .step = Step.init(.{
                .id = .run,
                .name = "Get V8 Sources.",
                .owner = b,
                .makeFn = make,
            }),
        };
        return self;
    }

    fn parseDep(self: Self, deps: json.Value, key: []const u8) !DepEntry {
        const val = deps.object.get(key).?;

        const i = std.mem.lastIndexOfScalar(u8, val.string, '@').?;
        const repo_rev = try self.b.allocator.dupe(u8, val.string[i + 1 ..]);

        const repo_url = try std.mem.replaceOwned(u8, self.b.allocator, val.string[0..i], "@chromium_url", "https://chromium.googlesource.com");
        return DepEntry{
            .alloc = self.b.allocator,
            .repo_url = repo_url,
            .repo_rev = repo_rev,
        };
    }

    fn getDep(self: *Self, deps: json.Value, key: []const u8, local_path: []const u8) !void {
        const dep = try self.parseDep(deps, key);
        defer dep.deinit();

        const stat = try statPathFromRoot(self.b, local_path);
        if (stat == .NotExist) {
            _ = self.b.run(&.{ "git", "clone", dep.repo_url, local_path });
        }
        _ = self.b.run(&.{ "git", "-C", local_path, "checkout", dep.repo_rev });
        if (stat == .NotExist) {
            // Apply patch for v8/build
            if (std.mem.eql(u8, key, "build")) {
                _ = self.b.run(&.{ "git", "apply", "--ignore-space-change", "--ignore-whitespace", "patches/v8_build.patch", "--directory=v8/build" });
            }
        }
    }

    fn runHook(self: *Self, hooks: json.Value, name: []const u8) !void {
        var gpa = std.heap.GeneralPurposeAllocator(.{}){};
        const alloc = gpa.allocator();

        defer _ = gpa.deinit();

        for (hooks.array.items) |hook| {
            if (std.mem.eql(u8, name, hook.object.get("name").?.string)) {
                const cmd = hook.object.get("action").?.array;
                var args = std.ArrayList([]const u8).init(self.b.allocator);
                defer args.deinit();
                for (cmd.items) |it| {
                    try args.append(it.string);
                }
                const cwd = self.b.pathFromRoot("v8");

                const cmd_path = try std.fmt.allocPrint(alloc, "{s}/{s}", .{ cwd, args.items[1] });
                defer alloc.free(cmd_path);

                _ = self.b.run(&.{ args.items[0], cmd_path });
                break;
            }
        }
    }

    fn make(step: *Step, prog_node: std.Progress.Node) !void {
        _ = prog_node;
        const self: *Self = @fieldParentPtr("step", step);

        // Pull the minimum source we need by looking at DEPS.
        // TODO: Check if we have the right branches, otherwise reclone.

        // Get revision/tag to checkout.
        const v8_rev = try getV8Rev(self.b);

        // Clone V8.
        const stat = try statPathFromRoot(self.b, "v8");
        if (stat == .NotExist) {
            _ = self.b.run(&.{ "git", "clone", "--depth=1", "--branch", v8_rev, "https://chromium.googlesource.com/v8/v8.git", "v8" });
            // Apply patch for v8 root.
            _ = self.b.run(&.{ "git", "apply", "--ignore-space-change", "--ignore-whitespace", "patches/v8.patch", "--directory=v8" });
        }

        // Get DEPS in json.
        const deps_json = self.b.run(&.{ "python3", "parse_deps.py", "v8/DEPS" });
        defer self.b.allocator.free(deps_json);

        var tree = try json.parseFromSlice(json.Value, self.b.allocator, deps_json, .{});
        defer tree.deinit();

        const deps = tree.value.object.get("deps").?;
        const hooks = tree.value.object.get("hooks").?;

        // build
        try self.getDep(deps, "build", "v8/build");

        // Add an empty gclient_args.gni so gn is happy. gclient also creates an empty file.
        const file = try std.fs.createFileAbsolute(self.b.pathFromRoot("v8/build/config/gclient_args.gni"), .{ .read = false, .truncate = true });
        try file.writeAll("# Generated from build.zig");

        file.close();

        // buildtools
        try self.getDep(deps, "buildtools", "v8/buildtools");

        // libc++
        try self.getDep(deps, "buildtools/third_party/libc++/trunk", "v8/buildtools/third_party/libc++/trunk");

        // tools/clang
        try self.getDep(deps, "tools/clang", "v8/tools/clang");

        try self.runHook(hooks, "clang");

        // third_party/zlib
        try self.getDep(deps, "third_party/zlib", "v8/third_party/zlib");

        // libc++abi
        try self.getDep(deps, "buildtools/third_party/libc++abi/trunk", "v8/buildtools/third_party/libc++abi/trunk");

        // googletest
        try self.getDep(deps, "third_party/googletest/src", "v8/third_party/googletest/src");

        // trace_event
        try self.getDep(deps, "base/trace_event/common", "v8/base/trace_event/common");

        // jinja2
        try self.getDep(deps, "third_party/jinja2", "v8/third_party/jinja2");

        // markupsafe
        try self.getDep(deps, "third_party/markupsafe", "v8/third_party/markupsafe");

        // For windows.
        if (builtin.os.tag == .windows) {
            // lastchange.py is flaky when it tries to do git commands from subprocess.Popen. Will sometimes get [WinError 50].
            // For now we'll just do it in zig.
            // try self.runHook(hooks, "lastchange");

            const merge_base_sha = "HEAD";
            const commit_filter = "^Change-Id:";
            const grep_arg = try std.fmt.allocPrint(self.b.allocator, "--grep={s}", .{commit_filter});
            const version_info = try self.b.execFromStep(&.{ "git", "-C", "v8/build", "log", "-1", "--format=%H %ct", grep_arg, merge_base_sha }, &self.step);
            const idx = std.mem.indexOfScalar(u8, version_info, ' ').?;
            const commit_timestamp = version_info[idx + 1 ..];

            // build/timestamp.gni expects the file to be just the unix timestamp.
            const write = std.fs.createFileAbsolute(self.b.pathFromRoot("v8/build/util/LASTCHANGE.committime"), .{ .truncate = true }) catch unreachable;
            defer write.close();
            write.writeAll(commit_timestamp) catch unreachable;
        }
    }
};

fn createBuildExeStep(b: *Builder, path: []const u8, target: std.Build.ResolvedTarget, mode: std.builtin.OptimizeMode, use_zig_tc: bool) *std.Build.Step.Compile {
    _ = b.step("exe", "Build exe with main file at -Dpath");

    const basename = std.fs.path.basename(path);
    const i = std.mem.indexOf(u8, basename, ".zig") orelse basename.len;
    const name = basename[0..i];

    const step = b.addExecutable(.{
        .target = target,
        .root_source_file = b.path(path),
        .name = name,
        .optimize = mode,
    }); //FIXED
    //step.setBuildMode(mode);
    //step.setTarget(target);

    step.linkLibC();
    step.addIncludePath(b.path("src"));

    if (mode == .ReleaseSafe) {
        step.root_module.strip = true;
    }

    linkV8(b, step, mode, target, use_zig_tc);

    return step;
}

const PathStat = enum {
    NotExist,
    Directory,
    File,
    SymLink,
    Unknown,
};

fn statPathFromRoot(b: *Builder, path_rel: []const u8) !PathStat {
    const path_abs = b.pathFromRoot(path_rel);
    var file: std.fs.File = undefined;
    if (comptime isMinZigVersion()) {
        file = std.fs.openFileAbsolute(path_abs, .{ .read = false, .write = false }) catch |err| {
            if (err == error.FileNotFound) {
                return .NotExist;
            } else if (err == error.IsDir) {
                return .Directory;
            } else {
                return err;
            }
        };
    } else {
        file = std.fs.openFileAbsolute(path_abs, .{ .mode = std.fs.File.OpenMode.read_only }) catch |err| {
            if (err == error.FileNotFound) {
                return .NotExist;
            } else if (err == error.IsDir) {
                return .Directory;
            } else {
                return err;
            }
        };
    }
    defer file.close();

    const stat = try file.stat();
    switch (stat.kind) {
        .sym_link => return .SymLink,
        .directory => return .Directory,
        .file => return .File,
        else => return .Unknown,
    }
}

fn isMinZigVersion() bool {
    return builtin.zig_version.major == 0 and builtin.zig_version.minor == 9;
}


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomic.h
================================================
/*
 * Copyright (c) 2004-2016 Apple Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _OSATOMIC_H_
#define _OSATOMIC_H_

/*! @header
 * These are deprecated legacy interfaces for atomic and synchronization
 * operations.
 *
 * Define OSATOMIC_USE_INLINED=1 to get inline implementations of the
 * OSAtomic interfaces in terms of the <stdatomic.h> primitives.
 *
 * Define OSSPINLOCK_USE_INLINED=1 to get inline implementations of the
 * OSSpinLock interfaces in terms of the <os/lock.h> primitives.
 *
 * These are intended as a transition convenience, direct use of those
 * primitives should be preferred.
 */

#include <sys/cdefs.h>

#include "OSAtomicDeprecated.h"
#include "OSSpinLockDeprecated.h"
#include "OSAtomicQueue.h"

#endif /* _OSATOMIC_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicDeprecated.h
================================================
/*
 * Copyright (c) 2004-2016 Apple Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _OSATOMIC_DEPRECATED_H_
#define _OSATOMIC_DEPRECATED_H_

/*! @header
 * These are deprecated legacy interfaces for atomic operations.
 * The C11 interfaces in <stdatomic.h> resp. C++11 interfaces in <atomic>
 * should be used instead.
 *
 * Define OSATOMIC_USE_INLINED=1 to get inline implementations of these
 * interfaces in terms of the <stdatomic.h> resp. <atomic> primitives.
 * This is intended as a transition convenience, direct use of those primitives
 * is preferred.
 */

#include    <Availability.h>

#if !(defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED)

#include    <sys/cdefs.h>
#include    <stddef.h>
#include    <stdint.h>
#include    <stdbool.h>

#ifndef OSATOMIC_DEPRECATED
#define OSATOMIC_DEPRECATED 1
#ifndef __cplusplus
#define OSATOMIC_BARRIER_DEPRECATED_MSG(_r) \
		"Use " #_r "() from <stdatomic.h> instead"
#define OSATOMIC_DEPRECATED_MSG(_r) \
		"Use " #_r "_explicit(memory_order_relaxed) from <stdatomic.h> instead"
#else
#define OSATOMIC_BARRIER_DEPRECATED_MSG(_r) \
		"Use std::" #_r "() from <atomic> instead"
#define OSATOMIC_DEPRECATED_MSG(_r) \
		"Use std::" #_r "_explicit(std::memory_order_relaxed) from <atomic> instead"
#endif
#define OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(_r) \
	__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSATOMIC_BARRIER_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSATOMIC_BARRIER_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSATOMIC_BARRIER_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSATOMIC_BARRIER_DEPRECATED_MSG(_r))
#define OSATOMIC_DEPRECATED_REPLACE_WITH(_r) \
	__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSATOMIC_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSATOMIC_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSATOMIC_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSATOMIC_DEPRECATED_MSG(_r))
#else
#undef OSATOMIC_DEPRECATED
#define OSATOMIC_DEPRECATED 0
#define OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(_r)
#define OSATOMIC_DEPRECATED_REPLACE_WITH(_r)
#endif

/*
 * WARNING: all addresses passed to these functions must be "naturally aligned",
 * i.e. <code>int32_t</code> pointers must be 32-bit aligned (low 2 bits of
 * address are zeroes), and <code>int64_t</code> pointers must be 64-bit
 * aligned (low 3 bits of address are zeroes.).
 * Note that this is not the default alignment of the <code>int64_t</code> type
 * in the iOS ARMv7 ABI, see
 * {@link //apple_ref/doc/uid/TP40009021-SW8 iPhoneOSABIReference}
 *
 * Note that some versions of the atomic functions incorporate memory barriers
 * and some do not.  Barriers strictly order memory access on weakly-ordered
 * architectures such as ARM.  All loads and stores that appear (in sequential
 * program order) before the barrier are guaranteed to complete before any
 * load or store that appears after the barrier.
 *
 * The barrier operation is typically a no-op on uniprocessor systems and
 * fully enabled on multiprocessor systems. On some platforms, such as ARM,
 * the barrier can be quite expensive.
 *
 * Most code should use the barrier functions to ensure that memory shared
 * between threads is properly synchronized.  For example, if you want to
 * initialize a shared data structure and then atomically increment a variable
 * to indicate that the initialization is complete, you must use
 * {@link OSAtomicIncrement32Barrier} to ensure that the stores to your data
 * structure complete before the atomic increment.
 *
 * Likewise, the consumer of that data structure must use
 * {@link OSAtomicDecrement32Barrier},
 * in order to ensure that their loads of the structure are not executed before
 * the atomic decrement.  On the other hand, if you are simply incrementing a
 * global counter, then it is safe and potentially faster to use
 * {@link OSAtomicIncrement32}.
 *
 * If you are unsure which version to use, prefer the barrier variants as they
 * are safer.
 *
 * For the kernel-space version of this header, see
 * {@link //apple_ref/doc/header/OSAtomic.h OSAtomic.h (Kernel Framework)}
 *
 * @apiuid //apple_ref/doc/header/user_space_OSAtomic.h
 */

__BEGIN_DECLS

/*! @typedef OSAtomic_int64_aligned64_t
 * 64-bit aligned <code>int64_t</code> type.
 * Use for variables whose addresses are passed to OSAtomic*64() functions to
 * get the compiler to generate the required alignment.
 */

#if __has_attribute(aligned)
typedef int64_t __attribute__((__aligned__((sizeof(int64_t)))))
		OSAtomic_int64_aligned64_t;
#else
typedef int64_t OSAtomic_int64_aligned64_t;
#endif

/*! @group Arithmetic functions
    All functions in this group return the new value.
 */

/*! @abstract Atomically adds two 32-bit values.
    @discussion
	This function adds the value given by <code>__theAmount</code> to the
	value in the memory location referenced by <code>__theValue</code>,
 	storing the result back to that memory location atomically.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicAdd32( int32_t __theAmount, volatile int32_t *__theValue );


/*! @abstract Atomically adds two 32-bit values.
    @discussion
	This function adds the value given by <code>__theAmount</code> to the
	value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicAdd32}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue );


#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT

/*! @abstract Atomically increments a 32-bit value.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int32_t	OSAtomicIncrement32( volatile int32_t *__theValue );


/*! @abstract Atomically increments a 32-bit value with a barrier.
    @discussion
	This function is equivalent to {@link OSAtomicIncrement32}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int32_t	OSAtomicIncrement32Barrier( volatile int32_t *__theValue );


/*! @abstract Atomically decrements a 32-bit value.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int32_t	OSAtomicDecrement32( volatile int32_t *__theValue );


/*! @abstract Atomically decrements a 32-bit value with a barrier.
    @discussion
	This function is equivalent to {@link OSAtomicDecrement32}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int32_t	OSAtomicDecrement32Barrier( volatile int32_t *__theValue );

#else
__inline static
int32_t	OSAtomicIncrement32( volatile int32_t *__theValue )
            { return OSAtomicAdd32(  1, __theValue); }

__inline static
int32_t	OSAtomicIncrement32Barrier( volatile int32_t *__theValue )
            { return OSAtomicAdd32Barrier(  1, __theValue); }

__inline static
int32_t	OSAtomicDecrement32( volatile int32_t *__theValue )
            { return OSAtomicAdd32( -1, __theValue); }

__inline static
int32_t	OSAtomicDecrement32Barrier( volatile int32_t *__theValue )
            { return OSAtomicAdd32Barrier( -1, __theValue); }
#endif


/*! @abstract Atomically adds two 64-bit values.
    @discussion
	This function adds the value given by <code>__theAmount</code> to the
	value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int64_t	OSAtomicAdd64( int64_t __theAmount,
		volatile OSAtomic_int64_aligned64_t *__theValue );


/*! @abstract Atomically adds two 64-bit values with a barrier.
    @discussion
	This function adds the value given by <code>__theAmount</code> to the
	value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicAdd64}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_3_2)
int64_t	OSAtomicAdd64Barrier( int64_t __theAmount,
		volatile OSAtomic_int64_aligned64_t *__theValue );


#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT

/*! @abstract Atomically increments a 64-bit value.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int64_t	OSAtomicIncrement64( volatile OSAtomic_int64_aligned64_t *__theValue );


/*! @abstract Atomically increments a 64-bit value with a barrier.
    @discussion
	This function is equivalent to {@link OSAtomicIncrement64}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int64_t	OSAtomicIncrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue );


/*! @abstract Atomically decrements a 64-bit value.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int64_t	OSAtomicDecrement64( volatile OSAtomic_int64_aligned64_t *__theValue );


/*! @abstract Atomically decrements a 64-bit value with a barrier.
    @discussion
	This function is equivalent to {@link OSAtomicDecrement64}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)
int64_t	OSAtomicDecrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue );

#else
__inline static
int64_t	OSAtomicIncrement64( volatile OSAtomic_int64_aligned64_t *__theValue )
            { return OSAtomicAdd64(  1, __theValue); }

__inline static
int64_t	OSAtomicIncrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue )
            { return OSAtomicAdd64Barrier(  1, __theValue); }

__inline static
int64_t	OSAtomicDecrement64( volatile OSAtomic_int64_aligned64_t *__theValue )
            { return OSAtomicAdd64( -1, __theValue); }

__inline static
int64_t	OSAtomicDecrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue )
            { return OSAtomicAdd64Barrier( -1, __theValue); }
#endif


/*! @group Boolean functions (AND, OR, XOR)
 *
 * @discussion Functions in this group come in four variants for each operation:
 * with and without barriers, and functions that return the original value or
 * the result value of the operation.
 *
 * The "Orig" versions return the original value, (before the operation); the non-Orig
 * versions return the value after the operation.  All are layered on top of
 * {@link OSAtomicCompareAndSwap32} and similar.
 */

/*! @abstract Atomic bitwise OR of two 32-bit values.
    @discussion
	This function performs the bitwise OR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_or)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicOr32( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise OR of two 32-bit values with barrier.
    @discussion
	This function performs the bitwise OR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicOr32}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_or)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicOr32Barrier( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise OR of two 32-bit values returning original.
    @discussion
	This function performs the bitwise OR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the original value referenced by <code>__theValue</code>.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_or)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
int32_t	OSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise OR of two 32-bit values returning original with barrier.
    @discussion
	This function performs the bitwise OR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicOr32Orig}
	except that it also introduces a barrier.
    @result Returns the original value referenced by <code>__theValue</code>.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_or)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
int32_t	OSAtomicOr32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );




/*! @abstract Atomic bitwise AND of two 32-bit values.
    @discussion
	This function performs the bitwise AND of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicAnd32( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise AND of two 32-bit values with barrier.
    @discussion
	This function performs the bitwise AND of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicAnd32}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicAnd32Barrier( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise AND of two 32-bit values returning original.
    @discussion
	This function performs the bitwise AND of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the original value referenced by <code>__theValue</code>.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
int32_t	OSAtomicAnd32Orig( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise AND of two 32-bit values returning original with barrier.
    @discussion
	This function performs the bitwise AND of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicAnd32Orig}
	except that it also introduces a barrier.
    @result Returns the original value referenced by <code>__theValue</code>.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
int32_t	OSAtomicAnd32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );




/*! @abstract Atomic bitwise XOR of two 32-bit values.
    @discussion
	This function performs the bitwise XOR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the new value.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicXor32( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise XOR of two 32-bit values with barrier.
    @discussion
	This function performs the bitwise XOR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicXor32}
	except that it also introduces a barrier.
    @result Returns the new value.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
int32_t	OSAtomicXor32Barrier( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise XOR of two 32-bit values returning original.
    @discussion
	This function performs the bitwise XOR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.
    @result Returns the original value referenced by <code>__theValue</code>.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
int32_t	OSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @abstract Atomic bitwise XOR of two 32-bit values returning original with barrier.
    @discussion
	This function performs the bitwise XOR of the value given by <code>__theMask</code>
	with the value in the memory location referenced by <code>__theValue</code>,
	storing the result back to that memory location atomically.

	This function is equivalent to {@link OSAtomicXor32Orig}
	except that it also introduces a barrier.
    @result Returns the original value referenced by <code>__theValue</code>.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
int32_t	OSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );


/*! @group Compare and swap
 * Functions in this group return true if the swap occured.  There are several versions,
 * depending on data type and on whether or not a barrier is used.
 */


/*! @abstract Compare and swap for 32-bit values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicCompareAndSwap32( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue );


/*! @abstract Compare and swap for 32-bit values with barrier.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwap32}
	except that it also introduces a barrier.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicCompareAndSwap32Barrier( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue );


/*! @abstract Compare and swap pointers.
    @discussion
	This function compares the pointer stored in <code>__oldValue</code> to the pointer
	in the memory location referenced by <code>__theValue</code>.  If the pointers
	match, this function stores the pointer from <code>__newValue</code> into
	that memory location atomically.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
bool	OSAtomicCompareAndSwapPtr( void *__oldValue, void *__newValue, void * volatile *__theValue );


/*! @abstract Compare and swap pointers with barrier.
    @discussion
	This function compares the pointer stored in <code>__oldValue</code> to the pointer
	in the memory location referenced by <code>__theValue</code>.  If the pointers
	match, this function stores the pointer from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwapPtr}
	except that it also introduces a barrier.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
bool	OSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue );


/*! @abstract Compare and swap for <code>int</code> values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwap32}.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
bool	OSAtomicCompareAndSwapInt( int __oldValue, int __newValue, volatile int *__theValue );


/*! @abstract Compare and swap for <code>int</code> values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwapInt}
	except that it also introduces a barrier.

	This function is equivalent to {@link OSAtomicCompareAndSwap32Barrier}.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
bool	OSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile int *__theValue );


/*! @abstract Compare and swap for <code>long</code> values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
	or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
bool	OSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long *__theValue );


/*! @abstract Compare and swap for <code>long</code> values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwapLong}
	except that it also introduces a barrier.

	This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
	or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)
bool	OSAtomicCompareAndSwapLongBarrier( long __oldValue, long __newValue, volatile long *__theValue );


/*! @abstract Compare and swap for <code>uint64_t</code> values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue,
		volatile OSAtomic_int64_aligned64_t *__theValue );


/*! @abstract Compare and swap for <code>uint64_t</code> values.
    @discussion
	This function compares the value in <code>__oldValue</code> to the value
	in the memory location referenced by <code>__theValue</code>.  If the values
	match, this function stores the value from <code>__newValue</code> into
	that memory location atomically.

	This function is equivalent to {@link OSAtomicCompareAndSwap64}
	except that it also introduces a barrier.
    @result Returns TRUE on a match, FALSE otherwise.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_3_2)
bool    OSAtomicCompareAndSwap64Barrier( int64_t __oldValue, int64_t __newValue,
		volatile OSAtomic_int64_aligned64_t *__theValue );


/* Test and set.
 * They return the original value of the bit, and operate on bit (0x80>>(n&7))
 * in byte ((char*)theAddress + (n>>3)).
 */
/*! @abstract Atomic test and set
    @discussion
	This function tests a bit in the value referenced by
	<code>__theAddress</code> and if it is not set, sets it.

	The bit is chosen by the value of <code>__n</code> such that the
	operation will be performed on bit <code>(0x80 >> (__n & 7))</code>
	of byte <code>((char *)__theAddress + (n >> 3))</code>.

	For example, if <code>__theAddress</code> points to a 64-bit value,
	to compare the value of the most significant bit, you would specify
	<code>56</code> for <code>__n</code>.
    @result
	Returns the original value of the bit being tested.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_or)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicTestAndSet( uint32_t __n, volatile void *__theAddress );


/*! @abstract Atomic test and set with barrier
    @discussion
	This function tests a bit in the value referenced by <code>__theAddress</code>
	and if it is not set, sets it.

	The bit is chosen by the value of <code>__n</code> such that the
	operation will be performed on bit <code>(0x80 >> (__n & 7))</code>
	of byte <code>((char *)__theAddress + (n >> 3))</code>.

	For example, if <code>__theAddress</code> points to a 64-bit value,
	to compare the value of the most significant bit, you would specify
	<code>56</code> for <code>__n</code>.

	This function is equivalent to {@link OSAtomicTestAndSet}
	except that it also introduces a barrier.
    @result
	Returns the original value of the bit being tested.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_or)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress );



/*! @abstract Atomic test and clear
    @discussion
	This function tests a bit in the value referenced by <code>__theAddress</code>
	and if it is not cleared, clears it.

	The bit is chosen by the value of <code>__n</code> such that the
	operation will be performed on bit <code>(0x80 >> (__n & 7))</code>
	of byte <code>((char *)__theAddress + (n >> 3))</code>.

	For example, if <code>__theAddress</code> points to a 64-bit value,
	to compare the value of the most significant bit, you would specify
	<code>56</code> for <code>__n</code>.

    @result
	Returns the original value of the bit being tested.
 */
OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );


/*! @abstract Atomic test and clear
    @discussion
	This function tests a bit in the value referenced by <code>__theAddress</code>
	and if it is not cleared, clears it.

	The bit is chosen by the value of <code>__n</code> such that the
	operation will be performed on bit <code>(0x80 >> (__n & 7))</code>
	of byte <code>((char *)__theAddress + (n >> 3))</code>.

	For example, if <code>__theAddress</code> points to a 64-bit value,
	to compare the value of the most significant bit, you would specify
	<code>56</code> for <code>__n</code>.

	This function is equivalent to {@link OSAtomicTestAndSet}
	except that it also introduces a barrier.
    @result
	Returns the original value of the bit being tested.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress );


/*! @group Memory barriers */

/*! @abstract Memory barrier.
    @discussion
	This function serves as both a read and write barrier.
 */
OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_thread_fence)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
void    OSMemoryBarrier( void );

__END_DECLS

#else // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED

/*
 * Inline implementations of the legacy OSAtomic interfaces in terms of
 * C11 <stdatomic.h> resp. C++11 <atomic> primitives.
 * Direct use of those primitives is preferred.
 */

#include <sys/cdefs.h>

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C++" {
#if !(__has_include(<atomic>) && __has_extension(cxx_atomic))
#error Cannot use inlined OSAtomic without <atomic> and C++11 atomics
#endif
#include <atomic>
typedef std::atomic<uint8_t> _OSAtomic_uint8_t;
typedef std::atomic<int32_t> _OSAtomic_int32_t;
typedef std::atomic<uint32_t> _OSAtomic_uint32_t;
typedef std::atomic<int64_t> _OSAtomic_int64_t;
typedef std::atomic<void*> _OSAtomic_void_ptr_t;
#define OSATOMIC_STD(_a) std::_a
__BEGIN_DECLS
#else
#if !(__has_include(<stdatomic.h>) && __has_extension(c_atomic))
#error Cannot use inlined OSAtomic without <stdatomic.h> and C11 atomics
#endif
#include <stdatomic.h>
typedef _Atomic(uint8_t) _OSAtomic_uint8_t;
typedef _Atomic(int32_t) _OSAtomic_int32_t;
typedef _Atomic(uint32_t) _OSAtomic_uint32_t;
typedef _Atomic(int64_t) _OSAtomic_int64_t;
typedef _Atomic(void*) _OSAtomic_void_ptr_t;
#define OSATOMIC_STD(_a) _a
#endif

#if __has_extension(c_alignof) && __has_attribute(aligned)
typedef int64_t __attribute__((__aligned__(_Alignof(_OSAtomic_int64_t))))
		OSAtomic_int64_aligned64_t;
#elif __has_attribute(aligned)
typedef int64_t __attribute__((__aligned__((sizeof(_OSAtomic_int64_t)))))
		OSAtomic_int64_aligned64_t;
#else
typedef int64_t OSAtomic_int64_aligned64_t;
#endif

#if __has_attribute(always_inline)
#define OSATOMIC_INLINE static __inline __attribute__((__always_inline__))
#else
#define OSATOMIC_INLINE static __inline
#endif

OSATOMIC_INLINE
int32_t
OSAtomicAdd32(int32_t __theAmount, volatile int32_t *__theValue)
{
	return (OSATOMIC_STD(atomic_fetch_add_explicit)(
			(volatile _OSAtomic_int32_t*) __theValue, __theAmount,
			OSATOMIC_STD(memory_order_relaxed)) + __theAmount);
}

OSATOMIC_INLINE
int32_t
OSAtomicAdd32Barrier(int32_t __theAmount, volatile int32_t *__theValue)
{
	return (OSATOMIC_STD(atomic_fetch_add_explicit)(
			(volatile _OSAtomic_int32_t*) __theValue, __theAmount,
			OSATOMIC_STD(memory_order_seq_cst)) + __theAmount);
}

OSATOMIC_INLINE
int32_t
OSAtomicIncrement32(volatile int32_t *__theValue)
{
	return OSAtomicAdd32(1, __theValue);
}

OSATOMIC_INLINE
int32_t
OSAtomicIncrement32Barrier(volatile int32_t *__theValue)
{
	return OSAtomicAdd32Barrier(1, __theValue);
}

OSATOMIC_INLINE
int32_t
OSAtomicDecrement32(volatile int32_t *__theValue)
{
	return OSAtomicAdd32(-1, __theValue);
}

OSATOMIC_INLINE
int32_t
OSAtomicDecrement32Barrier(volatile int32_t *__theValue)
{
	return OSAtomicAdd32Barrier(-1, __theValue);
}

OSATOMIC_INLINE
int64_t
OSAtomicAdd64(int64_t __theAmount,
		volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return (OSATOMIC_STD(atomic_fetch_add_explicit)(
			(volatile _OSAtomic_int64_t*) __theValue, __theAmount,
			OSATOMIC_STD(memory_order_relaxed)) + __theAmount);
}

OSATOMIC_INLINE
int64_t
OSAtomicAdd64Barrier(int64_t __theAmount,
		volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return (OSATOMIC_STD(atomic_fetch_add_explicit)(
			(volatile _OSAtomic_int64_t*) __theValue, __theAmount,
			OSATOMIC_STD(memory_order_seq_cst)) + __theAmount);
}

OSATOMIC_INLINE
int64_t
OSAtomicIncrement64(volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return OSAtomicAdd64(1, __theValue);
}

OSATOMIC_INLINE
int64_t
OSAtomicIncrement64Barrier(volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return OSAtomicAdd64Barrier(1, __theValue);
}

OSATOMIC_INLINE
int64_t
OSAtomicDecrement64(volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return OSAtomicAdd64(-1, __theValue);
}

OSATOMIC_INLINE
int64_t
OSAtomicDecrement64Barrier(volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return OSAtomicAdd64Barrier(-1, __theValue);
}

OSATOMIC_INLINE
int32_t
OSAtomicOr32(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_relaxed)) | __theMask);
}

OSATOMIC_INLINE
int32_t
OSAtomicOr32Barrier(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_seq_cst)) | __theMask);
}

OSATOMIC_INLINE
int32_t
OSAtomicOr32Orig(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
int32_t
OSAtomicOr32OrigBarrier(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_seq_cst)));
}

OSATOMIC_INLINE
int32_t
OSAtomicAnd32(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_relaxed)) & __theMask);
}

OSATOMIC_INLINE
int32_t
OSAtomicAnd32Barrier(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_seq_cst)) & __theMask);
}

OSATOMIC_INLINE
int32_t
OSAtomicAnd32Orig(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
int32_t
OSAtomicAnd32OrigBarrier(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_seq_cst)));
}

OSATOMIC_INLINE
int32_t
OSAtomicXor32(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_relaxed)) ^ __theMask);
}

OSATOMIC_INLINE
int32_t
OSAtomicXor32Barrier(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_seq_cst)) ^ __theMask);
}

OSATOMIC_INLINE
int32_t
OSAtomicXor32Orig(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
int32_t
OSAtomicXor32OrigBarrier(uint32_t __theMask, volatile uint32_t *__theValue)
{
	return (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(
			(volatile _OSAtomic_uint32_t*)__theValue, __theMask,
			OSATOMIC_STD(memory_order_seq_cst)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwap32(int32_t __oldValue, int32_t __newValue,
		volatile int32_t *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile _OSAtomic_int32_t*)__theValue, &__oldValue, __newValue,
			OSATOMIC_STD(memory_order_relaxed),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwap32Barrier(int32_t __oldValue, int32_t __newValue,
		volatile int32_t *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile _OSAtomic_int32_t*)__theValue, &__oldValue, __newValue,
			OSATOMIC_STD(memory_order_seq_cst),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwapPtr(void *__oldValue, void *__newValue,
		void * volatile *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile _OSAtomic_void_ptr_t*)__theValue, &__oldValue, __newValue,
			OSATOMIC_STD(memory_order_relaxed),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwapPtrBarrier(void *__oldValue, void *__newValue,
		void * volatile *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile _OSAtomic_void_ptr_t*)__theValue, &__oldValue, __newValue,
			OSATOMIC_STD(memory_order_seq_cst),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwapInt(int __oldValue, int __newValue,
		volatile int *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile OSATOMIC_STD(atomic_int)*)__theValue, &__oldValue,
			__newValue, OSATOMIC_STD(memory_order_relaxed),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwapIntBarrier(int __oldValue, int __newValue,
		volatile int *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile OSATOMIC_STD(atomic_int)*)__theValue, &__oldValue,
			__newValue, OSATOMIC_STD(memory_order_seq_cst),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwapLong(long __oldValue, long __newValue,
		volatile long *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile OSATOMIC_STD(atomic_long)*)__theValue, &__oldValue,
			__newValue, OSATOMIC_STD(memory_order_relaxed),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwapLongBarrier(long __oldValue, long __newValue,
		volatile long *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile OSATOMIC_STD(atomic_long)*)__theValue, &__oldValue,
			__newValue, OSATOMIC_STD(memory_order_seq_cst),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwap64(int64_t __oldValue, int64_t __newValue,
		volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile _OSAtomic_int64_t*)__theValue, &__oldValue, __newValue,
			OSATOMIC_STD(memory_order_relaxed),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicCompareAndSwap64Barrier(int64_t __oldValue, int64_t __newValue,
		volatile OSAtomic_int64_aligned64_t *__theValue)
{
	return (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(
			(volatile _OSAtomic_int64_t*)__theValue, &__oldValue, __newValue,
			OSATOMIC_STD(memory_order_seq_cst),
			OSATOMIC_STD(memory_order_relaxed)));
}

OSATOMIC_INLINE
bool
OSAtomicTestAndSet(uint32_t __n, volatile void *__theAddress)
{
	uintptr_t a = (uintptr_t)__theAddress + (__n >> 3);
	uint8_t v = (0x80u >> (__n & 7));
	return (OSATOMIC_STD(atomic_fetch_or_explicit)((_OSAtomic_uint8_t*)a, v,
			OSATOMIC_STD(memory_order_relaxed)) & v);
}

OSATOMIC_INLINE
bool
OSAtomicTestAndSetBarrier(uint32_t __n, volatile void *__theAddress)
{
	uintptr_t a = (uintptr_t)__theAddress + (__n >> 3);
	uint8_t v = (0x80u >> (__n & 7));
	return (OSATOMIC_STD(atomic_fetch_or_explicit)((_OSAtomic_uint8_t*)a, v,
			OSATOMIC_STD(memory_order_seq_cst)) & v);
}

OSATOMIC_INLINE
bool
OSAtomicTestAndClear(uint32_t __n, volatile void *__theAddress)
{
	uintptr_t a = (uintptr_t)__theAddress + (__n >> 3);
	uint8_t v = (0x80u >> (__n & 7));
	return (OSATOMIC_STD(atomic_fetch_and_explicit)((_OSAtomic_uint8_t*)a,
			(uint8_t)~v, OSATOMIC_STD(memory_order_relaxed)) & v);
}

OSATOMIC_INLINE
bool
OSAtomicTestAndClearBarrier(uint32_t __n, volatile void *__theAddress)
{
	uintptr_t a = (uintptr_t)__theAddress + (__n >> 3);
	uint8_t v = (0x80u >> (__n & 7));
	return (OSATOMIC_STD(atomic_fetch_and_explicit)((_OSAtomic_uint8_t*)a,
			(uint8_t)~v, OSATOMIC_STD(memory_order_seq_cst)) & v);
}

OSATOMIC_INLINE
void
OSMemoryBarrier(void)
{
	OSATOMIC_STD(atomic_thread_fence)(OSATOMIC_STD(memory_order_seq_cst));
}

#undef OSATOMIC_INLINE
#undef OSATOMIC_STD
#ifdef __cplusplus
__END_DECLS
} // extern "C++"
#endif

#endif // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED

#if TARGET_OS_OSX || TARGET_OS_DRIVERKIT

__BEGIN_DECLS

/*! @group Lockless atomic fifo enqueue and dequeue
 * These routines manipulate singly-linked FIFO lists.
 *
 * This API is deprecated and no longer recommended
 */

/*! @abstract The data structure for a fifo queue head.
    @discussion
	You should always initialize a fifo queue head structure with the
	initialization vector {@link OS_ATOMIC_FIFO_QUEUE_INIT} before use.
 */
#if defined(__LP64__)

typedef	volatile struct {
	void	*opaque1;
	void	*opaque2;
	int	 opaque3;
} __attribute__ ((aligned (16))) OSFifoQueueHead;

#else

typedef	volatile struct {
	void	*opaque1;
	void	*opaque2;
	int	 opaque3;
} OSFifoQueueHead;

#endif
/*! @abstract The initialization vector for a fifo queue head. */
#define OS_ATOMIC_FIFO_QUEUE_INIT   { NULL, NULL, 0 }

/*! @abstract Enqueue an element onto a list.
    @discussion
	Memory barriers are incorporated as needed to permit thread-safe access
	to the queue element.
    @param __list
	The list on which you want to enqueue the element.
    @param __new
	The element to add.
    @param __offset
	The "offset" parameter is the offset (in bytes) of the link field
	from the beginning of the data structure being queued (<code>__new</code>).
	The link field should be a pointer type.
	The <code>__offset</code> value needs to be same for all enqueuing and
	dequeuing operations on the same list, even if different structure types
	are enqueued on that list.  The use of <code>offsetset()</code>, defined in
	<code>stddef.h</code> is the common way to specify the <code>__offset</code>
	value.

	@note
	This API is deprecated and no longer recommended
 */
__API_DEPRECATED("No longer supported", macos(10.7, 11.0))
void  OSAtomicFifoEnqueue( OSFifoQueueHead *__list, void *__new, size_t __offset);

/*! @abstract Dequeue an element from a list.
    @discussion
	Memory barriers are incorporated as needed to permit thread-safe access
	to the queue element.
    @param __list
	The list from which you want to dequeue an element.
    @param __offset
	The "offset" parameter is the offset (in bytes) of the link field
	from the beginning of the data structure being dequeued (<code>__new</code>).
	The link field should be a pointer type.
	The <code>__offset</code> value needs to be same for all enqueuing and
	dequeuing operations on the same list, even if different structure types
	are enqueued on that list.  The use of <code>offsetset()</code>, defined in
	<code>stddef.h</code> is the common way to specify the <code>__offset</code>
	value.
    @result
	Returns the oldest enqueued element, or <code>NULL</code> if the
	list is empty.

	@note
	This API is deprecated and no longer recommended
 */
__API_DEPRECATED("No longer supported", macos(10.7, 11.0))
void* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset);

__END_DECLS

#endif /* TARGET_OS_OSX || TARGET_OS_DRIVERKIT */

#endif /* _OSATOMIC_DEPRECATED_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicQueue.h
================================================
/*
 * Copyright (c) 2004-2016 Apple Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _OSATOMICQUEUE_H_
#define _OSATOMICQUEUE_H_

#include    <stddef.h>
#include    <sys/cdefs.h>
#include    <stdint.h>
#include    <stdbool.h>
#include    "OSAtomicDeprecated.h"

#include    <Availability.h>

/*! @header Lockless atomic enqueue and dequeue
 * These routines manipulate singly-linked LIFO lists.
 */

__BEGIN_DECLS

/*! @abstract The data structure for a queue head.
    @discussion
	You should always initialize a queue head structure with the
	initialization vector {@link OS_ATOMIC_QUEUE_INIT} before use.
 */
#if defined(__LP64__)

typedef volatile struct {
	void	*opaque1;
	long	 opaque2;
} __attribute__ ((aligned (16))) OSQueueHead;

#else

typedef volatile struct {
	void	*opaque1;
	long	 opaque2;
} OSQueueHead;

#endif

/*! @abstract The initialization vector for a queue head. */
#define	OS_ATOMIC_QUEUE_INIT	{ NULL, 0 }

/*! @abstract Enqueue an element onto a list.
    @discussion
	Memory barriers are incorporated as needed to permit thread-safe access
	to the queue element.
    @param __list
	The list on which you want to enqueue the element.
    @param __new
	The element to add.
    @param __offset
	The "offset" parameter is the offset (in bytes) of the link field
	from the beginning of the data structure being queued (<code>__new</code>).
	The link field should be a pointer type.
	The <code>__offset</code> value needs to be same for all enqueuing and
	dequeuing operations on the same list, even if different structure types
	are enqueued on that list.  The use of <code>offsetset()</code>, defined in
	<code>stddef.h</code> is the common way to specify the <code>__offset</code>
	value.
 */
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)
void  OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset);


/*! @abstract Dequeue an element from a list.
    @discussion
	Memory barriers are incorporated as needed to permit thread-safe access
	to the queue element.
    @param __list
	The list from which you want to dequeue an element.
    @param __offset
	The "offset" parameter is the offset (in bytes) of the link field
	from the beginning of the data structure being dequeued (<code>__new</code>).
	The link field should be a pointer type.
	The <code>__offset</code> value needs to be same for all enqueuing and
	dequeuing operations on the same list, even if different structure types
	are enqueued on that list.  The use of <code>offsetset()</code>, defined in
	<code>stddef.h</code> is the common way to specify the <code>__offset</code>
	value.
	IMPORTANT: the memory backing the link field of a queue element must not be
	unmapped after OSAtomicDequeue() returns until all concurrent calls to
	OSAtomicDequeue() for the same list on other threads have also returned,
	as they may still be accessing that memory location.
    @result
	Returns the most recently enqueued element, or <code>NULL</code> if the
	list is empty.
 */
__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)
void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset);

__END_DECLS

#endif /* _OSATOMICQUEUE_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSByteOrder.h
================================================
/*
 * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#ifndef _OS_OSBYTEORDER_H
#define _OS_OSBYTEORDER_H

#include <stdint.h>
#include <libkern/_OSByteOrder.h>

/* Macros for swapping constant values in the preprocessing stage. */
#define OSSwapConstInt16(x)     __DARWIN_OSSwapConstInt16(x)
#define OSSwapConstInt32(x)     __DARWIN_OSSwapConstInt32(x)
#define OSSwapConstInt64(x)     __DARWIN_OSSwapConstInt64(x)

#if !defined(__DARWIN_OS_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#        define __DARWIN_OS_INLINE static inline
# elif defined(__MWERKS__) || defined(__cplusplus)
#        define __DARWIN_OS_INLINE static inline
# else
#        define __DARWIN_OS_INLINE static __inline__
# endif
#endif

#if defined(__GNUC__)

#if (defined(__i386__) || defined(__x86_64__))
#include <libkern/i386/OSByteOrder.h>
#elif defined (__arm__) || defined(__arm64__)
#include <libkern/arm/OSByteOrder.h>
#else
#include <libkern/machine/OSByteOrder.h>
#endif

#else /* ! __GNUC__ */

#include <libkern/machine/OSByteOrder.h>

#endif /* __GNUC__ */

#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)
#define OSSwapInt32(x)  __DARWIN_OSSwapInt32(x)
#define OSSwapInt64(x)  __DARWIN_OSSwapInt64(x)

enum {
	OSUnknownByteOrder,
	OSLittleEndian,
	OSBigEndian
};

__DARWIN_OS_INLINE
int32_t
OSHostByteOrder(void)
{
#if defined(__LITTLE_ENDIAN__)
	return OSLittleEndian;
#elif defined(__BIG_ENDIAN__)
	return OSBigEndian;
#else
	return OSUnknownByteOrder;
#endif
}

#define OSReadBigInt(x, y)              OSReadBigInt32(x, y)
#define OSWriteBigInt(x, y, z)          OSWriteBigInt32(x, y, z)
#define OSSwapBigToHostInt(x)           OSSwapBigToHostInt32(x)
#define OSSwapHostToBigInt(x)           OSSwapHostToBigInt32(x)
#define OSReadLittleInt(x, y)           OSReadLittleInt32(x, y)
#define OSWriteLittleInt(x, y, z)       OSWriteLittleInt32(x, y, z)
#define OSSwapHostToLittleInt(x)        OSSwapHostToLittleInt32(x)
#define OSSwapLittleToHostInt(x)        OSSwapLittleToHostInt32(x)

/* Functions for loading native endian values. */

__DARWIN_OS_INLINE
uint16_t
_OSReadInt16(
	const volatile void               * base,
	uintptr_t                     byteOffset
	)
{
	return *(volatile uint16_t *)((uintptr_t)base + byteOffset);
}

__DARWIN_OS_INLINE
uint32_t
_OSReadInt32(
	const volatile void               * base,
	uintptr_t                     byteOffset
	)
{
	return *(volatile uint32_t *)((uintptr_t)base + byteOffset);
}

__DARWIN_OS_INLINE
uint64_t
_OSReadInt64(
	const volatile void               * base,
	uintptr_t                     byteOffset
	)
{
	return *(volatile uint64_t *)((uintptr_t)base + byteOffset);
}

/* Functions for storing native endian values. */

__DARWIN_OS_INLINE
void
_OSWriteInt16(
	volatile void               * base,
	uintptr_t                     byteOffset,
	uint16_t                      data
	)
{
	*(volatile uint16_t *)((uintptr_t)base + byteOffset) = data;
}

__DARWIN_OS_INLINE
void
_OSWriteInt32(
	volatile void               * base,
	uintptr_t                     byteOffset,
	uint32_t                      data
	)
{
	*(volatile uint32_t *)((uintptr_t)base + byteOffset) = data;
}

__DARWIN_OS_INLINE
void
_OSWriteInt64(
	volatile void               * base,
	uintptr_t                     byteOffset,
	uint64_t                      data
	)
{
	*(volatile uint64_t *)((uintptr_t)base + byteOffset) = data;
}

#if             defined(__BIG_ENDIAN__)

/* Functions for loading big endian to host endianess. */

#define OSReadBigInt16(base, byteOffset) _OSReadInt16(base, byteOffset)
#define OSReadBigInt32(base, byteOffset) _OSReadInt32(base, byteOffset)
#define OSReadBigInt64(base, byteOffset) _OSReadInt64(base, byteOffset)

/* Functions for storing host endianess to big endian. */

#define OSWriteBigInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data)
#define OSWriteBigInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data)
#define OSWriteBigInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data)

/* Functions for loading little endian to host endianess. */

#define OSReadLittleInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset)
#define OSReadLittleInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset)
#define OSReadLittleInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset)

/* Functions for storing host endianess to little endian. */

#define OSWriteLittleInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data)
#define OSWriteLittleInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data)
#define OSWriteLittleInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data)

/* Host endianess to big endian byte swapping macros for constants. */

#define OSSwapHostToBigConstInt16(x) ((uint16_t)(x))
#define OSSwapHostToBigConstInt32(x) ((uint32_t)(x))
#define OSSwapHostToBigConstInt64(x) ((uint64_t)(x))

/* Generic host endianess to big endian byte swapping functions. */

#define OSSwapHostToBigInt16(x) ((uint16_t)(x))
#define OSSwapHostToBigInt32(x) ((uint32_t)(x))
#define OSSwapHostToBigInt64(x) ((uint64_t)(x))

/* Host endianess to little endian byte swapping macros for constants. */

#define OSSwapHostToLittleConstInt16(x) OSSwapConstInt16(x)
#define OSSwapHostToLittleConstInt32(x) OSSwapConstInt32(x)
#define OSSwapHostToLittleConstInt64(x) OSSwapConstInt64(x)

/* Generic host endianess to little endian byte swapping functions. */

#define OSSwapHostToLittleInt16(x) OSSwapInt16(x)
#define OSSwapHostToLittleInt32(x) OSSwapInt32(x)
#define OSSwapHostToLittleInt64(x) OSSwapInt64(x)

/* Big endian to host endianess byte swapping macros for constants. */

#define OSSwapBigToHostConstInt16(x) ((uint16_t)(x))
#define OSSwapBigToHostConstInt32(x) ((uint32_t)(x))
#define OSSwapBigToHostConstInt64(x) ((uint64_t)(x))

/* Generic big endian to host endianess byte swapping functions. */

#define OSSwapBigToHostInt16(x) ((uint16_t)(x))
#define OSSwapBigToHostInt32(x) ((uint32_t)(x))
#define OSSwapBigToHostInt64(x) ((uint64_t)(x))

/* Little endian to host endianess byte swapping macros for constants. */

#define OSSwapLittleToHostConstInt16(x) OSSwapConstInt16(x)
#define OSSwapLittleToHostConstInt32(x) OSSwapConstInt32(x)
#define OSSwapLittleToHostConstInt64(x) OSSwapConstInt64(x)

/* Generic little endian to host endianess byte swapping functions. */

#define OSSwapLittleToHostInt16(x) OSSwapInt16(x)
#define OSSwapLittleToHostInt32(x) OSSwapInt32(x)
#define OSSwapLittleToHostInt64(x) OSSwapInt64(x)

#elif           defined(__LITTLE_ENDIAN__)

/* Functions for loading big endian to host endianess. */

#define OSReadBigInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset)
#define OSReadBigInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset)
#define OSReadBigInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset)

/* Functions for storing host endianess to big endian. */

#define OSWriteBigInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data)
#define OSWriteBigInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data)
#define OSWriteBigInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data)

/* Functions for loading little endian to host endianess. */

#define OSReadLittleInt16(base, byteOffset) _OSReadInt16(base, byteOffset)
#define OSReadLittleInt32(base, byteOffset) _OSReadInt32(base, byteOffset)
#define OSReadLittleInt64(base, byteOffset) _OSReadInt64(base, byteOffset)

/* Functions for storing host endianess to little endian. */

#define OSWriteLittleInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data)
#define OSWriteLittleInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data)
#define OSWriteLittleInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data)

/* Host endianess to big endian byte swapping macros for constants. */

#define OSSwapHostToBigConstInt16(x) OSSwapConstInt16(x)
#define OSSwapHostToBigConstInt32(x) OSSwapConstInt32(x)
#define OSSwapHostToBigConstInt64(x) OSSwapConstInt64(x)

/* Generic host endianess to big endian byte swapping functions. */

#define OSSwapHostToBigInt16(x) OSSwapInt16(x)
#define OSSwapHostToBigInt32(x) OSSwapInt32(x)
#define OSSwapHostToBigInt64(x) OSSwapInt64(x)

/* Host endianess to little endian byte swapping macros for constants. */

#define OSSwapHostToLittleConstInt16(x) ((uint16_t)(x))
#define OSSwapHostToLittleConstInt32(x) ((uint32_t)(x))
#define OSSwapHostToLittleConstInt64(x) ((uint64_t)(x))

/* Generic host endianess to little endian byte swapping functions. */

#define OSSwapHostToLittleInt16(x) ((uint16_t)(x))
#define OSSwapHostToLittleInt32(x) ((uint32_t)(x))
#define OSSwapHostToLittleInt64(x) ((uint64_t)(x))

/* Big endian to host endianess byte swapping macros for constants. */

#define OSSwapBigToHostConstInt16(x) OSSwapConstInt16(x)
#define OSSwapBigToHostConstInt32(x) OSSwapConstInt32(x)
#define OSSwapBigToHostConstInt64(x) OSSwapConstInt64(x)

/* Generic big endian to host endianess byte swapping functions. */

#define OSSwapBigToHostInt16(x) OSSwapInt16(x)
#define OSSwapBigToHostInt32(x) OSSwapInt32(x)
#define OSSwapBigToHostInt64(x) OSSwapInt64(x)

/* Little endian to host endianess byte swapping macros for constants. */

#define OSSwapLittleToHostConstInt16(x) ((uint16_t)(x))
#define OSSwapLittleToHostConstInt32(x) ((uint32_t)(x))
#define OSSwapLittleToHostConstInt64(x) ((uint64_t)(x))

/* Generic little endian to host endianess byte swapping functions. */

#define OSSwapLittleToHostInt16(x) ((uint16_t)(x))
#define OSSwapLittleToHostInt32(x) ((uint32_t)(x))
#define OSSwapLittleToHostInt64(x) ((uint64_t)(x))

#else
#error Unknown endianess.
#endif

#endif /* ! _OS_OSBYTEORDER_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSCacheControl.h
================================================
/*
 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _OS_CACHE_CONTROL_H_
#define _OS_CACHE_CONTROL_H_

#include    <stddef.h>
#include    <sys/cdefs.h>
#include    <stdint.h>
#include    <Availability.h>

__BEGIN_DECLS


/* Functions performed by sys_cache_control(): */

/* Prepare memory for execution.  This should be called
 * after writing machine instructions to memory, before
 * executing them.  It syncs the dcache and icache.
 * On IA32 processors this function is a NOP, because
 * no synchronization is required.
 */
#define	kCacheFunctionPrepareForExecution	1

/* Flush data cache(s).  This ensures that cached data 
 * makes it all the way out to DRAM, and then removes
 * copies of the data from all processor caches.
 * It can be useful when dealing with cache incoherent
 * devices or DMA.
 */
#define	kCacheFunctionFlushDcache	2


/* perform one of the above cache functions: */
int	sys_cache_control( int function, void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
 
/* equivalent to sys_cache_control(kCacheFunctionPrepareForExecution): */
void	sys_icache_invalidate( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);

/* equivalent to sys_cache_control(kCacheFunctionFlushDcache): */
void	sys_dcache_flush( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);


__END_DECLS

#endif /* _OS_CACHE_CONTROL_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSDebug.h
================================================
/*
 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */
/*
 * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
 *
 * HISTORY
 *
 */

#ifndef _OS_OSDEBBUG_H
#define _OS_OSDEBBUG_H

#include <sys/cdefs.h>
#include <mach/mach_types.h>

__BEGIN_DECLS

extern int log_leaks;

/* Use kernel_debug() to log a backtrace */
extern void trace_backtrace(unsigned int debugid, unsigned int debugid2, unsigned long size, unsigned long data);
/* Report a message with a 4 entry backtrace - very slow */
extern void OSReportWithBacktrace(const char *str, ...);
extern unsigned OSBacktrace(void **bt, unsigned maxAddrs);

/* Simple dump of 20 backtrace entries */
extern void OSPrintBacktrace(void);

/*! @function OSKernelStackRemaining
 *   @abstract Returns bytes available below the current stack frame.
 *   @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context.
 *   @result Approximate byte count available. */

vm_offset_t OSKernelStackRemaining( void );

__END_DECLS

#define TRACE_MACHLEAKS(a, b, c, d)        \
do {                                    \
    if (__builtin_expect(!!log_leaks, 0))                      \
	trace_backtrace(a,b,c,d);       \
} while(0)

#endif /* !_OS_OSDEBBUG_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSKextLib.h
================================================
/*
 * Copyright (c) 2008 Apple Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#ifndef _LIBKERN_OSKEXTLIB_H
#define _LIBKERN_OSKEXTLIB_H

#include <sys/cdefs.h>
__BEGIN_DECLS

#include <stdint.h>
#include <mach/kmod.h>
#include <mach/vm_types.h>
#include <uuid/uuid.h>

#include <libkern/OSReturn.h>

/*!
 * @header
 *
 * Declares functions, basic return values, and other constants
 * related to kernel extensions (kexts).
 */

#if PRAGMA_MARK
#pragma mark -
/********************************************************************/
#pragma mark OSReturn Values for Kernel Extensions
/********************************************************************/
#endif
/*!
 * @group OSReturn Values for Kernel Extensions
 * Many kext-related functions return these values,
 * as well as those defined under
 * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code>
 * and other variants of <code>kern_return_t</code>.
 */


#define sub_libkern_kext           err_sub(2)
#define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))


/*!
 * @define   kOSKextReturnInternalError
 * @abstract An internal error in the kext library.
 *           Contrast with <code>@link //apple_ref/c/econst/OSReturnError
 *           OSReturnError@/link</code>.
 */
#define kOSKextReturnInternalError                   libkern_kext_err(0x1)

/*!
 * @define   kOSKextReturnNoMemory
 * @abstract Memory allocation failed.
 */
#define kOSKextReturnNoMemory                        libkern_kext_err(0x2)

/*!
 * @define   kOSKextReturnNoResources
 * @abstract Some resource other than memory (such as available load tags)
 *           is exhausted.
 */
#define kOSKextReturnNoResources                     libkern_kext_err(0x3)

/*!
 * @define   kOSKextReturnNotPrivileged
 * @abstract The caller lacks privileges to perform the requested operation.
 */
#define kOSKextReturnNotPrivileged                   libkern_kext_err(0x4)

/*!
 * @define   kOSKextReturnInvalidArgument
 * @abstract Invalid argument.
 */
#define kOSKextReturnInvalidArgument                 libkern_kext_err(0x5)

/*!
 * @define   kOSKextReturnNotFound
 * @abstract Search item not found.
 */
#define kOSKextReturnNotFound                        libkern_kext_err(0x6)

/*!
 * @define   kOSKextReturnBadData
 * @abstract Malformed data (not used for XML).
 */
#define kOSKextReturnBadData                         libkern_kext_err(0x7)

/*!
 * @define   kOSKextReturnSerialization
 * @abstract Error converting or (un)serializing URL, string, or XML.
 */
#define kOSKextReturnSerialization                   libkern_kext_err(0x8)

/*!
 * @define   kOSKextReturnUnsupported
 * @abstract Operation is no longer or not yet supported.
 */
#define kOSKextReturnUnsupported                     libkern_kext_err(0x9)

/*!
 * @define   kOSKextReturnDisabled
 * @abstract Operation is currently disabled.
 */
#define kOSKextReturnDisabled                        libkern_kext_err(0xa)

/*!
 * @define   kOSKextReturnNotAKext
 * @abstract Bundle is not a kernel extension.
 */
#define kOSKextReturnNotAKext                        libkern_kext_err(0xb)

/*!
 * @define   kOSKextReturnValidation
 * @abstract Validation failures encountered; check diagnostics for details.
 */
#define kOSKextReturnValidation                      libkern_kext_err(0xc)

/*!
 * @define   kOSKextReturnAuthentication
 * @abstract Authetication failures encountered; check diagnostics for details.
 */
#define kOSKextReturnAuthentication                  libkern_kext_err(0xd)

/*!
 * @define   kOSKextReturnDependencies
 * @abstract Dependency resolution failures encountered; check diagnostics for details.
 */
#define kOSKextReturnDependencies                    libkern_kext_err(0xe)

/*!
 * @define   kOSKextReturnArchNotFound
 * @abstract Kext does not contain code for the requested architecture.
 */
#define kOSKextReturnArchNotFound                    libkern_kext_err(0xf)

/*!
 * @define   kOSKextReturnCache
 * @abstract An error occurred processing a system kext cache.
 */
#define kOSKextReturnCache                           libkern_kext_err(0x10)

/*!
 * @define   kOSKextReturnDeferred
 * @abstract Operation has been posted asynchronously to user space (kernel only).
 */
#define kOSKextReturnDeferred                        libkern_kext_err(0x11)

/*!
 * @define   kOSKextReturnBootLevel
 * @abstract Kext not loadable or operation not allowed at current boot level.
 */
#define kOSKextReturnBootLevel                       libkern_kext_err(0x12)

/*!
 * @define   kOSKextReturnNotLoadable
 * @abstract Kext cannot be loaded; check diagnostics for details.
 */
#define kOSKextReturnNotLoadable                     libkern_kext_err(0x13)

/*!
 * @define   kOSKextReturnLoadedVersionDiffers
 * @abstract A different version (or executable UUID, or executable by checksum)
 *           of the requested kext is already loaded.
 */
#define kOSKextReturnLoadedVersionDiffers            libkern_kext_err(0x14)

/*!
 * @define   kOSKextReturnDependencyLoadError
 * @abstract A load error occurred on a dependency of the kext being loaded.
 */
#define kOSKextReturnDependencyLoadError             libkern_kext_err(0x15)

/*!
 * @define   kOSKextReturnLinkError
 * @abstract A link failure occured with this kext or a dependency.
 */
#define kOSKextReturnLinkError                       libkern_kext_err(0x16)

/*!
 * @define   kOSKextReturnStartStopError
 * @abstract The kext start or stop routine returned an error.
 */
#define kOSKextReturnStartStopError                  libkern_kext_err(0x17)

/*!
 * @define   kOSKextReturnInUse
 * @abstract The kext is currently in use or has outstanding references,
 *           and cannot be unloaded.
 */
#define kOSKextReturnInUse                           libkern_kext_err(0x18)

/*!
 * @define   kOSKextReturnTimeout
 * @abstract A kext request has timed out.
 */
#define kOSKextReturnTimeout                         libkern_kext_err(0x19)

/*!
 * @define   kOSKextReturnStopping
 * @abstract The kext is in the process of stopping; requests cannot be made.
 */
#define kOSKextReturnStopping                        libkern_kext_err(0x1a)

/*!
 * @define   kOSKextReturnSystemPolicy
 * @abstract The kext was prevented from loading due to system policy.
 */
#define kOSKextReturnSystemPolicy                    libkern_kext_err(0x1b)

/*!
 * @define   kOSKextReturnKCLoadFailure
 * @abstract Loading of the System KC failed
 */
#define kOSKextReturnKCLoadFailure                  libkern_kext_err(0x1c)

/*!
 * @define   kOSKextReturnKCLoadFailureSystemKC
 * @abstract Loading of the System KC failed
 *
 * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together
 * with: kOSKextReturnKCLoadFailureAuxKC
 *
 * If both the System and Aux KCs fail to load, then the error code will be:
 * libkern_kext_err(0x1f)
 */
#define kOSKextReturnKCLoadFailureSystemKC          libkern_kext_err(0x1d)

/*!
 * @define   kOSKextReturnKCLoadFailureAuxKC
 * @abstract Loading of the Aux KC failed
 *
 * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together
 * with: kOSKextReturnKCLoadFailureSystemKC
 *
 * If both the System and Aux KCs fail to load, then the error code will be:
 * libkern_kext_err(0x1f)
 */
#define kOSKextReturnKCLoadFailureAuxKC             libkern_kext_err(0x1e)

/* next available error is: libkern_kext_err(0x20) */

#if PRAGMA_MARK
#pragma mark -
/********************************************************************/
#pragma mark Kext/OSBundle Property List Keys
/********************************************************************/
#endif
/*!
 * @group Kext Property List Keys
 * These constants cover CFBundle properties defined for kernel extensions.
 * Because they are used in the kernel, if you want to use one with
 * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro.
 */


/*!
 * @define   kOSBundleCompatibleVersionKey
 * @abstract A string giving the backwards-compatible version of a library kext
 *           in extended Mac OS 'vers' format (####.##.##s{1-255} where 's'
 *           is a build stage 'd', 'a', 'b', 'f' or 'fc').
 */
#define kOSBundleCompatibleVersionKey           "OSBundleCompatibleVersion"

/*!
 * @define   kOSBundleEnableKextLoggingKey
 * @abstract Set to true to have the kernel kext logging spec applied
 *           to the kext.
 *           See <code>@link //apple_ref/c/econst/OSKextLogSpec
 *           OSKextLogSpec@/link</code>.
 */
#define kOSBundleEnableKextLoggingKey           "OSBundleEnableKextLogging"

/*!
 * @define   kOSBundleIsInterfaceKey
 * @abstract A boolean value indicating whether the kext executable
 *           contains only symbol references.
 */
#define kOSBundleIsInterfaceKey                 "OSBundleIsInterface"

/*!
 * @define   kOSBundleLibrariesKey
 * @abstract A dictionary listing link dependencies for this kext.
 *           Keys are bundle identifiers, values are version strings.
 */
#define kOSBundleLibrariesKey                   "OSBundleLibraries"

/*!
 * @define   kOSBundleRequiredKey
 * @abstract A string indicating in which kinds of startup this kext
 *           may need to load during early startup (before
 *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>).
 * @discussion
 * The value is one of:
 * <ul>
 * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li>
 * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li>
 * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li>
 * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li>
 * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li>
 * </ul>
 *
 * Use this property judiciously.
 * Every kext that declares a value other than "OSBundleRequiredSafeBoot"
 * increases startup time, as the booter must read it into memory,
 * or startup kext caches must include it.
 */
#define kOSBundleRequiredKey                    "OSBundleRequired"

/*!
 * @define   kOSBundleRequireExplicitLoadKey
 * @abstract A boolean value indicating whether the kext requires an
 *           explicit kextload in order to start/match.
 */
#define kOSBundleRequireExplicitLoadKey         "OSBundleRequireExplicitLoad"

/*!
 * @define   kOSBundleAllowUserLoadKey
 * @abstract A boolean value indicating whether
 *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>
 *           will honor a non-root process's request to load a kext.
 * @discussion
 * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL
 * KextManagerLoadKextWithURL@/link</code>
 * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier
 * KextManagerLoadKextWithIdentifier@/link</code>.
 */
#define kOSBundleAllowUserLoadKey               "OSBundleAllowUserLoad"

/*!
 * @define   kOSBundleAllowUserTerminateKey
 * @abstract A boolean value indicating whether the kextunload tool
 *           is allowed to issue IOService terminate to classes defined in this kext.
 * @discussion A boolean value indicating whether the kextunload tool
 *           is allowed to issue IOService terminate to classes defined in this kext.
 */
#define kOSBundleAllowUserTerminateKey          "OSBundleAllowUserTerminate"

/*!
 * @define   kOSKernelResourceKey
 * @abstract A boolean value indicating whether the kext represents a built-in
 *           component of the kernel.
 */
#define kOSKernelResourceKey                    "OSKernelResource"

/*!
 * @define   kOSKextVariantOverrideKey
 * @abstract A dictionary with target names as key and a target-specific variant
 *           name as value.
 */
#define kOSKextVariantOverrideKey               "OSKextVariantOverride"

/*!
 * @define   kIOKitPersonalitiesKey
 * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers.
 */
#define kIOKitPersonalitiesKey                  "IOKitPersonalities"

/*
 * @define   kIOPersonalityPublisherKey
 * @abstract Used in personalities sent to the I/O Kit,
 *           contains the CFBundleIdentifier of the kext
 *           that the personality originated in.
 */
#define kIOPersonalityPublisherKey              "IOPersonalityPublisher"

#if CONFIG_KEC_FIPS
/*
 * @define   kAppleTextHashesKey
 * @abstract A dictionary conataining hashes for corecrypto kext.
 */
#define kAppleTextHashesKey                     "AppleTextHashes"
#endif

/*!
 * @define   kOSMutableSegmentCopy
 * @abstract A boolean value indicating whether the kext requires a copy of
 *           its mutable segments to be kept in memory, and then reset when the kext
 *           unloads. This should be used with caution as it will increase the
 *           amount of memory used by the kext.
 */
#define kOSMutableSegmentCopy                   "OSMutableSegmentCopy"


#if PRAGMA_MARK
/********************************************************************/
#pragma mark Kext/OSBundle Property Deprecated Keys
/********************************************************************/
#endif
/*
 * @define   kOSBundleDebugLevelKey
 * @abstract
 * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard).
 * Value is an integer from 1-6, corresponding to the verbose levels
 * of kext tools on those releases.
 * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging
 * OSKextEnableKextLogging@/link</code>.
 */
#define kOSBundleDebugLevelKey                  "OSBundleDebugLevel"

/*!
 * @define   kOSBundleSharedExecutableIdentifierKey
 * @abstract Deprecated (used on some releases of Mac OS X
 *           prior to 10.6 Snow Leopard).
 *           Value is the bundle identifier of the pseudokext
 *           that contains an executable shared by this kext.
 */
#define kOSBundleSharedExecutableIdentifierKey  "OSBundleSharedExecutableIdentifier"


#if PRAGMA_MARK
/********************************************************************/
#pragma mark Kext/OSBundle Property List Values
/********************************************************************/
#endif

/*!
 * @group Kext Property List Values
 * These constants encompass established values
 * for kernel extension bundle properties.
 */

/*!
 * @define   kOSKextKernelIdentifier
 * @abstract
 * This is the CFBundleIdentifier user for the kernel itself.
 */
#define kOSKextKernelIdentifier                 "__kernel__"

/*!
 * @define  kOSKextBundlePackageTypeKext
 * @abstract
 * The bundle type value for Kernel Extensions.
 */
#define kOSKextBundlePackageTypeKext        "KEXT"

/*!
 * @define  kOSKextBundlePackageTypeDriverKit
 * @abstract
 * The bundle type value for Driver Extensions.
 */
#define kOSKextBundlePackageTypeDriverKit   "DEXT"

/*!
 * @define   kOSBundleRequiredRoot
 * @abstract
 * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
 * value indicates that the kext may be needed to mount the root filesystem
 * whether starting from a local or a network volume.
 */
#define kOSBundleRequiredRoot                   "Root"

/*!
 * @define   kOSBundleRequiredLocalRoot
 * @abstract
 * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
 * value indicates that the kext may be needed to mount the root filesystem
 * when starting from a local disk.
 */
#define kOSBundleRequiredLocalRoot              "Local-Root"

/*!
 * @define   kOSBundleRequiredNetworkRoot
 * @abstract
 * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
 * value indicates that the kext may be needed to mount the root filesystem
 * when starting over a network connection.
 */
#define kOSBundleRequiredNetworkRoot            "Network-Root"

/*!
 * @define   kOSBundleRequiredSafeBoot
 * @abstract
 * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
 * value indicates that the kext can be loaded during a safe startup.
 * This value does not normally cause the kext to be read by the booter
 * or included in startup kext caches.
 */
#define kOSBundleRequiredSafeBoot               "Safe Boot"

/*!
 * @define   kOSBundleRequiredConsole
 * @abstract
 * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
 * value indicates that the kext may be needed for console access
 * (specifically in a single-user startup when
 * <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>.
 * does not run)
 * and should be loaded during early startup.
 */
#define kOSBundleRequiredConsole                "Console"

/*!
 * @define   kOSBundleRequiredDriverKit
 * @abstract
 * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>
 * value indicates that the driver extension's (DriverKit driver's)
 * personalities must be present in the kernel at early boot (specifically
 * before <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code> starts)
 * in order to compete with kexts built into the prelinkedkernel. Note that
 * kextd is still required to launch the user space driver binary. The IOKit
 * matching will happen during early boot, and the actual driver launch
 * will happen after kextd starts.
 */
#define kOSBundleRequiredDriverKit              "DriverKit"

#if PRAGMA_MARK
#pragma mark -
/********************************************************************/
#pragma mark Kext Information
/********************************************************************/
#endif
/*!
 * @group Kext Information
 * Types, constants, and macros providing a kext with information
 * about itself.
 */

/*!
 * @typedef OSKextLoadTag
 *
 * @abstract
 * A unique identifier assigned to a loaded instanace of a kext.
 *
 * @discussion
 * If a kext is unloaded and later reloaded, the new instance
 * has a different load tag.
 *
 * A kext can get its own load tag in the <code>kmod_info_t</code>
 * structure passed into its module start routine, as the
 * <code>id</code> field (cast to this type).
 */
typedef uint32_t  OSKextLoadTag;

/*!
 * @define kOSKextInvalidLoadTag
 *
 * @abstract
 * A load tag value that will never be used for a loaded kext;
 * indicates kext not found.
 */
#define  kOSKextInvalidLoadTag  ((OSKextLoadTag)(-1))


__END_DECLS

#endif /* _LIBKERN_OSKEXTLIB_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSReturn.h
================================================
/*
 * Copyright (c) 2000 Apple Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */
/*
 * Copyright (c) 1998 Apple Inc.  All rights reserved.
 *
 * HISTORY
 *
 */

/*
 * Core OSReturn values.
 */

#ifndef __LIBKERN_OSRETURN_H
#define __LIBKERN_OSRETURN_H

#include <sys/cdefs.h>

__BEGIN_DECLS

#include <mach/error.h>


/*!
 * @header
 *
 * Declares functions, basic return values, and other constants
 * related to kernel extensions (kexts).
 */

#if PRAGMA_MARK
#pragma mark Core OSReturn Values for Libkern
#endif
/*********************************************************************
* Core OSReturn Values for Libkern
*********************************************************************/
/*!
 * @group Core OSReturn Values for Libkern
 * Some kext and I/O Kit functions can return these values,
 * as well as  other values of
 * <code>kern_return_t</code>.
 *
 * Many of these return values represent internal errors
 * in the Libkern C++ run-time typing information system
 * based on @link //apple_ref/doc/class/OSMetaClass OSMetaClass@/link;
 * you are unlikely to ever see them.
 *
 */


/*!
 * @typedef  OSReturn
 * @abstract The return type for many Libkern functions.
 */
typedef kern_return_t OSReturn;

#ifndef sys_libkern
#define sys_libkern                   err_system(0x37)
#endif /* sys_libkern */

#define sub_libkern_common            err_sub(0)
#define sub_libkern_metaclass         err_sub(1)
#define sub_libkern_reserved          err_sub(-1)

#define libkern_common_err(return )    (sys_libkern|sub_libkern_common|(return))
#define libkern_metaclass_err(return ) (sys_libkern|sub_libkern_metaclass|(return))

/* See OSKextLib.h for these
 * #define sub_libkern_kext           err_sub(2)
 * #define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))
 */

/*!
 * @define   kOSReturnSuccess
 * @abstract Operation successful.
 *           Equal to <code>@link //apple_ref/c/econst/KERN_SUCCESS
 *           KERN_SUCCESS@/link</code>.
 */
#define kOSReturnSuccess              KERN_SUCCESS

/*!
 * @define   kOSReturnError
 * @abstract Unspecified Libkern error.
 *           <b>Not equal</b> to
 *           <code>@link //apple_ref/c/econst/KERN_FAILURE
 *           KERN_FAILURE@/link</code>.
 */
#define kOSReturnError                libkern_common_err(1)

/*!
 * @define   kOSMetaClassInternal
 * @abstract Internal OSMetaClass run-time error.
 */
#define kOSMetaClassInternal          libkern_metaclass_err(1)

/*!
 * @define   kOSMetaClassHasInstances
 * @abstract A kext cannot be unloaded because there are instances
 *           derived from Libkern C++ classes that it defines.
 */
#define kOSMetaClassHasInstances      libkern_metaclass_err(2)

/*!
 * @define   kOSMetaClassNoInit
 * @abstract Internal error: The Libkern C++ class registration system
 *           was not properly initialized during kext loading.
 */
#define kOSMetaClassNoInit            libkern_metaclass_err(3)
// OSMetaClass::preModLoad wasn't called, runtime internal error

/*!
 * @define   kOSMetaClassNoTempData
 * @abstract Internal error: An allocation failure occurred
 *           registering Libkern C++ classes during kext loading.
 */
#define kOSMetaClassNoTempData        libkern_metaclass_err(4)
// Allocation failure internal data

/*!
 * @define   kOSMetaClassNoDicts
 * @abstract Internal error: An allocation failure occurred
 *           registering Libkern C++ classes during kext loading.
 */
#define kOSMetaClassNoDicts           libkern_metaclass_err(5)
// Allocation failure for Metaclass internal dictionaries

/*!
 * @define   kOSMetaClassNoKModSet
 * @abstract Internal error: An allocation failure occurred
 *           registering Libkern C++ classes during kext loading.
 */
#define kOSMetaClassNoKModSet         libkern_metaclass_err(6)
// Allocation failure for internal kmodule set

/*!
 * @define   kOSMetaClassNoInsKModSet
 * @abstract Internal error: An error occurred registering
 *           a specific Libkern C++ class during kext loading.
 */
#define kOSMetaClassNoInsKModSet      libkern_metaclass_err(7)
// Can't insert the KMod set into the module dictionary

/*!
 * @define   kOSMetaClassNoSuper
 * @abstract Internal error: No superclass can be found
 *           for a specific Libkern C++ class during kext loading.
 */
#define kOSMetaClassNoSuper           libkern_metaclass_err(8)

/*!
 * @define   kOSMetaClassInstNoSuper
 * @abstract Internal error: No superclass can be found when constructing
 *           an instance of a Libkern C++ class.
 */
#define kOSMetaClassInstNoSuper       libkern_metaclass_err(9)

/*!
 * @define   kOSMetaClassDuplicateClass
 * @abstract A duplicate Libkern C++ classname was encountered
 *           during kext loading.
 */
#define kOSMetaClassDuplicateClass    libkern_metaclass_err(10)

/*!
 * @define   kOSMetaClassNoKext
 * @abstract Internal error: The kext for a Libkern C++ class
 *           can't be found during kext loading.
 */
#define kOSMetaClassNoKext            libkern_metaclass_err(11)

__END_DECLS

#endif /* ! __LIBKERN_OSRETURN_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSSpinLockDeprecated.h
================================================
/*
 * Copyright (c) 2004-2016 Apple Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _OSSPINLOCK_DEPRECATED_H_
#define _OSSPINLOCK_DEPRECATED_H_

/*! @header
 * These are deprecated legacy interfaces for userspace spinlocks.
 *
 * These interfaces should no longer be used, particularily in situations where
 * threads of differing priorities may contend on the same spinlock.
 *
 * The interfaces in <os/lock.h> should be used instead in cases where a very
 * low-level lock primitive is required. In general however, using higher level
 * synchronization primitives such as those provided by the pthread or dispatch
 * subsystems should be preferred.
 *
 * Define OSSPINLOCK_USE_INLINED=1 to get inline implementations of these
 * interfaces in terms of the <os/lock.h> primitives. This is intended as a
 * transition convenience, direct use of those primitives is preferred.
 */

#ifndef OSSPINLOCK_DEPRECATED
#define OSSPINLOCK_DEPRECATED 1
#define OSSPINLOCK_DEPRECATED_MSG(_r) "Use " #_r "() from <os/lock.h> instead"
#define OSSPINLOCK_DEPRECATED_REPLACE_WITH(_r) \
	__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSSPINLOCK_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSSPINLOCK_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSSPINLOCK_DEPRECATED_MSG(_r)) \
	__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSSPINLOCK_DEPRECATED_MSG(_r))
#else
#undef OSSPINLOCK_DEPRECATED
#define OSSPINLOCK_DEPRECATED 0
#define OSSPINLOCK_DEPRECATED_REPLACE_WITH(_r)
#endif

#if !(defined(OSSPINLOCK_USE_INLINED) && OSSPINLOCK_USE_INLINED)

#include    <sys/cdefs.h>
#include    <stddef.h>
#include    <stdint.h>
#include    <stdbool.h>
#include    <Availability.h>

__BEGIN_DECLS

/*! @abstract The default value for an <code>OSSpinLock</code>.
    @discussion
	The convention is that unlocked is zero, locked is nonzero.
 */
#define	OS_SPINLOCK_INIT    0


/*! @abstract Data type for a spinlock.
    @discussion
	You should always initialize a spinlock to {@link OS_SPINLOCK_INIT} before
	using it.
 */
typedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);


/*! @abstract Locks a spinlock if it would not block
    @result
	Returns <code>false</code> if the lock was already held by another thread,
	<code>true</code> if it took the lock successfully.
 */
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_trylock)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
bool    OSSpinLockTry( volatile OSSpinLock *__lock );


/*! @abstract Locks a spinlock
    @discussion
	Although the lock operation spins, it employs various strategies to back
	off if the lock is held.
 */
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_lock)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
void    OSSpinLockLock( volatile OSSpinLock *__lock );


/*! @abstract Unlocks a spinlock */
OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_unlock)
__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
void    OSSpinLockUnlock( volatile OSSpinLock *__lock );

__END_DECLS

#else /* OSSPINLOCK_USE_INLINED */

/*
 * Inline implementations of the legacy OSSpinLock interfaces in terms of the
 * of the <os/lock.h> primitives. Direct use of those primitives is preferred.
 *
 * NOTE: the locked value of os_unfair_lock is implementation defined and
 * subject to change, code that relies on the specific locked value used by the
 * legacy OSSpinLock interface WILL break when using these inline
 * implementations in terms of os_unfair_lock.
 */

#if !OSSPINLOCK_USE_INLINED_TRANSPARENT

#include <os/lock.h>

__BEGIN_DECLS

#if __has_attribute(always_inline)
#define OSSPINLOCK_INLINE static __inline
#else
#define OSSPINLOCK_INLINE static __inline __attribute__((__always_inline__))
#endif

#define OS_SPINLOCK_INIT 0
typedef int32_t OSSpinLock;

#if  __has_extension(c_static_assert)
_Static_assert(sizeof(OSSpinLock) == sizeof(os_unfair_lock),
		"Incompatible os_unfair_lock type");
#endif

OSSPINLOCK_INLINE
void
OSSpinLockLock(volatile OSSpinLock *__lock)
{
	os_unfair_lock_t lock = (os_unfair_lock_t)__lock;
	return os_unfair_lock_lock(lock);
}

OSSPINLOCK_INLINE
bool
OSSpinLockTry(volatile OSSpinLock *__lock)
{
	os_unfair_lock_t lock = (os_unfair_lock_t)__lock;
	return os_unfair_lock_trylock(lock);
}

OSSPINLOCK_INLINE
void
OSSpinLockUnlock(volatile OSSpinLock *__lock)
{
	os_unfair_lock_t lock = (os_unfair_lock_t)__lock;
	return os_unfair_lock_unlock(lock);
}

#undef OSSPINLOCK_INLINE

__END_DECLS

#else /* OSSPINLOCK_USE_INLINED_TRANSPARENT */

#include    <sys/cdefs.h>
#include    <stddef.h>
#include    <stdint.h>
#include    <stdbool.h>
#include    <Availability.h>

#define OS_NOSPIN_LOCK_AVAILABILITY \
		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) \
		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)

__BEGIN_DECLS

#define OS_SPINLOCK_INIT 0
typedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);
typedef volatile OSSpinLock *_os_nospin_lock_t
		OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_t);

OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_lock)
OS_NOSPIN_LOCK_AVAILABILITY
void _os_nospin_lock_lock(_os_nospin_lock_t lock);
#undef OSSpinLockLock
#define OSSpinLockLock(lock) _os_nospin_lock_lock(lock)

OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_trylock)
OS_NOSPIN_LOCK_AVAILABILITY
bool _os_nospin_lock_trylock(_os_nospin_lock_t lock);
#undef OSSpinLockTry
#define OSSpinLockTry(lock) _os_nospin_lock_trylock(lock)

OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_unlock)
OS_NOSPIN_LOCK_AVAILABILITY
void _os_nospin_lock_unlock(_os_nospin_lock_t lock);
#undef OSSpinLockUnlock
#define OSSpinLockUnlock(lock) _os_nospin_lock_unlock(lock)

__END_DECLS

#endif /* OSSPINLOCK_USE_INLINED_TRANSPARENT */

#endif /* OSSPINLOCK_USE_INLINED */

#endif /* _OSSPINLOCK_DEPRECATED_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSThermalNotification.h
================================================
/*
 * Copyright (c) 2007 Apple Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _OSTHERMALNOTIFICATION_H_
#define _OSTHERMALNOTIFICATION_H_

#include <sys/cdefs.h>
#include <Availability.h>

/*
**  OSThermalNotification.h
**  
**  Notification mechanism to alert registered tasks when device thermal conditions
**  reach certain thresholds. Notifications are triggered in both directions
**  so clients can manage their memory usage more and less aggressively.
**
*/

__BEGIN_DECLS

/* Define pressure levels usable by OSThermalPressureLevel */
typedef enum {
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
	kOSThermalPressureLevelNominal = 0,
	kOSThermalPressureLevelModerate,
	kOSThermalPressureLevelHeavy,
	kOSThermalPressureLevelTrapping,
	kOSThermalPressureLevelSleeping
#else
	kOSThermalPressureLevelNominal = 0,
	kOSThermalPressureLevelLight = 10,
	kOSThermalPressureLevelModerate = 20,
	kOSThermalPressureLevelHeavy = 30,
	kOSThermalPressureLevelTrapping = 40,
	kOSThermalPressureLevelSleeping = 50
#endif
} OSThermalPressureLevel;

/*
 ** External notify(3) string for thermal pressure level notification
 */
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0)
extern const char * const kOSThermalNotificationPressureLevelName;


#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \
	__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0

typedef enum {
	OSThermalNotificationLevelAny      = -1,
	OSThermalNotificationLevelNormal   =  0,
} OSThermalNotificationLevel;

extern OSThermalNotificationLevel _OSThermalNotificationLevelForBehavior(int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2);
extern void _OSThermalNotificationSetLevelForBehavior(int, int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2);

enum {
	kOSThermalMitigationNone,
	kOSThermalMitigation70PercentTorch,
	kOSThermalMitigation70PercentBacklight,
	kOSThermalMitigation50PercentTorch,
	kOSThermalMitigation50PercentBacklight,
	kOSThermalMitigationDisableTorch,
	kOSThermalMitigation25PercentBacklight,
	kOSThermalMitigationDisableMapsHalo,
	kOSThermalMitigationAppTerminate,
	kOSThermalMitigationDeviceRestart,
	kOSThermalMitigationThermalTableReady,
	kOSThermalMitigationCount
};

#define OSThermalNotificationLevel70PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentTorch)
#define OSThermalNotificationLevel70PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentBacklight)
#define OSThermalNotificationLevel50PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentTorch)
#define OSThermalNotificationLevel50PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentBacklight)
#define OSThermalNotificationLevelDisableTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableTorch)
#define OSThermalNotificationLevel25PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation25PercentBacklight)
#define OSThermalNotificationLevelDisableMapsHalo _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableMapsHalo)
#define OSThermalNotificationLevelAppTerminate _OSThermalNotificationLevelForBehavior(kOSThermalMitigationAppTerminate)
#define OSThermalNotificationLevelDeviceRestart _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDeviceRestart)

/* Backwards compatibility */
#define OSThermalNotificationLevelWarning OSThermalNotificationLevel70PercentBacklight
#define OSThermalNotificationLevelUrgent OSThermalNotificationLevelAppTerminate
#define OSThermalNotificationLevelCritical OSThermalNotificationLevelDeviceRestart

/*
** Simple polling interface to detect current thermal level
*/
__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)
extern OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void);

/*
** External notify(3) string for manual notification setup
*/
__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)
extern const char * const kOSThermalNotificationName;

/*
** External notify(3) string for alerting user of a thermal condition
*/
__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)
extern const char * const kOSThermalNotificationAlert;

/*
** External notify(3) string for notifying system the options taken to resolve thermal condition
*/
__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)
extern const char * const kOSThermalNotificationDecision;

#endif // __IPHONE_OS_VERSION_MIN_REQUIRED

__END_DECLS

#endif /* _OSTHERMALNOTIFICATION_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSTypes.h
================================================
/*
 * Copyright (c) 1999-2012 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#include <MacTypes.h>

#ifndef _OS_OSTYPES_H
#define _OS_OSTYPES_H

#define OSTYPES_K64_REV         2

typedef unsigned int       UInt;
typedef signed int         SInt;


#include <sys/_types/_os_inline.h>

#endif /* _OS_OSTYPES_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/_OSByteOrder.h
================================================
/*
 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#ifndef _OS__OSBYTEORDER_H
#define _OS__OSBYTEORDER_H

/*
 * This header is normally included from <libkern/OSByteOrder.h>.  However,
 * <sys/_endian.h> also includes this in the case of little-endian
 * architectures, so that we can map OSByteOrder routines to the hton* and ntoh*
 * macros.  This results in the asymmetry below; we only include
 * <libkern/arch/_OSByteOrder.h> for little-endian architectures.
 */

#include <sys/_types.h>

/* Macros for swapping constant values in the preprocessing stage. */
#define __DARWIN_OSSwapConstInt16(x) \
    ((__uint16_t)((((__uint16_t)(x) & 0xff00U) >> 8) | \
	        (((__uint16_t)(x) & 0x00ffU) << 8)))

#define __DARWIN_OSSwapConstInt32(x) \
    ((__uint32_t)((((__uint32_t)(x) & 0xff000000U) >> 24) | \
	        (((__uint32_t)(x) & 0x00ff0000U) >>  8) | \
	        (((__uint32_t)(x) & 0x0000ff00U) <<  8) | \
	        (((__uint32_t)(x) & 0x000000ffU) << 24)))

#define __DARWIN_OSSwapConstInt64(x) \
    ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
	        (((__uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
	        (((__uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
	        (((__uint64_t)(x) & 0x000000ff00000000ULL) >>  8) | \
	        (((__uint64_t)(x) & 0x00000000ff000000ULL) <<  8) | \
	        (((__uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
	        (((__uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
	        (((__uint64_t)(x) & 0x00000000000000ffULL) << 56)))

#if defined(__GNUC__)

#if !defined(__DARWIN_OS_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#        define __DARWIN_OS_INLINE static inline
# elif defined(__MWERKS__) || defined(__cplusplus)
#        define __DARWIN_OS_INLINE static inline
# else
#        define __DARWIN_OS_INLINE static __inline__
# endif
#endif

#if defined(__i386__) || defined(__x86_64__)
#include <libkern/i386/_OSByteOrder.h>
#endif

#if defined (__arm__) || defined(__arm64__)
#include <libkern/arm/OSByteOrder.h>
#endif


#define __DARWIN_OSSwapInt16(x) \
    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))

#define __DARWIN_OSSwapInt32(x) \
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))

#define __DARWIN_OSSwapInt64(x) \
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))

#else /* ! __GNUC__ */

#if defined(__i386__) || defined(__x86_64__)

__DARWIN_OS_INLINE
uint16_t
_OSSwapInt16(
	uint16_t                    data
	)
{
	return __DARWIN_OSSwapConstInt16(data);
}

__DARWIN_OS_INLINE
uint32_t
_OSSwapInt32(
	uint32_t                    data
	)
{
	return __DARWIN_OSSwapConstInt32(data);
}

__DARWIN_OS_INLINE
uint64_t
_OSSwapInt64(
	uint64_t                    data
	)
{
	return __DARWIN_OSSwapConstInt64(data);
}
#endif

#define __DARWIN_OSSwapInt16(x) _OSSwapInt16(x)

#define __DARWIN_OSSwapInt32(x) _OSSwapInt32(x)

#define __DARWIN_OSSwapInt64(x) _OSSwapInt64(x)

#endif /* __GNUC__ */

#endif /* ! _OS__OSBYTEORDER_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/arm/OSByteOrder.h
================================================
/*
 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
 */

#ifndef _OS_OSBYTEORDERARM_H
#define _OS_OSBYTEORDERARM_H

#include <stdint.h>
#include <arm/arch.h> /* for _ARM_ARCH_6 */

/* Generic byte swapping functions. */

__DARWIN_OS_INLINE
uint16_t
_OSSwapInt16(
	uint16_t        _data
	)
{
	/* Reduces to 'rev16' with clang */
	return (uint16_t)(_data << 8 | _data >> 8);
}

__DARWIN_OS_INLINE
uint32_t
_OSSwapInt32(
	uint32_t        _data
	)
{
#if defined(__llvm__)
	_data = __builtin_bswap32(_data);
#else
	/* This actually generates the best code */
	_data = (((_data ^ (_data >> 16 | (_data << 16))) & 0xFF00FFFF) >> 8) ^ (_data >> 8 | _data << 24);
#endif

	return _data;
}

__DARWIN_OS_INLINE
uint64_t
_OSSwapInt64(
	uint64_t        _data
	)
{
#if defined(__llvm__)
	return __builtin_bswap64(_data);
#else
	union {
		uint64_t _ull;
		uint32_t _ul[2];
	} _u;

	/* This actually generates the best code */
	_u._ul[0] = (uint32_t)(_data >> 32);
	_u._ul[1] = (uint32_t)(_data & 0xffffffff);
	_u._ul[0] = _OSSwapInt32(_u._ul[0]);
	_u._ul[1] = _OSSwapInt32(_u._ul[1]);
	return _u._ull;
#endif
}

/* Functions for byte reversed loads. */

struct _OSUnalignedU16 {
	volatile uint16_t __val;
} __attribute__((__packed__));

struct _OSUnalignedU32 {
	volatile uint32_t __val;
} __attribute__((__packed__));

struct _OSUnalignedU64 {
	volatile uint64_t __val;
} __attribute__((__packed__));

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
__DARWIN_OS_INLINE
uint16_t
_OSReadSwapInt16(
	const volatile void   * _base,
	uintptr_t       _offset
	)
{
	return _OSSwapInt16(((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val);
}
#else
__DARWIN_OS_INLINE
uint16_t
OSReadSwapInt16(
	const volatile void   * _base,
	uintptr_t       _offset
	)
{
	return _OSSwapInt16(((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val);
}
#endif

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
__DARWIN_OS_INLINE
uint32_t
_OSReadSwapInt32(
	const volatile void   * _base,
	uintptr_t       _offset
	)
{
	return _OSSwapInt32(((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val);
}
#else
__DARWIN_OS_INLINE
uint32_t
OSReadSwapInt32(
	const volatile void   * _base,
	uintptr_t       _offset
	)
{
	return _OSSwapInt32(((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val);
}
#endif

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
__DARWIN_OS_INLINE
uint64_t
_OSReadSwapInt64(
	const volatile void   * _base,
	uintptr_t       _offset
	)
{
	return _OSSwapInt64(((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val);
}
#else
__DARWIN_OS_INLINE
uint64_t
OSReadSwapInt64(
	const volatile void   * _base,
	uintptr_t       _offset
	)
{
	return _OSSwapInt64(((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val);
}
#endif

/* Functions for byte reversed stores. */

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
__DARWIN_OS_INLINE
void
_OSWriteSwapInt16(
	volatile void   * _base,
	uintptr_t       _offset,
	uint16_t        _data
	)
{
	((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt16(_data);
}
#else
__DARWIN_OS_INLINE
void
OSWriteSwapInt16(
	volatile void   * _base,
	uintptr_t       _offset,
	uint16_t        _data
	)
{
	((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt16(_data);
}
#endif

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
__DARWIN_OS_INLINE
void
_OSWriteSwapInt32(
	volatile void   * _base,
	uintptr_t       _offset,
	uint32_t        _data
	)
{
	((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt32(_data);
}
#else
__DARWIN_OS_INLINE
void
OSWriteSwapInt32(
	volatile void   * _base,
	uintptr_t       _offset,
	uint32_t        _data
	)
{
	((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt32(_data);
}
#endif

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
__DARWIN_OS_INLINE
void
_OSWriteSwapInt64(
	volatile void    * _base,
	uintptr_t        _offset,
	uint64_t         _data
	)
{
	((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt64(_data);
}
#else
__DARWIN_OS_INLINE
void
OSWriteSwapInt64(
	volatile void    * _base,
	uintptr_t        _offset,
	uint64_t         _data
	)
{
	((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt64(_data);
}
#endif

#endif /* ! _OS_OSBYTEORDERARM_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/i386/OSByteOrder.h
================================================
/*
 * Copyright (c) 1999-2006 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#ifndef _OS_OSBYTEORDERI386_H
#define _OS_OSBYTEORDERI386_H

#include <stdint.h>
#include <libkern/i386/_OSByteOrder.h>
#include <sys/_types/_os_inline.h>

/* Functions for byte reversed loads. */

OS_INLINE
uint16_t
OSReadSwapInt16(
	const volatile void   * base,
	uintptr_t       byteOffset
	)
{
	uint16_t result;

	result = *(volatile uint16_t *)((uintptr_t)base + byteOffset);
	return _OSSwapInt16(result);
}

OS_INLINE
uint32_t
OSReadSwapInt32(
	const volatile void   * base,
	uintptr_t       byteOffset
	)
{
	uint32_t result;

	result = *(volatile uint32_t *)((uintptr_t)base + byteOffset);
	return _OSSwapInt32(result);
}

OS_INLINE
uint64_t
OSReadSwapInt64(
	const volatile void   * base,
	uintptr_t       byteOffset
	)
{
	uint64_t result;

	result = *(volatile uint64_t *)((uintptr_t)base + byteOffset);
	return _OSSwapInt64(result);
}

/* Functions for byte reversed stores. */

OS_INLINE
void
OSWriteSwapInt16(
	volatile void   * base,
	uintptr_t       byteOffset,
	uint16_t        data
	)
{
	*(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data);
}

OS_INLINE
void
OSWriteSwapInt32(
	volatile void   * base,
	uintptr_t       byteOffset,
	uint32_t        data
	)
{
	*(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data);
}

OS_INLINE
void
OSWriteSwapInt64(
	volatile void    * base,
	uintptr_t        byteOffset,
	uint64_t         data
	)
{
	*(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data);
}

#endif /* ! _OS_OSBYTEORDERI386_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/i386/_OSByteOrder.h
================================================
/*
 * Copyright (c) 2006-2012 Apple Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#ifndef _OS__OSBYTEORDERI386_H
#define _OS__OSBYTEORDERI386_H

#if !defined(__DARWIN_OS_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#        define __DARWIN_OS_INLINE static inline
# elif defined(__MWERKS__) || defined(__cplusplus)
#        define __DARWIN_OS_INLINE static inline
# else
#        define __DARWIN_OS_INLINE static __inline__
# endif
#endif

/* Generic byte swapping functions. */

__DARWIN_OS_INLINE
__uint16_t
_OSSwapInt16(
	__uint16_t        _data
	)
{
	return (__uint16_t)((_data << 8) | (_data >> 8));
}

__DARWIN_OS_INLINE
__uint32_t
_OSSwapInt32(
	__uint32_t        _data
	)
{
#if defined(__llvm__)
	return __builtin_bswap32(_data);
#else
	__asm__ ("bswap   %0" : "+r" (_data));
	return _data;
#endif
}

#if defined(__llvm__)
__DARWIN_OS_INLINE
__uint64_t
_OSSwapInt64(
	__uint64_t        _data
	)
{
	return __builtin_bswap64(_data);
}

#elif defined(__i386__)
__DARWIN_OS_INLINE
__uint64_t
_OSSwapInt64(
	__uint64_t        _data
	)
{
	__asm__ ("bswap   %%eax\n\t"
                 "bswap   %%edx\n\t"
                 "xchgl   %%eax, %%edx"
                 : "+A" (_data));
	return _data;
}
#elif defined(__x86_64__)
__DARWIN_OS_INLINE
__uint64_t
_OSSwapInt64(
	__uint64_t        _data
	)
{
	__asm__ ("bswap   %0" : "+r" (_data));
	return _data;
}
#else
#error Unknown architecture
#endif

#endif /* ! _OS__OSBYTEORDERI386_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/libkern/machine/OSByteOrder.h
================================================
/*
 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. The rights granted to you under the License
 * may not be used to create, or enable the creation or redistribution of,
 * unlawful or unlicensed copies of an Apple operating system, or to
 * circumvent, violate, or enable the circumvention or violation of, any
 * terms of an Apple operating system software license agreement.
 *
 * Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 *
 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
 */

#ifndef _OS_OSBYTEORDERMACHINE_H
#define _OS_OSBYTEORDERMACHINE_H

#include <stdint.h>

#if !defined(OS_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#        define OS_INLINE static inline
# elif defined(__MWERKS__) || defined(__cplusplus)
#        define OS_INLINE static inline
# else
#        define OS_INLINE static __inline__
# endif
#endif

/* Generic byte swapping functions. */

OS_INLINE
uint16_t
_OSSwapInt16(
	uint16_t                      data
	)
{
	return OSSwapConstInt16(data);
}

OS_INLINE
uint32_t
_OSSwapInt32(
	uint32_t                      data
	)
{
	return OSSwapConstInt32(data);
}

OS_INLINE
uint64_t
_OSSwapInt64(
	uint64_t                        data
	)
{
	return OSSwapConstInt64(data);
}

/* Functions for byte reversed loads. */

OS_INLINE
uint16_t
OSReadSwapInt16(
	const volatile void               * base,
	uintptr_t                     byteOffset
	)
{
	uint16_t data = *(volatile uint16_t *)((uintptr_t)base + byteOffset);
	return _OSSwapInt16(data);
}

OS_INLINE
uint32_t
OSReadSwapInt32(
	const volatile void               * base,
	uintptr_t                     byteOffset
	)
{
	uint32_t data = *(volatile uint32_t *)((uintptr_t)base + byteOffset);
	return _OSSwapInt32(data);
}

OS_INLINE
uint64_t
OSReadSwapInt64(
	const volatile void               * base,
	uintptr_t                     byteOffset
	)
{
	uint64_t data = *(volatile uint64_t *)((uintptr_t)base + byteOffset);
	return _OSSwapInt64(data);
}

/* Functions for byte reversed stores. */

OS_INLINE
void
OSWriteSwapInt16(
	volatile void               * base,
	uintptr_t                     byteOffset,
	uint16_t                      data
	)
{
	*(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data);
}

OS_INLINE
void
OSWriteSwapInt32(
	volatile void               * base,
	uintptr_t                     byteOffset,
	uint32_t                      data
	)
{
	*(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data);
}

OS_INLINE
void
OSWriteSwapInt64(
	volatile void               * base,
	uintptr_t                     byteOffset,
	uint64_t                      data
	)
{
	*(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data);
}

#endif /* ! _OS_OSBYTEORDERMACHINE_H */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/arch.h
================================================
/*
 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @APPLE_LICENSE_HEADER_END@
 */
#ifndef _MACH_O_ARCH_H_
#define _MACH_O_ARCH_H_
/*
 * Copyright (c) 1997 Apple Computer, Inc.
 *
 * Functions that deal with information about architectures.
 *
 */

#include <stdint.h>
#include <mach/machine.h>
#include <architecture/byte_order.h>

/* The NXArchInfo structs contain the architectures symbolic name
 * (such as "ppc"), its CPU type and CPU subtype as defined in
 * mach/machine.h, the byte order for the architecture, and a
 * describing string (such as "PowerPC").
 * There will both be entries for specific CPUs (such as ppc604e) as
 * well as generic "family" entries (such as ppc).
 */
typedef struct {
    const char *name;
    cpu_type_t cputype;
    cpu_subtype_t cpusubtype;
    enum NXByteOrder byteorder;
    const char *description;
} NXArchInfo;

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* NXGetAllArchInfos() returns a pointer to an array of all known
 * NXArchInfo structures.  The last NXArchInfo is marked by a NULL name.
 */
extern const NXArchInfo *NXGetAllArchInfos(void);

/* NXGetLocalArchInfo() returns the NXArchInfo for the local host, or NULL
 * if none is known. 
 */
extern const NXArchInfo *NXGetLocalArchInfo(void);

/* NXGetArchInfoFromName() and NXGetArchInfoFromCpuType() return the
 * NXArchInfo from the architecture's name or cputype/cpusubtype
 * combination.  A cpusubtype of CPU_SUBTYPE_MULTIPLE can be used
 * to request the most general NXArchInfo known for the given cputype.
 * NULL is returned if no matching NXArchInfo can be found.
 */
extern const NXArchInfo *NXGetArchInfoFromName(const char *name);
extern const NXArchInfo *NXGetArchInfoFromCpuType(cpu_type_t cputype,
						  cpu_subtype_t cpusubtype);

/* The above interfaces that return pointers to NXArchInfo structs in normal
 * cases returns a pointer from the array returned in NXGetAllArchInfos().
 * In some cases when the cputype is CPU_TYPE_I386 or CPU_TYPE_POWERPC it will
 * retun malloc(3)'ed NXArchInfo struct which contains a string in the
 * description field also a malloc(3)'ed pointer.  To allow programs not to
 * leak memory they can call NXFreeArchInfo() on pointers returned from the
 * above interfaces.  Since this is a new API on older systems can use the
 * code below.  Going forward the above interfaces will only return pointers
 * from the array returned in NXGetAllArchInfos().
 */
extern void NXFreeArchInfo(const NXArchInfo *x);

/* The code that can be used for NXFreeArchInfo() when it is not available is:
 *
 *	static void NXFreeArchInfo(
 *	const NXArchInfo *x)
 *	{
 *	    const NXArchInfo *p;
 *	
 *	        p = NXGetAllArchInfos();
 *	        while(p->name != NULL){
 *	            if(x == p)
 *	                return;
 *	            p++;
 *	        }
 *	        free((char *)x->description);
 *	        free((NXArchInfo *)x);
 *	}
 */

/* NXFindBestFatArch() is passed a cputype and cpusubtype and a set of
 * fat_arch structs and selects the best one that matches (if any) and returns
 * a pointer to that fat_arch struct (or NULL).  The fat_arch structs must be
 * in the host byte order and correct such that the fat_archs really points to
 * enough memory for nfat_arch structs.  It is possible that this routine could
 * fail if new cputypes or cpusubtypes are added and an old version of this
 * routine is used.  But if there is an exact match between the cputype and
 * cpusubtype and one of the fat_arch structs this routine will always succeed.
 */
extern struct fat_arch *NXFindBestFatArch(cpu_type_t cputype,
					  cpu_subtype_t cpusubtype,
					  struct fat_arch *fat_archs,
					  uint32_t nfat_archs);

/* NXFindBestFatArch_64() is passed a cputype and cpusubtype and a set of
 * fat_arch_64 structs and selects the best one that matches (if any) and
 * returns a pointer to that fat_arch_64 struct (or NULL).  The fat_arch_64
 * structs must be in the host byte order and correct such that the fat_archs64
 * really points to enough memory for nfat_arch structs.  It is possible that
 * this routine could fail if new cputypes or cpusubtypes are added and an old
 * version of this routine is used.  But if there is an exact match between the
 * cputype and cpusubtype and one of the fat_arch_64 structs this routine will
 * always succeed.
 */
extern struct fat_arch_64 *NXFindBestFatArch_64(cpu_type_t cputype,
					        cpu_subtype_t cpusubtype,
					        struct fat_arch_64 *fat_archs64,
					        uint32_t nfat_archs);

/* NXCombineCpuSubtypes() returns the resulting cpusubtype when combining two
 * different cpusubtypes for the specified cputype.  If the two cpusubtypes
 * can't be combined (the specific subtypes are mutually exclusive) -1 is
 * returned indicating it is an error to combine them.  This can also fail and
 * return -1 if new cputypes or cpusubtypes are added and an old version of
 * this routine is used.  But if the cpusubtypes are the same they can always
 * be combined and this routine will return the cpusubtype pass in.
 */
extern cpu_subtype_t NXCombineCpuSubtypes(cpu_type_t cputype,
					  cpu_subtype_t cpusubtype1,
					  cpu_subtype_t cpusubtype2);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _MACH_O_ARCH_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/arm/reloc.h
================================================
/*
 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @APPLE_LICENSE_HEADER_END@
 */
/*
 * Relocation types used in the arm implementation.  Relocation entries for
 * things other than instructions use the same generic relocation as discribed
 * in <mach-o/reloc.h> and their r_type is ARM_RELOC_VANILLA, one of the
 * *_SECTDIFF or the *_PB_LA_PTR types.  The rest of the relocation types are
 * for instructions.  Since they are for instructions the r_address field
 * indicates the 32 bit instruction that the relocation is to be preformed on.
 */
enum reloc_type_arm
{
    ARM_RELOC_VANILLA,	/* generic relocation as discribed above */
    ARM_RELOC_PAIR,	/* the second relocation entry of a pair */
    ARM_RELOC_SECTDIFF,	/* a PAIR follows with subtract symbol value */
    ARM_RELOC_LOCAL_SECTDIFF, /* like ARM_RELOC_SECTDIFF, but the symbol
				 referenced was local.  */
    ARM_RELOC_PB_LA_PTR,/* prebound lazy pointer */
    ARM_RELOC_BR24,	/* 24 bit branch displacement (to a word address) */
    ARM_THUMB_RELOC_BR22, /* 22 bit branch displacement (to a half-word
			     address) */
    ARM_THUMB_32BIT_BRANCH, /* obsolete - a thumb 32-bit branch instruction
			     possibly needing page-spanning branch workaround */

    /*
     * For these two r_type relocations they always have a pair following them
     * and the r_length bits are used differently.  The encoding of the
     * r_length is as follows:
     * low bit of r_length:
     *  0 - :lower16: for movw instructions
     *  1 - :upper16: for movt instructions
     * high bit of r_length:
     *  0 - arm instructions
     *  1 - thumb instructions   
     * the other half of the relocated expression is in the following pair
     * relocation entry in the the low 16 bits of r_address field.
     */
    ARM_RELOC_HALF,
    ARM_RELOC_HALF_SECTDIFF
};


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/arm64/reloc.h
================================================
/*
 * Copyright (c) 2010 Apple Computer, Inc. All rights reserved.
 *
 * @APPLE_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @APPLE_LICENSE_HEADER_END@
 */

#ifndef _MACHO_ARM64_RELOC_H_
#define _MACHO_ARM64_RELOC_H_

/*
 * Relocation types used in the arm64 implementation.
 */
enum reloc_type_arm64
{
    ARM64_RELOC_UNSIGNED,	  // for pointers
    ARM64_RELOC_SUBTRACTOR,       // must be followed by a ARM64_RELOC_UNSIGNED
    ARM64_RELOC_BRANCH26,         // a B/BL instruction with 26-bit displacement
    ARM64_RELOC_PAGE21,           // pc-rel distance to page of target
    ARM64_RELOC_PAGEOFF12,        // offset within page, scaled by r_length
    ARM64_RELOC_GOT_LOAD_PAGE21,  // pc-rel distance to page of GOT slot
    ARM64_RELOC_GOT_LOAD_PAGEOFF12, // offset within page of GOT slot,
                                    //  scaled by r_length
    ARM64_RELOC_POINTER_TO_GOT,   // for pointers to GOT slots
    ARM64_RELOC_TLVP_LOAD_PAGE21, // pc-rel distance to page of TLVP slot
    ARM64_RELOC_TLVP_LOAD_PAGEOFF12, // offset within page of TLVP slot,
                                     //  scaled by r_length
    ARM64_RELOC_ADDEND,		  // must be followed by PAGE21 or PAGEOFF12

    // An arm64e authenticated pointer.
    //
    // Represents a pointer to a symbol (like ARM64_RELOC_UNSIGNED).
    // Additionally, the resulting pointer is signed.  The signature is
    // specified in the target location: the addend is restricted to the lower
    // 32 bits (instead of the full 64 bits for ARM64_RELOC_UNSIGNED):
    //
    //   |63|62|61-51|50-49|  48  |47     -     32|31  -  0|
    //   | 1| 0|  0  | key | addr | discriminator | addend |
    //
    // The key is one of:
    //   IA: 00 IB: 01
    //   DA: 10 DB: 11
    //
    // The discriminator field is used as extra signature diversification.
    //
    // The addr field indicates whether the target address should be blended
    // into the discriminator.
    //
    ARM64_RELOC_AUTHENTICATED_POINTER,
};

#endif /* #ifndef _MACHO_ARM64_RELOC_H_ */


================================================
FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/compact_unwind_encoding.h
================================================
//===------------------ mach-o/compact_unwind_encoding.h ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//
// Darwin's alternative to DWARF based unwind encodings.
//
//===----------------------------------------------------------------------===//


#ifndef __COMPACT_UNWIND_ENCODING__
#define __COMPACT_UNWIND_ENCODING__

#include <stdint.h>

//
// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section
// of object files. Or compilers can emit compact unwind information in
// the __LD,__compact_unwind section.
//
// When the linker creates a final linked image,
Download .txt
gitextract_5ufvb6_p/

├── .gitattributes
├── .github/
│   └── workflows/
│       ├── build-single.yml
│       └── build.yml
├── .gitignore
├── .gn
├── BUILD.gclient.gn
├── BUILD.gn
├── LICENSE
├── README.md
├── V8_REVISION
├── build.zig
├── cross-macos/
│   └── sysroot/
│       └── macos-12/
│           └── usr/
│               └── include/
│                   ├── libkern/
│                   │   ├── OSAtomic.h
│                   │   ├── OSAtomicDeprecated.h
│                   │   ├── OSAtomicQueue.h
│                   │   ├── OSByteOrder.h
│                   │   ├── OSCacheControl.h
│                   │   ├── OSDebug.h
│                   │   ├── OSKextLib.h
│                   │   ├── OSReturn.h
│                   │   ├── OSSpinLockDeprecated.h
│                   │   ├── OSThermalNotification.h
│                   │   ├── OSTypes.h
│                   │   ├── _OSByteOrder.h
│                   │   ├── arm/
│                   │   │   └── OSByteOrder.h
│                   │   ├── i386/
│                   │   │   ├── OSByteOrder.h
│                   │   │   └── _OSByteOrder.h
│                   │   └── machine/
│                   │       └── OSByteOrder.h
│                   ├── mach-o/
│                   │   ├── arch.h
│                   │   ├── arm/
│                   │   │   └── reloc.h
│                   │   ├── arm64/
│                   │   │   └── reloc.h
│                   │   ├── compact_unwind_encoding.h
│                   │   ├── compact_unwind_encoding.modulemap
│                   │   ├── dyld.h
│                   │   ├── dyld.modulemap
│                   │   ├── dyld_images.h
│                   │   ├── fat.h
│                   │   ├── fixup-chains.h
│                   │   ├── getsect.h
│                   │   ├── i386/
│                   │   │   └── swap.h
│                   │   ├── ldsyms.h
│                   │   ├── loader.h
│                   │   ├── module.modulemap
│                   │   ├── nlist.h
│                   │   ├── ranlib.h
│                   │   ├── reloc.h
│                   │   ├── stab.h
│                   │   ├── swap.h
│                   │   └── x86_64/
│                   │       └── reloc.h
│                   ├── os/
│                   │   ├── _workgroup.h
│                   │   ├── activity.h
│                   │   ├── atomic.h
│                   │   ├── availability.h
│                   │   ├── base.h
│                   │   ├── clock.h
│                   │   ├── lock.h
│                   │   ├── log.h
│                   │   ├── object.h
│                   │   ├── overflow.h
│                   │   ├── proc.h
│                   │   ├── signpost.h
│                   │   ├── trace.h
│                   │   ├── trace_base.h
│                   │   ├── workgroup.h
│                   │   ├── workgroup_base.h
│                   │   ├── workgroup_interval.h
│                   │   ├── workgroup_object.h
│                   │   └── workgroup_parallel.h
│                   └── sys/
│                       ├── _endian.h
│                       ├── _posix_availability.h
│                       ├── _pthread/
│                       │   ├── _pthread_attr_t.h
│                       │   ├── _pthread_cond_t.h
│                       │   ├── _pthread_condattr_t.h
│                       │   ├── _pthread_key_t.h
│                       │   ├── _pthread_mutex_t.h
│                       │   ├── _pthread_mutexattr_t.h
│                       │   ├── _pthread_once_t.h
│                       │   ├── _pthread_rwlock_t.h
│                       │   ├── _pthread_rwlockattr_t.h
│                       │   ├── _pthread_t.h
│                       │   └── _pthread_types.h
│                       ├── _select.h
│                       ├── _structs.h
│                       ├── _symbol_aliasing.h
│                       ├── _types/
│                       │   ├── _blkcnt_t.h
│                       │   ├── _blksize_t.h
│                       │   ├── _caddr_t.h
│                       │   ├── _clock_t.h
│                       │   ├── _ct_rune_t.h
│                       │   ├── _dev_t.h
│                       │   ├── _errno_t.h
│                       │   ├── _fd_clr.h
│                       │   ├── _fd_copy.h
│                       │   ├── _fd_def.h
│                       │   ├── _fd_isset.h
│                       │   ├── _fd_set.h
│                       │   ├── _fd_setsize.h
│                       │   ├── _fd_zero.h
│                       │   ├── _filesec_t.h
│                       │   ├── _fsblkcnt_t.h
│                       │   ├── _fsfilcnt_t.h
│                       │   ├── _fsid_t.h
│                       │   ├── _fsobj_id_t.h
│                       │   ├── _gid_t.h
│                       │   ├── _guid_t.h
│                       │   ├── _id_t.h
│                       │   ├── _in_addr_t.h
│                       │   ├── _in_port_t.h
│                       │   ├── _ino64_t.h
│                       │   ├── _ino_t.h
│                       │   ├── _int16_t.h
│                       │   ├── _int32_t.h
│                       │   ├── _int64_t.h
│                       │   ├── _int8_t.h
│                       │   ├── _intptr_t.h
│                       │   ├── _iovec_t.h
│                       │   ├── _key_t.h
│                       │   ├── _mach_port_t.h
│                       │   ├── _mbstate_t.h
│                       │   ├── _mode_t.h
│                       │   ├── _nlink_t.h
│                       │   ├── _null.h
│                       │   ├── _o_dsync.h
│                       │   ├── _o_sync.h
│                       │   ├── _off_t.h
│                       │   ├── _offsetof.h
│                       │   ├── _os_inline.h
│                       │   ├── _pid_t.h
│                       │   ├── _posix_vdisable.h
│                       │   ├── _ptrdiff_t.h
│                       │   ├── _rsize_t.h
│                       │   ├── _rune_t.h
│                       │   ├── _s_ifmt.h
│                       │   ├── _sa_family_t.h
│                       │   ├── _seek_set.h
│                       │   ├── _sigaltstack.h
│                       │   ├── _sigset_t.h
│                       │   ├── _size_t.h
│                       │   ├── _socklen_t.h
│                       │   ├── _ssize_t.h
│                       │   ├── _suseconds_t.h
│                       │   ├── _time_t.h
│                       │   ├── _timespec.h
│                       │   ├── _timeval.h
│                       │   ├── _timeval32.h
│                       │   ├── _timeval64.h
│                       │   ├── _u_char.h
│                       │   ├── _u_int.h
│                       │   ├── _u_int16_t.h
│                       │   ├── _u_int32_t.h
│                       │   ├── _u_int64_t.h
│                       │   ├── _u_int8_t.h
│                       │   ├── _u_short.h
│                       │   ├── _ucontext.h
│                       │   ├── _ucontext64.h
│                       │   ├── _uid_t.h
│                       │   ├── _uintptr_t.h
│                       │   ├── _useconds_t.h
│                       │   ├── _uuid_t.h
│                       │   ├── _va_list.h
│                       │   ├── _wchar_t.h
│                       │   └── _wint_t.h
│                       ├── _types.h
│                       ├── acct.h
│                       ├── acl.h
│                       ├── aio.h
│                       ├── appleapiopts.h
│                       ├── attr.h
│                       ├── buf.h
│                       ├── cdefs.h
│                       ├── clonefile.h
│                       ├── commpage.h
│                       ├── conf.h
│                       ├── dir.h
│                       ├── dirent.h
│                       ├── disk.h
│                       ├── dkstat.h
│                       ├── domain.h
│                       ├── dtrace.h
│                       ├── dtrace_glue.h
│                       ├── dtrace_impl.h
│                       ├── errno.h
│                       ├── ev.h
│                       ├── event.h
│                       ├── fasttrap.h
│                       ├── fasttrap_isa.h
│                       ├── fcntl.h
│                       ├── file.h
│                       ├── filedesc.h
│                       ├── filio.h
│                       ├── fsgetpath.h
│                       ├── gmon.h
│                       ├── ioccom.h
│                       ├── ioctl.h
│                       ├── ioctl_compat.h
│                       ├── ipc.h
│                       ├── kauth.h
│                       ├── kdebug.h
│                       ├── kdebug_signpost.h
│                       ├── kern_control.h
│                       ├── kern_event.h
│                       ├── kernel.h
│                       ├── kernel_types.h
│                       ├── lctx.h
│                       ├── loadable_fs.h
│                       ├── lock.h
│                       ├── lockf.h
│                       ├── lockstat.h
│                       ├── log_data.h
│                       ├── malloc.h
│                       ├── mbuf.h
│                       ├── mman.h
│                       ├── mount.h
│                       ├── msg.h
│                       ├── msgbuf.h
│                       ├── netport.h
│                       ├── param.h
│                       ├── paths.h
│                       ├── pipe.h
│                       ├── poll.h
│                       ├── posix_sem.h
│                       ├── posix_shm.h
│                       ├── proc.h
│                       ├── proc_info.h
│                       ├── protosw.h
│                       ├── ptrace.h
│                       ├── qos.h
│                       ├── queue.h
│                       ├── quota.h
│                       ├── random.h
│                       ├── rbtree.h
│                       ├── reboot.h
│                       ├── resource.h
│                       ├── resourcevar.h
│                       ├── sbuf.h
│                       ├── sdt.h
│                       ├── select.h
│                       ├── sem.h
│                       ├── semaphore.h
│                       ├── shm.h
│                       ├── signal.h
│                       ├── signalvar.h
│                       ├── snapshot.h
│                       ├── socket.h
│                       ├── socketvar.h
│                       ├── sockio.h
│                       ├── spawn.h
│                       ├── stat.h
│                       ├── statvfs.h
│                       ├── stdio.h
│                       ├── sys_domain.h
│                       ├── syscall.h
│                       ├── sysctl.h
│                       ├── syslimits.h
│                       ├── syslog.h
│                       ├── termios.h
│                       ├── time.h
│                       ├── timeb.h
│                       ├── times.h
│                       ├── timex.h
│                       ├── tprintf.h
│                       ├── trace.h
│                       ├── tty.h
│                       ├── ttychars.h
│                       ├── ttycom.h
│                       ├── ttydefaults.h
│                       ├── ttydev.h
│                       ├── types.h
│                       ├── ubc.h
│                       ├── ucontext.h
│                       ├── ucred.h
│                       ├── uio.h
│                       ├── un.h
│                       ├── unistd.h
│                       ├── unpcb.h
│                       ├── user.h
│                       ├── utfconv.h
│                       ├── utsname.h
│                       ├── vadvise.h
│                       ├── vcmd.h
│                       ├── vm.h
│                       ├── vmmeter.h
│                       ├── vmparam.h
│                       ├── vnioctl.h
│                       ├── vnode.h
│                       ├── vnode_if.h
│                       ├── vsock.h
│                       ├── vstat.h
│                       ├── wait.h
│                       └── xattr.h
├── cross-windows/
│   ├── TraceLoggingProvider.h
│   ├── VersionHelpers.h
│   ├── Windows.h
│   └── src/
│       └── base/
│           └── win32-headers.h
├── parse_deps.py
├── patches/
│   ├── v8.patch
│   └── v8_build.patch
└── src/
    ├── binding.cpp
    ├── binding.h
    ├── shell.zig
    ├── test.zig
    └── v8.zig
Download .txt
SYMBOL INDEX (1453 symbols across 193 files)

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicDeprecated.h
  function __OSX_AVAILABLE_STARTING (line 145) | OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
  function OSAtomicDecrement32 (line 213) | __inline static
  function OSAtomicDecrement32Barrier (line 217) | __inline static
  function __OSX_AVAILABLE_STARTING (line 230) | OSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)
  function OSAtomicDecrement64 (line 300) | __inline static
  function OSAtomicDecrement64Barrier (line 304) | __inline static
  type std (line 774) | typedef std::atomic<uint8_t> _OSAtomic_uint8_t;
  type std (line 775) | typedef std::atomic<int32_t> _OSAtomic_int32_t;
  type std (line 776) | typedef std::atomic<uint32_t> _OSAtomic_uint32_t;
  type std (line 777) | typedef std::atomic<int64_t> _OSAtomic_int64_t;
  type std (line 778) | typedef std::atomic<void*> _OSAtomic_void_ptr_t;
  type _OSAtomic_uint8_t (line 786) | typedef _Atomic(uint8_t) _OSAtomic_uint8_t;
  type _OSAtomic_int32_t (line 787) | typedef _Atomic(int32_t) _OSAtomic_int32_t;
  type _OSAtomic_uint32_t (line 788) | typedef _Atomic(uint32_t) _OSAtomic_uint32_t;
  type _OSAtomic_int64_t (line 789) | typedef _Atomic(int64_t) _OSAtomic_int64_t;
  type _OSAtomic_void_ptr_t (line 790) | typedef _Atomic(void*) _OSAtomic_void_ptr_t;
  type OSAtomic_int64_aligned64_t (line 801) | typedef int64_t OSAtomic_int64_aligned64_t;
  function OSATOMIC_INLINE (line 810) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 819) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 828) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 835) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 842) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 849) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 856) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 866) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 876) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 883) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 890) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 897) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 904) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 913) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 922) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 931) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 940) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 949) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 958) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 967) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 976) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 985) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 994) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1003) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1012) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1023) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1034) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1045) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1056) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1067) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1078) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1089) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1100) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1111) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1122) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1132) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1142) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1152) | OSATOMIC_INLINE
  function OSATOMIC_INLINE (line 1162) | OSATOMIC_INLINE
  type OSFifoQueueHead (line 1195) | typedef	volatile struct {
  type OSFifoQueueHead (line 1203) | typedef	volatile struct {

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicQueue.h
  type OSQueueHead (line 48) | typedef volatile struct {
  type OSQueueHead (line 55) | typedef volatile struct {

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSByteOrder.h
  function __DARWIN_OS_INLINE (line 76) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 100) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 110) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 120) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 132) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 143) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 154) | __DARWIN_OS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSKextLib.h
  type OSKextLoadTag (line 557) | typedef uint32_t  OSKextLoadTag;

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSReturn.h
  type kern_return_t (line 80) | typedef kern_return_t OSReturn;

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSSpinLockDeprecated.h
  type OSSpinLock (line 79) | typedef int32_t OSSpinLock
  type OSSpinLock (line 134) | typedef int32_t OSSpinLock;
  function OSSPINLOCK_INLINE (line 141) | OSSPINLOCK_INLINE
  function OSSPINLOCK_INLINE (line 149) | OSSPINLOCK_INLINE
  function OSSPINLOCK_INLINE (line 157) | OSSPINLOCK_INLINE
  type OSSpinLock (line 184) | typedef int32_t OSSpinLock
  type OSSpinLock (line 185) | typedef volatile OSSpinLock *_os_nospin_lock_t

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSThermalNotification.h
  function __BEGIN_DECLS (line 39) | __BEGIN_DECLS
  type OSThermalNotificationLevel (line 69) | typedef enum {

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/OSTypes.h
  type UInt (line 36) | typedef unsigned int       UInt;
  type SInt (line 37) | typedef signed int         SInt;

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/_OSByteOrder.h
  function __DARWIN_OS_INLINE (line 97) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 106) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 115) | __DARWIN_OS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/arm/OSByteOrder.h
  function __DARWIN_OS_INLINE (line 13) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 23) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 39) | __DARWIN_OS_INLINE
  type _OSUnalignedU16 (line 64) | struct _OSUnalignedU16 {
  type _OSUnalignedU32 (line 68) | struct _OSUnalignedU32 {
  type _OSUnalignedU64 (line 72) | struct _OSUnalignedU64 {
  function __DARWIN_OS_INLINE (line 77) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 87) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 99) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 109) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 121) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 131) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 145) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 156) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 169) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 180) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 193) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 204) | __DARWIN_OS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/i386/OSByteOrder.h
  function OS_INLINE (line 38) | OS_INLINE
  function OS_INLINE (line 51) | OS_INLINE
  function OS_INLINE (line 64) | OS_INLINE
  function OS_INLINE (line 79) | OS_INLINE
  function OS_INLINE (line 90) | OS_INLINE
  function OS_INLINE (line 101) | OS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/i386/_OSByteOrder.h
  function __DARWIN_OS_INLINE (line 44) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 53) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 68) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 78) | __DARWIN_OS_INLINE
  function __DARWIN_OS_INLINE (line 91) | __DARWIN_OS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/libkern/machine/OSByteOrder.h
  function OS_INLINE (line 46) | OS_INLINE
  function OS_INLINE (line 55) | OS_INLINE
  function OS_INLINE (line 64) | OS_INLINE
  function OS_INLINE (line 75) | OS_INLINE
  function OS_INLINE (line 86) | OS_INLINE
  function OS_INLINE (line 97) | OS_INLINE
  function OS_INLINE (line 110) | OS_INLINE
  function OS_INLINE (line 121) | OS_INLINE
  function OS_INLINE (line 132) | OS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/arch.h
  type NXArchInfo (line 43) | typedef struct {
  type fat_arch (line 114) | struct fat_arch
  type fat_arch (line 116) | struct fat_arch
  type fat_arch_64 (line 129) | struct fat_arch_64
  type fat_arch_64 (line 131) | struct fat_arch_64

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/arm/reloc.h
  type reloc_type_arm (line 31) | enum reloc_type_arm

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/arm64/reloc.h
  type reloc_type_arm64 (line 30) | enum reloc_type_arm64

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/compact_unwind_encoding.h
  type compact_unwind_encoding_t (line 40) | typedef uint32_t compact_unwind_encoding_t;
  type unwind_info_section_header (line 465) | struct unwind_info_section_header
  type unwind_info_section_header_index_entry (line 480) | struct unwind_info_section_header_index_entry
  type unwind_info_section_header_lsda_index_entry (line 487) | struct unwind_info_section_header_lsda_index_entry
  type unwind_info_regular_second_level_entry (line 500) | struct unwind_info_regular_second_level_entry
  type unwind_info_regular_second_level_page_header (line 507) | struct unwind_info_regular_second_level_page_header
  type unwind_info_compressed_second_level_page_header (line 516) | struct unwind_info_compressed_second_level_page_header

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/dyld.h
  type mach_header (line 54) | struct mach_header
  type mach_header (line 67) | struct mach_header
  type mach_header (line 68) | struct mach_header
  type DYLD_BOOL (line 146) | enum DYLD_BOOL { FALSE, TRUE }
  type NSObjectFileImageReturnCode (line 151) | typedef enum {
  type __NSObjectFileImage (line 160) | struct __NSObjectFileImage

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/dyld_images.h
  type dyld_image_mode (line 72) | enum dyld_image_mode { dyld_image_adding=0, dyld_image_removing=1, dyld_...
  type dyld_image_info (line 74) | struct dyld_image_info {
  type dyld_uuid_info (line 82) | struct dyld_uuid_info {
  type dyld_aot_image_info (line 88) | struct dyld_aot_image_info {
  type dyld_aot_shared_cache_info (line 95) | struct dyld_aot_shared_cache_info {
  type dyld_image_mode (line 100) | enum dyld_image_mode
  type dyld_image_info (line 100) | struct dyld_image_info
  type dyld_all_image_infos (line 113) | struct dyld_all_image_infos {
  type dyld_shared_cache_ranges (line 194) | struct dyld_shared_cache_ranges {
  type dyld_shared_cache_ranges (line 201) | struct dyld_shared_cache_ranges

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/fat.h
  type fat_header (line 51) | struct fat_header {
  type fat_arch (line 56) | struct fat_arch {
  type fat_arch_64 (line 74) | struct fat_arch_64 {

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/fixup-chains.h
  type dyld_chained_fixups_header (line 37) | struct dyld_chained_fixups_header
  type dyld_chained_starts_in_image (line 49) | struct dyld_chained_starts_in_image
  type dyld_chained_starts_in_segment (line 58) | struct dyld_chained_starts_in_segment
  type dyld_chained_starts_offsets (line 81) | struct dyld_chained_starts_offsets
  type dyld_chained_ptr_arm64e_rebase (line 108) | struct dyld_chained_ptr_arm64e_rebase
  type dyld_chained_ptr_arm64e_bind (line 118) | struct dyld_chained_ptr_arm64e_bind
  type dyld_chained_ptr_arm64e_auth_rebase (line 129) | struct dyld_chained_ptr_arm64e_auth_rebase
  type dyld_chained_ptr_arm64e_auth_bind (line 141) | struct dyld_chained_ptr_arm64e_auth_bind
  type dyld_chained_ptr_64_rebase (line 154) | struct dyld_chained_ptr_64_rebase
  type dyld_chained_ptr_arm64e_bind24 (line 165) | struct dyld_chained_ptr_arm64e_bind24
  type dyld_chained_ptr_arm64e_auth_bind24 (line 176) | struct dyld_chained_ptr_arm64e_auth_bind24
  type dyld_chained_ptr_64_bind (line 190) | struct dyld_chained_ptr_64_bind
  type dyld_chained_ptr_64_kernel_cache_rebase (line 200) | struct dyld_chained_ptr_64_kernel_cache_rebase
  type dyld_chained_ptr_32_rebase (line 216) | struct dyld_chained_ptr_32_rebase
  type dyld_chained_ptr_32_bind (line 224) | struct dyld_chained_ptr_32_bind
  type dyld_chained_ptr_32_cache_rebase (line 233) | struct dyld_chained_ptr_32_cache_rebase
  type dyld_chained_ptr_32_firmware_rebase (line 241) | struct dyld_chained_ptr_32_firmware_rebase
  type dyld_chained_import (line 257) | struct dyld_chained_import
  type dyld_chained_import_addend (line 265) | struct dyld_chained_import_addend
  type dyld_chained_import_addend64 (line 274) | struct dyld_chained_import_addend64

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/getsect.h
  type section (line 57) | struct section
  type mach_header (line 62) | struct mach_header
  type segment_command (line 67) | struct segment_command
  type mach_header (line 71) | struct mach_header
  type section_64 (line 79) | struct section_64
  type mach_header_64 (line 84) | struct mach_header_64
  type segment_command_64 (line 89) | struct segment_command_64
  type mach_header_64 (line 93) | struct mach_header_64
  type mach_header (line 103) | struct mach_header
  type section (line 108) | struct section
  type mach_header (line 109) | struct mach_header
  type section (line 113) | struct section
  type mach_header (line 114) | struct mach_header
  type mach_header_64 (line 123) | struct mach_header_64
  type section_64 (line 128) | struct section_64
  type mach_header_64 (line 129) | struct mach_header_64
  type section (line 133) | struct section
  type mach_header_64 (line 134) | struct mach_header_64

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/i386/swap.h
  type i386_float_state (line 26) | struct i386_float_state
  type NXByteOrder (line 30) | enum NXByteOrder
  type i386_float_state (line 35) | struct i386_float_state
  type NXByteOrder (line 36) | enum NXByteOrder
  type NXByteOrder (line 40) | enum NXByteOrder
  type NXByteOrder (line 47) | enum NXByteOrder
  type NXByteOrder (line 51) | enum NXByteOrder
  type NXByteOrder (line 55) | enum NXByteOrder
  type NXByteOrder (line 61) | enum NXByteOrder
  type NXByteOrder (line 65) | enum NXByteOrder
  type NXByteOrder (line 69) | enum NXByteOrder
  type NXByteOrder (line 73) | enum NXByteOrder
  type NXByteOrder (line 77) | enum NXByteOrder
  type NXByteOrder (line 81) | enum NXByteOrder
  type NXByteOrder (line 85) | enum NXByteOrder
  type NXByteOrder (line 89) | enum NXByteOrder
  type NXByteOrder (line 93) | enum NXByteOrder
  type NXByteOrder (line 97) | enum NXByteOrder

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/ldsyms.h
  type __LP64__ (line 56) | struct
  type __LP64__ (line 73) | struct
  type __LP64__ (line 90) | struct
  type __LP64__ (line 107) | struct

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/loader.h
  type mach_header (line 54) | struct mach_header {
  type mach_header_64 (line 72) | struct mach_header_64 {
  type load_command (line 249) | struct load_command {
  type segment_command (line 357) | struct segment_command { /* for 32-bit architectures */
  type segment_command_64 (line 377) | struct segment_command_64 { /* for 64-bit architectures */
  type section (line 437) | struct section { /* for 32-bit architectures */
  type section_64 (line 451) | struct section_64 { /* for 64-bit architectures */
  type fvmlib (line 641) | struct fvmlib {
  type fvmlib_command (line 654) | struct fvmlib_command {
  type dylib (line 669) | struct dylib {
  type dylib_command (line 683) | struct dylib_command {
  type sub_framework_command (line 700) | struct sub_framework_command {
  type sub_client_command (line 715) | struct sub_client_command {
  type sub_umbrella_command (line 734) | struct sub_umbrella_command {
  type sub_library_command (line 755) | struct sub_library_command {
  type prebound_dylib_command (line 770) | struct prebound_dylib_command {
  type dylinker_command (line 786) | struct dylinker_command {
  type thread_command (line 814) | struct thread_command {
  type routines_command (line 831) | struct routines_command { /* for 32-bit architectures */
  type routines_command_64 (line 848) | struct routines_command_64 { /* for 64-bit architectures */
  type symtab_command (line 867) | struct symtab_command {
  type dysymtab_command (line 916) | struct dysymtab_command {
  type dylib_table_of_contents (line 1044) | struct dylib_table_of_contents {
  type dylib_module (line 1052) | struct dylib_module {
  type dylib_module_64 (line 1079) | struct dylib_module_64 {
  type dylib_reference (line 1113) | struct dylib_reference {
  type twolevel_hints_command (line 1122) | struct twolevel_hints_command {
  type twolevel_hint (line 1145) | struct twolevel_hint {
  type prebind_cksum_command (line 1161) | struct prebind_cksum_command {
  type uuid_command (line 1171) | struct uuid_command {
  type rpath_command (line 1181) | struct rpath_command {
  type linkedit_data_command (line 1191) | struct linkedit_data_command {
  type encryption_info_command (line 1207) | struct encryption_info_command {
  type encryption_info_command_64 (line 1220) | struct encryption_info_command_64 {
  type version_min_command (line 1235) | struct version_min_command {
  type build_version_command (line 1250) | struct build_version_command {
  type build_tool_version (line 1260) | struct build_tool_version {
  type dyld_info_command (line 1292) | struct dyld_info_command {
  type linker_option_command (line 1467) | struct linker_option_command {
  type symseg_command (line 1484) | struct symseg_command {
  type ident_command (line 1497) | struct ident_command {
  type fvmfile_command (line 1508) | struct fvmfile_command {
  type entry_point_command (line 1522) | struct entry_point_command {
  type source_version_command (line 1534) | struct source_version_command {
  type data_in_code_entry (line 1546) | struct data_in_code_entry {
  type tlv_descriptor (line 1563) | struct tlv_descriptor
  type note_command (line 1574) | struct note_command {
  type fileset_entry_command (line 1588) | struct fileset_entry_command {

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/nlist.h
  type nlist (line 76) | struct nlist {
  type nlist_64 (line 92) | struct nlist_64 {
  type nlist (line 318) | struct nlist

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/ranlib.h
  type ranlib (line 58) | struct	ranlib {
  type ranlib_64 (line 84) | struct	ranlib_64 {

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/reloc.h
  type relocation_info (line 64) | struct relocation_info {
  type scattered_relocation_info (line 151) | struct scattered_relocation_info {
  type reloc_type_generic (line 193) | enum reloc_type_generic

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/swap.h
  type fat_header (line 39) | struct fat_header
  type NXByteOrder (line 40) | enum NXByteOrder
  type fat_arch (line 43) | struct fat_arch
  type NXByteOrder (line 45) | enum NXByteOrder
  type fat_arch_64 (line 48) | struct fat_arch_64
  type NXByteOrder (line 50) | enum NXByteOrder
  type mach_header (line 53) | struct mach_header
  type NXByteOrder (line 54) | enum NXByteOrder
  type mach_header_64 (line 57) | struct mach_header_64
  type NXByteOrder (line 58) | enum NXByteOrder
  type load_command (line 61) | struct load_command
  type NXByteOrder (line 62) | enum NXByteOrder
  type segment_command (line 65) | struct segment_command
  type NXByteOrder (line 66) | enum NXByteOrder
  type segment_command_64 (line 69) | struct segment_command_64
  type NXByteOrder (line 70) | enum NXByteOrder
  type section (line 73) | struct section
  type NXByteOrder (line 75) | enum NXByteOrder
  type section_64 (line 78) | struct section_64
  type NXByteOrder (line 80) | enum NXByteOrder
  type symtab_command (line 83) | struct symtab_command
  type NXByteOrder (line 84) | enum NXByteOrder
  type dysymtab_command (line 87) | struct dysymtab_command
  type NXByteOrder (line 88) | enum NXByteOrder
  type symseg_command (line 91) | struct symseg_command
  type NXByteOrder (line 92) | enum NXByteOrder
  type fvmlib_command (line 95) | struct fvmlib_command
  type NXByteOrder (line 96) | enum NXByteOrder
  type dylib_command (line 99) | struct dylib_command
  type NXByteOrder (line 100) | enum NXByteOrder
  type sub_framework_command (line 103) | struct sub_framework_command
  type NXByteOrder (line 104) | enum NXByteOrder
  type sub_umbrella_command (line 107) | struct sub_umbrella_command
  type NXByteOrder (line 108) | enum NXByteOrder
  type sub_library_command (line 111) | struct sub_library_command
  type NXByteOrder (line 112) | enum NXByteOrder
  type sub_client_command (line 115) | struct sub_client_command
  type NXByteOrder (line 116) | enum NXByteOrder
  type prebound_dylib_command (line 119) | struct prebound_dylib_command
  type NXByteOrder (line 120) | enum NXByteOrder
  type dylinker_command (line 123) | struct dylinker_command
  type NXByteOrder (line 124) | enum NXByteOrder
  type fvmfile_command (line 127) | struct fvmfile_command
  type NXByteOrder (line 128) | enum NXByteOrder
  type thread_command (line 131) | struct thread_command
  type NXByteOrder (line 132) | enum NXByteOrder
  type ident_command (line 135) | struct ident_command
  type NXByteOrder (line 136) | enum NXByteOrder
  type routines_command (line 139) | struct routines_command
  type NXByteOrder (line 140) | enum NXByteOrder
  type routines_command_64 (line 143) | struct routines_command_64
  type NXByteOrder (line 144) | enum NXByteOrder
  type twolevel_hints_command (line 147) | struct twolevel_hints_command
  type NXByteOrder (line 148) | enum NXByteOrder
  type prebind_cksum_command (line 151) | struct prebind_cksum_command
  type NXByteOrder (line 152) | enum NXByteOrder
  type uuid_command (line 155) | struct uuid_command
  type NXByteOrder (line 156) | enum NXByteOrder
  type linkedit_data_command (line 159) | struct linkedit_data_command
  type NXByteOrder (line 160) | enum NXByteOrder
  type version_min_command (line 163) | struct version_min_command
  type NXByteOrder (line 164) | enum NXByteOrder
  type rpath_command (line 167) | struct rpath_command
  type NXByteOrder (line 168) | enum NXByteOrder
  type encryption_info_command (line 171) | struct encryption_info_command
  type NXByteOrder (line 172) | enum NXByteOrder
  type encryption_info_command_64 (line 175) | struct encryption_info_command_64
  type NXByteOrder (line 176) | enum NXByteOrder
  type linker_option_command (line 179) | struct linker_option_command
  type NXByteOrder (line 180) | enum NXByteOrder
  type dyld_info_command (line 183) | struct dyld_info_command
  type NXByteOrder (line 184) | enum NXByteOrder
  type entry_point_command (line 187) | struct entry_point_command
  type NXByteOrder (line 188) | enum NXByteOrder
  type source_version_command (line 191) | struct source_version_command
  type NXByteOrder (line 192) | enum NXByteOrder
  type note_command (line 195) | struct note_command
  type NXByteOrder (line 196) | enum NXByteOrder
  type build_version_command (line 199) | struct build_version_command
  type NXByteOrder (line 200) | enum NXByteOrder
  type build_tool_version (line 203) | struct build_tool_version
  type NXByteOrder (line 205) | enum NXByteOrder
  type prebind_cksum_command (line 208) | struct prebind_cksum_command
  type NXByteOrder (line 209) | enum NXByteOrder
  type uuid_command (line 212) | struct uuid_command
  type NXByteOrder (line 213) | enum NXByteOrder
  type twolevel_hint (line 216) | struct twolevel_hint
  type NXByteOrder (line 218) | enum NXByteOrder
  type fileset_entry_command (line 221) | struct fileset_entry_command
  type NXByteOrder (line 222) | enum NXByteOrder
  type nlist (line 225) | struct nlist
  type NXByteOrder (line 227) | enum NXByteOrder
  type nlist_64 (line 230) | struct nlist_64
  type NXByteOrder (line 232) | enum NXByteOrder
  type ranlib (line 235) | struct ranlib
  type NXByteOrder (line 237) | enum NXByteOrder
  type ranlib_64 (line 240) | struct ranlib_64
  type NXByteOrder (line 242) | enum NXByteOrder
  type relocation_info (line 245) | struct relocation_info
  type NXByteOrder (line 247) | enum NXByteOrder
  type NXByteOrder (line 252) | enum NXByteOrder
  type dylib_reference (line 255) | struct dylib_reference
  type NXByteOrder (line 257) | enum NXByteOrder
  type dylib_module (line 260) | struct dylib_module
  type NXByteOrder (line 262) | enum NXByteOrder
  type dylib_module_64 (line 265) | struct dylib_module_64
  type NXByteOrder (line 267) | enum NXByteOrder
  type dylib_table_of_contents (line 270) | struct dylib_table_of_contents
  type NXByteOrder (line 272) | enum NXByteOrder

FILE: cross-macos/sysroot/macos-12/usr/include/mach-o/x86_64/reloc.h
  type reloc_type_x86_64 (line 173) | enum reloc_type_x86_64

FILE: cross-macos/sysroot/macos-12/usr/include/os/activity.h
  type os_activity_s (line 69) | struct os_activity_s
  type os_activity_s (line 82) | struct os_activity_s
  type os_activity_s (line 94) | struct os_activity_s
  type os_activity_t (line 105) | typedef uint64_t os_activity_t;
  type os_activity_id_t (line 114) | typedef uint64_t os_activity_id_t;
  type os_activity_scope_state_s (line 122) | struct os_activity_scope_state_s {
  type os_breadcrumb_t (line 505) | typedef uint32_t os_breadcrumb_t;

FILE: cross-macos/sysroot/macos-12/usr/include/os/atomic.h
  function namespace (line 91) | namespace os {

FILE: cross-macos/sysroot/macos-12/usr/include/os/lock.h
  type os_unfair_lock_s (line 77) | struct os_unfair_lock_s {

FILE: cross-macos/sysroot/macos-12/usr/include/os/log.h
  type os_log_s (line 27) | struct os_log_s
  type os_log_s (line 40) | struct os_log_s
  type os_log_s (line 54) | struct os_log_s
  function OS_ALWAYS_INLINE (line 494) | OS_ALWAYS_INLINE

FILE: cross-macos/sysroot/macos-12/usr/include/os/overflow.h
  function OS_WARN_RESULT (line 48) | OS_WARN_RESULT

FILE: cross-macos/sysroot/macos-12/usr/include/os/signpost.h
  type os_signpost_id_t (line 111) | typedef uint64_t os_signpost_id_t;

FILE: cross-macos/sysroot/macos-12/usr/include/os/trace.h
  type xpc_object_t (line 11) | typedef xpc_object_t os_trace_payload_object_t;
  function OS_ALWAYS_INLINE (line 25) | OS_ALWAYS_INLINE __attribute__((format(os_trace, 1, 2)))
  function os_trace_type_enabled (line 350) | inline bool

FILE: cross-macos/sysroot/macos-12/usr/include/os/workgroup_base.h
  function os_workgroup_attr_opaque_s (line 62) | struct OS_REFINED_FOR_SWIFT os_workgroup_attr_opaque_s {
  function os_workgroup_interval_data_opaque_s (line 68) | struct OS_REFINED_FOR_SWIFT os_workgroup_interval_data_opaque_s {
  function os_workgroup_join_token_opaque_s (line 73) | struct OS_REFINED_FOR_SWIFT os_workgroup_join_token_opaque_s {

FILE: cross-macos/sysroot/macos-12/usr/include/os/workgroup_interval.h
  type os_workgroup_interval_data_s (line 55) | typedef struct os_workgroup_interval_data_opaque_s os_workgroup_interval...
  type os_workgroup_interval_data_opaque_s (line 56) | struct os_workgroup_interval_data_opaque_s

FILE: cross-macos/sysroot/macos-12/usr/include/os/workgroup_object.h
  type os_workgroup_attr_s (line 60) | typedef struct os_workgroup_attr_opaque_s os_workgroup_attr_s;
  type os_workgroup_attr_opaque_s (line 61) | struct os_workgroup_attr_opaque_s
  type os_workgroup_join_token_opaque_s (line 148) | struct os_workgroup_join_token_opaque_s
  type os_workgroup_join_token_opaque_s (line 150) | struct os_workgroup_join_token_opaque_s
  type os_workgroup_index (line 205) | typedef uint32_t os_workgroup_index;
  type os_workgroup_max_parallel_threads_attr_s (line 323) | struct os_workgroup_max_parallel_threads_attr_s
  type os_workgroup_max_parallel_threads_attr_s (line 325) | struct os_workgroup_max_parallel_threads_attr_s

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_attr_t.h
  type __darwin_pthread_attr_t (line 31) | typedef __darwin_pthread_attr_t pthread_attr_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_cond_t.h
  type __darwin_pthread_cond_t (line 31) | typedef __darwin_pthread_cond_t pthread_cond_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_condattr_t.h
  type __darwin_pthread_condattr_t (line 31) | typedef __darwin_pthread_condattr_t pthread_condattr_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_key_t.h
  type __darwin_pthread_key_t (line 31) | typedef __darwin_pthread_key_t pthread_key_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_mutex_t.h
  type __darwin_pthread_mutex_t (line 31) | typedef __darwin_pthread_mutex_t pthread_mutex_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_mutexattr_t.h
  type __darwin_pthread_mutexattr_t (line 31) | typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_once_t.h
  type __darwin_pthread_once_t (line 31) | typedef __darwin_pthread_once_t pthread_once_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_rwlock_t.h
  type __darwin_pthread_rwlock_t (line 31) | typedef __darwin_pthread_rwlock_t pthread_rwlock_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_rwlockattr_t.h
  type __darwin_pthread_rwlockattr_t (line 31) | typedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_t.h
  type __darwin_pthread_t (line 31) | typedef __darwin_pthread_t pthread_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_types.h
  type __darwin_pthread_handler_rec (line 57) | struct __darwin_pthread_handler_rec {
  type _opaque_pthread_attr_t (line 63) | struct _opaque_pthread_attr_t {
  type _opaque_pthread_cond_t (line 68) | struct _opaque_pthread_cond_t {
  type _opaque_pthread_condattr_t (line 73) | struct _opaque_pthread_condattr_t {
  type _opaque_pthread_mutex_t (line 78) | struct _opaque_pthread_mutex_t {
  type _opaque_pthread_mutexattr_t (line 83) | struct _opaque_pthread_mutexattr_t {
  type _opaque_pthread_once_t (line 88) | struct _opaque_pthread_once_t {
  type _opaque_pthread_rwlock_t (line 93) | struct _opaque_pthread_rwlock_t {
  type _opaque_pthread_rwlockattr_t (line 98) | struct _opaque_pthread_rwlockattr_t {
  type _opaque_pthread_t (line 103) | struct _opaque_pthread_t {
  type __darwin_pthread_attr_t (line 109) | typedef struct _opaque_pthread_attr_t __darwin_pthread_attr_t;
  type __darwin_pthread_cond_t (line 110) | typedef struct _opaque_pthread_cond_t __darwin_pthread_cond_t;
  type __darwin_pthread_condattr_t (line 111) | typedef struct _opaque_pthread_condattr_t __darwin_pthread_condattr_t;
  type __darwin_pthread_key_t (line 112) | typedef unsigned long __darwin_pthread_key_t;
  type __darwin_pthread_mutex_t (line 113) | typedef struct _opaque_pthread_mutex_t __darwin_pthread_mutex_t;
  type __darwin_pthread_mutexattr_t (line 114) | typedef struct _opaque_pthread_mutexattr_t __darwin_pthread_mutexattr_t;
  type __darwin_pthread_once_t (line 115) | typedef struct _opaque_pthread_once_t __darwin_pthread_once_t;
  type __darwin_pthread_rwlock_t (line 116) | typedef struct _opaque_pthread_rwlock_t __darwin_pthread_rwlock_t;
  type __darwin_pthread_rwlockattr_t (line 117) | typedef struct _opaque_pthread_rwlockattr_t __darwin_pthread_rwlockattr_t;
  type _opaque_pthread_t (line 118) | struct _opaque_pthread_t

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_select.h
  type timeval (line 44) | struct timeval

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types.h
  type __int64_t (line 55) | typedef __int64_t       __darwin_blkcnt_t;
  type __int32_t (line 56) | typedef __int32_t       __darwin_blksize_t;
  type __int32_t (line 57) | typedef __int32_t       __darwin_dev_t;
  type __darwin_fsblkcnt_t (line 58) | typedef unsigned int    __darwin_fsblkcnt_t;
  type __darwin_fsfilcnt_t (line 59) | typedef unsigned int    __darwin_fsfilcnt_t;
  type __uint32_t (line 60) | typedef __uint32_t      __darwin_gid_t;
  type __uint32_t (line 61) | typedef __uint32_t      __darwin_id_t;
  type __uint64_t (line 62) | typedef __uint64_t      __darwin_ino64_t;
  type __darwin_ino64_t (line 64) | typedef __darwin_ino64_t __darwin_ino_t;
  type __uint32_t (line 66) | typedef __uint32_t      __darwin_ino_t;
  type __darwin_natural_t (line 68) | typedef __darwin_natural_t __darwin_mach_port_name_t;
  type __darwin_mach_port_name_t (line 69) | typedef __darwin_mach_port_name_t __darwin_mach_port_t;
  type __uint16_t (line 70) | typedef __uint16_t      __darwin_mode_t;
  type __int64_t (line 71) | typedef __int64_t       __darwin_off_t;
  type __int32_t (line 72) | typedef __int32_t       __darwin_pid_t;
  type __uint32_t (line 73) | typedef __uint32_t      __darwin_sigset_t;
  type __int32_t (line 74) | typedef __int32_t       __darwin_suseconds_t;
  type __uint32_t (line 75) | typedef __uint32_t      __darwin_uid_t;
  type __uint32_t (line 76) | typedef __uint32_t      __darwin_useconds_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_blkcnt_t.h
  type __darwin_blkcnt_t (line 31) | typedef __darwin_blkcnt_t        blkcnt_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_blksize_t.h
  type __darwin_blksize_t (line 31) | typedef __darwin_blksize_t        blksize_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_clock_t.h
  type __darwin_clock_t (line 31) | typedef __darwin_clock_t        clock_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ct_rune_t.h
  type __darwin_ct_rune_t (line 32) | typedef __darwin_ct_rune_t ct_rune_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_dev_t.h
  type __darwin_dev_t (line 31) | typedef __darwin_dev_t        dev_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_errno_t.h
  type errno_t (line 30) | typedef int                    errno_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_def.h
  type fd_set (line 50) | struct fd_set {
  function __darwin_check_fd_set (line 57) | int
  function __header_always_inline (line 79) | __header_always_inline int
  function __header_always_inline (line 89) | __header_always_inline void
  function __header_always_inline (line 97) | __header_always_inline void

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_filesec_t.h
  type _filesec (line 30) | struct _filesec
  type _filesec (line 31) | struct _filesec

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsblkcnt_t.h
  type __darwin_fsblkcnt_t (line 31) | typedef __darwin_fsblkcnt_t             fsblkcnt_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsfilcnt_t.h
  type __darwin_fsfilcnt_t (line 31) | typedef __darwin_fsfilcnt_t             fsfilcnt_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsid_t.h
  type fsid_t (line 31) | typedef struct fsid { int32_t val[2]; } fsid_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsobj_id_t.h
  type fsobj_id_t (line 33) | typedef struct fsobj_id {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_gid_t.h
  type __darwin_gid_t (line 31) | typedef __darwin_gid_t  gid_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_guid_t.h
  type guid_t (line 31) | typedef union {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_id_t.h
  type __darwin_id_t (line 31) | typedef __darwin_id_t   id_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_in_addr_t.h
  type __uint32_t (line 31) | typedef __uint32_t      in_addr_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_in_port_t.h
  type __uint16_t (line 31) | typedef __uint16_t              in_port_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ino64_t.h
  type __darwin_ino64_t (line 31) | typedef __darwin_ino64_t        ino64_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ino_t.h
  type __darwin_ino_t (line 31) | typedef __darwin_ino_t          ino_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_intptr_t.h
  type __darwin_intptr_t (line 32) | typedef __darwin_intptr_t       intptr_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_iovec_t.h
  type iovec (line 31) | struct iovec {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_key_t.h
  type __int32_t (line 31) | typedef __int32_t        key_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_mach_port_t.h
  type __darwin_mach_port_t (line 50) | typedef __darwin_mach_port_t mach_port_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_mbstate_t.h
  type __darwin_mbstate_t (line 32) | typedef __darwin_mbstate_t mbstate_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_mode_t.h
  type __darwin_mode_t (line 31) | typedef __darwin_mode_t         mode_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_nlink_t.h
  type __uint16_t (line 31) | typedef __uint16_t        nlink_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_off_t.h
  type __darwin_off_t (line 31) | typedef __darwin_off_t          off_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_pid_t.h
  type __darwin_pid_t (line 31) | typedef __darwin_pid_t        pid_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ptrdiff_t.h
  type __darwin_ptrdiff_t (line 32) | typedef __darwin_ptrdiff_t ptrdiff_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_rsize_t.h
  type __darwin_size_t (line 31) | typedef __darwin_size_t        rsize_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_rune_t.h
  type __darwin_rune_t (line 31) | typedef __darwin_rune_t rune_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_sa_family_t.h
  type __uint8_t (line 31) | typedef __uint8_t               sa_family_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_sigaltstack.h
  type _STRUCT_SIGALTSTACK (line 48) | typedef _STRUCT_SIGALTSTACK     stack_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_sigset_t.h
  type __darwin_sigset_t (line 31) | typedef __darwin_sigset_t               sigset_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_size_t.h
  type __darwin_size_t (line 31) | typedef __darwin_size_t        size_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_socklen_t.h
  type __darwin_socklen_t (line 31) | typedef __darwin_socklen_t      socklen_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ssize_t.h
  type __darwin_ssize_t (line 31) | typedef __darwin_ssize_t        ssize_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_suseconds_t.h
  type __darwin_suseconds_t (line 31) | typedef __darwin_suseconds_t    suseconds_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_time_t.h
  type __darwin_time_t (line 31) | typedef __darwin_time_t         time_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval64.h
  type timeval64 (line 34) | struct timeval64 {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_char.h
  type u_char (line 30) | typedef unsigned char   u_char;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int.h
  type u_int (line 30) | typedef unsigned int    u_int;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int16_t.h
  type u_int16_t (line 30) | typedef unsigned short                  u_int16_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int32_t.h
  type u_int32_t (line 30) | typedef unsigned int            u_int32_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int64_t.h
  type u_int64_t (line 30) | typedef unsigned long long      u_int64_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int8_t.h
  type u_int8_t (line 30) | typedef unsigned char           u_int8_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_short.h
  type u_short (line 30) | typedef unsigned short  u_short;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ucontext.h
  type _STRUCT_UCONTEXT (line 57) | typedef _STRUCT_UCONTEXT        ucontext_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_ucontext64.h
  type _STRUCT_UCONTEXT64 (line 52) | typedef _STRUCT_UCONTEXT64      ucontext64_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_uid_t.h
  type __darwin_uid_t (line 31) | typedef __darwin_uid_t        uid_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_useconds_t.h
  type __darwin_useconds_t (line 31) | typedef __darwin_useconds_t     useconds_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_uuid_t.h
  type __darwin_uuid_t (line 31) | typedef __darwin_uuid_t uuid_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_va_list.h
  type __darwin_va_list (line 32) | typedef __darwin_va_list va_list;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_wchar_t.h
  type __darwin_wchar_t (line 34) | typedef __darwin_wchar_t wchar_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/_types/_wint_t.h
  type __darwin_wint_t (line 32) | typedef __darwin_wint_t wint_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/acct.h
  type u_int16_t (line 85) | typedef u_int16_t comp_t;
  type acct (line 87) | struct acct {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/acl.h
  type acl_perm_t (line 69) | typedef enum {
  type acl_tag_t (line 91) | typedef enum {
  type acl_type_t (line 98) | typedef enum {
  type acl_entry_id_t (line 115) | typedef enum {
  type acl_flag_t (line 122) | typedef enum {
  type _acl (line 134) | struct _acl
  type _acl_entry (line 135) | struct _acl_entry
  type _acl_permset (line 136) | struct _acl_permset
  type _acl_flagset (line 137) | struct _acl_flagset
  type _acl (line 139) | struct _acl
  type _acl_entry (line 140) | struct _acl_entry
  type _acl_permset (line 141) | struct _acl_permset
  type _acl_flagset (line 142) | struct _acl_flagset
  type u_int64_t (line 144) | typedef u_int64_t		acl_permset_mask_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/aio.h
  type aiocb (line 65) | struct aiocb {
  type aiocb (line 142) | struct aiocb
  type aiocb (line 151) | struct aiocb
  type aiocb (line 169) | struct aiocb
  type aiocb (line 185) | struct aiocb
  type aiocb (line 200) | struct aiocb
  type aiocb (line 216) | struct aiocb
  type timespec (line 218) | struct timespec
  type aiocb (line 228) | struct aiocb
  type aiocb (line 243) | struct aiocb
  type sigevent (line 245) | struct sigevent

FILE: cross-macos/sysroot/macos-12/usr/include/sys/attr.h
  type u_int32_t (line 63) | typedef u_int32_t text_encoding_t;
  type u_int32_t (line 65) | typedef u_int32_t fsobj_type_t;
  type u_int32_t (line 67) | typedef u_int32_t fsobj_tag_t;
  type u_int32_t (line 69) | typedef u_int32_t fsfile_type_t;
  type u_int32_t (line 71) | typedef u_int32_t fsvolid_t;
  type u_int32_t (line 75) | typedef u_int32_t attrgroup_t;
  type attrlist (line 77) | struct attrlist {
  type attribute_set_t (line 89) | typedef struct attribute_set {
  type attrreference_t (line 100) | typedef struct attrreference {
  type diskextent (line 107) | struct diskextent {
  type diskextent (line 112) | struct diskextent
  type u_int32_t (line 114) | typedef u_int32_t vol_capabilities_set_t[4];
  type vol_capabilities_attr_t (line 121) | typedef struct vol_capabilities_attr {
  type vol_attributes_attr_t (line 370) | typedef struct vol_attributes_attr {
  type fssearchblock (line 568) | struct fssearchblock {
  type searchstate (line 582) | struct searchstate {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/buf.h
  type uio (line 965) | struct uio

FILE: cross-macos/sysroot/macos-12/usr/include/sys/conf.h
  type buf (line 81) | struct buf
  type proc (line 82) | struct proc
  type tty (line 83) | struct tty
  type uio (line 84) | struct uio
  type vnode (line 85) | struct vnode

FILE: cross-macos/sysroot/macos-12/usr/include/sys/dirent.h
  type dirent (line 89) | struct dirent {
  type dirent (line 112) | struct dirent

FILE: cross-macos/sysroot/macos-12/usr/include/sys/disk.h
  type dk_extent_t (line 90) | typedef struct{
  type dk_firmware_path_t (line 95) | typedef struct{
  type dk_format_capacity_t (line 99) | typedef struct{
  type dk_format_capacities_t (line 106) | typedef struct{
  type dk_synchronize_t (line 117) | typedef struct{
  type dk_unmap_t (line 126) | typedef struct{
  type dk_corestorage_info_t (line 137) | typedef struct{
  type dk_provision_extent_t (line 154) | typedef struct{
  type dk_provision_status_t (line 161) | typedef struct{
  type dk_error_description_t (line 170) | typedef struct{

FILE: cross-macos/sysroot/macos-12/usr/include/sys/dtrace.h
  type uchar_t (line 112) | typedef uint8_t		uchar_t;
  type ushort_t (line 113) | typedef uint16_t	ushort_t;
  type uint_t (line 114) | typedef uint32_t	uint_t;
  type ulong_t (line 115) | typedef unsigned long	ulong_t;
  type u_longlong_t (line 116) | typedef uint64_t	u_longlong_t;
  type longlong_t (line 117) | typedef int64_t		longlong_t;
  type off64_t (line 118) | typedef int64_t		off64_t;
  type processorid_t (line 119) | typedef int			processorid_t;
  type hrtime_t (line 120) | typedef int64_t		hrtime_t;
  type _dtrace_boolean (line 122) | typedef enum { B_FALSE = 0, B_TRUE = 1 } _dtrace_boolean;
  type modctl (line 126) | struct modctl
  type ctf_file_t (line 130) | typedef struct ctf_file ctf_file_t;
  type ctf_id_t (line 131) | typedef long ctf_id_t;
  type zoneid_t (line 135) | typedef uint32_t        zoneid_t;
  type va_list (line 140) | typedef va_list __va_list;
  type dtrace_id_t (line 169) | typedef uint32_t dtrace_id_t;
  type dtrace_epid_t (line 170) | typedef uint32_t dtrace_epid_t;
  type dtrace_aggid_t (line 171) | typedef uint32_t dtrace_aggid_t;
  type dtrace_aggvarid_t (line 172) | typedef int64_t dtrace_aggvarid_t;
  type dtrace_actkind_t (line 173) | typedef uint16_t dtrace_actkind_t;
  type dtrace_optval_t (line 174) | typedef int64_t dtrace_optval_t;
  type dtrace_cacheid_t (line 175) | typedef uint32_t dtrace_cacheid_t;
  type dtrace_probespec_t (line 177) | typedef enum dtrace_probespec {
  type dif_instr_t (line 410) | typedef uint32_t dif_instr_t;
  type dtrace_diftype_t (line 459) | typedef struct dtrace_diftype {
  type dtrace_difv_t (line 479) | typedef struct dtrace_difv {
  type dof_hdr_t (line 748) | typedef struct dof_hdr {
  type dof_secidx_t (line 811) | typedef uint32_t dof_secidx_t;
  type dof_stridx_t (line 812) | typedef uint32_t dof_stridx_t;
  type dof_sec_t (line 817) | typedef struct dof_sec {
  type dof_ecbdesc_t (line 856) | typedef struct dof_ecbdesc {
  type dof_probedesc_t (line 864) | typedef struct dof_probedesc {
  type dof_actdesc_t (line 873) | typedef struct dof_actdesc {
  type dof_difohdr_t (line 882) | typedef struct dof_difohdr {
  type dof_relohdr_t (line 887) | typedef struct dof_relohdr {
  type dof_relodesc_t (line 893) | typedef struct dof_relodesc {
  type dof_optdesc_t (line 903) | typedef struct dof_optdesc {
  type dof_attr_t (line 909) | typedef uint32_t dof_attr_t;
  type dof_provider_t (line 916) | typedef struct dof_provider {
  type dof_probe_t (line 930) | typedef struct dof_probe {
  type dof_xlator_t (line 947) | typedef struct dof_xlator {
  type dof_xlmember_t (line 956) | typedef struct dof_xlmember {
  type dof_xlref_t (line 962) | typedef struct dof_xlref {
  type dtrace_difo_t (line 982) | typedef struct dtrace_difo {
  type dtrace_predicate (line 1022) | struct dtrace_predicate
  type dtrace_probedesc_t (line 1024) | typedef struct dtrace_probedesc {
  type dtrace_repldesc_t (line 1032) | typedef struct dtrace_repldesc {
  type dtrace_preddesc_t (line 1037) | typedef struct dtrace_preddesc {
  type dtrace_actdesc_t (line 1042) | typedef struct dtrace_actdesc {
  type dtrace_ecbdesc_t (line 1053) | typedef struct dtrace_ecbdesc {
  type dtrace_recdesc_t (line 1084) | typedef struct dtrace_recdesc {
  type dtrace_eprobedesc_t (line 1094) | typedef struct dtrace_eprobedesc {
  type dtrace_aggdesc_t (line 1103) | typedef struct dtrace_aggdesc {
  type dtrace_fmtdesc_t (line 1115) | typedef struct dtrace_fmtdesc {
  type dtrace_bufdesc_t (line 1207) | typedef struct dtrace_bufdesc {
  type dtrace_rechdr_t (line 1222) | typedef struct dtrace_rechdr {
  type dtrace_status_t (line 1253) | typedef struct dtrace_status {
  type dtrace_conf_t (line 1276) | typedef struct dtrace_conf {
  type dtrace_argdesc_t (line 1322) | typedef struct dtrace_argdesc {
  type dtrace_stability_t (line 1338) | typedef uint8_t dtrace_stability_t;
  type dtrace_class_t (line 1339) | typedef uint8_t dtrace_class_t;
  type dtrace_ppriv_t (line 1370) | typedef struct dtrace_ppriv {
  type dtrace_attribute_t (line 1376) | typedef struct dtrace_attribute {
  type dtrace_pattr_t (line 1382) | typedef struct dtrace_pattr {
  type dtrace_providerdesc_t (line 1390) | typedef struct dtrace_providerdesc {
  type dtrace_symbol_t (line 1450) | typedef struct dtrace_symbol {
  type dtrace_module_symbols_t (line 1456) | typedef struct dtrace_module_symbols {
  type dtrace_module_uuids_list_t (line 1477) | typedef struct dtrace_module_uuids_list {
  type dtrace_procdesc_t (line 1484) | typedef struct dtrace_procdesc {
  type dof_helper_t (line 1587) | typedef struct dof_helper {
  type dof_ioctl_data_t (line 1602) | typedef struct dof_ioctl_data {
  type dtrace_pops_t (line 2300) | typedef struct dtrace_pops {
  type dtrace_provider_id_t (line 2315) | typedef uintptr_t       dtrace_provider_id_t;
  type dtrace_helper_probedesc_t (line 2452) | typedef struct dtrace_helper_probedesc {
  type dtrace_helper_provdesc_t (line 2473) | typedef struct dtrace_helper_provdesc {
  type dtrace_mops_t (line 2486) | typedef struct dtrace_mops {
  type dtrace_meta_provider_id_t (line 2493) | typedef uintptr_t       dtrace_meta_provider_id_t;
  type dtrace_vtime_state_t (line 2508) | typedef enum dtrace_vtime_state {
  type regs (line 2523) | struct regs
  type regs (line 2525) | struct regs
  type regs (line 2526) | struct regs
  type dtrace_icookie_t (line 2543) | typedef uintptr_t dtrace_icookie_t;
  type modctl (line 2554) | struct modctl
  type modctl (line 2555) | struct modctl
  type kmod_info (line 2557) | struct kmod_info
  type kmod_info (line 2558) | struct kmod_info

FILE: cross-macos/sysroot/macos-12/usr/include/sys/dtrace_glue.h
  type wrap_timer_call (line 105) | struct wrap_timer_call
  type dtrace_cpu_t (line 110) | typedef struct dtrace_cpu {
  type cpu_core_t (line 134) | typedef struct cpu_core {
  type cpu_setup_t (line 154) | typedef enum {
  type dtrace_module_symbols (line 202) | struct dtrace_module_symbols
  type modctl_t (line 205) | typedef struct modctl {
  type modctl (line 259) | struct modctl
  type cred_t (line 275) | typedef struct ucred cred_t;
  type cyclic_id_t (line 293) | typedef uintptr_t cyclic_id_t;
  type cyclic_id_t (line 294) | typedef cyclic_id_t *cyclic_id_list_t;
  type cyc_level_t (line 295) | typedef uint16_t cyc_level_t;
  type cyc_time_t (line 300) | typedef struct cyc_time {
  type cyc_handler_t (line 305) | typedef struct cyc_handler {
  type cyc_omni_handler_t (line 311) | typedef struct cyc_omni_handler {
  type ddi_detach_cmd_t (line 337) | typedef enum {
  type uint_t (line 347) | typedef uint_t major_t;
  type uint_t (line 348) | typedef uint_t minor_t;
  type __dev_info (line 350) | struct __dev_info
  type vmem_t (line 376) | typedef struct vmem vmem_t;
  type kmem_cache_t (line 377) | typedef struct kmem_cache kmem_cache_t;
  type kthread_t (line 418) | typedef struct _kthread kthread_t;
  type model_t (line 436) | typedef unsigned int model_t;
  type pc_t (line 456) | typedef uintptr_t pc_t;
  type greg_t (line 457) | typedef uintptr_t greg_t;
  type regs (line 461) | struct regs

FILE: cross-macos/sysroot/macos-12/usr/include/sys/dtrace_impl.h
  type dtrace_probe (line 63) | struct dtrace_probe
  type dtrace_ecb (line 64) | struct dtrace_ecb
  type dtrace_predicate (line 65) | struct dtrace_predicate
  type dtrace_action (line 66) | struct dtrace_action
  type dtrace_provider (line 67) | struct dtrace_provider
  type dtrace_state (line 68) | struct dtrace_state
  type dtrace_probe_t (line 70) | typedef struct dtrace_probe dtrace_probe_t;
  type dtrace_ecb_t (line 71) | typedef struct dtrace_ecb dtrace_ecb_t;
  type dtrace_predicate_t (line 72) | typedef struct dtrace_predicate dtrace_predicate_t;
  type dtrace_action_t (line 73) | typedef struct dtrace_action dtrace_action_t;
  type dtrace_provider_t (line 74) | typedef struct dtrace_provider dtrace_provider_t;
  type dtrace_meta_t (line 75) | typedef struct dtrace_meta dtrace_meta_t;
  type dtrace_state_t (line 76) | typedef struct dtrace_state dtrace_state_t;
  type dtrace_optid_t (line 77) | typedef uint32_t dtrace_optid_t;
  type dtrace_specid_t (line 78) | typedef uint32_t dtrace_specid_t;
  type dtrace_genid_t (line 79) | typedef uint64_t dtrace_genid_t;
  type dtrace_probe (line 102) | struct dtrace_probe {
  type dtrace_probekey_t (line 126) | typedef struct dtrace_probekey {
  type dtrace_hashbucket_t (line 138) | typedef struct dtrace_hashbucket {
  type dtrace_hash_t (line 146) | typedef struct dtrace_hash {
  type dtrace_ecb (line 220) | struct dtrace_ecb {
  type dtrace_predicate (line 235) | struct dtrace_predicate {
  type dtrace_action (line 241) | struct dtrace_action {
  type dtrace_aggregation_t (line 251) | typedef struct dtrace_aggregation {
  type dtrace_buffer_t (line 428) | typedef struct dtrace_buffer {
  type dtrace_aggkey_t (line 506) | typedef struct dtrace_aggkey {
  type dtrace_aggbuffer_t (line 514) | typedef struct dtrace_aggbuffer {
  type dtrace_speculation_state_t (line 573) | typedef enum dtrace_speculation_state {
  type dtrace_speculation_t (line 583) | typedef struct dtrace_speculation {
  type dtrace_key_t (line 783) | typedef struct dtrace_key {
  type dtrace_tuple_t (line 788) | typedef struct dtrace_tuple {
  type dtrace_dynvar_t (line 794) | typedef struct dtrace_dynvar {
  type dtrace_dynvar_op_t (line 801) | typedef enum dtrace_dynvar_op {
  type dtrace_dynhash_t (line 807) | typedef struct dtrace_dynhash {
  type dtrace_dstate_percpu_t (line 817) | typedef struct dtrace_dstate_percpu {
  type dtrace_dstate_state_t (line 832) | typedef enum dtrace_dstate_state {
  type dtrace_dstate_t (line 839) | typedef struct dtrace_dstate {
  type dtrace_statvar_t (line 881) | typedef struct dtrace_statvar {
  type dtrace_vstate_t (line 888) | typedef struct dtrace_vstate {
  type dtrace_mstate_t (line 922) | typedef struct dtrace_mstate {
  type dtrace_activity_t (line 1001) | typedef enum dtrace_activity {
  type dtrace_helper_action_t (line 1098) | typedef struct dtrace_helper_action {
  type dtrace_helper_provider_t (line 1106) | typedef struct dtrace_helper_provider {
  type dtrace_helpers_t (line 1112) | typedef struct dtrace_helpers {
  type dtrace_helptrace_t (line 1142) | typedef struct dtrace_helptrace {
  type dtrace_cred_t (line 1185) | typedef struct dtrace_cred {
  type dtrace_format_t (line 1192) | typedef struct dtrace_format {
  type dtrace_state (line 1209) | struct dtrace_state {
  type dtrace_provider (line 1247) | struct dtrace_provider {
  type dtrace_meta (line 1259) | struct dtrace_meta {
  type dtrace_enabling_t (line 1280) | typedef struct dtrace_enabling {
  type dtrace_anon_t (line 1304) | typedef struct dtrace_anon {
  type dtrace_errhash_t (line 1319) | typedef struct dtrace_errhash {
  type dtrace_string_t (line 1328) | typedef struct dtrace_string dtrace_string_t;
  type dtrace_string_t (line 1330) | typedef struct dtrace_string {
  type dtrace_match_cond_t (line 1343) | typedef struct dtrace_match_cond {
  type dtrace_toxrange_t (line 1365) | typedef struct dtrace_toxrange {
  type regs (line 1383) | struct regs

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ev.h
  type eventreq (line 38) | struct eventreq {
  type eventreq (line 54) | struct eventreq
  type timeval (line 74) | struct timeval

FILE: cross-macos/sysroot/macos-12/usr/include/sys/event.h
  type kevent (line 86) | struct kevent {
  type kevent64_s (line 98) | struct kevent64_s {
  type knote (line 371) | struct knote
  type timespec (line 375) | struct timespec
  type kevent (line 380) | struct kevent
  type kevent (line 381) | struct kevent
  type timespec (line 382) | struct timespec
  type kevent64_s (line 384) | struct kevent64_s
  type kevent64_s (line 385) | struct kevent64_s
  type timespec (line 387) | struct timespec

FILE: cross-macos/sysroot/macos-12/usr/include/sys/fasttrap.h
  type fasttrap_probe_type_t (line 46) | typedef enum fasttrap_probe_type {
  type fasttrap_provider_type_t (line 56) | typedef enum fasttrap_provider_type {
  type fasttrap_probe_spec_t (line 71) | typedef struct fasttrap_probe_spec {
  type fasttrap_instr_query_t (line 98) | typedef struct fasttrap_instr_query {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/fcntl.h
  type flock (line 359) | struct flock {
  type flocktimeout (line 374) | struct flocktimeout {
  type radvisory (line 387) | struct radvisory {
  type fsignatures_t (line 400) | typedef struct fsignatures {
  type fsupplement_t (line 412) | typedef struct fsupplement {
  type fchecklv_t (line 431) | typedef struct fchecklv {
  type fgetsigsinfo_t (line 445) | typedef struct fgetsigsinfo {
  type fstore_t (line 460) | typedef struct fstore {
  type fpunchhole_t (line 469) | typedef struct fpunchhole {
  type ftrimactivefile_t (line 477) | typedef struct ftrimactivefile {
  type fspecread_t (line 483) | typedef struct fspecread {
  type fbootstraptransfer_t (line 492) | typedef struct fbootstraptransfer {
  type log2phys (line 522) | struct log2phys {
  type filesec_property_t (line 545) | typedef enum {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/file.h
  type ucred (line 77) | struct ucred
  type ucred (line 78) | struct ucred
  type posix_cred (line 79) | struct posix_cred
  type posix_cred (line 80) | struct posix_cred

FILE: cross-macos/sysroot/macos-12/usr/include/sys/gmon.h
  type gmonhdr (line 72) | struct gmonhdr {
  type gmonhdr_64 (line 82) | struct gmonhdr_64 {
  type gmonhdr (line 91) | typedef struct
  type tostruct (line 146) | struct tostruct {
  type tostruct_64 (line 153) | struct tostruct_64 {
  type tostruct_t (line 160) | typedef struct
  type rawarc (line 172) | struct rawarc {
  type rawarc_64 (line 178) | struct rawarc_64 {
  type rawarc_t (line 184) | typedef struct
  type gmonparam (line 201) | struct gmonparam {
  type gmonparam (line 215) | struct gmonparam
  type gmon_data_t (line 233) | typedef struct gmon_data {
  type rawarc_order (line 254) | struct rawarc_order {
  type rawarc_order_64 (line 259) | struct rawarc_order_64 {
  type rawarc_order_t (line 266) | typedef struct

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ioctl.h
  type ttysize (line 79) | struct ttysize {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ioctl_compat.h
  type tchars (line 75) | struct tchars {
  type ltchars (line 84) | struct ltchars {
  type sgttyb (line 98) | struct sgttyb {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ipc.h
  type ipc_perm (line 107) | struct ipc_perm {
  type __ipc_perm_old (line 127) | struct __ipc_perm_old {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/kauth.h
  type ntsid_t (line 60) | typedef struct {
  type kauth_identity_extlookup (line 81) | struct kauth_identity_extlookup {
  type kauth_cache_sizes (line 131) | struct kauth_cache_sizes {
  type u_int32_t (line 153) | typedef u_int32_t kauth_ace_rights_t;
  type kauth_ace (line 156) | struct kauth_ace {
  type kauth_ace (line 187) | struct kauth_ace
  type kauth_acl (line 192) | struct kauth_acl {
  type kauth_acl (line 237) | struct kauth_acl
  type kauth_filesec (line 247) | struct kauth_filesec {
  type kauth_filesec (line 268) | struct kauth_filesec

FILE: cross-macos/sysroot/macos-12/usr/include/sys/kern_control.h
  type ctl_event_data (line 75) | struct ctl_event_data {
  type ctl_info (line 117) | struct ctl_info {
  type sockaddr_ctl (line 140) | struct sockaddr_ctl {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/kern_event.h
  type kern_event_msg (line 150) | struct kern_event_msg {
  type kev_request (line 186) | struct kev_request {
  type kev_vendor_code (line 209) | struct kev_vendor_code {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/kernel_types.h
  type daddr64_t (line 44) | typedef int64_t daddr64_t;
  type buf (line 47) | struct buf
  type buf (line 48) | struct buf
  type file (line 50) | struct file
  type file (line 51) | struct file
  type ucred (line 54) | struct ucred
  type ucred (line 55) | struct ucred
  type mount (line 59) | struct mount
  type mount (line 60) | struct mount
  type vnode (line 62) | struct vnode
  type vnode (line 63) | struct vnode
  type proc (line 66) | struct proc
  type proc (line 67) | struct proc
  type proc_ident (line 69) | struct proc_ident
  type proc_ident (line 70) | struct proc_ident
  type uio (line 72) | struct uio
  type uio (line 73) | struct uio
  type vfs_context (line 75) | struct vfs_context
  type vfs_context (line 76) | struct vfs_context
  type vfstable (line 78) | struct vfstable
  type vfstable (line 79) | struct vfstable
  type __ifnet (line 81) | struct __ifnet
  type __mbuf (line 82) | struct __mbuf
  type __pkthdr (line 83) | struct __pkthdr
  type __socket (line 84) | struct __socket
  type __sockopt (line 85) | struct __sockopt
  type __ifaddr (line 86) | struct __ifaddr
  type __ifmultiaddr (line 87) | struct __ifmultiaddr
  type __ifnet_filter (line 88) | struct __ifnet_filter
  type __rtentry (line 89) | struct __rtentry
  type __if_clone (line 90) | struct __if_clone
  type __bufattr (line 91) | struct __bufattr
  type __ifnet (line 93) | struct __ifnet
  type __mbuf (line 94) | struct __mbuf
  type __pkthdr (line 95) | struct __pkthdr
  type __socket (line 96) | struct __socket
  type __sockopt (line 97) | struct __sockopt
  type __ifaddr (line 98) | struct __ifaddr
  type __ifmultiaddr (line 99) | struct __ifmultiaddr
  type __ifnet_filter (line 100) | struct __ifnet_filter
  type __rtentry (line 101) | struct __rtentry
  type __if_clone (line 102) | struct __if_clone
  type __bufattr (line 103) | struct __bufattr
  type buf (line 107) | struct buf
  type file (line 108) | struct file
  type ucred (line 110) | struct ucred
  type mount (line 113) | struct mount
  type vnode (line 114) | struct vnode
  type proc (line 116) | struct proc
  type proc_ident (line 117) | struct proc_ident
  type uio (line 118) | struct uio
  type user_iovec (line 119) | struct user_iovec
  type vfs_context (line 120) | struct vfs_context
  type vfstable (line 121) | struct vfstable
  type kauth_ace (line 130) | struct kauth_ace
  type kauth_ace (line 131) | struct kauth_ace
  type kauth_acl (line 135) | struct kauth_acl
  type kauth_acl (line 136) | struct kauth_acl
  type kauth_filesec (line 140) | struct kauth_filesec
  type kauth_filesec (line 141) | struct kauth_filesec
  type kauth_action_t (line 146) | typedef int kauth_action_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/lctx.h
  function pid_t (line 9) | static __inline pid_t
  function setlcid (line 16) | static __inline int

FILE: cross-macos/sysroot/macos-12/usr/include/sys/lockf.h
  type vnop_advlock_args (line 70) | struct vnop_advlock_args
  type vnode (line 71) | struct vnode
  type lockf (line 87) | struct lockf {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/mbuf.h
  type mbstat (line 113) | struct mbstat {
  type ombstat (line 136) | struct ombstat {
  type mb_class_stat_t (line 160) | typedef struct mb_class_stat {
  type mb_stat_t (line 195) | typedef struct mb_stat {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/mount.h
  type statfs64 (line 123) | struct statfs64
  type statfs (line 129) | struct statfs
  type statfs (line 136) | struct statfs {
  type vfsstatfs (line 163) | struct vfsstatfs {
  type mount (line 293) | struct mount
  type mount (line 294) | struct mount
  type vnode (line 295) | struct vnode
  type vnode (line 296) | struct vnode
  type vfsconf (line 300) | struct vfsconf {
  type vfsidctl (line 310) | struct vfsidctl {
  type vfsquery (line 349) | struct vfsquery {
  type vfs_server (line 354) | struct vfs_server {
  type netfs_status (line 362) | struct netfs_status {
  type fhandle (line 398) | struct fhandle {
  type fhandle_t (line 402) | typedef struct fhandle  fhandle_t;
  type fhandle (line 407) | struct fhandle
  type statfs (line 408) | struct statfs
  type statfs64 (line 410) | struct statfs64
  type statfs (line 413) | struct statfs
  type statfs64 (line 415) | struct statfs64
  type statfs (line 417) | struct statfs
  type statfs (line 418) | struct statfs
  type statfs64 (line 422) | struct statfs64
  type statfs (line 426) | struct statfs
  type statfs64 (line 428) | struct statfs64
  type vfsconf (line 431) | struct vfsconf

FILE: cross-macos/sysroot/macos-12/usr/include/sys/msg.h
  type msgqnum_t (line 83) | typedef unsigned long           msgqnum_t;
  type msglen_t (line 86) | typedef unsigned long           msglen_t;
  type msqid_ds (line 116) | struct msqid_ds
  type __msqid_ds_new (line 119) | struct __msqid_ds_new
  type __msqid_ds_old (line 144) | struct __msqid_ds_old {
  type msg (line 169) | struct msg {
  type mymsg (line 187) | struct mymsg {
  type msginfo (line 202) | struct msginfo {
  type msqid_ds (line 218) | struct msqid_ds

FILE: cross-macos/sysroot/macos-12/usr/include/sys/msgbuf.h
  type msgbuf (line 69) | struct  msgbuf {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/netport.h
  type netaddr_t (line 37) | typedef uint32_t        netaddr_t;
  type np_uid_t (line 42) | typedef struct {
  type network_port_t (line 47) | typedef struct {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/pipe.h
  type pipebuf (line 98) | struct pipebuf {
  type pipemapping (line 111) | struct pipemapping {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/poll.h
  type pollfd (line 96) | struct pollfd {
  type nfds_t (line 102) | typedef unsigned int nfds_t;
  type pollfd (line 113) | struct pollfd

FILE: cross-macos/sysroot/macos-12/usr/include/sys/posix_sem.h
  type label (line 51) | struct label
  type pseminfo (line 55) | struct pseminfo {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/posix_shm.h
  type label (line 51) | struct label
  type pshminfo (line 55) | struct pshminfo {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/proc.h
  type session (line 86) | struct session
  type pgrp (line 87) | struct pgrp
  type proc (line 88) | struct proc
  type proc_ident (line 89) | struct proc_ident
  type extern_proc (line 92) | struct extern_proc {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/proc_info.h
  type proc_bsdinfo (line 60) | struct proc_bsdinfo {
  type proc_bsdshortinfo (line 86) | struct proc_bsdshortinfo {
  type proc_taskinfo (line 127) | struct proc_taskinfo {
  type proc_taskallinfo (line 148) | struct proc_taskallinfo {
  type proc_threadinfo (line 155) | struct proc_threadinfo {
  type proc_regioninfo (line 169) | struct proc_regioninfo {
  type proc_workqueueinfo (line 225) | struct proc_workqueueinfo {
  type proc_fileinfo (line 239) | struct proc_fileinfo {
  type proc_exitreasonbasicinfo (line 258) | struct proc_exitreasonbasicinfo {
  type proc_exitreasoninfo (line 265) | struct proc_exitreasoninfo {
  type vinfo_stat (line 276) | struct vinfo_stat {
  type vnode_info (line 300) | struct vnode_info {
  type vnode_info_path (line 307) | struct vnode_info_path {
  type vnode_fdinfo (line 312) | struct vnode_fdinfo {
  type vnode_fdinfowithpath (line 317) | struct vnode_fdinfowithpath {
  type proc_regionwithpathinfo (line 322) | struct proc_regionwithpathinfo {
  type proc_regionpath (line 327) | struct proc_regionpath {
  type proc_vnodepathinfo (line 333) | struct proc_vnodepathinfo {
  type proc_threadwithpathinfo (line 338) | struct proc_threadwithpathinfo {
  type in4in6_addr (line 355) | struct in4in6_addr {
  type in_sockinfo (line 360) | struct in_sockinfo {
  type tcp_sockinfo (line 413) | struct tcp_sockinfo {
  type un_sockinfo (line 428) | struct un_sockinfo {
  type ndrv_info (line 445) | struct ndrv_info {
  type kern_event_info (line 455) | struct kern_event_info {
  type kern_ctl_info (line 465) | struct kern_ctl_info {
  type vsock_sockinfo (line 479) | struct vsock_sockinfo {
  type sockbuf_info (line 503) | struct sockbuf_info {
  type socket_info (line 524) | struct socket_info {
  type socket_fdinfo (line 555) | struct socket_fdinfo {
  type psem_info (line 562) | struct psem_info {
  type psem_fdinfo (line 567) | struct psem_fdinfo {
  type pshm_info (line 574) | struct pshm_info  {
  type pshm_fdinfo (line 580) | struct pshm_fdinfo {
  type pipe_info (line 586) | struct pipe_info {
  type pipe_fdinfo (line 594) | struct pipe_fdinfo {
  type kqueue_info (line 600) | struct kqueue_info {
  type kqueue_dyninfo (line 606) | struct kqueue_dyninfo {
  type kqueue_fdinfo (line 629) | struct kqueue_fdinfo {
  type appletalk_info (line 634) | struct appletalk_info {
  type appletalk_fdinfo (line 638) | struct appletalk_fdinfo {
  type proc_info_udata_t (line 643) | typedef uint64_t proc_info_udata_t;
  type proc_fdinfo (line 656) | struct proc_fdinfo {
  type proc_fileportinfo (line 661) | struct proc_fileportinfo {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/queue.h
  type qm_trace (line 149) | struct qm_trace {
  type type (line 330) | struct type
  type type (line 482) | struct type
  type type (line 574) | struct type
  function TRACEBUF (line 575) | TRACEBUF                                                        \
  type type (line 588) | struct type
  type type (line 756) | struct type
  function __NULLABILITY_COMPLETENESS_POP (line 758) | __NULLABILITY_COMPLETENESS_POP                                          \
  type quehead (line 865) | struct quehead {
  function insque (line 874) | static __inline void
  function remque (line 887) | static __inline void

FILE: cross-macos/sysroot/macos-12/usr/include/sys/quota.h
  type dqfilehdr (line 146) | struct dqfilehdr {
  type dqblk (line 159) | struct dqblk {
  function dqhashshift (line 212) | static __inline int

FILE: cross-macos/sysroot/macos-12/usr/include/sys/rbtree.h
  type rb_tree_ops_t (line 81) | typedef struct {
  type rb_node_t (line 88) | typedef struct rb_node { void * opaque[3]; } rb_node_t;
  type rb_tree_t (line 89) | typedef struct rb_tree { void *opaque[8]; } rb_tree_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/resource.h
  type __uint64_t (line 89) | typedef __uint64_t      rlim_t;
  type rusage (line 152) | struct  rusage {
  type rusage_info_v0 (line 201) | struct rusage_info_v0 {
  type rusage_info_v1 (line 215) | struct rusage_info_v1 {
  type rusage_info_v2 (line 235) | struct rusage_info_v2 {
  type rusage_info_v3 (line 257) | struct rusage_info_v3 {
  type rusage_info_v4 (line 288) | struct rusage_info_v4 {
  type rusage_info_v5 (line 327) | struct rusage_info_v5 {
  type rusage_info_current (line 367) | typedef struct rusage_info_v5 rusage_info_current;
  type rlimit (line 411) | struct rlimit {
  type proc_rlimit_control_wakeupmon (line 446) | struct proc_rlimit_control_wakeupmon {
  type rlimit (line 515) | struct rlimit
  type rusage (line 516) | struct rusage
  type rlimit (line 521) | struct rlimit

FILE: cross-macos/sysroot/macos-12/usr/include/sys/resourcevar.h
  type pstats (line 75) | struct pstats {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/sbuf.h
  type sbuf (line 41) | struct sbuf {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/select.h
  type timespec (line 115) | struct timespec

FILE: cross-macos/sysroot/macos-12/usr/include/sys/sem.h
  type semid_ds (line 82) | struct semid_ds
  type __semid_ds_new (line 85) | struct __semid_ds_new
  type __semid_ds_old (line 105) | struct __semid_ds_old {
  type sem (line 132) | struct sem {
  type sembuf (line 143) | struct sembuf {
  type semid_ds (line 179) | struct semid_ds
  type semun_t (line 182) | typedef union semun semun_t;
  type sembuf (line 202) | struct sembuf

FILE: cross-macos/sysroot/macos-12/usr/include/sys/semaphore.h
  type sem_t (line 43) | typedef int sem_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/shm.h
  type shmatt_t (line 93) | typedef unsigned short  shmatt_t;
  type shmid_ds (line 142) | struct shmid_ds
  type __shmid_ds_new (line 145) | struct __shmid_ds_new
  type __shmid_ds_old (line 163) | struct __shmid_ds_old {
  type shmid_ds (line 184) | struct shmid_ds

FILE: cross-macos/sysroot/macos-12/usr/include/sys/signal.h
  type sigevent (line 168) | struct sigevent {
  type siginfo_t (line 177) | typedef struct __siginfo {
  type __siginfo (line 271) | struct __siginfo
  type __sigaction (line 276) | struct  __sigaction {
  type sigaction (line 286) | struct  sigaction {
  type sigvec (line 348) | struct  sigvec {
  type sigstack (line 367) | struct  sigstack {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/snapshot.h
  type attrlist (line 44) | struct attrlist

FILE: cross-macos/sysroot/macos-12/usr/include/sys/socket.h
  type __uint32_t (line 293) | typedef __uint32_t sae_associd_t;
  type __uint32_t (line 297) | typedef __uint32_t sae_connid_t;
  type sa_endpoints_t (line 307) | typedef struct sa_endpoints {
  type linger (line 319) | struct  linger {
  type accept_filter_arg (line 325) | struct  accept_filter_arg {
  type so_np_extensions (line 337) | struct so_np_extensions {
  type sockaddr (line 412) | struct sockaddr {
  type sockproto (line 425) | struct sockproto {
  type sockaddr_storage (line 445) | struct sockaddr_storage {
  type msghdr (line 552) | struct msghdr {
  type cmsghdr (line 600) | struct cmsghdr {
  type cmsgcred (line 623) | struct cmsgcred {
  type cmsghdr (line 660) | struct cmsghdr
  type sf_hdtr (line 691) | struct sf_hdtr {
  type sockaddr (line 704) | struct sockaddr
  type sockaddr (line 706) | struct sockaddr
  type sockaddr (line 707) | struct sockaddr
  type sockaddr (line 708) | struct sockaddr
  type sockaddr (line 710) | struct sockaddr
  type sockaddr (line 715) | struct sockaddr
  type msghdr (line 717) | struct msghdr
  type msghdr (line 719) | struct msghdr
  type sockaddr (line 721) | struct sockaddr
  type sf_hdtr (line 729) | struct sf_hdtr
  type sockaddr (line 733) | struct sockaddr
  type iovec (line 737) | struct iovec

FILE: cross-macos/sysroot/macos-12/usr/include/sys/socketvar.h
  type u_quad_t (line 81) | typedef u_quad_t so_gen_t;
  type xsockbuf (line 95) | struct xsockbuf {
  type xsocket (line 108) | struct  xsocket {
  type xsocket64 (line 131) | struct  xsocket64 {
  type so_tracker_action (line 159) | enum so_tracker_action {
  type so_tracker_attribute (line 168) | enum so_tracker_attribute {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/stat.h
  type ostat (line 110) | struct ostat {
  type timespec (line 130) | struct timespec
  type timespec (line 131) | struct timespec
  type timespec (line 132) | struct timespec
  type stat (line 182) | struct stat
  type stat (line 186) | struct stat {
  type stat64 (line 221) | struct stat64
  type stat (line 382) | struct stat
  type stat (line 383) | struct stat
  type stat (line 386) | struct stat
  type stat (line 392) | struct stat
  type timespec (line 398) | struct timespec
  type timespec (line 399) | struct timespec
  type stat (line 411) | struct stat
  type stat (line 414) | struct stat
  type stat (line 417) | struct stat
  type stat64 (line 422) | struct stat64
  type stat64 (line 423) | struct stat64
  type stat64 (line 424) | struct stat64
  type stat64 (line 425) | struct stat64
  type stat64 (line 426) | struct stat64
  type stat64 (line 427) | struct stat64

FILE: cross-macos/sysroot/macos-12/usr/include/sys/statvfs.h
  type statvfs (line 37) | struct statvfs {
  type statvfs (line 56) | struct statvfs
  type statvfs (line 57) | struct statvfs

FILE: cross-macos/sysroot/macos-12/usr/include/sys/sys_domain.h
  type sockaddr_sys (line 46) | struct sockaddr_sys {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/sysctl.h
  type ctlname (line 133) | struct ctlname {
  type ucred (line 451) | struct  ucred
  type _ucred (line 459) | struct _ucred {
  type kinfo_proc (line 466) | struct kinfo_proc {
  type xsw_usage (line 533) | struct xsw_usage {
  type loadavg (line 544) | struct loadavg {
  type loadavg (line 548) | struct loadavg

FILE: cross-macos/sysroot/macos-12/usr/include/sys/syslog.h
  type CODE (line 96) | typedef struct _code {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/termios.h
  type tcflag_t (line 263) | typedef unsigned long   tcflag_t;
  type cc_t (line 264) | typedef unsigned char   cc_t;
  type speed_t (line 265) | typedef unsigned long   speed_t;
  type termios (line 267) | struct termios {
  type termios (line 331) | struct termios
  type termios (line 332) | struct termios
  type termios (line 333) | struct termios
  type termios (line 334) | struct termios
  type termios (line 335) | struct termios
  type termios (line 336) | struct termios
  type termios (line 343) | struct termios
  type termios (line 344) | struct termios

FILE: cross-macos/sysroot/macos-12/usr/include/sys/time.h
  type itimerval (line 91) | struct  itimerval {
  type timezone (line 129) | struct timezone {
  type clockinfo (line 172) | struct clockinfo {
  type timeval (line 190) | struct timeval
  type timeval (line 190) | struct timeval
  type timeval (line 191) | struct timeval
  type timeval (line 192) | struct timeval
  type timeval (line 193) | struct timeval
  type timezone (line 193) | struct timezone
  type itimerval (line 196) | struct itimerval
  type timeval (line 197) | struct timeval
  type itimerval (line 201) | struct itimerval
  type itimerval (line 202) | struct itimerval
  type timeval (line 203) | struct timeval

FILE: cross-macos/sysroot/macos-12/usr/include/sys/timeb.h
  type timeb (line 82) | struct timeb {
  type timeb (line 91) | struct timeb

FILE: cross-macos/sysroot/macos-12/usr/include/sys/times.h
  type tms (line 82) | struct tms {
  type tms (line 90) | struct tms

FILE: cross-macos/sysroot/macos-12/usr/include/sys/timex.h
  type ntptimeval (line 147) | struct ntptimeval {
  type timex (line 162) | struct timex {
  type timex (line 192) | struct timex
  type ntptimeval (line 193) | struct ntptimeval

FILE: cross-macos/sysroot/macos-12/usr/include/sys/tprintf.h
  type proc (line 72) | struct proc
  type pgrp (line 73) | struct pgrp
  type proc (line 76) | struct proc

FILE: cross-macos/sysroot/macos-12/usr/include/sys/tty.h
  type tty (line 77) | struct tty
  type clist (line 78) | struct clist
  type speedtab (line 130) | struct speedtab {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ttychars.h
  type ttychars (line 76) | struct ttychars {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ttycom.h
  type winsize (line 82) | struct winsize {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/types.h
  type u_long (line 88) | typedef unsigned long           u_long;
  type ushort (line 91) | typedef unsigned short          ushort;
  type uint (line 92) | typedef unsigned int            uint;
  type u_int64_t (line 95) | typedef u_int64_t               u_quad_t;
  type quad_t (line 96) | typedef int64_t                 quad_t;
  type quad_t (line 97) | typedef quad_t *                qaddr_t;
  type daddr_t (line 101) | typedef int32_t                 daddr_t;
  type u_int32_t (line 105) | typedef u_int32_t               fixpt_t;
  type segsz_t (line 125) | typedef int32_t                 segsz_t;
  type swblk_t (line 126) | typedef int32_t                 swblk_t;
  function __int32_t (line 138) | static inline __int32_t
  function __int32_t (line 144) | static inline __int32_t
  function dev_t (line 150) | static inline dev_t
  type __int32_t (line 189) | typedef __int32_t       fd_mask;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ubc.h
  type vnode (line 54) | struct vnode
  type vnode (line 55) | struct vnode
  type vnode (line 56) | struct vnode
  type vnode (line 57) | struct vnode
  type vnode (line 60) | struct vnode
  type thread (line 61) | struct thread
  type vnode (line 62) | struct vnode
  type proc (line 62) | struct proc
  type thread (line 62) | struct thread
  type uio (line 76) | struct uio
  type uio (line 77) | struct uio
  type uio (line 79) | struct uio
  type uio (line 80) | struct uio
  type cl_direct_read_lock_t (line 100) | typedef struct cl_direct_read_lock cl_direct_read_lock_t;

FILE: cross-macos/sysroot/macos-12/usr/include/sys/ucred.h
  type label (line 78) | struct label
  type ucred (line 81) | struct ucred
  type posix_cred (line 82) | struct posix_cred
  type ucred (line 86) | struct ucred
  type posix_cred (line 87) | struct posix_cred
  type xucred (line 100) | struct xucred {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/uio.h
  type uio_rw (line 92) | enum uio_rw { UIO_READ, UIO_WRITE }
  type iovec (line 98) | struct iovec
  type iovec (line 99) | struct iovec
  type iovec (line 103) | struct iovec
  type iovec (line 104) | struct iovec

FILE: cross-macos/sysroot/macos-12/usr/include/sys/un.h
  type sockaddr_un (line 76) | struct  sockaddr_un {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/unistd.h
  type accessx_descriptor (line 132) | struct accessx_descriptor {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/unpcb.h
  type u_quad_t (line 98) | typedef u_quad_t        unp_gen_t;
  type _unpcb_list_entry (line 101) | struct _unpcb_list_entry {
  type xunpgen (line 118) | struct  xunpgen {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/user.h
  type waitq_set (line 68) | struct waitq_set
  type user (line 86) | struct  user {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/utsname.h
  type utsname (line 74) | struct  utsname {
  type utsname (line 83) | struct utsname

FILE: cross-macos/sysroot/macos-12/usr/include/sys/vm.h
  type vmspace (line 80) | struct vmspace {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/vmmeter.h
  type vmmeter (line 74) | struct vmmeter {
  type vmtotal (line 122) | struct vmtotal {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/vnioctl.h
  type vncontrol_t (line 85) | typedef enum {
  type vn_ioctl (line 89) | struct vn_ioctl {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/vnode.h
  type vtype (line 81) | enum vtype      {
  type vtagtype (line 95) | enum vtagtype   {
  type io_compression_stats (line 151) | struct io_compression_stats {
  type io_compression_stats (line 157) | struct io_compression_stats
  type iocs_store_buffer_entry (line 167) | struct iocs_store_buffer_entry {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/vsock.h
  type sockaddr_vm (line 49) | struct sockaddr_vm {
  type u_quad_t (line 57) | typedef u_quad_t vsock_gen_t;
  type xvsockpcb (line 59) | struct xvsockpcb {
  type xvsockpgen (line 75) | struct  xvsockpgen {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/vstat.h
  type vstat (line 49) | struct vstat {

FILE: cross-macos/sysroot/macos-12/usr/include/sys/wait.h
  type idtype_t (line 79) | typedef enum {
  type rusage (line 254) | struct rusage
  type rusage (line 255) | struct rusage

FILE: cross-windows/src/base/win32-headers.h
  type BOOL (line 51) | typedef int BOOL;
  type DWORD (line 52) | typedef unsigned long DWORD;
  type LONG (line 53) | typedef long LONG;
  type ULONG_PTR (line 61) | typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
  type ULONG_PTR (line 63) | typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR;
  type SRWLOCK (line 66) | typedef struct _RTL_SRWLOCK SRWLOCK;
  type CONDITION_VARIABLE (line 67) | typedef struct _RTL_CONDITION_VARIABLE CONDITION_VARIABLE;
  type CRITICAL_SECTION (line 68) | typedef struct _RTL_CRITICAL_SECTION CRITICAL_SECTION;
  type _RTL_CRITICAL_SECTION_DEBUG (line 69) | struct _RTL_CRITICAL_SECTION_DEBUG
  type V8_SRWLOCK (line 78) | struct V8_SRWLOCK {
  type V8_CONDITION_VARIABLE (line 82) | struct V8_CONDITION_VARIABLE {
  type V8_CRITICAL_SECTION (line 86) | struct V8_CRITICAL_SECTION {
  function SRWLOCK (line 95) | inline SRWLOCK* V8ToWindowsType(V8_SRWLOCK* p) {
  function SRWLOCK (line 99) | inline const SRWLOCK* V8ToWindowsType(const V8_SRWLOCK* p) {
  function CONDITION_VARIABLE (line 103) | inline CONDITION_VARIABLE* V8ToWindowsType(V8_CONDITION_VARIABLE* p) {
  function CONDITION_VARIABLE (line 107) | inline const CONDITION_VARIABLE* V8ToWindowsType(
  function CRITICAL_SECTION (line 112) | inline CRITICAL_SECTION* V8ToWindowsType(V8_CRITICAL_SECTION* p) {
  function CRITICAL_SECTION (line 116) | inline const CRITICAL_SECTION* V8ToWindowsType(const V8_CRITICAL_SECTION...

FILE: parse_deps.py
  function Var (line 9) | def Var(arg):
  function main (line 12) | def main():

FILE: src/binding.cpp
  class Wrapper (line 9) | class Wrapper {
    method Wrapper (line 11) | Wrapper(T* buf, Args... args) : inner_(args...) {}
  function construct_in_place (line 17) | void construct_in_place(T* buf, Args... args) {
  function T (line 22) | inline static T* local_to_ptr(v8::Local<T> local) {
  function ptr_to_local (line 27) | inline static const v8::Local<T> ptr_to_local(const T* ptr) {
  function ptr_to_maybe_local (line 35) | inline static const v8::MaybeLocal<T> ptr_to_maybe_local(const T* ptr) {
  function T (line 41) | inline static T* maybe_local_to_ptr(v8::MaybeLocal<T> local) {
  type SharedPtr (line 54) | struct SharedPtr {
  type make_pod (line 62) | struct make_pod {
    method make_pod (line 64) | inline make_pod(V&& value) : pod_(helper<V>(std::move(value))) {}
    method make_pod (line 66) | inline make_pod(const V& value) : pod_(helper<V>(value)) {}
    method helper (line 80) | inline helper(V&& value) : value_(std::move(value)) {}
    method helper (line 81) | inline helper(const V& value) : value_(value) {}
  function v8__Platform__DELETE (line 111) | void v8__Platform__DELETE(v8::Platform* self) { delete self; }
  function v8__Platform__PumpMessageLoop (line 113) | bool v8__Platform__PumpMessageLoop(
  function v8__V8__InitializePlatform (line 153) | void v8__V8__InitializePlatform(v8::Platform* platform) {
  function v8__V8__Initialize (line 157) | void v8__V8__Initialize() { v8::V8::Initialize(); }
  function v8__V8__Dispose (line 159) | int v8__V8__Dispose() { return v8::V8::Dispose(); }
  function v8__V8__DisposePlatform (line 161) | void v8__V8__DisposePlatform() { v8::V8::DisposePlatform(); }
  function v8__Isolate__Dispose (line 169) | void v8__Isolate__Dispose(v8::Isolate* isolate) { isolate->Dispose(); }
  function v8__Isolate__Enter (line 171) | void v8__Isolate__Enter(v8::Isolate* isolate) { isolate->Enter(); }
  function v8__Isolate__Exit (line 173) | void v8__Isolate__Exit(v8::Isolate* isolate) { isolate->Exit(); }
  function v8__Isolate__CreateParams__SIZEOF (line 179) | size_t v8__Isolate__CreateParams__SIZEOF() {
  function v8__Isolate__CreateParams__CONSTRUCT (line 183) | void v8__Isolate__CreateParams__CONSTRUCT(v8::Isolate::CreateParams* buf) {
  function v8__Isolate__SetPromiseRejectCallback (line 194) | void v8__Isolate__SetPromiseRejectCallback(
  function v8__Isolate__GetMicrotasksPolicy (line 200) | v8::MicrotasksPolicy v8__Isolate__GetMicrotasksPolicy(const v8::Isolate*...
  function v8__Isolate__SetMicrotasksPolicy (line 204) | void v8__Isolate__SetMicrotasksPolicy(
  function v8__Isolate__PerformMicrotaskCheckpoint (line 210) | void v8__Isolate__PerformMicrotaskCheckpoint(v8::Isolate* self) {
  function v8__Isolate__AddMessageListener (line 214) | bool v8__Isolate__AddMessageListener(
  function v8__Isolate__AddMessageListenerWithErrorLevel (line 220) | bool v8__Isolate__AddMessageListenerWithErrorLevel(
  function v8__Isolate__SetCaptureStackTraceForUncaughtExceptions (line 228) | void v8__Isolate__SetCaptureStackTraceForUncaughtExceptions(
  function v8__Isolate__TerminateExecution (line 235) | void v8__Isolate__TerminateExecution(v8::Isolate* self) {
  function v8__Isolate__IsExecutionTerminating (line 239) | bool v8__Isolate__IsExecutionTerminating(v8::Isolate* self) {
  function v8__Isolate__CancelTerminateExecution (line 243) | void v8__Isolate__CancelTerminateExecution(v8::Isolate* self) {
  function v8__Isolate__LowMemoryNotification (line 247) | void v8__Isolate__LowMemoryNotification(v8::Isolate* self) {
  function v8__Isolate__GetHeapStatistics (line 251) | void v8__Isolate__GetHeapStatistics(
  function v8__HeapStatistics__SIZEOF (line 257) | size_t v8__HeapStatistics__SIZEOF() {
  function v8__ArrayBuffer__Allocator__DELETE (line 267) | void v8__ArrayBuffer__Allocator__DELETE(v8::ArrayBuffer::Allocator* self...
  function v8__BackingStore__ByteLength (line 287) | size_t v8__BackingStore__ByteLength(const v8::BackingStore& self) { retu...
  function v8__BackingStore__IsShared (line 289) | bool v8__BackingStore__IsShared(const v8::BackingStore& self) { return s...
  function SharedPtr (line 291) | SharedPtr v8__BackingStore__TO_SHARED_PTR(v8::BackingStore* unique_ptr) {
  function std__shared_ptr__v8__BackingStore__reset (line 295) | void std__shared_ptr__v8__BackingStore__reset(std::shared_ptr<v8::Backin...
  function std__shared_ptr__v8__BackingStore__use_count (line 299) | long std__shared_ptr__v8__BackingStore__use_count(const std::shared_ptr<...
  function v8__ArrayBuffer__ByteLength (line 312) | size_t v8__ArrayBuffer__ByteLength(const v8::ArrayBuffer& self) { return...
  function SharedPtr (line 314) | SharedPtr v8__ArrayBuffer__GetBackingStore(const v8::ArrayBuffer& self) {
  function v8__HandleScope__CONSTRUCT (line 326) | void v8__HandleScope__CONSTRUCT(v8::HandleScope* buf, v8::Isolate* isola...
  function v8__HandleScope__DESTRUCT (line 332) | void v8__HandleScope__DESTRUCT(v8::HandleScope* scope) { scope->~HandleS...
  function v8__Context__Enter (line 345) | void v8__Context__Enter(const v8::Context& context) { ptr_to_local(&cont...
  function v8__Context__Exit (line 347) | void v8__Context__Exit(const v8::Context& context) { ptr_to_local(&conte...
  function v8__Context__SetEmbedderData (line 364) | void v8__Context__SetEmbedderData(
  function v8__ScriptOrigin__CONSTRUCT (line 373) | void v8__ScriptOrigin__CONSTRUCT(
  function v8__ScriptOrigin__CONSTRUCT2 (line 380) | void v8__ScriptOrigin__CONSTRUCT2(
  function v8__ScriptCompiler__Source__SIZEOF (line 419) | size_t v8__ScriptCompiler__Source__SIZEOF() {
  function v8__ScriptCompiler__Source__CONSTRUCT (line 423) | void v8__ScriptCompiler__Source__CONSTRUCT(
  function v8__ScriptCompiler__Source__CONSTRUCT2 (line 430) | void v8__ScriptCompiler__Source__CONSTRUCT2(
  function v8__ScriptCompiler__Source__DESTRUCT (line 438) | void v8__ScriptCompiler__Source__DESTRUCT(v8::ScriptCompiler::Source* se...
  function v8__ScriptCompiler__CachedData__SIZEOF (line 442) | size_t v8__ScriptCompiler__CachedData__SIZEOF() {
  function v8__ScriptCompiler__CachedData__DELETE (line 454) | void v8__ScriptCompiler__CachedData__DELETE(v8::ScriptCompiler::CachedDa...
  function v8__Module__GetStatus (line 469) | v8::Module::Status v8__Module__GetStatus(const v8::Module& self) {
  function v8__Module__InstantiateModule (line 481) | void v8__Module__InstantiateModule(
  function v8__Module__GetIdentityHash (line 495) | int v8__Module__GetIdentityHash(const v8::Module& self) {
  function v8__Module__ScriptId (line 499) | int v8__Module__ScriptId(const v8::Module& self) {
  function v8__ModuleRequest__GetSourceOffset (line 509) | int v8__ModuleRequest__GetSourceOffset(const v8::ModuleRequest& self) {
  function v8__FixedArray__Length (line 515) | int v8__FixedArray__Length(const v8::FixedArray& self) {
  function v8__String__WriteUtf8 (line 538) | int v8__String__WriteUtf8(
  function v8__String__Utf8Length (line 548) | int v8__String__Utf8Length(const v8::String& self, v8::Isolate* isolate) {
  function v8__Integer__Value (line 582) | int64_t v8__Integer__Value(const v8::Integer& self) { return self.Value(...
  function v8__BigInt__Uint64Value (line 598) | uint64_t v8__BigInt__Uint64Value(
  function v8__BigInt__Int64Value (line 604) | int64_t v8__BigInt__Int64Value(
  function v8__Promise__Resolver__Resolve (line 624) | void v8__Promise__Resolver__Resolve(
  function v8__Promise__Resolver__Reject (line 634) | void v8__Promise__Resolver__Reject(
  function v8__Promise__State (line 677) | v8::Promise::PromiseState v8__Promise__State(const v8::Promise& self) {
  function v8__Promise__MarkAsHandled (line 681) | void v8__Promise__MarkAsHandled(const v8::Promise& self) {
  function v8__Value__BooleanValue (line 703) | bool v8__Value__BooleanValue(
  function v8__Value__Uint32Value (line 709) | void v8__Value__Uint32Value(
  function v8__Value__Int32Value (line 716) | void v8__Value__Int32Value(
  function v8__Value__NumberValue (line 723) | void v8__Value__NumberValue(
  function v8__Value__IsFunction (line 730) | bool v8__Value__IsFunction(const v8::Value& self) { return self.IsFuncti...
  function v8__Value__IsAsyncFunction (line 732) | bool v8__Value__IsAsyncFunction(const v8::Value& self) { return self.IsA...
  function v8__Value__IsObject (line 734) | bool v8__Value__IsObject(const v8::Value& self) { return self.IsObject(); }
  function v8__Value__IsString (line 736) | bool v8__Value__IsString(const v8::Value& self) { return self.IsString(); }
  function v8__Value__IsArray (line 738) | bool v8__Value__IsArray(const v8::Value& self) { return self.IsArray(); }
  function v8__Value__IsArrayBuffer (line 740) | bool v8__Value__IsArrayBuffer(const v8::Value& self) { return self.IsArr...
  function v8__Value__IsArrayBufferView (line 742) | bool v8__Value__IsArrayBufferView(const v8::Value& self) { return self.I...
  function v8__Value__IsUint8Array (line 744) | bool v8__Value__IsUint8Array(const v8::Value& self) { return self.IsUint...
  function v8__Value__IsExternal (line 746) | bool v8__Value__IsExternal(const v8::Value& self) { return self.IsExtern...
  function v8__Value__IsTrue (line 748) | bool v8__Value__IsTrue(const v8::Value& self) { return self.IsTrue(); }
  function v8__Value__IsFalse (line 750) | bool v8__Value__IsFalse(const v8::Value& self) { return self.IsFalse(); }
  function v8__Value__IsUndefined (line 752) | bool v8__Value__IsUndefined(const v8::Value& self) { return self.IsUndef...
  function v8__Value__IsNull (line 754) | bool v8__Value__IsNull(const v8::Value& self) { return self.IsNull(); }
  function v8__Value__IsNullOrUndefined (line 756) | bool v8__Value__IsNullOrUndefined(const v8::Value& self) { return self.I...
  function v8__Value__IsNativeError (line 758) | bool v8__Value__IsNativeError(const v8::Value& self) { return self.IsNat...
  function v8__Value__IsBigInt (line 760) | bool v8__Value__IsBigInt(const v8::Value& self) {
  function v8__Value__IsBigIntObject (line 764) | bool v8__Value__IsBigIntObject(const v8::Value& self) {
  function v8__Value__InstanceOf (line 768) | void v8__Value__InstanceOf(
  function v8__Template__Set (line 778) | void v8__Template__Set(
  function v8__Template__SetAccessorProperty__DEFAULT (line 786) | void v8__Template__SetAccessorProperty__DEFAULT(
  function v8__ObjectTemplate__SetInternalFieldCount (line 812) | void v8__ObjectTemplate__SetInternalFieldCount(
  function v8__ObjectTemplate__SetAccessor__DEFAULT (line 818) | void v8__ObjectTemplate__SetAccessor__DEFAULT(
  function v8__ObjectTemplate__SetAccessor__DEFAULT2 (line 825) | void v8__ObjectTemplate__SetAccessor__DEFAULT2(
  function v8__Array__Length (line 850) | uint32_t v8__Array__Length(const v8::Array& self) { return self.Length(); }
  function v8__Object__SetInternalField (line 859) | void v8__Object__SetInternalField(
  function v8__Object__Set (line 890) | void v8__Object__Set(
  function v8__Object__DefineOwnProperty (line 903) | void v8__Object__DefineOwnProperty(
  function v8__Object__GetIdentityHash (line 926) | int v8__Object__GetIdentityHash(const v8::Object& self) {
  function v8__Object__Has (line 930) | void v8__Object__Has(
  function v8__Object__HasIndex (line 940) | void v8__Object__HasIndex(
  function v8__Object__SetAlignedPointerInInternalField (line 964) | void v8__Object__SetAlignedPointerInInternalField(
  function v8__FunctionCallbackInfo__Length (line 978) | int v8__FunctionCallbackInfo__Length(
  function v8__FunctionCallbackInfo__GetReturnValue (line 988) | void v8__FunctionCallbackInfo__GetReturnValue(
  function v8__PropertyCallbackInfo__GetReturnValue (line 1012) | void v8__PropertyCallbackInfo__GetReturnValue(
  function v8__PromiseRejectMessage__GetEvent (line 1030) | v8::PromiseRejectEvent v8__PromiseRejectMessage__GetEvent(const v8::Prom...
  function v8__PromiseRejectMessage__SIZEOF (line 1042) | size_t v8__PromiseRejectMessage__SIZEOF() {
  function v8__ReturnValue__Set (line 1048) | void v8__ReturnValue__Set(
  function v8__FunctionTemplate__SetClassName (line 1096) | void v8__FunctionTemplate__SetClassName(
  function v8__FunctionTemplate__ReadOnlyPrototype (line 1102) | void v8__FunctionTemplate__ReadOnlyPrototype(
  function v8__Function__SetName (line 1159) | void v8__Function__SetName(
  function v8__Persistent__New (line 1177) | void v8__Persistent__New(
  function v8__Persistent__Reset (line 1185) | void v8__Persistent__Reset(v8::Persistent<v8::Data>* self) {
  function v8__Persistent__SetWeak (line 1191) | void v8__Persistent__SetWeak(v8::Persistent<v8::Data>* self) {
  function v8__Persistent__SetWeakFinalizer (line 1195) | void v8__Persistent__SetWeakFinalizer(
  function v8__TryCatch__SIZEOF (line 1255) | size_t v8__TryCatch__SIZEOF() {
  function v8__TryCatch__CONSTRUCT (line 1259) | void v8__TryCatch__CONSTRUCT(
  function v8__TryCatch__DESTRUCT (line 1264) | void v8__TryCatch__DESTRUCT(v8::TryCatch* self) { self->~TryCatch(); }
  function v8__TryCatch__HasCaught (line 1274) | bool v8__TryCatch__HasCaught(const v8::TryCatch& self) {
  function v8__TryCatch__IsVerbose (line 1284) | bool v8__TryCatch__IsVerbose(const v8::TryCatch& self) { return self.IsV...
  function v8__TryCatch__SetVerbose (line 1286) | void v8__TryCatch__SetVerbose(
  function v8__Message__GetLineNumber (line 1312) | int v8__Message__GetLineNumber(
  function v8__Message__GetStartColumn (line 1319) | int v8__Message__GetStartColumn(const v8::Message& self) { return self.G...
  function v8__Message__GetEndColumn (line 1321) | int v8__Message__GetEndColumn(const v8::Message& self) { return self.Get...
  function v8__StackTrace__GetFrameCount (line 1327) | int v8__StackTrace__GetFrameCount(const v8::StackTrace& self) { return s...
  function v8__StackFrame__GetLineNumber (line 1348) | int v8__StackFrame__GetLineNumber(const v8::StackFrame& self) { return s...
  function v8__StackFrame__GetColumn (line 1350) | int v8__StackFrame__GetColumn(const v8::StackFrame& self) { return self....
  function v8__StackFrame__GetScriptId (line 1352) | int v8__StackFrame__GetScriptId(const v8::StackFrame& self) { return sel...
  function v8__StackFrame__IsEval (line 1366) | bool v8__StackFrame__IsEval(const v8::StackFrame& self) { return self.Is...
  function v8__StackFrame__IsConstructor (line 1368) | bool v8__StackFrame__IsConstructor(const v8::StackFrame& self) { return ...
  function v8__StackFrame__IsWasm (line 1370) | bool v8__StackFrame__IsWasm(const v8::StackFrame& self) { return self.Is...
  function v8__StackFrame__IsUserJavaScript (line 1372) | bool v8__StackFrame__IsUserJavaScript(const v8::StackFrame& self) { retu...
  function v8__base__SetDcheckFunction (line 1393) | void v8__base__SetDcheckFunction(void (*func)(const char*, int, const ch...

FILE: src/binding.h
  type usize (line 5) | typedef uintptr_t usize;
  type Data (line 6) | typedef struct Data Data;
  type ArrayBuffer (line 7) | typedef struct ArrayBuffer ArrayBuffer;
  type ArrayBufferAllocator (line 8) | typedef struct ArrayBufferAllocator ArrayBufferAllocator;
  type CreateParams (line 9) | typedef struct CreateParams CreateParams;
  type Isolate (line 10) | typedef struct Isolate Isolate;
  type StackTrace (line 11) | typedef struct StackTrace StackTrace;
  type StackFrame (line 12) | typedef struct StackFrame StackFrame;
  type FixedArray (line 13) | typedef struct FixedArray FixedArray;
  type Module (line 14) | typedef struct Module Module;
  type FunctionTemplate (line 15) | typedef struct FunctionTemplate FunctionTemplate;
  type Message (line 16) | typedef struct Message Message;
  type Name (line 17) | typedef struct Name Name;
  type Context (line 18) | typedef struct Context Context;
  type InternalAddress (line 20) | typedef uintptr_t InternalAddress;
  type Data (line 22) | typedef Data Value;
  type Value (line 23) | typedef Value Object;
  type Value (line 24) | typedef Value String;
  type Value (line 25) | typedef Value Function;
  type Value (line 26) | typedef Value Number;
  type Value (line 27) | typedef Value Primitive;
  type Value (line 28) | typedef Value Integer;
  type Value (line 29) | typedef Value BigInt;
  type Value (line 30) | typedef Value Array;
  type Value (line 31) | typedef Value Uint8Array;
  type Value (line 32) | typedef Value ArrayBufferView;
  type Value (line 33) | typedef Value External;
  type Value (line 34) | typedef Value Boolean;
  type Value (line 35) | typedef Value Promise;
  type Value (line 36) | typedef Value PromiseResolver;
  type CompileOptions (line 37) | typedef enum CompileOptions {
  type NoCacheReason (line 42) | typedef enum NoCacheReason {
  type PromiseRejectEvent (line 59) | typedef enum PromiseRejectEvent {
  type PromiseRejectMessage (line 65) | typedef struct PromiseRejectMessage PromiseRejectMessage;
  type MessageErrorLevel (line 67) | typedef enum MessageErrorLevel {
  type usize (line 77) | typedef usize UniquePtr;
  type SharedPtr (line 78) | typedef struct SharedPtr {
  type IntAddress (line 82) | typedef uintptr_t IntAddress;
  type MaybeU32 (line 84) | typedef struct MaybeU32 {
  type MaybeI32 (line 88) | typedef struct MaybeI32 {
  type MaybeF64 (line 92) | typedef struct MaybeF64 {
  type MaybeBool (line 96) | typedef struct MaybeBool {
  type PropertyAttribute (line 100) | typedef enum PropertyAttribute {
  type Platform (line 112) | typedef struct Platform Platform;
  type MicrotasksPolicy (line 135) | typedef enum MicrotasksPolicy { kExplicit, kScoped, kAuto } MicrotasksPo...
  type HeapStatistics (line 170) | typedef struct HeapStatistics {
  type StartupData (line 191) | typedef struct StartupData {
  type ResourceConstraints (line 196) | typedef struct ResourceConstraints {
  type CreateParams (line 205) | typedef struct CreateParams {
  type BackingStore (line 235) | typedef struct BackingStore BackingStore;
  type HandleScope (line 262) | typedef struct HandleScope {
  type TryCatch (line 281) | typedef struct TryCatch {
  type Context (line 324) | typedef struct Context Context;
  type ObjectTemplate (line 325) | typedef struct ObjectTemplate ObjectTemplate;
  type NewStringType (line 345) | typedef enum NewStringType {
  type WriteOptions (line 358) | typedef enum WriteOptions {
  type PromiseState (line 418) | typedef enum PromiseState { kPending, kFulfilled, kRejected } PromiseState;
  type Template (line 554) | typedef struct Template Template;
  type FunctionCallbackInfo (line 566) | typedef struct FunctionCallbackInfo FunctionCallbackInfo;
  type ReturnValue (line 567) | typedef struct ReturnValue {
  type PropertyCallbackInfo (line 585) | typedef struct PropertyCallbackInfo PropertyCallbackInfo;
  type PromiseRejectMessage (line 597) | struct PromiseRejectMessage {
  type Persistent (line 670) | typedef struct Persistent {
  type WeakCallbackInfo (line 681) | typedef struct WeakCallbackInfo WeakCallbackInfo;
  type WeakCallbackType (line 683) | typedef enum WeakCallbackType {
  type ObjectTemplate (line 702) | typedef struct ObjectTemplate ObjectTemplate;
  type ScriptOriginOptions (line 725) | typedef struct ScriptOriginOptions {
  type ScriptOrigin (line 728) | typedef struct ScriptOrigin {
  type ScriptCompilerSource (line 755) | typedef struct ScriptCompilerSource {
  type BufferPolicy (line 772) | typedef enum BufferPolicy {
  type ScriptCompilerCachedData (line 776) | typedef struct ScriptCompilerCachedData {
  type Script (line 805) | typedef struct Script Script;
  type ModuleStatus (line 810) | typedef enum ModuleStatus {
  type Module (line 821) | typedef const Module* (*ResolveModuleCallback)(
  type Data (line 834) | typedef Data ModuleRequest;
Condensed preview — 301 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,194K chars).
[
  {
    "path": ".gitattributes",
    "chars": 113,
    "preview": "*.zig text eol=lf\n*.md text eol=lf\n*.patch text eol=lf\nV8_REVISION text eol=lf\n\ncross-macos/** linguist-vendored\n"
  },
  {
    "path": ".github/workflows/build-single.yml",
    "chars": 7877,
    "preview": "name: Build V8 (Single)\n\non: \n  workflow_dispatch:\n    inputs:\n      host:\n        type: choice\n        description: Hos"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 7689,
    "preview": "name: Build V8\n\non: [workflow_dispatch, push]\n\nconcurrency:\n  group: my-group\n  cancel-in-progress: true\n\njobs:\n  build:"
  },
  {
    "path": ".gitignore",
    "chars": 101,
    "preview": "/zig-cache/\n/tools/ninja_gn_binaries*\n/v8-build/\n/gclient/\n/v8/\n/zig-out/\n/vendor\n/libc_v8.a\n/tools/\n"
  },
  {
    "path": ".gn",
    "chars": 1326,
    "preview": "# This file is used by the GN meta build system to find the root of the source\n# tree and to set startup options. For do"
  },
  {
    "path": "BUILD.gclient.gn",
    "chars": 1060,
    "preview": "# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.\n# Based on https://github.com/denoland/rusty_v"
  },
  {
    "path": "BUILD.gn",
    "chars": 3006,
    "preview": "# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.\n# Based on https://github.com/denoland/rusty_v"
  },
  {
    "path": "LICENSE",
    "chars": 1063,
    "preview": "MIT License\n\nCopyright (c) 2021 fubark\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof "
  },
  {
    "path": "README.md",
    "chars": 4277,
    "preview": "# zig-v8\n\nBuilds V8 from official source and provides C bindings and a Zig API. This would be used for embedding the V8 "
  },
  {
    "path": "V8_REVISION",
    "chars": 9,
    "preview": "11.1.134\n"
  },
  {
    "path": "build.zig",
    "chars": 31685,
    "preview": "const std = @import(\"std\");\nconst json = std.json;\nconst Builder = std.Build;\nconst Step = std.Build.Step;\nconst print ="
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomic.h",
    "chars": 1651,
    "preview": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contain"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicDeprecated.h",
    "chars": 46027,
    "preview": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contain"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicQueue.h",
    "chars": 4026,
    "preview": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contain"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSByteOrder.h",
    "chars": 10968,
    "preview": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSCacheControl.h",
    "chars": 2344,
    "preview": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSDebug.h",
    "chars": 2526,
    "preview": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSKextLib.h",
    "chars": 19326,
    "preview": "/*\n * Copyright (c) 2008 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSReturn.h",
    "chars": 6293,
    "preview": "/*\n * Copyright (c) 2000 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSSpinLockDeprecated.h",
    "chars": 6687,
    "preview": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contain"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSThermalNotification.h",
    "chars": 5316,
    "preview": "/*\n * Copyright (c) 2007 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Or"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSTypes.h",
    "chars": 1570,
    "preview": "/*\n * Copyright (c) 1999-2012 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/_OSByteOrder.h",
    "chars": 4334,
    "preview": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/arm/OSByteOrder.h",
    "chars": 4351,
    "preview": "/*\n * Copyright (c) 1999-2007 Apple Inc. All rights reserved.\n */\n\n#ifndef _OS_OSBYTEORDERARM_H\n#define _OS_OSBYTEORDERA"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/i386/OSByteOrder.h",
    "chars": 2844,
    "preview": "/*\n * Copyright (c) 1999-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/i386/_OSByteOrder.h",
    "chars": 2704,
    "preview": "/*\n * Copyright (c) 2006-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/machine/OSByteOrder.h",
    "chars": 3585,
    "preview": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/arch.h",
    "chars": 6150,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/arm/reloc.h",
    "chars": 2726,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/arm64/reloc.h",
    "chars": 2858,
    "preview": "/*\n * Copyright (c) 2010 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/compact_unwind_encoding.h",
    "chars": 21599,
    "preview": "//===------------------ mach-o/compact_unwind_encoding.h ------------------===//\n//\n// Part of the LLVM Project, under t"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/compact_unwind_encoding.modulemap",
    "chars": 109,
    "preview": "module MachO.compact_unwind_encoding [system] [extern_c] {\n  header \"compact_unwind_encoding.h\"\n  export *\n}\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/dyld.h",
    "chars": 17246,
    "preview": "/*\n * Copyright (c) 1999-2008 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contai"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/dyld.modulemap",
    "chars": 71,
    "preview": "module MachO.dyld [system] [extern_c] {\n  header \"dyld.h\"\n  export *\n}\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/dyld_images.h",
    "chars": 9123,
    "preview": "/*\n * Copyright (c) 2006-2010 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contai"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/fat.h",
    "chars": 3238,
    "preview": "/*\n * Copyright (c) 2016 Apple, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains O"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/fixup-chains.h",
    "chars": 10325,
    "preview": "/* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-\n *\n * Copyright (c) 2018 Apple Inc. All rights reserved.\n *\n * @AP"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/getsect.h",
    "chars": 3890,
    "preview": "/*\n * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/i386/swap.h",
    "chars": 3111,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/ldsyms.h",
    "chars": 5404,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/loader.h",
    "chars": 71668,
    "preview": "/*\n * Copyright (c) 1999-2010 Apple Inc.  All Rights Reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file conta"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/module.modulemap",
    "chars": 725,
    "preview": "module MachO [system] [extern_c] {\n\n  extern module dyld \"dyld.modulemap\"\n\n  extern module compact_unwind_encoding \"comp"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/nlist.h",
    "chars": 13984,
    "preview": "/*\n * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.\n * \n * @APPLE_LICENSE_HEADER_START@\n * \n * This"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/ranlib.h",
    "chars": 3901,
    "preview": "/*\n * Copyright (c) 2016 Apple, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains O"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/reloc.h",
    "chars": 10506,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/stab.h",
    "chars": 6489,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/swap.h",
    "chars": 7770,
    "preview": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/x86_64/reloc.h",
    "chars": 8341,
    "preview": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/_workgroup.h",
    "chars": 1264,
    "preview": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Ori"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/activity.h",
    "chars": 16328,
    "preview": "/*\n * Copyright (c) 2013-2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_ACTIVITY_H__\n#define __OS_ACTIVITY_H__\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/atomic.h",
    "chars": 4321,
    "preview": "/*\n * Copyright (c) 2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/availability.h",
    "chars": 7035,
    "preview": "/*\n * Copyright (c) 2008-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed u"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/base.h",
    "chars": 10728,
    "preview": "/*\n * Copyright (c) 2008-2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed u"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/clock.h",
    "chars": 320,
    "preview": "#ifndef __OS_CLOCK__\n#define __OS_CLOCK__\n\n#include <os/base.h>\n#include <stdint.h>\n\n/*\n * @typedef os_clockid_t\n *\n * @"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/lock.h",
    "chars": 5506,
    "preview": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/log.h",
    "chars": 18314,
    "preview": "/*\n * Copyright (c) 2015-2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_LOG_H__\n#define __OS_LOG_H__\n\n#include <"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/object.h",
    "chars": 9903,
    "preview": "/*\n * Copyright (c) 2011-2014 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed u"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/overflow.h",
    "chars": 4137,
    "preview": "/*\n * Copyright (c) 2015-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/proc.h",
    "chars": 3458,
    "preview": "/*\n * Copyright (c) 2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/signpost.h",
    "chars": 13544,
    "preview": "/*\n * Copyright (c) 2017-2018 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_SIGNPOST_H__\n#define __OS_SIGNPOST_H__\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/trace.h",
    "chars": 16908,
    "preview": "/*\n * Copyright (c) 2013-2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_TRACE_H__\n#define __OS_TRACE_H__\n\n#inclu"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/trace_base.h",
    "chars": 3857,
    "preview": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_TRACE_BASE_H__\n#define __OS_TRACE_BASE_H__\n\n#"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup.h",
    "chars": 1143,
    "preview": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_base.h",
    "chars": 2289,
    "preview": "#ifndef __OS_WORKGROUP_BASE__\n#define __OS_WORKGROUP_BASE__\n\n#ifndef __OS_WORKGROUP_INDIRECT__\n#error \"Please #include <"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_interval.h",
    "chars": 5621,
    "preview": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_object.h",
    "chars": 12363,
    "preview": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_parallel.h",
    "chars": 2281,
    "preview": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_endian.h",
    "chars": 6484,
    "preview": "/*\n * Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_posix_availability.h",
    "chars": 2905,
    "preview": "/* Copyright (c) 2010 Apple Inc. All rights reserved.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_attr_t.h",
    "chars": 1522,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_cond_t.h",
    "chars": 1521,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_condattr_t.h",
    "chars": 1545,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_key_t.h",
    "chars": 1515,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_mutex_t.h",
    "chars": 1526,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_mutexattr_t.h",
    "chars": 1551,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_once_t.h",
    "chars": 1521,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_rwlock_t.h",
    "chars": 1533,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_rwlockattr_t.h",
    "chars": 1557,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_t.h",
    "chars": 1491,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_types.h",
    "chars": 3855,
    "preview": "/*\n * Copyright (c) 2003-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_select.h",
    "chars": 2468,
    "preview": "/*\n * Copyright (c) 2005, 2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_structs.h",
    "chars": 1373,
    "preview": "/*\n * Copyright (c) 2004-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_symbol_aliasing.h",
    "chars": 23249,
    "preview": "/* Copyright (c) 2010 Apple Inc. All rights reserved.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n * This file c"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_blkcnt_t.h",
    "chars": 1476,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_blksize_t.h",
    "chars": 1482,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_caddr_t.h",
    "chars": 1409,
    "preview": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_clock_t.h",
    "chars": 1472,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ct_rune_t.h",
    "chars": 1474,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_dev_t.h",
    "chars": 1481,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_errno_t.h",
    "chars": 1422,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_clr.h",
    "chars": 1406,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_copy.h",
    "chars": 1409,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_def.h",
    "chars": 4422,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_isset.h",
    "chars": 1412,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_set.h",
    "chars": 1406,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_setsize.h",
    "chars": 1412,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_zero.h",
    "chars": 1406,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_filesec_t.h",
    "chars": 1440,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsblkcnt_t.h",
    "chars": 1492,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsfilcnt_t.h",
    "chars": 1492,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsid_t.h",
    "chars": 1494,
    "preview": "/*\n * Copyright (c) 2014 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsobj_id_t.h",
    "chars": 1528,
    "preview": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_gid_t.h",
    "chars": 1438,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_guid_t.h",
    "chars": 1642,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_id_t.h",
    "chars": 1494,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_in_addr_t.h",
    "chars": 1508,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_in_port_t.h",
    "chars": 1474,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ino64_t.h",
    "chars": 1502,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ino_t.h",
    "chars": 1488,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int16_t.h",
    "chars": 1417,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int32_t.h",
    "chars": 1417,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int64_t.h",
    "chars": 1417,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int8_t.h",
    "chars": 1411,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_intptr_t.h",
    "chars": 1478,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_iovec_t.h",
    "chars": 1601,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_key_t.h",
    "chars": 1489,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_mach_port_t.h",
    "chars": 2098,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_mbstate_t.h",
    "chars": 1473,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_mode_t.h",
    "chars": 1465,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_nlink_t.h",
    "chars": 1483,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_null.h",
    "chars": 1429,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_o_dsync.h",
    "chars": 1441,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_o_sync.h",
    "chars": 1439,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_off_t.h",
    "chars": 1460,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_offsetof.h",
    "chars": 1418,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_os_inline.h",
    "chars": 1533,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_pid_t.h",
    "chars": 1458,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_posix_vdisable.h",
    "chars": 1433,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ptrdiff_t.h",
    "chars": 1473,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_rsize_t.h",
    "chars": 1471,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_rune_t.h",
    "chars": 1455,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_s_ifmt.h",
    "chars": 3677,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_sa_family_t.h",
    "chars": 1482,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_seek_set.h",
    "chars": 2053,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_sigaltstack.h",
    "chars": 1992,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_sigset_t.h",
    "chars": 1483,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_size_t.h",
    "chars": 1468,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_socklen_t.h",
    "chars": 1465,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ssize_t.h",
    "chars": 1473,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_suseconds_t.h",
    "chars": 1490,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_time_t.h",
    "chars": 1468,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timespec.h",
    "chars": 1552,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval.h",
    "chars": 1667,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval32.h",
    "chars": 1618,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval64.h",
    "chars": 1590,
    "preview": "/*\n * Copyright (c) 2015 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_char.h",
    "chars": 1405,
    "preview": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int.h",
    "chars": 1401,
    "preview": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int16_t.h",
    "chars": 1433,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int32_t.h",
    "chars": 1425,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int64_t.h",
    "chars": 1425,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int8_t.h",
    "chars": 1421,
    "preview": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_short.h",
    "chars": 1409,
    "preview": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ucontext.h",
    "chars": 2466,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ucontext64.h",
    "chars": 2366,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_uid_t.h",
    "chars": 1458,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_uintptr_t.h",
    "chars": 1534,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_useconds_t.h",
    "chars": 1484,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_uuid_t.h",
    "chars": 1456,
    "preview": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_va_list.h",
    "chars": 1467,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_wchar_t.h",
    "chars": 1547,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_wint_t.h",
    "chars": 1456,
    "preview": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types.h",
    "chars": 3895,
    "preview": "/*\n * Copyright (c) 2003-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/acct.h",
    "chars": 5139,
    "preview": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/acl.h",
    "chars": 8715,
    "preview": "/*\n * Copyright (c) 2004, 2010 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * The contents of"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/aio.h",
    "chars": 10129,
    "preview": "/*\n * Copyright (c) 2003-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/appleapiopts.h",
    "chars": 2065,
    "preview": "/*\n * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/attr.h",
    "chars": 25584,
    "preview": "/*\n * Copyright (c) 2000-2018 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/buf.h",
    "chars": 50614,
    "preview": "/*\n * Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/cdefs.h",
    "chars": 32859,
    "preview": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/clonefile.h",
    "chars": 2198,
    "preview": "/*\n * Copyright (c) 2015-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/commpage.h",
    "chars": 1369,
    "preview": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/conf.h",
    "chars": 3992,
    "preview": "/*\n * Copyright (c) 2000-2012 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dir.h",
    "chars": 4022,
    "preview": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dirent.h",
    "chars": 5582,
    "preview": "/*\n * Copyright (c) 2000-2008 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/disk.h",
    "chars": 8879,
    "preview": "/*\n * Copyright (c) 1998-2014 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dkstat.h",
    "chars": 3657,
    "preview": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/domain.h",
    "chars": 3490,
    "preview": "/*\n * Copyright (c) 2000-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dtrace.h",
    "chars": 117194,
    "preview": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distri"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dtrace_glue.h",
    "chars": 16795,
    "preview": "/*\n * Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dtrace_impl.h",
    "chars": 70453,
    "preview": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distri"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/errno.h",
    "chars": 12965,
    "preview": "/*\n * Copyright (c) 2000-2012 Apple, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ev.h",
    "chars": 2314,
    "preview": "/*\n * Copyright (c) 2000-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/event.h",
    "chars": 17724,
    "preview": "/*\n * Copyright (c) 2003-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fasttrap.h",
    "chars": 3802,
    "preview": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distri"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fasttrap_isa.h",
    "chars": 1777,
    "preview": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n *"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fcntl.h",
    "chars": 24619,
    "preview": "/*\n * Copyright (c) 2000-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/file.h",
    "chars": 3719,
    "preview": "/*\n * Copyright (c) 2000-2008 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/filedesc.h",
    "chars": 4314,
    "preview": "/*\n * Copyright (c) 2000-2012 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/filio.h",
    "chars": 4306,
    "preview": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fsgetpath.h",
    "chars": 1828,
    "preview": "/*\n * Copyright (c) 2008-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/gmon.h",
    "chars": 9726,
    "preview": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ioccom.h",
    "chars": 4673,
    "preview": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ioctl.h",
    "chars": 4522,
    "preview": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ioctl_compat.h",
    "chars": 10271,
    "preview": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ipc.h",
    "chars": 6912,
    "preview": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kauth.h",
    "chars": 16584,
    "preview": "/*\n * Copyright (c) 2004-2010 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kdebug.h",
    "chars": 51648,
    "preview": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kdebug_signpost.h",
    "chars": 2393,
    "preview": "/*\n * Copyright (c) 2016-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kern_control.h",
    "chars": 5382,
    "preview": "/*\n * Copyright (c) 2000-2004, 2012-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kern_event.h",
    "chars": 9366,
    "preview": "/*\n * Copyright (c) 2000-2021 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This "
  }
]

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

About this extraction

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

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

Copied to clipboard!