NetBSD Problem Report #55801

From martin@aprisoft.de  Tue Nov 10 11:04:35 2020
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 793701A9246
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 10 Nov 2020 11:04:35 +0000 (UTC)
Message-Id: <20201110110423.3C4EA5CC7A2@emmas.aprisoft.de>
Date: Tue, 10 Nov 2020 12:04:23 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: clang-10 crashes
X-Send-Pr-Version: 3.95

>Number:         55801
>Category:       pkg
>Synopsis:       clang-10 crashes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 10 11:05:00 +0000 2020
>Last-Modified:  Tue Nov 10 11:30:02 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.75
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 9.99.75 NetBSD 9.99.75 (WHOEVER) #350: Fri Nov 6 06:38:30 CET 2020 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Since we are forced to use clang for pkgsrc/www/firefox (instead of the good
engouh and working well gcc in netbsd-current) I run into issues trying to
build firefox on sparc64:

[swgl 0.1.0] cargo:warning=Stack dump:
[swgl 0.1.0] cargo:warning=0.   Program arguments: /usr/pkg/bin/clang-10 -cc1 -triple sparc64-unknown-netbsd9.99 -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name gl.cc -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=none -relaxed-aliasing -fno-rounding-math -no-integrated-as -mconstructor-aliases -munwind-tables -mfloat-abi hard -dwarf-column-info -fno-split-dwarf-inlining -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -resource-dir /usr/pkg/lib/clang/10.0.1 -include /usr/pkgobj/www/firefox/work/firefox-82.0.2/config/gcc_hidden.h -include /usr/pkgobj/www/firefox/work/build/mozilla-config.h -I /usr/pkgobj/www/firefox/work/build/dist/stl_wrappers -I /usr/pkgobj/www/firefox/work/build/dist/system_wrappers -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D NDEBUG=1 -D TRIMMED=1 -I /usr/pkgobj/www/firefox/work/firefox-82.0.2/toolkit/library/rust -I /usr/pkgobj/www/firefox/work/build/toolkit/li
 brary/rust -I /usr/pkgobj/www/firefox/work/build/dist/include -I /usr/pkgobj/www/firefox/work/.buildlink/include/nspr -I /usr/pkgobj/www/firefox/work/.buildlink/include/nss -I /usr/pkgobj/www/firefox/work/build/dist/include/nss -I /usr/pkgobj/www/firefox/work/.x11-buildlink/include/pixman-1 -I /usr/pkgobj/www/firefox/work/.buildlink/include -D PIC -D MOZILLA_CLIENT -D PNG_NO_ASSEMBLER_CODE -I /usr/pkgobj/www/firefox/work/.buildlink/include/nss/nss -I /usr/pkgobj/www/firefox/work/.x11-buildlink/include -I /usr/pkgobj/www/firefox/work/.buildlink/include/libdrm -I /usr/pkgobj/www/firefox/work/.buildlink/include/glib-2.0 -I /usr/pkgobj/www/firefox/work/.buildlink/include/gio-unix-2.0 -I /usr/pkgobj/www/firefox/work/.buildlink/lib/glib-2.0/include -I /usr/pkgobj/www/firefox/work/.buildlink/include/ffmpeg4 -I /usr/pkgobj/www/firefox/work/.x11-buildlink/include/freetype2 -I /usr/pkgobj/www/firefox/work/.buildlink/include/harfbuzz -D _GLIBCXX_INCLUDE_NEXT_C_HEADERS -D _FORTIFY_SOURCE=2 -D u
 nix -D MOZILLA_CONFIG_H -I /usr/pkgobj/www/firefox/work/firefox-82.0.2/gfx/wr/webrender/res -I src -I /usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/build/swgl-2a769e3b252065cb/out -U MOZILLA_CONFIG_H -D _GLIBCXX_USE_CXX11_ABI=0 -internal-isystem /usr/include/g++ -internal-isystem /usr/include/g++/ -internal-isystem /usr/include/g++/backward -Og -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-de
 lete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Werror=implicit-function-declaration -Wno-unknown-warning-option -std=c++14 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /usr/pkgobj/www/firefox/work/firefox-82.0.2/gfx/wr/swgl -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 1 -fno-rtti -fgnuc-version=4.2.1 -fobjc-runtime=gnustep -fno-aligned-allocation -fdiagnostics-show-option -o /tmp/gl-be265b.s -x c++ src/gl.cc 
[swgl 0.1.0] cargo:warning=1.   <eof> parser at end of file
[swgl 0.1.0] cargo:warning=2.   Code generation
[swgl 0.1.0] cargo:warning=3.   Running pass 'Function Pass Manager' on module 'src/gl.cc'.
[swgl 0.1.0] cargo:warning=4.   Running pass 'SPARC DAG->DAG Pattern Instruction Selection' on function '@_ZL9pack_spanIN4glsl11vec4_scalarEEDv16_hPjRKT_'
[swgl 0.1.0] cargo:warning=#0 0x00000000440aa3e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/pkg/lib/libLLVM-10.so+0x7aa3e8)
[swgl 0.1.0] cargo:warning=#1 0x00000000440a7e54 llvm::sys::RunSignalHandlers() (/usr/pkg/lib/libLLVM-10.so+0x7a7e54)
[swgl 0.1.0] cargo:warning=#2 0x00000000440a8a20 SignalHandler(int) (/usr/pkg/lib/libLLVM-10.so+0x7a8a20)
[swgl 0.1.0] cargo:warning=clang-10: error: unable to execute command: Segmentation fault (core dumped)
[swgl 0.1.0] cargo:warning=clang-10: error: clang frontend command failed due to signal (use -v to see invocation)
[swgl 0.1.0] cargo:warning=clang version 10.0.1 
[swgl 0.1.0] cargo:warning=Target: sparc64-unknown-netbsd9.99
[swgl 0.1.0] cargo:warning=Thread model: posix
[swgl 0.1.0] cargo:warning=InstalledDir: /usr/pkg/bin
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: PLEASE submit a bug report to  and include the crash backtrace, preprocessed source, and associated run script.
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: 
[swgl 0.1.0] cargo:warning=********************
[swgl 0.1.0] cargo:warning=
[swgl 0.1.0] cargo:warning=PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[swgl 0.1.0] cargo:warning=Preprocessed source(s) and associated run script(s) are located at:
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: /tmp/gl-b5701c.cpp
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: /tmp/gl-b5701c.sh
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: 
[swgl 0.1.0] cargo:warning=
[swgl 0.1.0] cargo:warning=********************
[swgl 0.1.0] exit code: -2
[swgl 0.1.0] 
[swgl 0.1.0] 


Core was generated by `clang-10'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000044813548 in llvm::ScheduleDAGSDNodes::AddSchedEdges() ()
   from /usr/pkg/lib/libLLVM-10.so
(gdb) bt
#0  0x0000000044813548 in llvm::ScheduleDAGSDNodes::AddSchedEdges() ()
   from /usr/pkg/lib/libLLVM-10.so
#1  0x0000000044811a34 in (anonymous namespace)::ScheduleDAGRRList::Schedule()
    () from /usr/pkg/lib/libLLVM-10.so
#2  0x0000000044813098 in llvm::ScheduleDAGSDNodes::Run(llvm::SelectionDAG*, llvm::MachineBasicBlock*) () from /usr/pkg/lib/libLLVM-10.so
#3  0x00000000448d1410 in llvm::SelectionDAGISel::CodeGenAndEmitDAG() ()
   from /usr/pkg/lib/libLLVM-10.so
#4  0x00000000448d5414 in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) () from /usr/pkg/lib/libLLVM-10.so
#5  0x00000000448d88f4 in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone .part.0] () from /usr/pkg/lib/libLLVM-10.so
#6  0x0000000044404fcc in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) [clone .part.0] () from /usr/pkg/lib/libLLVM-10.so
#7  0x00000000441d40f4 in llvm::FPPassManager::runOnFunction(llvm::Function&)
    () from /usr/pkg/lib/libLLVM-10.so
#8  0x00000000441d4ff0 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
   from /usr/pkg/lib/libLLVM-10.so
#9  0x00000000441d5368 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
   from /usr/pkg/lib/libLLVM-10.so
#10 0x0000000041e872d4 in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, ce<llvm::raw_pwrite_stream> >) () from /usr/pkg/lib/libclang-cpp.so.10
#11 0x000000004219400c in clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) () from /usr/pkg/lib/libclang-cpp.so.10
#12 0x0000000040f90e5c in clang::ParseAST(clang::Sema&, bool, bool) ()
   from /usr/pkg/lib/libclang-cpp.so.10
#13 0x0000000042a07ee0 in clang::FrontendAction::Execute() ()
   from /usr/pkg/lib/libclang-cpp.so.10
#14 0x00000000429c0218 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from /usr/pkg/lib/libclang-cpp.so.10
#15 0x0000000042a958f0 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) () from /usr/pkg/lib/libclang-cpp.so.10
#16 0x0000000000111e30 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) ()
#17 0x000000000010fcdc in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
    ()
#18 0x000000000010da84 in main ()
(gdb) x/i $pc
=> 0x44813548 <_ZN4llvm18ScheduleDAGSDNodes13AddSchedEdgesEv+1192>:     
    ldx  [ %o0 ], %g1

and %o0 is NULL.

Will attach diag message/reproducer script to the PR later.

>How-To-Repeat:
Try to build firefox on sparc64.

>Fix:
Get rid of the pkgsrc clang dependency for this pkg.

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55801: clang-10 crashes
Date: Tue, 10 Nov 2020 12:10:23 +0100

 # Crash reproducer for clang version 10.0.1=20
 # Driver args: "--driver-mode=3Dg++" "-O2" "-ffunction-sections" "-fdata-se=
 ctions" "-fPIC" "-std=3Dgnu++17" "-I" "/usr/pkgobj/www/firefox/work/build/d=
 ist/stl_wrappers" "-I" "/usr/pkgobj/www/firefox/work/build/dist/system_wrap=
 pers" "-include" "/usr/pkgobj/www/firefox/work/firefox-82.0.2/config/gcc_hi=
 dden.h" "-U" "_FORTIFY_SOURCE" "-D" "_FORTIFY_SOURCE=3D2" "-fstack-protecto=
 r-strong" "-D" "NDEBUG=3D1" "-D" "TRIMMED=3D1" "-I" "/usr/pkgobj/www/firefo=
 x/work/firefox-82.0.2/toolkit/library/rust" "-I" "/usr/pkgobj/www/firefox/w=
 ork/build/toolkit/library/rust" "-I" "/usr/pkgobj/www/firefox/work/build/di=
 st/include" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/include/nspr" "-I=
 " "/usr/pkgobj/www/firefox/work/.buildlink/include/nss" "-I" "/usr/pkgobj/w=
 ww/firefox/work/build/dist/include/nss" "-I" "/usr/pkgobj/www/firefox/work/=
 =2Ex11-buildlink/include/pixman-1" "-I" "/usr/pkgobj/www/firefox/work/.buil=
 dlink/include" "-fPIC" "-D" "PIC" "-D" "MOZILLA_CLIENT" "-include" "/usr/pk=
 gobj/www/firefox/work/build/mozilla-config.h" "-Qunused-arguments" "-D" "PN=
 G_NO_ASSEMBLER_CODE" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/include/=
 nss/nss" "-I" "/usr/pkgobj/www/firefox/work/.x11-buildlink/include" "-I" "/=
 usr/pkgobj/www/firefox/work/.buildlink/include/libdrm" "-I" "/usr/pkgobj/ww=
 w/firefox/work/.buildlink/include/glib-2.0" "-I" "/usr/pkgobj/www/firefox/w=
 ork/.buildlink/include/gio-unix-2.0" "-I" "/usr/pkgobj/www/firefox/work/.bu=
 ildlink/lib/glib-2.0/include" "-I" "/usr/pkgobj/www/firefox/work/.buildlink=
 /include/ffmpeg4" "-I" "/usr/pkgobj/www/firefox/work/.x11-buildlink/include=
 /freetype2" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/include/harfbuzz"=
  "-Qunused-arguments" "-Wall" "-Wbitfield-enum-conversion" "-Wempty-body" "=
 -Wignored-qualifiers" "-Woverloaded-virtual" "-Wpointer-arith" "-Wshadow-fi=
 eld-in-constructor-modified" "-Wsign-compare" "-Wtype-limits" "-Wunreachabl=
 e-code" "-Wunreachable-code-return" "-Wwrite-strings" "-Wno-invalid-offseto=
 f" "-Wclass-varargs" "-Wempty-init-stmt" "-Wfloat-overflow-conversion" "-Wf=
 loat-zero-conversion" "-Wloop-analysis" "-Wc++2a-compat" "-Wcomma" "-Wimpli=
 cit-fallthrough" "-Wunused-function" "-Wunused-variable" "-Wstring-conversi=
 on" "-Wtautological-overlap-compare" "-Wtautological-unsigned-enum-zero-com=
 pare" "-Wtautological-unsigned-zero-compare" "-Wno-error=3Dtautological-typ=
 e-limit-compare" "-Wno-inline-new-delete" "-Wno-error=3Ddeprecated-declarat=
 ions" "-Wno-error=3Darray-bounds" "-Wno-error=3Dbackend-plugin" "-Wno-error=
 =3Dreturn-std-move" "-Wno-error=3Datomic-alignment" "-Wno-error=3Ddeprecate=
 d-copy" "-Wformat" "-Wformat-security" "-Wno-gnu-zero-variadic-macro-argume=
 nts" "-Werror=3Dimplicit-function-declaration" "-Wno-unknown-warning-option=
 " "-fno-sized-deallocation" "-fno-aligned-allocation" "-O2" "-D" "_GLIBCXX_=
 INCLUDE_NEXT_C_HEADERS" "-pipe" "-D" "_FORTIFY_SOURCE=3D2" "-fno-exceptions=
 " "-fno-strict-aliasing" "-D" "unix" "-fno-rtti" "-ffunction-sections" "-fd=
 ata-sections" "-fno-exceptions" "-fno-math-errno" "-pthread" "-pipe" "-g" "=
 -Og" "-fomit-frame-pointer" "-funwind-tables" "-D" "MOZILLA_CONFIG_H" "-I" =
 "/usr/pkgobj/www/firefox/work/firefox-82.0.2/gfx/wr/webrender/res" "-I" "sr=
 c" "-I" "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/=
 build/swgl-2a769e3b252065cb/out" "-std=3Dc++14" "-U" "MOZILLA_CONFIG_H" "-f=
 no-exceptions" "-fno-rtti" "-fno-math-errno" "-D" "_GLIBCXX_USE_CXX11_ABI=
 =3D0" "-o" "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/relea=
 se/build/swgl-2a769e3b252065cb/out/src/gl.o" "-c" "src/gl.cc" "-fstack-prot=
 ector"
 # Original command:  "/usr/pkg/bin/clang-10" "-cc1" "-triple" "sparc64-unkn=
 own-netbsd9.99" "-S" "-disable-free" "-disable-llvm-verifier" "-discard-val=
 ue-names" "-main-file-name" "gl.cc" "-mrelocation-model" "pic" "-pic-level"=
  "2" "-mthread-model" "posix" "-mframe-pointer=3Dnone" "-relaxed-aliasing" =
 "-fno-rounding-math" "-no-integrated-as" "-mconstructor-aliases" "-munwind-=
 tables" "-mfloat-abi" "hard" "-dwarf-column-info" "-fno-split-dwarf-inlinin=
 g" "-debug-info-kind=3Dlimited" "-dwarf-version=3D4" "-debugger-tuning=3Dgd=
 b" "-ffunction-sections" "-fdata-sections" "-resource-dir" "/usr/pkg/lib/cl=
 ang/10.0.1" "-include" "/usr/pkgobj/www/firefox/work/firefox-82.0.2/config/=
 gcc_hidden.h" "-include" "/usr/pkgobj/www/firefox/work/build/mozilla-config=
 =2Eh" "-I" "/usr/pkgobj/www/firefox/work/build/dist/stl_wrappers" "-I" "/us=
 r/pkgobj/www/firefox/work/build/dist/system_wrappers" "-U" "_FORTIFY_SOURCE=
 " "-D" "_FORTIFY_SOURCE=3D2" "-D" "NDEBUG=3D1" "-D" "TRIMMED=3D1" "-I" "/us=
 r/pkgobj/www/firefox/work/firefox-82.0.2/toolkit/library/rust" "-I" "/usr/p=
 kgobj/www/firefox/work/build/toolkit/library/rust" "-I" "/usr/pkgobj/www/fi=
 refox/work/build/dist/include" "-I" "/usr/pkgobj/www/firefox/work/.buildlin=
 k/include/nspr" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/include/nss" =
 "-I" "/usr/pkgobj/www/firefox/work/build/dist/include/nss" "-I" "/usr/pkgob=
 j/www/firefox/work/.x11-buildlink/include/pixman-1" "-I" "/usr/pkgobj/www/f=
 irefox/work/.buildlink/include" "-D" "PIC" "-D" "MOZILLA_CLIENT" "-D" "PNG_=
 NO_ASSEMBLER_CODE" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/include/ns=
 s/nss" "-I" "/usr/pkgobj/www/firefox/work/.x11-buildlink/include" "-I" "/us=
 r/pkgobj/www/firefox/work/.buildlink/include/libdrm" "-I" "/usr/pkgobj/www/=
 firefox/work/.buildlink/include/glib-2.0" "-I" "/usr/pkgobj/www/firefox/wor=
 k/.buildlink/include/gio-unix-2.0" "-I" "/usr/pkgobj/www/firefox/work/.buil=
 dlink/lib/glib-2.0/include" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/i=
 nclude/ffmpeg4" "-I" "/usr/pkgobj/www/firefox/work/.x11-buildlink/include/f=
 reetype2" "-I" "/usr/pkgobj/www/firefox/work/.buildlink/include/harfbuzz" "=
 -D" "_GLIBCXX_INCLUDE_NEXT_C_HEADERS" "-D" "_FORTIFY_SOURCE=3D2" "-D" "unix=
 " "-D" "MOZILLA_CONFIG_H" "-I" "/usr/pkgobj/www/firefox/work/firefox-82.0.2=
 /gfx/wr/webrender/res" "-I" "src" "-I" "/usr/pkgobj/www/firefox/work/build/=
 sparc64-unknown-netbsd/release/build/swgl-2a769e3b252065cb/out" "-U" "MOZIL=
 LA_CONFIG_H" "-D" "_GLIBCXX_USE_CXX11_ABI=3D0" "-internal-isystem" "/usr/in=
 clude/g++" "-internal-isystem" "/usr/include/g++/" "-internal-isystem" "/us=
 r/include/g++/backward" "-Og" "-Wall" "-Wbitfield-enum-conversion" "-Wempty=
 -body" "-Wignored-qualifiers" "-Woverloaded-virtual" "-Wpointer-arith" "-Ws=
 hadow-field-in-constructor-modified" "-Wsign-compare" "-Wtype-limits" "-Wun=
 reachable-code" "-Wunreachable-code-return" "-Wwrite-strings" "-Wno-invalid=
 -offsetof" "-Wclass-varargs" "-Wempty-init-stmt" "-Wfloat-overflow-conversi=
 on" "-Wfloat-zero-conversion" "-Wloop-analysis" "-Wc++2a-compat" "-Wcomma" =
 "-Wimplicit-fallthrough" "-Wunused-function" "-Wunused-variable" "-Wstring-=
 conversion" "-Wtautological-overlap-compare" "-Wtautological-unsigned-enum-=
 zero-compare" "-Wtautological-unsigned-zero-compare" "-Wno-error=3Dtautolog=
 ical-type-limit-compare" "-Wno-inline-new-delete" "-Wno-error=3Ddeprecated-=
 declarations" "-Wno-error=3Darray-bounds" "-Wno-error=3Dbackend-plugin" "-W=
 no-error=3Dreturn-std-move" "-Wno-error=3Datomic-alignment" "-Wno-error=3Dd=
 eprecated-copy" "-Wformat" "-Wformat-security" "-Wno-gnu-zero-variadic-macr=
 o-arguments" "-Werror=3Dimplicit-function-declaration" "-Wno-unknown-warnin=
 g-option" "-std=3Dc++14" "-fdeprecated-macro" "-fno-dwarf-directory-asm" "-=
 fdebug-compilation-dir" "/usr/pkgobj/www/firefox/work/firefox-82.0.2/gfx/wr=
 /swgl" "-ferror-limit" "19" "-fmessage-length" "0" "-pthread" "-stack-prote=
 ctor" "1" "-fno-rtti" "-fgnuc-version=3D4.2.1" "-fobjc-runtime=3Dgnustep" "=
 -fno-aligned-allocation" "-fdiagnostics-show-option" "-o" "/tmp/gl-be265b.s=
 " "-x" "c++" "src/gl.cc"
  "/usr/pkg/bin/clang-10" "-cc1" "-triple" "sparc64-unknown-netbsd9.99" "-S"=
  "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-fil=
 e-name" "gl.cc" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model=
 " "posix" "-mframe-pointer=3Dnone" "-relaxed-aliasing" "-fno-rounding-math"=
  "-no-integrated-as" "-mconstructor-aliases" "-munwind-tables" "-mfloat-abi=
 " "hard" "-dwarf-column-info" "-fno-split-dwarf-inlining" "-debug-info-kind=
 =3Dlimited" "-dwarf-version=3D4" "-debugger-tuning=3Dgdb" "-ffunction-secti=
 ons" "-fdata-sections" "-U" "_FORTIFY_SOURCE" "-D" "_FORTIFY_SOURCE=3D2" "-=
 D" "NDEBUG=3D1" "-D" "TRIMMED=3D1" "-D" "PIC" "-D" "MOZILLA_CLIENT" "-D" "P=
 NG_NO_ASSEMBLER_CODE" "-D" "_GLIBCXX_INCLUDE_NEXT_C_HEADERS" "-D" "_FORTIFY=
 _SOURCE=3D2" "-D" "unix" "-D" "MOZILLA_CONFIG_H" "-U" "MOZILLA_CONFIG_H" "-=
 D" "_GLIBCXX_USE_CXX11_ABI=3D0" "-Og" "-Wall" "-Wbitfield-enum-conversion" =
 "-Wempty-body" "-Wignored-qualifiers" "-Woverloaded-virtual" "-Wpointer-ari=
 th" "-Wshadow-field-in-constructor-modified" "-Wsign-compare" "-Wtype-limit=
 s" "-Wunreachable-code" "-Wunreachable-code-return" "-Wwrite-strings" "-Wno=
 -invalid-offsetof" "-Wclass-varargs" "-Wempty-init-stmt" "-Wfloat-overflow-=
 conversion" "-Wfloat-zero-conversion" "-Wloop-analysis" "-Wc++2a-compat" "-=
 Wcomma" "-Wimplicit-fallthrough" "-Wunused-function" "-Wunused-variable" "-=
 Wstring-conversion" "-Wtautological-overlap-compare" "-Wtautological-unsign=
 ed-enum-zero-compare" "-Wtautological-unsigned-zero-compare" "-Wno-error=3D=
 tautological-type-limit-compare" "-Wno-inline-new-delete" "-Wno-error=3Ddep=
 recated-declarations" "-Wno-error=3Darray-bounds" "-Wno-error=3Dbackend-plu=
 gin" "-Wno-error=3Dreturn-std-move" "-Wno-error=3Datomic-alignment" "-Wno-e=
 rror=3Ddeprecated-copy" "-Wformat" "-Wformat-security" "-Wno-gnu-zero-varia=
 dic-macro-arguments" "-Werror=3Dimplicit-function-declaration" "-Wno-unknow=
 n-warning-option" "-std=3Dc++14" "-fdeprecated-macro" "-fno-dwarf-directory=
 -asm" "-ferror-limit" "19" "-fmessage-length" "0" "-pthread" "-stack-protec=
 tor" "1" "-fno-rtti" "-fgnuc-version=3D4.2.1" "-fobjc-runtime=3Dgnustep" "-=
 fno-aligned-allocation" "-fdiagnostics-show-option" "-x" "c++" "gl-b5701c.c=
 pp"


 ---8<------ gl-b5701c.cpp ---8<-------
 # 1 "<built-in>"
 # 1 "/usr/pkgobj/www/firefox/work/firefox-82.0.2/config/gcc_hidden.h" 1
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 /* Begin all files as hidden visibility */
 #pragma GCC visibility push(hidden)
 # 1 "<built-in>" 2
 # 1 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h" 1
 /* List of defines generated by configure. Included with preprocessor flag,
  * -include, to avoid long list of -D defines on the compile command-line.
  * Do not edit.
  */

 #ifndef MOZILLA_CONFIG_H
 #define MOZILLA_CONFIG_H

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__clang__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 10 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #pragma clang diagnostic push
 #if 0 /* disabled by -frewrite-includes */
 #if __has_warning("-Wreserved-id-macro")
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 12 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #pragma clang diagnostic ignored "-Wreserved-id-macro"
 #endif
 # 14 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #endif
 # 15 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"

 /* Expands to all the defines from configure. */
 #define ACCESSIBILITY 1
 #define ATK_MAJOR_VERSION 2
 #define ATK_MINOR_VERSION 36
 #define ATK_REV_VERSION 0
 #define BROWSER_CHROME_URL chrome://browser/content/browser.xhtml
 #define BROWSER_CHROME_URL_QUOTED "chrome://browser/content/browser.xhtml"
 #define BUILD_CTYPES 1
 #define CROSS_COMPILE=20
 #define ENABLE_SHARED_MEMORY 1
 #define ENABLE_SYSTEM_EXTENSION_DIRS 1
 #define ENABLE_WASM_MULTI_VALUE 1
 #define ENABLE_WASM_REFTYPES 1
 #define FORCE_PR_LOG 1
 #define FUNCPROTO 15
 #define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_14
 #define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_42
 #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_42
 #define GL_PROVIDER_GLX 1
 #define HAVE_64BIT_BUILD 1
 #define HAVE_ARC4RANDOM 1
 #define HAVE_ARC4RANDOM_BUF 1
 #define HAVE_CLOCK_MONOTONIC 1
 #define HAVE_DIRENT_H 1
 #define HAVE_DLADDR 1
 #define HAVE_DLOPEN 1
 #define HAVE_FONTCONFIG_FCFREETYPE_H 1
 #define HAVE_FT_BITMAP_SIZE_Y_PPEM 1
 #define HAVE_FT_GLYPHSLOT_EMBOLDEN 1
 #define HAVE_FT_LOAD_SFNT_TABLE 1
 #define HAVE_GETOPT_H 1
 #define HAVE_GETPAGESIZE 1
 #define HAVE_GMTIME_R 1
 #define HAVE_INTTYPES_H 1
 #define HAVE_LCHOWN 1
 #define HAVE_LOCALECONV 1
 #define HAVE_LOCALTIME_R 1
 #define HAVE_LUTIMES 1
 #define HAVE_MALLOC_H 1
 #define HAVE_MEMMEM 1
 #define HAVE_NETINET_IN_H 1
 #define HAVE_NL_TYPES_H 1
 #define HAVE_POSIX_FADVISE 1
 #define HAVE_POSIX_FALLOCATE 1
 #define HAVE_POSIX_MEMALIGN 1
 #define HAVE_PTHREAD_H 1
 #define HAVE_SA_LEN 1
 #define HAVE_SCONN_LEN 1
 #define HAVE_SETPRIORITY 1
 #define HAVE_SIN6_LEN 1
 #define HAVE_SIN_LEN 1
 #define HAVE_STATFS 1
 #define HAVE_STATVFS 1
 #define HAVE_STDINT_H 1
 #define HAVE_STRERROR 1
 #define HAVE_STRNDUP 1
 #define HAVE_SYSCALL 1
 #define HAVE_SYS_MOUNT_H 1
 #define HAVE_SYS_QUEUE_H 1
 #define HAVE_SYS_STATVFS_H 1
 #define HAVE_SYS_TYPES_H 1
 #define HAVE_UNISTD_H 1
 #define HAVE_VALLOC 1
 #define HAVE_VA_COPY 1
 #define HAVE_VISIBILITY_ATTRIBUTE 1
 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
 #define HAVE__UNWIND_BACKTRACE 1
 #define HAVE___CXA_DEMANGLE 1
 #define JS_64BIT 1
 #define JS_CODEGEN_NONE 1
 #define JS_DEFAULT_JITREPORT_GRANULARITY 3
 #define JS_HAS_INTL_API 1
 #define JS_PUNBOX64 1
 #define MALLOC_H <malloc.h>
 #define MALLOC_USABLE_SIZE_CONST_PTR const
 #define MOZILLA_UAVERSION "82.0"
 #define MOZILLA_VERSION "82.0.2"
 #define MOZILLA_VERSION_U 82.0.2
 #define MOZ_ACCESSIBILITY_ATK 1
 #define MOZ_APP_UA_NAME ""
 #define MOZ_APP_UA_VERSION "82.0.2"
 #define MOZ_AV1 1
 #define MOZ_BLOCK_PROFILE_DOWNGRADE 1
 #define MOZ_BUILD_APP browser
 #define MOZ_DATA_REPORTING 1
 #define MOZ_DEDICATED_PROFILES 1
 #define MOZ_DISTRIBUTION_ID "org.mozilla"
 #define MOZ_DLL_PREFIX "lib"
 #define MOZ_DLL_SUFFIX ".so"
 #define MOZ_ENABLE_DBUS 1
 #define MOZ_FFMPEG 1
 #define MOZ_FMP4 1
 #define MOZ_GLUE_IN_PROGRAM 1
 #define MOZ_HAS_REMOTE 1
 #define MOZ_INSTRUMENT_EVENT_LOOP 1
 #define MOZ_LOGGING 1
 #define MOZ_MACBUNDLE_ID org.mozilla.firefox
 #define MOZ_NEW_CERT_STORAGE 1
 #define MOZ_NORMANDY 1
 #define MOZ_OFFICIAL_BRANDING 1
 #define MOZ_PEERCONNECTION 1
 #define MOZ_PLACES 1
 #define MOZ_RAW 1
 #define MOZ_SAMPLE_TYPE_FLOAT32 1
 #define MOZ_SCTP 1
 #define MOZ_SERVICES_HEALTHREPORT 1
 #define MOZ_SRTP 1
 #define MOZ_STATIC_JS 1
 #define MOZ_SYSTEM_ICU 1
 #define MOZ_TREE_CAIRO 1
 #define MOZ_UPDATE_CHANNEL default
 #define MOZ_USER_DIR ".mozilla"
 #define MOZ_VERIFY_MAR_SIGNATURE 1
 #define MOZ_VORBIS 1
 #define MOZ_WEBM_ENCODER 1
 #define MOZ_WEBRTC 1
 #define MOZ_WEBRTC_ASSERT_ALWAYS 1
 #define MOZ_WEBRTC_SIGNALING 1
 #define MOZ_WEBSPEECH 1
 #define MOZ_WEBSPEECH_TEST_BACKEND 1
 #define MOZ_WIDGET_GTK 1
 #define MOZ_X11 1
 #define MOZ_XUL 1
 #define NO_NSPR_10_SUPPORT 1
 #define NS_PRINTING 1
 #define NS_PRINT_PREVIEW 1
 #define RELEASE_OR_BETA 1
 #define SPARC64 1
 #define STATIC_JS_API 1
 #define STDC_HEADERS 1
 #define TARGET_XPCOM_ABI "sparc64-gcc3"
 #define U_USING_ICU_NAMESPACE 0
 #define VA_COPY va_copy
 #define XP_NETBSD 1
 #define XP_UNIX 1

 /*
  * The c99 defining the limit macros (UINT32_MAX for example), says:
  *
  *   C++ implementations should define these macros only when
  *   __STDC_LIMIT_MACROS is defined before <stdint.h> is included.
  *
  * The same also occurs with __STDC_CONSTANT_MACROS for the constant macros
  * (INT8_C for example) used to specify a literal constant of the proper ty=
 pe,
  * and with __STDC_FORMAT_MACROS for the format macros (PRId32 for example)=
  used
  * with the fprintf function family.
  */
 #define __STDC_LIMIT_MACROS
 #define __STDC_CONSTANT_MACROS
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__STDC_FORMAT_MACROS)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 166 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #define __STDC_FORMAT_MACROS
 #endif
 # 168 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__clang__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 170 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #pragma clang diagnostic pop
 #endif
 # 172 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"

 /*
  * Force-include sdkdecls.h for building the chromium sandbox code.
  *
  * CHROMIUM_SANDBOX_BUILD is defined in security/sandbox/moz.build.
  * Note that this include path relies on the LOCAL_INCLUDES in that file.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(CHROMIUM_SANDBOX_BUILD) && defined(XP_WIN)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 180 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #if 0 /* expanded by -frewrite-includes */
 #include "base/win/sdkdecls.h"
 #endif /* expanded by -frewrite-includes */
 # 180 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 # 181 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"

 #ifdef __MINGW32__
 /*
  * MinGW doesn't support __try / __except. There are a few mechanisms avail=
 able
  * to hack around it and pseudo-support it, but these are untested in Firef=
 ox.
  * What is tested (and works) is replacing them with if(true) and else.
  */
 #define __try if(true)
 #define __except(x) else
 #ifdef GetExceptionCode
 /* #undef GetExceptionCode */
 #endif
 # 193 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #define GetExceptionCode() 0

 #endif /* __MINGW32__ */
 # 196 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 #endif /* defined(CHROMIUM_SANDBOX_BUILD) && defined(XP_WIN) */
 # 197 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"

 #endif /* MOZILLA_CONFIG_H */
 # 199 "/usr/pkgobj/www/firefox/work/build/mozilla-config.h"
 # 1 "<built-in>" 2
 # 1 "src/gl.cc"
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 #if 0 /* expanded by -frewrite-includes */
 #include <stdlib.h>
 #endif /* expanded by -frewrite-includes */
 # 5 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdlib.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdlib.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <stdlib.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdlib.h" 3
 # 1 "/usr/include/stdlib.h" 1 3 4
 /*	$NetBSD: stdlib.h,v 1.122 2020/05/26 21:49:29 joerg Exp $	*/

 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
  */

 #ifndef _STDLIB_H_
 #define _STDLIB_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/stdlib.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 1 "/usr/include/sys/cdefs.h" 1 3 4
 /*	$NetBSD: cdefs.h,v 1.154 2020/04/22 09:23:21 rin Exp $	*/

 /* * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
  * Berkeley Software Design, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  */

 #ifndef	_SYS_CDEFS_H_
 #define	_SYS_CDEFS_H_

 #ifdef _KERNEL_OPT
 #if 0 /* expanded by -frewrite-includes */
 #include "opt_diagnostic.h"
 #endif /* expanded by -frewrite-includes */
 # 40 "/usr/include/sys/cdefs.h" 3 4
 # 41 "/usr/include/sys/cdefs.h" 3 4
 #endif
 # 42 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Macro to test if we're using a GNU C compiler of a specific vintage
  * or later, for e.g. features that appeared in a particular version
  * of GNU C.  Usage:
  *
  *	#if __GNUC_PREREQ__(major, minor)
  *	...cool feature...
  *	#else
  *	...delete feature...
  *	#endif
  */
 #ifdef __GNUC__
 #define	__GNUC_PREREQ__(x, y)						\
 	((__GNUC__ =3D=3D (x) && __GNUC_MINOR__ >=3D (y)) ||			\
 	 (__GNUC__ > (x)))
 #else
 # 59 "/usr/include/sys/cdefs.h" 3 4
 #define	__GNUC_PREREQ__(x, y)	0
 #endif
 # 61 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Macros to test Clang/LLVM features.
  * Usage:
  *
  *	#if __has_feature(safe_stack)
  *	...SafeStack specific code...
  *	#else
  *	..regular code...
  *	#endif
  */
 #ifndef __has_feature
 #define __has_feature(x)	0
 #endif
 # 75 "/usr/include/sys/cdefs.h" 3 4

 #ifndef __has_extension
 #define __has_extension		__has_feature /* Compat with pre-3.0 Clang */
 #endif
 # 79 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 80 "/usr/include/sys/cdefs.h" 3 4
 # 1 "/usr/include/machine/cdefs.h" 1 3 4
 /*       $NetBSD: cdefs.h,v 1.4 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/cdefs.h" 3 4
 # 1 "/usr/include/sparc/cdefs.h" 1 3 4
 /*	$NetBSD: cdefs.h,v 1.13 2014/03/18 17:11:19 christos Exp $	*/

 #ifndef	_MACHINE_CDEFS_H_
 #define	_MACHINE_CDEFS_H_

 /* No arch-specific cdefs. */
 #ifdef __arch64__
 #define	__ALIGNBYTES		((size_t)0xf)
 #else
 # 10 "/usr/include/sparc/cdefs.h" 3 4
 #define	__ALIGNBYTES		((size_t)0x7)
 #endif
 # 12 "/usr/include/sparc/cdefs.h" 3 4

 #endif /* !_MACHINE_CDEFS_H_ */
 # 14 "/usr/include/sparc/cdefs.h" 3 4
 # 4 "/usr/include/machine/cdefs.h" 2 3 4
 # 81 "/usr/include/sys/cdefs.h" 2 3 4
 #ifdef __ELF__
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs_elf.h>
 #endif /* expanded by -frewrite-includes */
 # 82 "/usr/include/sys/cdefs.h" 3 4
 # 1 "/usr/include/sys/cdefs_elf.h" 1 3 4
 /*	$NetBSD: cdefs_elf.h,v 1.57 2020/04/30 14:32:05 joerg Exp $	*/

 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
  * All rights reserved.
  *
  * Author: Chris G. Demetriou
  *
  * Permission to use, copy, modify and distribute this software and
  * its documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
  *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  *
  * Carnegie Mellon requests users of this software to return to
  *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
  *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  */

 #ifndef _SYS_CDEFS_ELF_H_
 #define	_SYS_CDEFS_ELF_H_

 #ifdef __LEADING_UNDERSCORE
 #define	_C_LABEL(x)	__CONCAT(_,x)
 #define _C_LABEL_STRING(x)	"_"x
 #else
 # 37 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	_C_LABEL(x)	x
 #define _C_LABEL_STRING(x)	x
 #endif
 # 40 "/usr/include/sys/cdefs_elf.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __STDC__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 42 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	___RENAME(x)	__asm(___STRING(_C_LABEL(x)))
 #else
 # 44 "/usr/include/sys/cdefs_elf.h" 3 4
 #ifdef __LEADING_UNDERSCORE
 #define	___RENAME(x)	____RENAME(_/**/x)
 #define	____RENAME(x)	__asm(___STRING(x))
 #else
 # 48 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	___RENAME(x)	__asm(___STRING(x))
 #endif
 # 50 "/usr/include/sys/cdefs_elf.h" 3 4
 #endif
 # 51 "/usr/include/sys/cdefs_elf.h" 3 4

 #define	__indr_reference(sym,alias)	/* nada, since we do weak refs */

 #if 0 /* disabled by -frewrite-includes */
 #if __STDC__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 55 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__strong_alias(alias,sym)	       				\
     __asm(".global " _C_LABEL_STRING(#alias) "\n"			\
 	    _C_LABEL_STRING(#alias) " =3D " _C_LABEL_STRING(#sym));

 #define	__weak_alias(alias,sym)						\
     __asm(".weak " _C_LABEL_STRING(#alias) "\n"			\
 	    _C_LABEL_STRING(#alias) " =3D " _C_LABEL_STRING(#sym));

 /* Do not use __weak_extern, use __weak_reference instead */
 #define	__weak_extern(sym)						\
     __asm(".weak " _C_LABEL_STRING(#sym));

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 0)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 68 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weak	__attribute__((__weak__))
 #else
 # 70 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weak
 #endif
 # 72 "/usr/include/sys/cdefs_elf.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 0)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 74 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weak_reference(sym)	__attribute__((__weakref__(#sym)))
 #else
 # 76 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weak_reference(sym)	; __asm(".weak " _C_LABEL_STRING(#sym))
 #endif
 # 78 "/usr/include/sys/cdefs_elf.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 2)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 80 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weakref_visible	static
 #else
 # 82 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weakref_visible	extern
 #endif
 # 84 "/usr/include/sys/cdefs_elf.h" 3 4

 #define	__warn_references(sym,msg)					\
     __asm(".pushsection .gnu.warning." #sym "\n"			\
 	  ".ascii \"" msg "\"\n"					\
 	  ".popsection");

 #else /* !__STDC__ */
 # 91 "/usr/include/sys/cdefs_elf.h" 3 4

 #ifdef __LEADING_UNDERSCORE
 #define __weak_alias(alias,sym) ___weak_alias(_/**/alias,_/**/sym)
 #define	___weak_alias(alias,sym)					\
     __asm(".weak alias\nalias =3D sym");
 #else
 # 97 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weak_alias(alias,sym)						\
     __asm(".weak alias\nalias =3D sym");
 #endif
 # 100 "/usr/include/sys/cdefs_elf.h" 3 4
 #ifdef __LEADING_UNDERSCORE
 #define __weak_extern(sym) ___weak_extern(_/**/sym)
 #define	___weak_extern(sym)						\
     __asm(".weak sym");
 #else
 # 105 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__weak_extern(sym)						\
     __asm(".weak sym");
 #endif
 # 108 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__warn_references(sym,msg)					\
     __asm(".pushsection .gnu.warning.sym\n"				\
 	  ".ascii \"" msg "\"\n"					\
 	  ".popsection");

 #endif /* !__STDC__ */
 # 114 "/usr/include/sys/cdefs_elf.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __arm__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 116 "/usr/include/sys/cdefs_elf.h" 3 4
 #define __ifunc(name, resolver) \
 	__asm(".globl	" _C_LABEL_STRING(#name) "\n" \
 	      ".type	" _C_LABEL_STRING(#name) ", %gnu_indirect_function\n" \
 	       _C_LABEL_STRING(#name) " =3D " _C_LABEL_STRING(#resolver))
 #define __hidden_ifunc(name, resolver) \
 	__asm(".globl	" _C_LABEL_STRING(#name) "\n" \
 	      ".hidden	" _C_LABEL_STRING(#name) "\n" \
 	      ".type	" _C_LABEL_STRING(#name) ", %gnu_indirect_function\n" \
 	       _C_LABEL_STRING(#name) " =3D " _C_LABEL_STRING(#resolver))
 #else
 # 126 "/usr/include/sys/cdefs_elf.h" 3 4
 #define __ifunc(name, resolver) \
 	__asm(".globl	" _C_LABEL_STRING(#name) "\n" \
 	      ".type	" _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \
 	      _C_LABEL_STRING(#name) " =3D " _C_LABEL_STRING(#resolver))
 #define __hidden_ifunc(name, resolver) \
 	__asm(".globl	" _C_LABEL_STRING(#name) "\n" \
 	      ".hidden	" _C_LABEL_STRING(#name) "\n" \
 	      ".type	" _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \
 	      _C_LABEL_STRING(#name) " =3D " _C_LABEL_STRING(#resolver))
 #endif
 # 136 "/usr/include/sys/cdefs_elf.h" 3 4

 #ifdef __arm__
 #if 0 /* disabled by -frewrite-includes */
 #if __STDC__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 139 "/usr/include/sys/cdefs_elf.h" 3 4
 #  define	__SECTIONSTRING(_sec, _str)					\
 	__asm(".pushsection " #_sec ",\"MS\",%progbits,1\n"		\
 	      ".asciz \"" _str "\"\n"					\
 	      ".popsection")
 #else
 # 144 "/usr/include/sys/cdefs_elf.h" 3 4
 #  define	__SECTIONSTRING(_sec, _str)					\
 	__asm(".pushsection " _sec ",\"MS\",%progbits,1\n"		\
 	      ".asciz \"" _str "\"\n"					\
 	      ".popsection")
 #  endif
 # 149 "/usr/include/sys/cdefs_elf.h" 3 4
 #else
 # 150 "/usr/include/sys/cdefs_elf.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #  if __STDC__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 151 "/usr/include/sys/cdefs_elf.h" 3 4
 #  define	__SECTIONSTRING(_sec, _str)					\
 	__asm(".pushsection " #_sec ",\"MS\",@progbits,1\n"		\
 	      ".asciz \"" _str "\"\n"					\
 	      ".popsection")
 #  else
 # 156 "/usr/include/sys/cdefs_elf.h" 3 4
 #  define	__SECTIONSTRING(_sec, _str)					\
 	__asm(".pushsection " _sec ",\"MS\",@progbits,1\n"		\
 	      ".asciz \"" _str "\"\n"					\
 	      ".popsection")
 #  endif
 # 161 "/usr/include/sys/cdefs_elf.h" 3 4
 #endif
 # 162 "/usr/include/sys/cdefs_elf.h" 3 4

 #define	__IDSTRING(_n,_s)		__SECTIONSTRING(.ident,_s)

 #define	__RCSID(_s)			__IDSTRING(rcsid,_s)
 #define	__SCCSID(_s)
 #define __SCCSID2(_s)
 #define	__COPYRIGHT(_s)			__SECTIONSTRING(.copyright,_s)

 #define	__KERNEL_RCSID(_n, _s)		__RCSID(_s)
 #define	__KERNEL_SCCSID(_n, _s)
 #define	__KERNEL_COPYRIGHT(_n, _s)	__COPYRIGHT(_s)

 #ifndef __lint__
 #define	__link_set_make_entry(set, sym)					\
 	static void const * const __link_set_##set##_sym_##sym		\
 	    __section("link_set_" #set) __used =3D (const void *)&sym
 #define	__link_set_make_entry2(set, sym, n)				\
 	static void const * const __link_set_##set##_sym_##sym##_##n	\
 	    __section("link_set_" #set) __used =3D (const void *)&sym[n]
 #else
 # 182 "/usr/include/sys/cdefs_elf.h" 3 4
 #define	__link_set_make_entry(set, sym)					\
 	extern void const * const __link_set_##set##_sym_##sym
 #define	__link_set_make_entry2(set, sym, n)				\
 	extern void const * const __link_set_##set##_sym_##sym##_##n
 #endif /* __lint__ */
 # 187 "/usr/include/sys/cdefs_elf.h" 3 4

 #define	__link_set_add_text(set, sym)	__link_set_make_entry(set, sym)
 #define	__link_set_add_rodata(set, sym)	__link_set_make_entry(set, sym)
 #define	__link_set_add_data(set, sym)	__link_set_make_entry(set, sym)
 #define	__link_set_add_bss(set, sym)	__link_set_make_entry(set, sym)
 #define	__link_set_add_text2(set, sym, n)   __link_set_make_entry2(set, sym=
 , n)
 #define	__link_set_add_rodata2(set, sym, n) __link_set_make_entry2(set, sym=
 , n)
 #define	__link_set_add_data2(set, sym, n)   __link_set_make_entry2(set, sym=
 , n)
 #define	__link_set_add_bss2(set, sym, n)    __link_set_make_entry2(set, sym=
 , n)

 #define	__link_set_start(set)	(__start_link_set_##set)
 #define	__link_set_end(set)	(__stop_link_set_##set)

 #define	__link_set_decl(set, ptype)					\
 	extern ptype * const __link_set_start(set)[] __dso_hidden;	\
 	__asm__(".hidden " __STRING(__stop_link_set_##set)); \
 	extern ptype * const __link_set_end(set)[] __weak __dso_hidden

 #define	__link_set_count(set)						\
 	(__link_set_end(set) - __link_set_start(set))


 #ifdef _KERNEL

 /*
  * On multiprocessor systems we can gain an improvement in performance
  * by being mindful of which cachelines data is placed in.
  *
  * __read_mostly:
  *
  *	It makes sense to ensure that rarely modified data is not
  *	placed in the same cacheline as frequently modified data.
  *	To mitigate the phenomenon known as "false-sharing" we
  *	can annotate rarely modified variables with __read_mostly.
  *	All such variables are placed into the .data.read_mostly
  *	section in the kernel ELF.
  *
  *	Prime candidates for __read_mostly annotation are variables
  *	which are hardly ever modified and which are used in code
  *	hot-paths, e.g. pmap_initialized.
  *
  * __cacheline_aligned:
  *
  *	Some data structures (mainly locks) benefit from being aligned
  *	on a cacheline boundary, and having a cacheline to themselves.
  *	This way, the modification of other data items cannot adversely
  *	affect the lock and vice versa.
  *
  *	Any variables annotated with __cacheline_aligned will be
  *	placed into the .data.cacheline_aligned ELF section.
  */
 #define	__read_mostly						\
     __attribute__((__section__(".data.read_mostly")))

 #define	__cacheline_aligned					\
     __attribute__((__aligned__(COHERENCY_UNIT),			\
 		 __section__(".data.cacheline_aligned")))

 #endif /* _KERNEL */
 # 246 "/usr/include/sys/cdefs_elf.h" 3 4

 #endif /* !_SYS_CDEFS_ELF_H_ */
 # 248 "/usr/include/sys/cdefs_elf.h" 3 4
 # 83 "/usr/include/sys/cdefs.h" 2 3 4
 #else
 # 84 "/usr/include/sys/cdefs.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs_aout.h>
 #endif /* expanded by -frewrite-includes */
 # 84 "/usr/include/sys/cdefs.h" 3 4
 # 85 "/usr/include/sys/cdefs.h" 3 4
 #endif
 # 86 "/usr/include/sys/cdefs.h" 3 4

 #ifdef __GNUC__
 #define	__strict_weak_alias(alias,sym)					\
 	__unused static __typeof__(alias) *__weak_alias_##alias =3D &sym;	\
 	__weak_alias(alias,sym)
 #else
 # 92 "/usr/include/sys/cdefs.h" 3 4
 #define	__strict_weak_alias(alias,sym) __weak_alias(alias,sym)
 #endif
 # 94 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Optional marker for size-optimised MD calling convention.
  */
 #ifndef __compactcall
 #define	__compactcall
 #endif
 # 101 "/usr/include/sys/cdefs.h" 3 4

 /*
  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  * in between its arguments.  __CONCAT can also concatenate double-quoted
  * strings produced by the __STRING macro, but this only works with ANSI C.
  */

 #define	___STRING(x)	__STRING(x)
 #define	___CONCAT(x,y)	__CONCAT(x,y)

 #if 0 /* disabled by -frewrite-includes */
 #if __STDC__ || defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 114 "/usr/include/sys/cdefs.h" 3 4
 #define	__P(protos)	protos		/* full-blown ANSI C */
 #define	__CONCAT(x,y)	x ## y
 #define	__STRING(x)	#x

 #define	__const		const		/* define reserved names to standard */
 #define	__signed	signed
 #define	__volatile	volatile
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__cplusplus) || defined(__PCC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 122 "/usr/include/sys/cdefs.h" 3 4
 #define	__inline	inline		/* convert to C++/C99 keyword */
 #else
 # 124 "/usr/include/sys/cdefs.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__GNUC__) && !defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 125 "/usr/include/sys/cdefs.h" 3 4
 #define	__inline			/* delete GCC keyword */
 #endif /* !__GNUC__  && !__lint__ */
 # 127 "/usr/include/sys/cdefs.h" 3 4
 #endif /* !__cplusplus */
 # 128 "/usr/include/sys/cdefs.h" 3 4

 #else	/* !(__STDC__ || __cplusplus) */
 # 130 "/usr/include/sys/cdefs.h" 3 4
 #define	__P(protos)	()		/* traditional C preprocessor */
 #define	__CONCAT(x,y)	x/**/y
 #define	__STRING(x)	"x"

 #ifndef __GNUC__
 #define	__const				/* delete pseudo-ANSI C keywords */
 #define	__inline
 #define	__signed
 #define	__volatile
 #endif	/* !__GNUC__ */
 # 140 "/usr/include/sys/cdefs.h" 3 4

 /*
  * In non-ANSI C environments, new programs will want ANSI-only C keywords
  * deleted from the program and old programs will want them left alone.
  * Programs using the ANSI C keywords const, inline etc. as normal
  * identifiers should define -DNO_ANSI_KEYWORDS.
  */
 #ifndef	NO_ANSI_KEYWORDS
 #define	const		__const		/* convert ANSI C keywords */
 #define	inline		__inline
 #define	signed		__signed
 #define	volatile	__volatile
 #endif /* !NO_ANSI_KEYWORDS */
 # 153 "/usr/include/sys/cdefs.h" 3 4
 #endif	/* !(__STDC__ || __cplusplus) */
 # 154 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Used for internal auditing of the NetBSD source tree.
  */
 #ifdef __AUDIT__
 #define	__aconst	__const
 #else
 # 161 "/usr/include/sys/cdefs.h" 3 4
 #define	__aconst
 #endif
 # 163 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Compile Time Assertion.
  */
 #ifdef __COUNTER__
 #define	__CTASSERT(x)		__CTASSERT0(x, __ctassert, __COUNTER__)
 #else
 # 170 "/usr/include/sys/cdefs.h" 3 4
 #define	__CTASSERT(x)		__CTASSERT99(x, __INCLUDE_LEVEL__, __LINE__)
 #define	__CTASSERT99(x, a, b)	__CTASSERT0(x, __CONCAT(__ctassert,a), \
 					       __CONCAT(_,b))
 #endif
 # 174 "/usr/include/sys/cdefs.h" 3 4
 #define	__CTASSERT0(x, y, z)	__CTASSERT1(x, y, z)
 #define	__CTASSERT1(x, y, z)	\
 	struct y ## z ## _struct { \
 		unsigned int y ## z : /*CONSTCOND*/(x) ? 1 : -1; \
 	}

 /*
  * The following macro is used to remove const cast-away warnings
  * from gcc -Wcast-qual; it should be used with caution because it
  * can hide valid errors; in particular most valid uses are in
  * situations where the API requires it, not to cast away string
  * constants. We don't use *intptr_t on purpose here and we are
  * explicit about unsigned long so that we don't have additional
  * dependencies.
  */
 #define __UNCONST(a)	((void *)(unsigned long)(const void *)(a))

 /*
  * The following macro is used to remove the volatile cast-away warnings
  * from gcc -Wcast-qual; as above it should be used with caution
  * because it can hide valid errors or warnings.  Valid uses include
  * making it possible to pass a volatile pointer to memset().
  * For the same reasons as above, we use unsigned long and not intptr_t.
  */
 #define __UNVOLATILE(a)	((void *)(unsigned long)(volatile void *)(a))

 /*
  * The following macro is used to remove the the function type cast warnings
  * from gcc -Wcast-function-type and as above should be used with caution.
  */
 #define __FPTRCAST(t, f)	((t)(void *)(f))

 /*
  * GCC2 provides __extension__ to suppress warnings for various GNU C
  * language extensions under "-ansi -pedantic".
  */
 #if 0 /* disabled by -frewrite-includes */
 #if !__GNUC_PREREQ__(2, 0)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 211 "/usr/include/sys/cdefs.h" 3 4
 #define	__extension__		/* delete __extension__ if non-gcc or gcc1 */
 #endif
 # 213 "/usr/include/sys/cdefs.h" 3 4

 /*
  * GCC1 and some versions of GCC2 declare dead (non-returning) and
  * pure (no side effects) functions using "volatile" and "const";
  * unfortunately, these then cause warnings under "-ansi -pedantic".
  * GCC2 uses a new, peculiar __attribute__((attrs)) style.  All of
  * these work for GNU C++ (modulo a slight glitch in the C++ grammar
  * in the distribution version of 2.5.5).
  *
  * GCC defines a pure function as depending only on its arguments and
  * global variables.  Typical examples are strlen and sqrt.
  *
  * GCC defines a const function as depending only on its arguments.
  * Therefore calling a const function again with identical arguments
  * will always produce the same result.
  *
  * Rounding modes for floating point operations are considered global
  * variables and prevent sqrt from being a const function.
  *
  * Calls to const functions can be optimised away and moved around
  * without limitations.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if !__GNUC_PREREQ__(2, 0) && !defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 236 "/usr/include/sys/cdefs.h" 3 4
 #define __attribute__(x)
 #endif
 # 238 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 5) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 240 "/usr/include/sys/cdefs.h" 3 4
 #define	__dead		__attribute__((__noreturn__))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__GNUC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 242 "/usr/include/sys/cdefs.h" 3 4
 #define	__dead		__volatile
 #else
 # 244 "/usr/include/sys/cdefs.h" 3 4
 #define	__dead
 #endif
 # 246 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 96) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 248 "/usr/include/sys/cdefs.h" 3 4
 #define	__pure		__attribute__((__pure__))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__GNUC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 250 "/usr/include/sys/cdefs.h" 3 4
 #define	__pure		__const
 #else
 # 252 "/usr/include/sys/cdefs.h" 3 4
 #define	__pure
 #endif
 # 254 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 5) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 256 "/usr/include/sys/cdefs.h" 3 4
 #define	__constfunc	__attribute__((__const__))
 #else
 # 258 "/usr/include/sys/cdefs.h" 3 4
 #define	__constfunc
 #endif
 # 260 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3, 0) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 262 "/usr/include/sys/cdefs.h" 3 4
 #define	__noinline	__attribute__((__noinline__))
 #else
 # 264 "/usr/include/sys/cdefs.h" 3 4
 #define	__noinline	/* nothing */
 #endif
 # 266 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3, 0) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 268 "/usr/include/sys/cdefs.h" 3 4
 #define	__always_inline	__attribute__((__always_inline__))
 #else
 # 270 "/usr/include/sys/cdefs.h" 3 4
 #define	__always_inline	/* nothing */
 #endif
 # 272 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 1) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 274 "/usr/include/sys/cdefs.h" 3 4
 #define	__returns_twice	__attribute__((__returns_twice__))
 #else
 # 276 "/usr/include/sys/cdefs.h" 3 4
 #define	__returns_twice	/* nothing */
 #endif
 # 278 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 5) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 280 "/usr/include/sys/cdefs.h" 3 4
 #define	__noclone	__attribute__((__noclone__))
 #else
 # 282 "/usr/include/sys/cdefs.h" 3 4
 #define	__noclone	/* nothing */
 #endif
 # 284 "/usr/include/sys/cdefs.h" 3 4

 /*
  * __unused: Note that item or function might be unused.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 7) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 289 "/usr/include/sys/cdefs.h" 3 4
 #define	__unused	__attribute__((__unused__))
 #else
 # 291 "/usr/include/sys/cdefs.h" 3 4
 #define	__unused	/* delete */
 #endif
 # 293 "/usr/include/sys/cdefs.h" 3 4

 /*
  * __used: Note that item is needed, even if it appears to be unused.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3, 1) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 298 "/usr/include/sys/cdefs.h" 3 4
 #define	__used		__attribute__((__used__))
 #else
 # 300 "/usr/include/sys/cdefs.h" 3 4
 #define	__used		__unused
 #endif
 # 302 "/usr/include/sys/cdefs.h" 3 4

 /*
  * __diagused: Note that item is used in diagnostic code, but may be
  * unused in non-diagnostic code.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_KERNEL) && defined(DIAGNOSTIC)) \
  || (!defined(_KERNEL) && !defined(NDEBUG))
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 309 "/usr/include/sys/cdefs.h" 3 4
 #define	__diagused	/* empty */
 #else
 # 311 "/usr/include/sys/cdefs.h" 3 4
 #define	__diagused	__unused
 #endif
 # 313 "/usr/include/sys/cdefs.h" 3 4

 /*
  * __debugused: Note that item is used in debug code, but may be
  * unused in non-debug code.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(DEBUG)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 319 "/usr/include/sys/cdefs.h" 3 4
 #define	__debugused	/* empty */
 #else
 # 321 "/usr/include/sys/cdefs.h" 3 4
 #define	__debugused	__unused
 #endif
 # 323 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3, 1) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 325 "/usr/include/sys/cdefs.h" 3 4
 #define	__noprofile	__attribute__((__no_instrument_function__))
 #else
 # 327 "/usr/include/sys/cdefs.h" 3 4
 #define	__noprofile	/* nothing */
 #endif
 # 329 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 6) || defined(__clang__) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 331 "/usr/include/sys/cdefs.h" 3 4
 #define	__unreachable()	__builtin_unreachable()
 #else
 # 333 "/usr/include/sys/cdefs.h" 3 4
 #define	__unreachable()	do {} while (/*CONSTCOND*/0)
 #endif
 # 335 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_RUMPKERNEL)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 337 "/usr/include/sys/cdefs.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__clang__) && __has_feature(address_sanitizer)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 338 "/usr/include/sys/cdefs.h" 3 4
 #define	__noasan	__attribute__((no_sanitize("kernel-address", "address")))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(4, 9) && defined(__SANITIZE_ADDRESS__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 340 "/usr/include/sys/cdefs.h" 3 4
 #define	__noasan	__attribute__((no_sanitize_address))
 #else
 # 342 "/usr/include/sys/cdefs.h" 3 4
 #define	__noasan	/* nothing */
 #endif
 # 344 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__clang__) && __has_feature(thread_sanitizer)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 346 "/usr/include/sys/cdefs.h" 3 4
 #define	__nocsan	__attribute__((no_sanitize("thread")))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(4, 9) && defined(__SANITIZE_THREAD__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 348 "/usr/include/sys/cdefs.h" 3 4
 #define	__nocsan	__attribute__((no_sanitize_thread))
 #else
 # 350 "/usr/include/sys/cdefs.h" 3 4
 #define	__nocsan	/* nothing */
 #endif
 # 352 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__clang__) && __has_feature(memory_sanitizer)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 354 "/usr/include/sys/cdefs.h" 3 4
 #define	__nomsan	__attribute__((no_sanitize("kernel-memory", "memory")))
 #else
 # 356 "/usr/include/sys/cdefs.h" 3 4
 #define	__nomsan	/* nothing */
 #endif
 # 358 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__clang__) && __has_feature(undefined_behavior_sanitizer)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 360 "/usr/include/sys/cdefs.h" 3 4
 #define __noubsan	__attribute__((no_sanitize("undefined")))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(4, 9) && defined(__SANITIZE_UNDEFINED__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 362 "/usr/include/sys/cdefs.h" 3 4
 #define __noubsan	__attribute__((no_sanitize_undefined))
 #else
 # 364 "/usr/include/sys/cdefs.h" 3 4
 #define __noubsan	/* nothing */
 #endif
 # 366 "/usr/include/sys/cdefs.h" 3 4
 #endif
 # 367 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__COVERITY__) ||						\
     __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) ||\
     __has_feature(leak_sanitizer) || defined(__SANITIZE_LEAK__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 371 "/usr/include/sys/cdefs.h" 3 4
 #define	__NO_LEAKS
 #endif
 # 373 "/usr/include/sys/cdefs.h" 3 4

 /*
  * To be used when an empty body is required like:
  *
  * #ifdef DEBUG
  * # define dprintf(a) printf(a)
  * #else
  * # define dprintf(a) __nothing
  * #endif
  *
  * We use ((void)0) instead of do {} while (0) so that it
  * works on , expressions.
  */
 #define __nothing	(/*LINTED*/(void)0)

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 389 "/usr/include/sys/cdefs.h" 3 4
 #define	__BEGIN_EXTERN_C	extern "C" {
 #define	__END_EXTERN_C		}
 #define	__static_cast(x,y)	static_cast<x>(y)
 #else
 # 393 "/usr/include/sys/cdefs.h" 3 4
 #define	__BEGIN_EXTERN_C
 #define	__END_EXTERN_C
 #define	__static_cast(x,y)	(x)y
 #endif
 # 397 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 0) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 399 "/usr/include/sys/cdefs.h" 3 4
 #  define __dso_public	__attribute__((__visibility__("default")))
 #  define __dso_hidden	__attribute__((__visibility__("hidden")))
 #  define __BEGIN_PUBLIC_DECLS	\
 	_Pragma("GCC visibility push(default)") __BEGIN_EXTERN_C
 #  define __END_PUBLIC_DECLS	__END_EXTERN_C _Pragma("GCC visibility pop")
 #  define __BEGIN_HIDDEN_DECLS	\
 	_Pragma("GCC visibility push(hidden)") __BEGIN_EXTERN_C
 #  define __END_HIDDEN_DECLS	__END_EXTERN_C _Pragma("GCC visibility pop")
 #else
 # 408 "/usr/include/sys/cdefs.h" 3 4
 #  define __dso_public
 #  define __dso_hidden
 #  define __BEGIN_PUBLIC_DECLS	__BEGIN_EXTERN_C
 #  define __END_PUBLIC_DECLS	__END_EXTERN_C
 #  define __BEGIN_HIDDEN_DECLS	__BEGIN_EXTERN_C
 #  define __END_HIDDEN_DECLS	__END_EXTERN_C
 #endif
 # 415 "/usr/include/sys/cdefs.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 2) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 416 "/usr/include/sys/cdefs.h" 3 4
 #  define __dso_protected	__attribute__((__visibility__("protected")))
 #else
 # 418 "/usr/include/sys/cdefs.h" 3 4
 #  define __dso_protected
 #endif
 # 420 "/usr/include/sys/cdefs.h" 3 4

 #define	__BEGIN_DECLS		__BEGIN_PUBLIC_DECLS
 #define	__END_DECLS		__END_PUBLIC_DECLS

 /*
  * Non-static C99 inline functions are optional bodies.  They don't
  * create global symbols if not used, but can be replaced if desirable.
  * This differs from the behavior of GCC before version 4.3.  The nearest
  * equivalent for older GCC is `extern inline'.  For newer GCC, use the
  * gnu_inline attribute additionally to get the old behavior.
  *
  * For C99 compilers other than GCC, the C99 behavior is expected.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__GNUC__) && defined(__GNUC_STDC_INLINE__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 434 "/usr/include/sys/cdefs.h" 3 4
 #define	__c99inline	extern __attribute__((__gnu_inline__)) __inline
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__GNUC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 1 /* evaluated by -frewrite-includes */
 # 436 "/usr/include/sys/cdefs.h" 3 4
 #define	__c99inline	extern __inline
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__STDC_VERSION__) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 438 "/usr/include/sys/cdefs.h" 3 4
 #define	__c99inline	__inline
 #endif
 # 440 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 442 "/usr/include/sys/cdefs.h" 3 4
 #define __thread	/* delete */
 #define	__packed	__packed
 #define	__aligned(x)	/* delete */
 #define	__section(x)	/* delete */
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(2, 7) || defined(__PCC__) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 1 /* evaluated by -frewrite-includes */
 # 447 "/usr/include/sys/cdefs.h" 3 4
 #define	__packed	__attribute__((__packed__))
 #define	__aligned(x)	__attribute__((__aligned__(x)))
 #define	__section(x)	__attribute__((__section__(x)))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(_MSC_VER)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 451 "/usr/include/sys/cdefs.h" 3 4
 #define	__packed	/* ignore */
 #else
 # 453 "/usr/include/sys/cdefs.h" 3 4
 #define	__packed	error: no __packed for this compiler
 #define	__aligned(x)	error: no __aligned for this compiler
 #define	__section(x)	error: no __section for this compiler
 #endif
 # 457 "/usr/include/sys/cdefs.h" 3 4

 /*
  * C99 defines the restrict type qualifier keyword, which was made available
  * in GCC 2.92.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 463 "/usr/include/sys/cdefs.h" 3 4
 #define	__restrict	/* delete __restrict when not supported */
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __STDC_VERSION__ >=3D 199901L
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 465 "/usr/include/sys/cdefs.h" 3 4
 #define	__restrict	restrict
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(2, 92) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 1 /* evaluated by -frewrite-includes */
 # 467 "/usr/include/sys/cdefs.h" 3 4
 #define	__restrict	__restrict__
 #else
 # 469 "/usr/include/sys/cdefs.h" 3 4
 #define	__restrict	/* delete __restrict when not supported */
 #endif
 # 471 "/usr/include/sys/cdefs.h" 3 4

 /*
  * C99 and C++11 define __func__ predefined identifier, which was made
  * available in GCC 2.95.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if !(__STDC_VERSION__ >=3D 199901L) && !(__cplusplus - 0 >=3D 201103L)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 477 "/usr/include/sys/cdefs.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 4) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 478 "/usr/include/sys/cdefs.h" 3 4
 #define	__func__	__FUNCTION__
 #else
 # 480 "/usr/include/sys/cdefs.h" 3 4
 #define	__func__	""
 #endif
 # 482 "/usr/include/sys/cdefs.h" 3 4
 #endif /* !(__STDC_VERSION__ >=3D 199901L) && !(__cplusplus - 0 >=3D 201103=
 L) */
 # 483 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) && defined(NO_KERNEL_RCSIDS)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 485 "/usr/include/sys/cdefs.h" 3 4
 #undef	__KERNEL_RCSID
 #define	__KERNEL_RCSID(_n, _s)	/* nothing */
 #undef	__RCSID
 #define	__RCSID(_s)		/* nothing */
 #endif
 # 490 "/usr/include/sys/cdefs.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_STANDALONE) && !defined(_KERNEL)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 492 "/usr/include/sys/cdefs.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__GNUC__) || defined(__PCC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 493 "/usr/include/sys/cdefs.h" 3 4
 #define	__RENAME(x)	___RENAME(x)
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 495 "/usr/include/sys/cdefs.h" 3 4
 #define	__RENAME(x)	__symbolrename(x)
 #else
 # 497 "/usr/include/sys/cdefs.h" 3 4
 #error "No function renaming possible"
 #endif /* __GNUC__ */
 # 499 "/usr/include/sys/cdefs.h" 3 4
 #else /* _STANDALONE || _KERNEL */
 # 500 "/usr/include/sys/cdefs.h" 3 4
 #define	__RENAME(x)	no renaming in kernel/standalone environment
 #endif
 # 502 "/usr/include/sys/cdefs.h" 3 4

 /*
  * A barrier to stop the optimizer from moving code or assume live
  * register values. This is gcc specific, the version is more or less
  * arbitrary, might work with older compilers.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 95) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 509 "/usr/include/sys/cdefs.h" 3 4
 #define	__insn_barrier()	__asm __volatile("":::"memory")
 #else
 # 511 "/usr/include/sys/cdefs.h" 3 4
 #define	__insn_barrier()	/* */
 #endif
 # 513 "/usr/include/sys/cdefs.h" 3 4

 /*
  * GNU C version 2.96 adds explicit branch prediction so that
  * the CPU back-end can hint the processor and also so that
  * code blocks can be reordered such that the predicted path
  * sees a more linear flow, thus improving cache behavior, etc.
  *
  * The following two macros provide us with a way to use this
  * compiler feature.  Use __predict_true() if you expect the expression
  * to evaluate to true, and __predict_false() if you expect the
  * expression to evaluate to false.
  *
  * A few notes about usage:
  *
  *	* Generally, __predict_false() error condition checks (unless
  *	  you have some _strong_ reason to do otherwise, in which case
  *	  document it), and/or __predict_true() `no-error' condition
  *	  checks, assuming you want to optimize for the no-error case.
  *
  *	* Other than that, if you don't know the likelihood of a test
  *	  succeeding from empirical or other `hard' evidence, don't
  *	  make predictions.
  *
  *	* These are meant to be used in places that are run `a lot'.
  *	  It is wasteful to make predictions in code that is run
  *	  seldomly (e.g. at subsystem initialization time) as the
  *	  basic block reordering that this affects can often generate
  *	  larger code.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 96) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 543 "/usr/include/sys/cdefs.h" 3 4
 #define	__predict_true(exp)	__builtin_expect((exp) !=3D 0, 1)
 #define	__predict_false(exp)	__builtin_expect((exp) !=3D 0, 0)
 #else
 # 546 "/usr/include/sys/cdefs.h" 3 4
 #define	__predict_true(exp)	(exp)
 #define	__predict_false(exp)	(exp)
 #endif
 # 549 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Compiler-dependent macros to declare that functions take printf-like
  * or scanf-like arguments.  They are null except for versions of gcc
  * that are known to support the features properly (old versions of gcc-2
  * didn't permit keeping the keywords out of the application namespace).
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 7) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 557 "/usr/include/sys/cdefs.h" 3 4
 #define __printflike(fmtarg, firstvararg)	\
 	    __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
 #ifndef __syslog_attribute__
 #define __syslog__ __printf__
 #endif
 # 562 "/usr/include/sys/cdefs.h" 3 4
 #define __sysloglike(fmtarg, firstvararg)	\
 	    __attribute__((__format__ (__syslog__, fmtarg, firstvararg)))
 #define __scanflike(fmtarg, firstvararg)	\
 	    __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
 #define __format_arg(fmtarg)    __attribute__((__format_arg__ (fmtarg)))
 #else
 # 568 "/usr/include/sys/cdefs.h" 3 4
 #define __printflike(fmtarg, firstvararg)	/* nothing */
 #define __scanflike(fmtarg, firstvararg)	/* nothing */
 #define __sysloglike(fmtarg, firstvararg)	/* nothing */
 #define __format_arg(fmtarg)			/* nothing */
 #endif
 # 573 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Macros for manipulating "link sets".  Link sets are arrays of pointers
  * to objects, which are gathered up by the linker.
  *
  * Object format-specific code has provided us with the following macros:
  *
  *	__link_set_add_text(set, sym)
  *		Add a reference to the .text symbol `sym' to `set'.
  *
  *	__link_set_add_rodata(set, sym)
  *		Add a reference to the .rodata symbol `sym' to `set'.
  *
  *	__link_set_add_data(set, sym)
  *		Add a reference to the .data symbol `sym' to `set'.
  *
  *	__link_set_add_bss(set, sym)
  *		Add a reference to the .bss symbol `sym' to `set'.
  *
  *	__link_set_decl(set, ptype)
  *		Provide an extern declaration of the set `set', which
  *		contains an array of pointers to type `ptype'.  This
  *		macro must be used by any code which wishes to reference
  *		the elements of a link set.
  *
  *	__link_set_start(set)
  *		This points to the first slot in the link set.
  *
  *	__link_set_end(set)
  *		This points to the (non-existent) slot after the last
  *		entry in the link set.
  *
  *	__link_set_count(set)
  *		Count the number of entries in link set `set'.
  *
  * In addition, we provide the following macros for accessing link sets:
  *
  *	__link_set_foreach(pvar, set)
  *		Iterate over the link set `set'.  Because a link set is
  *		an array of pointers, pvar must be declared as "type **pvar",
  *		and the actual entry accessed as "*pvar".
  *
  *	__link_set_entry(set, idx)
  *		Access the link set entry at index `idx' from set `set'.
  */
 #define	__link_set_foreach(pvar, set)					\
 	for (pvar =3D __link_set_start(set); pvar < __link_set_end(set); pvar++)

 #define	__link_set_entry(set, idx)	(__link_set_start(set)[idx])

 /*
  * Return the natural alignment in bytes for the given type
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4, 1) || defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 627 "/usr/include/sys/cdefs.h" 3 4
 #define	__alignof(__t)  __alignof__(__t)
 #else
 # 629 "/usr/include/sys/cdefs.h" 3 4
 #define __alignof(__t) (sizeof(struct { char __x; __t __y; }) - sizeof(__t))
 #endif
 # 631 "/usr/include/sys/cdefs.h" 3 4

 /*
  * Return the number of elements in a statically-allocated array,
  * __x.
  */
 #define	__arraycount(__x)	(sizeof(__x) / sizeof(__x[0]))

 #ifndef __ASSEMBLER__
 /* __BIT(n): nth bit, where __BIT(0) =3D=3D 0x1. */
 #define	__BIT(__n)	\
     (((uintmax_t)(__n) >=3D NBBY * sizeof(uintmax_t)) ? 0 : \
     ((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1))))

 /* Macros for min/max. */
 #define	__MIN(a,b)	((/*CONSTCOND*/(a)<=3D(b))?(a):(b))
 #define	__MAX(a,b)	((/*CONSTCOND*/(a)>(b))?(a):(b))

 /* __BITS(m, n): bits m through n, m < n. */
 #define	__BITS(__m, __n)	\
 	((__BIT(__MAX((__m), (__n)) + 1) - 1) ^ (__BIT(__MIN((__m), (__n))) - 1))
 #endif /* !__ASSEMBLER__ */
 # 652 "/usr/include/sys/cdefs.h" 3 4

 /* find least significant bit that is set */
 #define	__LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))

 #define	__PRIuBIT	PRIuMAX
 #define	__PRIuBITS	__PRIuBIT

 #define	__PRIxBIT	PRIxMAX
 #define	__PRIxBITS	__PRIxBIT

 #define	__SHIFTOUT(__x, __mask)	(((__x) & (__mask)) / __LOWEST_SET_BIT(__ma=
 sk))
 #define	__SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask))
 #define	__SHIFTOUT_MASK(__mask) __SHIFTOUT((__mask), (__mask))

 /*
  * Only to be used in other headers that are included from both c or c++
  * NOT to be used in code.
  */
 #ifdef __cplusplus
 #define __CAST(__dt, __st)	static_cast<__dt>(__st)
 #else
 # 673 "/usr/include/sys/cdefs.h" 3 4
 #define __CAST(__dt, __st)	((__dt)(__st))
 #endif
 # 675 "/usr/include/sys/cdefs.h" 3 4

 #define __CASTV(__dt, __st)	__CAST(__dt, __CAST(void *, __st))
 #define __CASTCV(__dt, __st)	__CAST(__dt, __CAST(const void *, __st))

 #define __USE(a) (/*LINTED*/(void)(a))

 #define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \
     (~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL)

 #ifndef __ASSEMBLER__
 static __inline long long __zeroll(void) { return 0; }
 static __inline unsigned long long __zeroull(void) { return 0; }
 #else
 # 688 "/usr/include/sys/cdefs.h" 3 4
 #define __zeroll() (0LL)
 #define __zeroull() (0ULL)
 #endif
 # 691 "/usr/include/sys/cdefs.h" 3 4

 #define __negative_p(x) (!((x) > 0) && ((x) !=3D 0))

 #define __type_min_s(t) ((t)((1ULL << (sizeof(t) * NBBY - 1))))
 #define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * NBBY - 1))))
 #define __type_min_u(t) ((t)0ULL)
 #define __type_max_u(t) ((t)~0ULL)
 #define __type_is_signed(t) (/*LINTED*/__type_min_s(t) + (t)1 < (t)1)
 #define __type_min(t) (__type_is_signed(t) ? __type_min_s(t) : __type_min_u=
 (t))
 #define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u=
 (t))


 #define __type_fit_u(t, a) (/*LINTED*/!__negative_p(a) && \
     (uintmax_t)((a) + __zeroull()) <=3D (uintmax_t)__type_max_u(t))

 #define __type_fit_s(t, a) (/*LINTED*/__negative_p(a) ? \
     ((intmax_t)((a) + __zeroll()) >=3D (intmax_t)__type_min_s(t)) : \
     ((intmax_t)((a) + __zeroll()) >=3D (intmax_t)0 && \
      (intmax_t)((a) + __zeroll()) <=3D (intmax_t)__type_max_s(t)))

 /*
  * return true if value 'a' fits in type 't'
  */
 #define __type_fit(t, a) (__type_is_signed(t) ? \
     __type_fit_s(t, a) : __type_fit_u(t, a))

 #endif /* !_SYS_CDEFS_H_ */
 # 718 "/usr/include/sys/cdefs.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 2=
  3
 #pragma GCC visibility pop
 # 38 "/usr/include/stdlib.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 38 "/usr/include/stdlib.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 39 "/usr/include/stdlib.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 41 "/usr/include/stdlib.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/types.h>		/* for quad_t, etc. */
 #endif /* expanded by -frewrite-includes */
 # 41 "/usr/include/stdlib.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 # 1 "/usr/include/sys/types.h" 1 3 4
 /*	$NetBSD: types.h,v 1.105 2020/05/16 18:31:53 christos Exp $	*/

 /*-
  * Copyright (c) 1982, 1986, 1991, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)types.h	8.4 (Berkeley) 1/21/94
  */

 #ifndef _SYS_TYPES_H_
 #define	_SYS_TYPES_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 43 "/usr/include/sys/types.h" 2 3 4

 /* Machine type dependent parameters. */
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/types.h>
 #endif /* expanded by -frewrite-includes */
 # 45 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/include/machine/types.h" 1 3 4
 /*       $NetBSD: types.h,v 1.28 2019/04/06 03:06:27 thorpej Exp $        */

 #ifndef _SPARC64_TYPES_H_
 #define	_SPARC64_TYPES_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/types.h>
 #endif /* expanded by -frewrite-includes */
 # 6 "/usr/include/machine/types.h" 3 4
 # 1 "/usr/include/sparc/types.h" 1 3 4
 /*	$NetBSD: types.h,v 1.68 2020/05/17 06:30:44 martin Exp $ */

 /*
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * This software was developed by the Computer Systems Engineering group
  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
  * contributed to Berkeley.
  *
  * All advertising materials mentioning features or use of this software
  * must display the following acknowledgement:
  *	This product includes software developed by the University of
  *	California, Lawrence Berkeley Laboratory.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)types.h	8.1 (Berkeley) 6/11/93
  */

 #ifndef	_MACHTYPES_H_
 #define	_MACHTYPES_H_

 #ifdef sun
 #undef sun
 #endif
 # 49 "/usr/include/sparc/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL_OPT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 51 "/usr/include/sparc/types.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include "opt_sparc_arch.h"
 #endif /* expanded by -frewrite-includes */
 # 51 "/usr/include/sparc/types.h" 3 4
 # 52 "/usr/include/sparc/types.h" 3 4
 #endif
 # 53 "/usr/include/sparc/types.h" 3 4

 #ifndef _LOCORE

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 56 "/usr/include/sparc/types.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 57 "/usr/include/sparc/types.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 57 "/usr/include/sparc/types.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 58 "/usr/include/sparc/types.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 58 "/usr/include/sparc/types.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 1 "/usr/include/sparc/int_types.h" 1 3 4
 /*	$NetBSD: int_types.h,v 1.11 2014/08/13 22:56:56 matt Exp $	*/

 /*
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * This software was developed by the Computer Systems Engineering group
  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
  * contributed to Berkeley.
  *
  * All advertising materials mentioning features or use of this software
  * must display the following acknowledgement:
  *	This product includes software developed by the University of
  *	California, Lawrence Berkeley Laboratory.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	from: @(#)types.h	8.1 (Berkeley) 6/11/93
  */

 #ifndef	_SPARC_INT_TYPES_H_
 #define	_SPARC_INT_TYPES_H_

 #ifdef __UINTPTR_TYPE__
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 47 "/usr/include/sparc/int_types.h" 3 4
 # 1 "/usr/include/sys/common_int_types.h" 1 3 4
 /*	$NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $	*/

 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Joerg Sonnenberger.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SYS_COMMON_INT_TYPES_H_
 #define _SYS_COMMON_INT_TYPES_H_

 #ifndef __UINTPTR_TYPE__
 #error Your compiler does not provide exact width type macros.
 #endif
 # 38 "/usr/include/sys/common_int_types.h" 3 4

 /*
  * 7.18.1 Integer types
  */

 /* 7.18.1.1 Exact-width integer types */

 typedef	__INT8_TYPE__		   __int8_t;
 typedef	__UINT8_TYPE__		  __uint8_t;
 typedef	__INT16_TYPE__		  __int16_t;
 typedef	__UINT16_TYPE__		 __uint16_t;
 typedef	__INT32_TYPE__		  __int32_t;
 typedef	__UINT32_TYPE__		 __uint32_t;
 typedef	__INT64_TYPE__		  __int64_t;
 typedef	__UINT64_TYPE__		 __uint64_t;

 #define	__BIT_TYPES_DEFINED__

 /* 7.18.1.4 Integer types capable of holding object pointers */

 typedef	__INTPTR_TYPE__		 __intptr_t;
 typedef	__UINTPTR_TYPE__	__uintptr_t;

 #endif /* _SYS_COMMON_INT_TYPES_H_ */
 # 62 "/usr/include/sys/common_int_types.h" 3 4
 # 48 "/usr/include/sparc/int_types.h" 2 3 4
 #else
 # 49 "/usr/include/sparc/int_types.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 49 "/usr/include/sparc/int_types.h" 3 4
 # 50 "/usr/include/sparc/int_types.h" 3 4

 /*
  * 7.18.1 Integer types
  */

 /* 7.18.1.1 Exact-width integer types */

 typedef	signed char		 __int8_t;
 typedef	unsigned char		__uint8_t;
 typedef	short int		__int16_t;
 typedef	unsigned short int     __uint16_t;
 typedef	int			__int32_t;
 typedef	unsigned int	       __uint32_t;

 #ifdef __COMPILER_INT64__
 typedef	__COMPILER_INT64__	__int64_t;
 typedef	__COMPILER_UINT64__    __uint64_t;
 #else
 # 68 "/usr/include/sparc/int_types.h" 3 4
 #ifdef __arch64__
 /* 64-bit compiler */
 typedef	long int		__int64_t;
 typedef	unsigned long int      __uint64_t;
 #else
 # 73 "/usr/include/sparc/int_types.h" 3 4
 /* 32-bit compiler */
 /* LONGLONG */
 typedef	long long int		__int64_t;
 /* LONGLONG */
 typedef	unsigned long long int __uint64_t;
 #endif
 # 79 "/usr/include/sparc/int_types.h" 3 4
 #endif /* !__COMPILER_INT64__ */
 # 80 "/usr/include/sparc/int_types.h" 3 4

 #define	__BIT_TYPES_DEFINED__

 /* 7.18.1.4 Integer types capable of holding object pointers */

 typedef	long int	       __intptr_t;
 typedef	unsigned long int     __uintptr_t;

 #endif /* !__UINTPTR_TYPE__ */
 # 89 "/usr/include/sparc/int_types.h" 3 4

 #endif	/* !_SPARC_INT_TYPES_H_ */
 # 91 "/usr/include/sparc/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 2 3 4
 # 59 "/usr/include/sparc/types.h" 2 3 4

 /* The following are unsigned to prevent annoying sign extended pointers. */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || define=
 d(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 62 "/usr/include/sparc/types.h" 3 4
 typedef unsigned long int	register_t;
 #define	PRIxREGISTER		"lx"
 typedef unsigned int		register32_t;
 #define	PRIxREGISTER32		"x"
 #ifdef __arch64__
 typedef unsigned long int	register64_t;
 #define	PRIxREGISTER64		"lx"
 #else
 # 70 "/usr/include/sparc/types.h" 3 4
 /* LONGLONG */
 typedef unsigned long long int	register64_t;
 #define	PRIxREGISTER64		"llx"
 #endif
 # 74 "/usr/include/sparc/types.h" 3 4
 #endif
 # 75 "/usr/include/sparc/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 77 "/usr/include/sparc/types.h" 3 4
 typedef struct label_t {
 #ifdef __sparc_v9__
 	register64_t val[2];
 #else
 # 81 "/usr/include/sparc/types.h" 3 4
 	register_t val[3];
 #endif
 # 83 "/usr/include/sparc/types.h" 3 4
 } label_t;
 #endif
 # 85 "/usr/include/sparc/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || define=
 d(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 87 "/usr/include/sparc/types.h" 3 4
 typedef unsigned long int	vaddr_t;
 typedef vaddr_t			vsize_t;
 #define	PRIxVADDR		"lx"
 #define	PRIxVSIZE		"lx"
 #define	PRIuVSIZE		"lu"
 #ifdef __sparc_v9__
 #ifdef __arch64__
 typedef unsigned long int	paddr_t;
 #define	PRIxPADDR		"lx"
 #define	PRIuPSIZE		"lu"
 #else
 # 98 "/usr/include/sparc/types.h" 3 4
 /* LONGLONG */
 typedef unsigned long long int	paddr_t;
 #define	PRIxPADDR		"llx"
 #define	PRIuPSIZE		"llu"
 #endif /* __arch64__ */
 # 103 "/usr/include/sparc/types.h" 3 4
 #else
 # 104 "/usr/include/sparc/types.h" 3 4
 typedef unsigned long int	paddr_t;
 #define	PRIxPADDR		"lx"
 #define	PRIuPSIZE		"lu"
 #endif /* __sparc_v9__ */
 # 108 "/usr/include/sparc/types.h" 3 4
 typedef paddr_t			psize_t;
 #define	PRIxPSIZE		PRIxPADDR
 #endif
 # 111 "/usr/include/sparc/types.h" 3 4

 typedef	unsigned char		__cpu_simple_lock_nv_t;
 typedef unsigned long int	__register_t;

 /* __cpu_simple_lock_t used to be a full word. */
 #define	__CPU_SIMPLE_LOCK_PAD

 #define	__SIMPLELOCK_LOCKED	0xff
 #define	__SIMPLELOCK_UNLOCKED	0

 #endif /* _LOCORE */
 # 122 "/usr/include/sparc/types.h" 3 4

 #define	__HAVE_NEW_STYLE_BUS_H
 #define	__HAVE_SYSCALL_INTERN
 #define	__GENERIC_SOFT_INTERRUPTS_ALL_LEVELS
 #define	__HAVE_CPU_VMSPACE_EXEC
 #define	__HAVE_RAS

 #ifdef __sparc_v9__
 #define	__HAVE_CPU_DATA_FIRST
 #define	__HAVE_DEVICE_REGISTER_POSTCONFIG
 #define	__HAVE_ATOMIC64_OPS
 #define	__HAVE_CPU_COUNTER	/* sparc v9 CPUs have %tick */
 #define	__HAVE_FAST_SOFTINTS
 #else
 # 136 "/usr/include/sparc/types.h" 3 4
 #define	__HAVE_MM_MD_READWRITE
 #endif
 # 138 "/usr/include/sparc/types.h" 3 4

 #define	__HAVE_CPU_LWP_SETPRIVATE
 #define	__HAVE___LWP_GETPRIVATE_FAST
 #define	__HAVE_TLS_VARIANT_II
 #define	__HAVE_COMMON___TLS_GET_ADDR

 #endif	/* _MACHTYPES_H_ */
 # 145 "/usr/include/sparc/types.h" 3 4
 # 7 "/usr/include/machine/types.h" 2 3 4

 #ifdef __arch64__
 #define	MD_TOPDOWN_INIT(epp)	/* no topdown VM flag for exec by default */
 #endif
 # 11 "/usr/include/machine/types.h" 3 4

 #define	__HAVE_COMPAT_NETBSD32
 #define	__HAVE_UCAS_FULL

 #endif
 # 16 "/usr/include/machine/types.h" 3 4
 # 46 "/usr/include/sys/types.h" 2 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 47 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 1 "/usr/include/sys/common_ansi.h" 1 3 4
 /*	$NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $	*/

 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Matt Thomas of 3am Software Foundry.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SYS_COMMON_ANSI_H_
 #define _SYS_COMMON_ANSI_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 35 "/usr/include/sys/common_ansi.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 36 "/usr/include/sys/common_ansi.h" 2 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sys/common_ansi.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 3 4
 # 38 "/usr/include/sys/common_ansi.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__PTRDIFF_TYPE__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 40 "/usr/include/sys/common_ansi.h" 3 4
 #error __PTRDIFF_TYPE__ not present
 #endif
 # 42 "/usr/include/sys/common_ansi.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__SIZE_TYPE__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 44 "/usr/include/sys/common_ansi.h" 3 4
 #error __SIZE_TYPE__ not present
 #endif
 # 46 "/usr/include/sys/common_ansi.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__WCHAR_TYPE__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 48 "/usr/include/sys/common_ansi.h" 3 4
 #error __WCHAR_TYPE__ not present
 #endif
 # 50 "/usr/include/sys/common_ansi.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__WINT_TYPE__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 52 "/usr/include/sys/common_ansi.h" 3 4
 #error __WINT_TYPE__ not present
 #endif
 # 54 "/usr/include/sys/common_ansi.h" 3 4

 /*
  * Types which are fundamental to the implementation and may appear in
  * more than one standard header are defined here.  Standard headers
  * then use:
  *	#ifdef	_BSD_SIZE_T_
  *	typedef	_BSD_SIZE_T_ size_t;
  *	#undef	_BSD_SIZE_T_
  *	#endif
  */
 #define	_BSD_CLOCK_T_		unsigned int	/* clock() */
 #define	_BSD_PTRDIFF_T_		__PTRDIFF_TYPE__ /* ptr1 - ptr2 */
 #define	_BSD_SSIZE_T_		__PTRDIFF_TYPE__ /* byte count or error */
 #define	_BSD_SIZE_T_		__SIZE_TYPE__	/* sizeof() */
 #define	_BSD_TIME_T_		__int64_t	/* time() */
 #define	_BSD_CLOCKID_T_		int		/* clockid_t */
 #define	_BSD_TIMER_T_		int		/* timer_t */
 #define	_BSD_SUSECONDS_T_	int		/* suseconds_t */
 #define	_BSD_USECONDS_T_	unsigned int	/* useconds_t */
 #define	_BSD_WCHAR_T_		__WCHAR_TYPE__	/* wchar_t */
 #define	_BSD_WINT_T_		__WINT_TYPE__	/* wint_t */

 #endif	/* _SYS_COMMON_ANSI_H_ */
 # 77 "/usr/include/sys/common_ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 2 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 48 "/usr/include/sys/types.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 48 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 3 4
 # 49 "/usr/include/sys/types.h" 2 3 4


 #if 0 /* expanded by -frewrite-includes */
 #include <sys/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 51 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/include/sys/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.15 2020/05/16 18:31:53 christos Exp $	*/

 /*-
  * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Jun-ichiro itojun Hagino and by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef	_SYS_ANSI_H_
 #define	_SYS_ANSI_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 35 "/usr/include/sys/ansi.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 36 "/usr/include/sys/ansi.h" 2 3 4

 typedef char *		__caddr_t;	/* core address */
 typedef __uint32_t	__gid_t;	/* group id */
 typedef __uint32_t	__in_addr_t;	/* IP(v4) address */
 typedef __uint16_t	__in_port_t;	/* "Internet" port number */
 typedef __uint32_t	__mode_t;	/* file permissions */
 typedef __uint32_t	__accmode_t;	/* access permissions */
 typedef __int64_t	__off_t;	/* file offset */
 typedef __int32_t	__pid_t;	/* process id */
 typedef __uint8_t	__sa_family_t;	/* socket address family */
 typedef unsigned int	__socklen_t;	/* socket-related datum length */
 typedef __uint32_t	__uid_t;	/* user id */
 typedef	__uint64_t	__fsblkcnt_t;	/* fs block count (statvfs) */
 typedef	__uint64_t	__fsfilcnt_t;	/* fs file count */

 struct __tag_wctrans_t;
 typedef struct __tag_wctrans_t *__wctrans_t;

 struct __tag_wctype_t;
 typedef struct __tag_wctype_t *__wctype_t;

 /*
  * mbstate_t is an opaque object to keep conversion state, during multibyte
  * stream conversions.  The content must not be referenced by user programs.
  */
 typedef union {
 	__int64_t __mbstateL; /* for alignment */
 	char __mbstate8[128];
 } __mbstate_t;

 #define _BSD_WCTRANS_T_	__wctrans_t	/* wctrans_t */
 #define _BSD_WCTYPE_T_	__wctype_t	/* wctype_t */
 #define _BSD_MBSTATE_T_	__mbstate_t	/* mbstate_t */

 #ifdef __lint__
 typedef char *__va_list;
 #else
 # 73 "/usr/include/sys/ansi.h" 3 4
 typedef __builtin_va_list __va_list;
 #endif
 # 75 "/usr/include/sys/ansi.h" 3 4

 #endif	/* !_SYS_ANSI_H_ */
 # 77 "/usr/include/sys/ansi.h" 3 4
 # 52 "/usr/include/sys/types.h" 2 3 4

 #ifndef	_BSD_INT8_T_
 typedef	__int8_t	int8_t;
 #define	_BSD_INT8_T_
 #endif
 # 57 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT8_T_
 typedef	__uint8_t	uint8_t;
 #define	_BSD_UINT8_T_
 #endif
 # 62 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT16_T_
 typedef	__int16_t	int16_t;
 #define	_BSD_INT16_T_
 #endif
 # 67 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT16_T_
 typedef	__uint16_t	uint16_t;
 #define	_BSD_UINT16_T_
 #endif
 # 72 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT32_T_
 typedef	__int32_t	int32_t;
 #define	_BSD_INT32_T_
 #endif
 # 77 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT32_T_
 typedef	__uint32_t	uint32_t;
 #define	_BSD_UINT32_T_
 #endif
 # 82 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT64_T_
 typedef	__int64_t	int64_t;
 #define	_BSD_INT64_T_
 #endif
 # 87 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT64_T_
 typedef	__uint64_t	uint64_t;
 #define	_BSD_UINT64_T_
 #endif
 # 92 "/usr/include/sys/types.h" 3 4

 typedef	uint8_t		u_int8_t;
 typedef	uint16_t	u_int16_t;
 typedef	uint32_t	u_int32_t;
 typedef	uint64_t	u_int64_t;

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/endian.h>
 #endif /* expanded by -frewrite-includes */
 # 98 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/endian=
 =2Eh" 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/endian=
 =2Eh" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/endian.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/endian=
 =2Eh" 3
 # 1 "/usr/include/machine/endian.h" 1 3 4
 /*	$NetBSD: endian.h,v 1.7 2000/03/17 00:09:25 mycroft Exp $	*/

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/endian.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/endian.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/endian.h" =
 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/endian.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/endian.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/endian.h" 3
 # 1 "/usr/include/sys/endian.h" 1 3 4
 /*	$NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $	*/

 /*
  * Copyright (c) 1987, 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)endian.h	8.1 (Berkeley) 6/11/93
  */

 #ifndef _SYS_ENDIAN_H_
 #define _SYS_ENDIAN_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sys/endian.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 38 "/usr/include/sys/endian.h" 2 3 4

 /*
  * Definitions for byte order, according to byte significance from low
  * address to high.
  */
 #define	_LITTLE_ENDIAN	1234	/* LSB first: i386, vax */
 #define	_BIG_ENDIAN	4321	/* MSB first: 68000, ibm, net */
 #define	_PDP_ENDIAN	3412	/* LSB first in word, MSW first in long */


 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 49 "/usr/include/sys/endian.h" 3 4
 #ifndef _LOCORE

 /* C-family endian-ness definitions */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 53 "/usr/include/sys/endian.h" 3 4
 # 54 "/usr/include/sys/endian.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 54 "/usr/include/sys/endian.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 55 "/usr/include/sys/endian.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/types.h>
 #endif /* expanded by -frewrite-includes */
 # 55 "/usr/include/sys/endian.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 # 1 "/usr/include/sys/types.h" 1 3 4
 /*	$NetBSD: types.h,v 1.105 2020/05/16 18:31:53 christos Exp $	*/

 /*-
  * Copyright (c) 1982, 1986, 1991, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)types.h	8.4 (Berkeley) 1/21/94
  */

 #ifndef _SYS_TYPES_H_
 #define	_SYS_TYPES_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/sys/types.h" 3 4
 # 43 "/usr/include/sys/types.h" 3 4

 /* Machine type dependent parameters. */
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/types.h>
 #endif /* expanded by -frewrite-includes */
 # 45 "/usr/include/sys/types.h" 3 4
 # 46 "/usr/include/sys/types.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 47 "/usr/include/sys/types.h" 3 4
 # 48 "/usr/include/sys/types.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 48 "/usr/include/sys/types.h" 3 4
 # 49 "/usr/include/sys/types.h" 3 4


 #if 0 /* expanded by -frewrite-includes */
 #include <sys/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 51 "/usr/include/sys/types.h" 3 4
 # 52 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT8_T_
 typedef	__int8_t	int8_t;
 #define	_BSD_INT8_T_
 #endif
 # 57 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT8_T_
 typedef	__uint8_t	uint8_t;
 #define	_BSD_UINT8_T_
 #endif
 # 62 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT16_T_
 typedef	__int16_t	int16_t;
 #define	_BSD_INT16_T_
 #endif
 # 67 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT16_T_
 typedef	__uint16_t	uint16_t;
 #define	_BSD_UINT16_T_
 #endif
 # 72 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT32_T_
 typedef	__int32_t	int32_t;
 #define	_BSD_INT32_T_
 #endif
 # 77 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT32_T_
 typedef	__uint32_t	uint32_t;
 #define	_BSD_UINT32_T_
 #endif
 # 82 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_INT64_T_
 typedef	__int64_t	int64_t;
 #define	_BSD_INT64_T_
 #endif
 # 87 "/usr/include/sys/types.h" 3 4

 #ifndef	_BSD_UINT64_T_
 typedef	__uint64_t	uint64_t;
 #define	_BSD_UINT64_T_
 #endif
 # 92 "/usr/include/sys/types.h" 3 4

 typedef	uint8_t		u_int8_t;
 typedef	uint16_t	u_int16_t;
 typedef	uint32_t	u_int32_t;
 typedef	uint64_t	u_int64_t;

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/endian.h>
 #endif /* expanded by -frewrite-includes */
 # 98 "/usr/include/sys/types.h" 3 4
 # 99 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 101 "/usr/include/sys/types.h" 3 4
 typedef	unsigned char	u_char;
 typedef	unsigned short	u_short;
 typedef	unsigned int	u_int;
 typedef	unsigned long	u_long;

 typedef unsigned char	unchar;		/* Sys V compatibility */
 typedef	unsigned short	ushort;		/* Sys V compatibility */
 typedef	unsigned int	uint;		/* Sys V compatibility */
 typedef unsigned long	ulong;		/* Sys V compatibility */
 #endif
 # 111 "/usr/include/sys/types.h" 3 4

 typedef	uint64_t	u_quad_t;	/* quads */
 typedef	int64_t		quad_t;
 typedef	quad_t *	qaddr_t;

 /*
  * The types longlong_t and u_longlong_t exist for use with the
  * Sun-derived XDR routines involving these types, and their usage
  * in other contexts is discouraged.  Further note that these types
  * may not be equivalent to "long long" and "unsigned long long",
  * they are only guaranteed to be signed and unsigned 64-bit types
  * respectively.  Portable programs that need 64-bit types should use
  * the C99 types int64_t and uint64_t instead.
  */

 typedef	int64_t		longlong_t;	/* for XDR */
 typedef	uint64_t	u_longlong_t;	/* for XDR */

 typedef	int64_t		blkcnt_t;	/* fs block count */
 typedef	int32_t		blksize_t;	/* fs optimal block size */

 #ifndef	fsblkcnt_t
 typedef	__fsblkcnt_t	fsblkcnt_t;	/* fs block count (statvfs) */
 #define fsblkcnt_t	__fsblkcnt_t
 #endif
 # 136 "/usr/include/sys/types.h" 3 4

 #ifndef	fsfilcnt_t
 typedef	__fsfilcnt_t	fsfilcnt_t;	/* fs file count */
 #define fsfilcnt_t	__fsfilcnt_t
 #endif
 # 141 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 143 "/usr/include/sys/types.h" 3 4
 /* We don't and shouldn't use caddr_t in the kernel anymore */
 #ifndef	caddr_t
 typedef	__caddr_t	caddr_t;	/* core address */
 #define	caddr_t		__caddr_t
 #endif
 # 148 "/usr/include/sys/types.h" 3 4
 #endif
 # 149 "/usr/include/sys/types.h" 3 4

 #ifdef __daddr_t
 typedef	__daddr_t	daddr_t;	/* disk address */
 #undef __daddr_t
 #else
 # 154 "/usr/include/sys/types.h" 3 4
 typedef	int64_t		daddr_t;	/* disk address */
 #endif
 # 156 "/usr/include/sys/types.h" 3 4

 typedef	uint64_t	dev_t;		/* device number */
 typedef	uint32_t	fixpt_t;	/* fixed point number */

 #ifndef	gid_t
 typedef	__gid_t		gid_t;		/* group id */
 #define	gid_t		__gid_t
 #endif
 # 164 "/usr/include/sys/types.h" 3 4

 typedef	uint32_t	id_t;		/* group id, process id or user id */
 typedef	uint64_t	ino_t;		/* inode number */
 typedef	long		key_t;		/* IPC key (for Sys V IPC) */

 #ifndef	mode_t
 typedef	__mode_t	mode_t;		/* permissions */
 #define	mode_t		__mode_t
 #endif
 # 173 "/usr/include/sys/types.h" 3 4

 #ifndef	accmode_t
 typedef	__accmode_t	accmode_t;	/* access permissions */
 #define	accmode_t	__accmode_t
 #endif
 # 178 "/usr/include/sys/types.h" 3 4

 typedef	uint32_t	nlink_t;	/* link count */

 #ifndef	off_t
 typedef	__off_t		off_t;		/* file offset */
 #define	off_t		__off_t
 #endif
 # 185 "/usr/include/sys/types.h" 3 4

 #ifndef	pid_t
 typedef	__pid_t		pid_t;		/* process id */
 #define	pid_t		__pid_t
 #endif
 # 190 "/usr/include/sys/types.h" 3 4
 typedef int32_t		lwpid_t;	/* LWP id */
 typedef uint64_t	rlim_t;		/* resource limit */
 typedef	int32_t		segsz_t;	/* segment size */
 typedef	int32_t		swblk_t;	/* swap offset */

 #ifndef	uid_t
 typedef	__uid_t		uid_t;		/* user id */
 #define	uid_t		__uid_t
 #endif
 # 199 "/usr/include/sys/types.h" 3 4

 typedef int		mqd_t;

 typedef	unsigned long	cpuid_t;

 typedef	int		psetid_t;

 typedef volatile __cpu_simple_lock_nv_t __cpu_simple_lock_t;

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 209 "/usr/include/sys/types.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/stdbool.h>
 #endif /* expanded by -frewrite-includes */
 # 210 "/usr/include/sys/types.h" 3 4
 # 211 "/usr/include/sys/types.h" 3 4

 /*
  * Deprecated Mach-style boolean_t type.  Should not be used by new code.
  */
 typedef int	boolean_t;
 #ifndef TRUE
 #define	TRUE	1
 #endif
 # 219 "/usr/include/sys/types.h" 3 4
 #ifndef FALSE
 #define	FALSE	0
 #endif
 # 222 "/usr/include/sys/types.h" 3 4

 #endif /* _KERNEL || _STANDALONE */
 # 224 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_LIBC) || defined(_KMEMUSER)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 226 "/usr/include/sys/types.h" 3 4
 /*
  * semctl(2)'s argument structure.  This is here for the benefit of
  * <sys/syscallargs.h>.  It is not in the user's namespace in SUSv2.
  * The SUSv2 semctl(2) takes variable arguments.
  */
 union __semun {
 	int		val;		/* value for SETVAL */
 	struct semid_ds	*buf;		/* buffer for IPC_STAT & IPC_SET */
 	unsigned short	*array;		/* array for GETALL & SETALL */
 };
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/stdint.h>
 #endif /* expanded by -frewrite-includes */
 # 236 "/usr/include/sys/types.h" 3 4
 # 237 "/usr/include/sys/types.h" 3 4
 #endif /* _KERNEL || _LIBC || _KMEMUSER */
 # 238 "/usr/include/sys/types.h" 3 4

 /*
  * These belong in unistd.h, but are placed here too to ensure that
  * long arguments will be promoted to off_t if the program fails to
  * include that header or explicitly cast them to off_t.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 245 "/usr/include/sys/types.h" 3 4
 #ifndef __OFF_T_SYSCALLS_DECLARED
 #define __OFF_T_SYSCALLS_DECLARED
 #ifndef _KERNEL
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 248 "/usr/include/sys/types.h" 3 4
 # 249 "/usr/include/sys/types.h" 3 4
 __BEGIN_DECLS
 off_t	 lseek(int, off_t, int);
 int	 ftruncate(int, off_t);
 int	 truncate(const char *, off_t);
 __END_DECLS
 #endif /* !_KERNEL */
 # 255 "/usr/include/sys/types.h" 3 4
 #endif /* __OFF_T_SYSCALLS_DECLARED */
 # 256 "/usr/include/sys/types.h" 3 4
 #endif /* defined(_NETBSD_SOURCE) */
 # 257 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 259 "/usr/include/sys/types.h" 3 4
 /* Major, minor numbers, dev_t's. */
 typedef int32_t __devmajor_t, __devminor_t;
 #define devmajor_t __devmajor_t
 #define devminor_t __devminor_t
 #define NODEVMAJOR (-1)
 #define	major(x)	((devmajor_t)(((uint32_t)(x) & 0x000fff00) >>  8))
 #define	minor(x)	((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \
 				   (((uint32_t)(x) & 0x000000ff) >>  0)))
 #define	makedev(x,y)	((dev_t)((((dev_t)(x) <<  8) & 0x000fff00U) | \
 				 (((dev_t)(y) << 12) & 0xfff00000U) | \
 				 (((dev_t)(y) <<  0) & 0x000000ffU)))
 #endif
 # 271 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_CLOCK_T_
 typedef	_BSD_CLOCK_T_		clock_t;
 #undef	_BSD_CLOCK_T_
 #endif
 # 276 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_PTRDIFF_T_
 typedef	_BSD_PTRDIFF_T_		ptrdiff_t;
 #undef	_BSD_PTRDIFF_T_
 #endif
 # 281 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_		size_t;
 #define _SIZE_T
 #undef	_BSD_SIZE_T_
 #endif
 # 287 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_SSIZE_T_
 typedef	_BSD_SSIZE_T_		ssize_t;
 #undef	_BSD_SSIZE_T_
 #endif
 # 292 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_TIME_T_
 typedef	_BSD_TIME_T_		time_t;
 #undef	_BSD_TIME_T_
 #endif
 # 297 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_CLOCKID_T_
 typedef	_BSD_CLOCKID_T_		clockid_t;
 #undef	_BSD_CLOCKID_T_
 #endif
 # 302 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_TIMER_T_
 typedef	_BSD_TIMER_T_		timer_t;
 #undef	_BSD_TIMER_T_
 #endif
 # 307 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_SUSECONDS_T_
 typedef	_BSD_SUSECONDS_T_	suseconds_t;
 #undef	_BSD_SUSECONDS_T_
 #endif
 # 312 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_USECONDS_T_
 typedef	_BSD_USECONDS_T_	useconds_t;
 #undef	_BSD_USECONDS_T_
 #endif
 # 317 "/usr/include/sys/types.h" 3 4

 #ifdef _NETBSD_SOURCE
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/fd_set.h>
 #endif /* expanded by -frewrite-includes */
 # 319 "/usr/include/sys/types.h" 3 4
 # 320 "/usr/include/sys/types.h" 3 4

 #define	NBBY			8

 typedef struct kauth_cred *kauth_cred_t;

 typedef int pri_t;

 #endif
 # 328 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER))
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 330 "/usr/include/sys/types.h" 3 4
 /*
  * Forward structure declarations for function prototypes.  We include the
  * common structures that cross subsystem boundaries here; others are mostly
  * used in the same place that the structure is defined.
  */
 struct	lwp;
 typedef struct lwp lwp_t;
 struct	__ucontext;
 struct	proc;
 typedef struct proc proc_t;
 struct	pgrp;
 struct	rusage;
 struct	file;
 typedef struct file file_t;
 struct	buf;
 typedef struct buf buf_t;
 struct	tty;
 struct	uio;
 #endif
 # 349 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 351 "/usr/include/sys/types.h" 3 4
 #define SET(t, f)	((t) |=3D (f))
 #define	ISSET(t, f)	((t) & (f))
 #define	CLR(t, f)	((t) &=3D ~(f))
 #endif
 # 355 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 357 "/usr/include/sys/types.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0L) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 359 "/usr/include/sys/types.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <pthread_types.h>
 #endif /* expanded by -frewrite-includes */
 # 359 "/usr/include/sys/types.h" 3 4
 # 360 "/usr/include/sys/types.h" 3 4
 #endif
 # 361 "/usr/include/sys/types.h" 3 4
 #endif
 # 362 "/usr/include/sys/types.h" 3 4

 #endif /* !_SYS_TYPES_H_ */
 # 364 "/usr/include/sys/types.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 2=
  3
 #pragma GCC visibility pop
 # 56 "/usr/include/sys/endian.h" 2 3 4

 #ifndef in_addr_t
 typedef __in_addr_t	in_addr_t;
 #define	in_addr_t	__in_addr_t
 #endif
 # 61 "/usr/include/sys/endian.h" 3 4

 #ifndef in_port_t
 typedef __in_port_t	in_port_t;
 #define	in_port_t	__in_port_t
 #endif
 # 66 "/usr/include/sys/endian.h" 3 4

 __BEGIN_DECLS
 uint32_t htonl(uint32_t) __constfunc;
 uint16_t htons(uint16_t) __constfunc;
 uint32_t ntohl(uint32_t) __constfunc;
 uint16_t ntohs(uint16_t) __constfunc;
 __END_DECLS

 #endif /* !_LOCORE */
 # 75 "/usr/include/sys/endian.h" 3 4
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 76 "/usr/include/sys/endian.h" 3 4


 #if 0 /* expanded by -frewrite-includes */
 #include <machine/endian_machdep.h>
 #endif /* expanded by -frewrite-includes */
 # 78 "/usr/include/sys/endian.h" 3 4
 # 1 "/usr/include/machine/endian_machdep.h" 1 3 4
 /*	$NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:25 mycroft Exp $ */

 #define _BYTE_ORDER _BIG_ENDIAN
 # 79 "/usr/include/sys/endian.h" 2 3 4

 /*
  * Define the order of 32-bit words in 64-bit words.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if _BYTE_ORDER =3D=3D _LITTLE_ENDIAN
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 84 "/usr/include/sys/endian.h" 3 4
 #define _QUAD_HIGHWORD 1
 #define _QUAD_LOWWORD 0
 #endif
 # 87 "/usr/include/sys/endian.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if _BYTE_ORDER =3D=3D _BIG_ENDIAN
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 89 "/usr/include/sys/endian.h" 3 4
 #define _QUAD_HIGHWORD 0
 #define _QUAD_LOWWORD 1
 #endif
 # 92 "/usr/include/sys/endian.h" 3 4


 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 95 "/usr/include/sys/endian.h" 3 4
 /*
  *  Traditional names for byteorder.  These are defined as the numeric
  *  sequences so that third party code can "#define XXX_ENDIAN" and not
  *  cause errors.
  */
 #define	LITTLE_ENDIAN	1234		/* LSB first: i386, vax */
 #define	BIG_ENDIAN	4321		/* MSB first: 68000, ibm, net */
 #define	PDP_ENDIAN	3412		/* LSB first in word, MSW first in long */
 #define BYTE_ORDER	_BYTE_ORDER

 #ifndef _LOCORE

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/bswap.h>
 #endif /* expanded by -frewrite-includes */
 # 107 "/usr/include/sys/endian.h" 3 4
 # 1 "/usr/include/machine/bswap.h" 1 3 4
 /*      $NetBSD: bswap.h,v 1.2 1999/08/21 05:39:55 simonb Exp $      */

 #ifndef _MACHINE_BSWAP_H_
 #define	_MACHINE_BSWAP_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/bswap.h>
 #endif /* expanded by -frewrite-includes */
 # 6 "/usr/include/machine/bswap.h" 3 4
 # 1 "/usr/include/sys/bswap.h" 1 3 4
 /*      $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $      */

 /* Written by Manuel Bouyer. Public domain */

 #ifndef _SYS_BSWAP_H_
 #define _SYS_BSWAP_H_

 #ifndef _LOCORE
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/stdint.h>
 #endif /* expanded by -frewrite-includes */
 # 9 "/usr/include/sys/bswap.h" 3 4
 # 1 "/usr/include/sys/stdint.h" 1 3 4
 /*	$NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $	*/

 /*-
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SYS_STDINT_H_
 #define _SYS_STDINT_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 35 "/usr/include/sys/stdint.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 36 "/usr/include/sys/stdint.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/sys/stdint.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 3 4
 # 37 "/usr/include/sys/stdint.h" 2 3 4

 #ifndef	_BSD_INT8_T_
 typedef	__int8_t	int8_t;
 #define	_BSD_INT8_T_
 #endif
 # 42 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_UINT8_T_
 typedef	__uint8_t	uint8_t;
 #define	_BSD_UINT8_T_
 #endif
 # 47 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_INT16_T_
 typedef	__int16_t	int16_t;
 #define	_BSD_INT16_T_
 #endif
 # 52 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_UINT16_T_
 typedef	__uint16_t	uint16_t;
 #define	_BSD_UINT16_T_
 #endif
 # 57 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_INT32_T_
 typedef	__int32_t	int32_t;
 #define	_BSD_INT32_T_
 #endif
 # 62 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_UINT32_T_
 typedef	__uint32_t	uint32_t;
 #define	_BSD_UINT32_T_
 #endif
 # 67 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_INT64_T_
 typedef	__int64_t	int64_t;
 #define	_BSD_INT64_T_
 #endif
 # 72 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_UINT64_T_
 typedef	__uint64_t	uint64_t;
 #define	_BSD_UINT64_T_
 #endif
 # 77 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_INTPTR_T_
 typedef	__intptr_t	intptr_t;
 #define	_BSD_INTPTR_T_
 #endif
 # 82 "/usr/include/sys/stdint.h" 3 4

 #ifndef	_BSD_UINTPTR_T_
 typedef	__uintptr_t	uintptr_t;
 #define	_BSD_UINTPTR_T_
 #endif
 # 87 "/usr/include/sys/stdint.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_mwgwtypes.h>
 #endif /* expanded by -frewrite-includes */
 # 88 "/usr/include/sys/stdint.h" 3 4
 # 1 "/usr/include/machine/int_mwgwtypes.h" 1 3 4
 /*       $NetBSD: int_mwgwtypes.h,v 1.6 2002/07/20 11:52:21 mrg Exp $      =
   */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_mwgwtypes.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_mwgwtypes.h" 3 4
 # 1 "/usr/include/sparc/int_mwgwtypes.h" 1 3 4
 /*	$NetBSD: int_mwgwtypes.h,v 1.7 2014/08/13 22:25:39 matt Exp $	*/

 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SPARC_INT_MWGWTYPES_H_
 #define _SPARC_INT_MWGWTYPES_H_

 #ifdef __UINT_FAST64_TYPE__
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_int_mwgwtypes.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 # 1 "/usr/include/sys/common_int_mwgwtypes.h" 1 3 4
 /*	$NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $	*/

 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Joerg Sonnenberger.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SYS_COMMON_INT_MWGWTYPES_H_
 #define _SYS_COMMON_INT_MWGWTYPES_H_

 #ifndef __UINT_FAST64_TYPE__
 #error Your compiler does not provide min/fast width type macros.
 #endif
 # 38 "/usr/include/sys/common_int_mwgwtypes.h" 3 4

 /*
  * 7.18.1 Integer types
  */

 /* 7.18.1.2 Minimum-width integer types */

 typedef	__INT_LEAST8_TYPE__		  int_least8_t;
 typedef	__UINT_LEAST8_TYPE__		 uint_least8_t;
 typedef	__INT_LEAST16_TYPE__		 int_least16_t;
 typedef	__UINT_LEAST16_TYPE__		uint_least16_t;
 typedef	__INT_LEAST32_TYPE__		 int_least32_t;
 typedef	__UINT_LEAST32_TYPE__		uint_least32_t;
 typedef	__INT_LEAST64_TYPE__		 int_least64_t;
 typedef	__UINT_LEAST64_TYPE__		uint_least64_t;

 /* 7.18.1.3 Fastest minimum-width integer types */
 typedef	__INT_FAST8_TYPE__		   int_fast8_t;
 typedef	__UINT_FAST8_TYPE__		  uint_fast8_t;
 typedef	__INT_FAST16_TYPE__		  int_fast16_t;
 typedef	__UINT_FAST16_TYPE__		 uint_fast16_t;
 typedef	__INT_FAST32_TYPE__		  int_fast32_t;
 typedef	__UINT_FAST32_TYPE__		 uint_fast32_t;
 typedef	__INT_FAST64_TYPE__		  int_fast64_t;
 typedef	__UINT_FAST64_TYPE__		 uint_fast64_t;

 /* 7.18.1.5 Greatest-width integer types */

 typedef	__INTMAX_TYPE__			      intmax_t;
 typedef	__UINTMAX_TYPE__		     uintmax_t;

 #endif /* _SYS_COMMON_INT_MWGWTYPES_H_ */
 # 70 "/usr/include/sys/common_int_mwgwtypes.h" 3 4
 # 37 "/usr/include/sparc/int_mwgwtypes.h" 2 3 4
 #else
 # 38 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 /*
  * 7.18.1 Integer types
  */

 /* 7.18.1.2 Minimum-width integer types */

 typedef	signed char		  int_least8_t;
 typedef	unsigned char		 uint_least8_t;
 typedef	short int		 int_least16_t;
 typedef	unsigned short int	uint_least16_t;
 typedef	int			 int_least32_t;
 typedef	unsigned int		uint_least32_t;
 #ifdef __COMPILER_INT64__
 typedef	__COMPILER_INT64__	 int_least64_t;
 typedef	__COMPILER_UINT64__	uint_least64_t;
 #else
 # 54 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #ifdef __arch64__
 typedef	long int		 int_least64_t;
 typedef	unsigned long int	uint_least64_t;
 #else
 # 58 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 /* LONGLONG */
 typedef	long long int		 int_least64_t;
 /* LONGLONG */
 typedef	unsigned long long int	uint_least64_t;
 #endif /* __arch64__ */
 # 63 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #endif /* __COMPILER_INT64__ */
 # 64 "/usr/include/sparc/int_mwgwtypes.h" 3 4

 /* 7.18.1.3 Fastest minimum-width integer types */

 #ifdef __arch64__
 typedef	long int		   int_fast8_t;
 typedef	unsigned char		  uint_fast8_t;
 #else
 # 71 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 typedef	int			   int_fast8_t;
 typedef	unsigned int		  uint_fast8_t;
 #endif
 # 74 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #ifdef __arch64__
 typedef	long int		  int_fast16_t;
 typedef	unsigned short int	 uint_fast16_t;
 #else
 # 78 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 typedef	int			  int_fast16_t;
 typedef	unsigned int		 uint_fast16_t;
 #endif
 # 81 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #ifdef __arch64__
 typedef	long int		  int_fast32_t;
 typedef	unsigned int		 uint_fast32_t;
 #else
 # 85 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 typedef	int			  int_fast32_t;
 typedef	unsigned int		 uint_fast32_t;
 #endif
 # 88 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #ifdef __COMPILER_INT64__
 typedef	__COMPILER_INT64__	  int_fast64_t;
 typedef	__COMPILER_UINT64__	 uint_fast64_t;
 #else
 # 92 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #ifdef __arch64__
 typedef	long int		  int_fast64_t;
 typedef	unsigned long int	 uint_fast64_t;
 #else
 # 96 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 /* LONGLONG */
 typedef	long long int		  int_fast64_t;
 /* LONGLONG */
 typedef	unsigned long long int	 uint_fast64_t;
 #endif /* __arch64__ */
 # 101 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #endif /* __COMPILER_INT64__ */
 # 102 "/usr/include/sparc/int_mwgwtypes.h" 3 4

 /* 7.18.1.5 Greatest-width integer types */

 #ifdef __COMPILER_INT64__
 typedef	__COMPILER_INT64__	      intmax_t;
 typedef	__COMPILER_UINT64__	     uintmax_t;
 #else
 # 109 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #ifdef __arch64__
 typedef	long int		      intmax_t;
 typedef	unsigned long int	     uintmax_t;
 #else
 # 113 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 /* LONGLONG */
 typedef	long long int		      intmax_t;
 /* LONGLONG */
 typedef	unsigned long long int	     uintmax_t;
 #endif /* __arch64__ */
 # 118 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 #endif /* __COMPILER_INT64__ */
 # 119 "/usr/include/sparc/int_mwgwtypes.h" 3 4

 #endif /* !__UINT_FAST64_TYPE__ */
 # 121 "/usr/include/sparc/int_mwgwtypes.h" 3 4

 #endif /* !_SPARC_INT_MWGWTYPES_H_ */
 # 123 "/usr/include/sparc/int_mwgwtypes.h" 3 4
 # 4 "/usr/include/machine/int_mwgwtypes.h" 2 3 4
 # 89 "/usr/include/sys/stdint.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) || \
     (__cplusplus >=3D 201103L)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 92 "/usr/include/sys/stdint.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_limits.h>
 #endif /* expanded by -frewrite-includes */
 # 92 "/usr/include/sys/stdint.h" 3 4
 # 1 "/usr/include/machine/int_limits.h" 1 3 4
 /*       $NetBSD: int_limits.h,v 1.3 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_limits.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_limits.h" 3 4
 # 1 "/usr/include/sparc/int_limits.h" 1 3 4
 /*	$NetBSD: int_limits.h,v 1.8 2014/08/13 22:31:07 matt Exp $	*/

 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SPARC_INT_LIMITS_H_
 #define _SPARC_INT_LIMITS_H_

 #ifdef __SIG_ATOMIC_MAX__
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_int_limits.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/sparc/int_limits.h" 3 4
 # 1 "/usr/include/sys/common_int_limits.h" 1 3 4
 /*	$NetBSD: common_int_limits.h,v 1.1 2014/07/25 21:43:13 joerg Exp $	*/

 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Joerg Sonnenberger.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SYS_COMMON_INT_LIMITS_H_
 #define _SYS_COMMON_INT_LIMITS_H_

 #ifndef __SIG_ATOMIC_MAX__
 #error Your compiler does not provide limit macros.
 #endif
 # 38 "/usr/include/sys/common_int_limits.h" 3 4

 /*
  * 7.18.2 Limits of specified-width integer types
  */

 /* 7.18.2.1 Limits of exact-width integer types */

 /* minimum values of exact-width signed integer types */
 #define	INT8_MIN		(-__INT8_MAX__-1)
 #define	INT16_MIN		(-__INT16_MAX__-1)
 #define	INT32_MIN		(-__INT32_MAX__-1)
 #define	INT64_MIN		(-__INT64_MAX__-1)

 /* maximum values of exact-width signed integer types */
 #define	INT8_MAX		__INT8_MAX__
 #define	INT16_MAX		__INT16_MAX__
 #define	INT32_MAX		__INT32_MAX__
 #define	INT64_MAX		__INT64_MAX__

 /* maximum values of exact-width unsigned integer types */
 #define	UINT8_MAX		__UINT8_MAX__
 #define	UINT16_MAX		__UINT16_MAX__
 #define	UINT32_MAX		__UINT32_MAX__
 #define	UINT64_MAX		__UINT64_MAX__

 /* 7.18.2.2 Limits of minimum-width integer types */

 /* minimum values of minimum-width signed integer types */
 #define	INT_LEAST8_MIN		(-__INT_LEAST8_MAX__-1)
 #define	INT_LEAST16_MIN		(-__INT_LEAST16_MAX__-1)
 #define	INT_LEAST32_MIN		(-__INT_LEAST32_MAX__-1)
 #define	INT_LEAST64_MIN		(-__INT_LEAST64_MAX__-1)

 /* maximum values of minimum-width signed integer types */
 #define	INT_LEAST8_MAX		__INT_LEAST8_MAX__
 #define	INT_LEAST16_MAX		__INT_LEAST16_MAX__
 #define	INT_LEAST32_MAX		__INT_LEAST32_MAX__
 #define	INT_LEAST64_MAX		__INT_LEAST64_MAX__

 /* maximum values of minimum-width unsigned integer types */
 #define	UINT_LEAST8_MAX 	__UINT_LEAST8_MAX__
 #define	UINT_LEAST16_MAX	__UINT_LEAST16_MAX__
 #define	UINT_LEAST32_MAX	__UINT_LEAST32_MAX__
 #define	UINT_LEAST64_MAX	__UINT_LEAST64_MAX__

 /* 7.18.2.3 Limits of fastest minimum-width integer types */
 =20
 /* minimum values of fastest minimum-width signed integer types */
 #define	INT_FAST8_MIN		(-__INT_FAST8_MAX__-1)
 #define	INT_FAST16_MIN		(-__INT_FAST16_MAX__-1)
 #define	INT_FAST32_MIN		(-__INT_FAST32_MAX__-1)
 #define	INT_FAST64_MIN		(-__INT_FAST64_MAX__-1)

 /* maximum values of fastest minimum-width signed integer types */
 #define	INT_FAST8_MAX		__INT_FAST8_MAX__
 #define	INT_FAST16_MAX		__INT_FAST16_MAX__
 #define	INT_FAST32_MAX		__INT_FAST32_MAX__
 #define	INT_FAST64_MAX		__INT_FAST64_MAX__

 /* maximum values of fastest minimum-width unsigned integer types */
 #define	UINT_FAST8_MAX 	__UINT_FAST8_MAX__
 #define	UINT_FAST16_MAX	__UINT_FAST16_MAX__
 #define	UINT_FAST32_MAX	__UINT_FAST32_MAX__
 #define	UINT_FAST64_MAX	__UINT_FAST64_MAX__

 /* 7.18.2.4 Limits of integer types capable of holding object pointers */
 #define	INTPTR_MIN	(-__INTPTR_MAX__-1)
 #define	INTPTR_MAX	__INTPTR_MAX__
 #define	UINTPTR_MAX	__UINTPTR_MAX__

 /* 7.18.2.5 Limits of greatest-width integer types */

 #define	INTMAX_MIN	(-__INTMAX_MAX__-1)
 #define	INTMAX_MAX	__INTMAX_MAX__
 #define	UINTMAX_MAX	__UINTMAX_MAX__


 /*
  * 7.18.3 Limits of other integer types
  */

 /* limits of ptrdiff_t */
 #define	PTRDIFF_MIN	(-__PTRDIFF_MAX__-1)
 #define	PTRDIFF_MAX	__PTRDIFF_MAX__

 /* limits of sig_atomic_t */
 #define	SIG_ATOMIC_MIN	(-__SIG_ATOMIC_MAX__-1)
 #define	SIG_ATOMIC_MAX	__SIG_ATOMIC_MAX__

 /* limit of size_t */
 #define	SIZE_MAX	__SIZE_MAX__

 #endif /* _SYS_COMMON_INT_LIMITS_H_ */
 # 131 "/usr/include/sys/common_int_limits.h" 3 4
 # 37 "/usr/include/sparc/int_limits.h" 2 3 4
 #else
 # 38 "/usr/include/sparc/int_limits.h" 3 4
 /*
  * 7.18.2 Limits of specified-width integer types
  */

 /* 7.18.2.1 Limits of exact-width integer types */

 /* minimum values of exact-width signed integer types */
 #define	INT8_MIN	(-0x7f-1)			/* int8_t	  */
 #define	INT16_MIN	(-0x7fff-1)			/* int16_t	  */
 #define	INT32_MIN	(-0x7fffffff-1)			/* int32_t	  */
 #ifdef __arch64__
 #define	INT64_MIN	(-0x7fffffffffffffffL-1)	/* int64_t	  */
 #else
 # 51 "/usr/include/sparc/int_limits.h" 3 4
 #define	INT64_MIN	(-0x7fffffffffffffffLL-1)	/* int64_t	  */
 #endif
 # 53 "/usr/include/sparc/int_limits.h" 3 4

 /* maximum values of exact-width signed integer types */
 #define	INT8_MAX	0x7f				/* int8_t	  */
 #define	INT16_MAX	0x7fff				/* int16_t	  */
 #define	INT32_MAX	0x7fffffff			/* int32_t	  */
 #ifdef __arch64__
 #define	INT64_MAX	0x7fffffffffffffffL		/* int64_t	  */
 #else
 # 61 "/usr/include/sparc/int_limits.h" 3 4
 #define	INT64_MAX	0x7fffffffffffffffLL		/* int64_t	  */
 #endif
 # 63 "/usr/include/sparc/int_limits.h" 3 4

 /* maximum values of exact-width unsigned integer types */
 #define	UINT8_MAX	0xff				/* uint8_t	  */
 #define	UINT16_MAX	0xffff				/* uint16_t	  */
 #define	UINT32_MAX	0xffffffffU			/* uint32_t	  */
 #ifdef __arch64__
 #define	UINT64_MAX	0xffffffffffffffffUL		/* uint64_t	  */
 #else
 # 71 "/usr/include/sparc/int_limits.h" 3 4
 #define	UINT64_MAX	0xffffffffffffffffULL		/* uint64_t	  */
 #endif
 # 73 "/usr/include/sparc/int_limits.h" 3 4

 /* 7.18.2.2 Limits of minimum-width integer types */

 /* minimum values of minimum-width signed integer types */
 #define	INT_LEAST8_MIN	(-0x7f-1)			/* int_least8_t	  */
 #define	INT_LEAST16_MIN	(-0x7fff-1)			/* int_least16_t  */
 #define	INT_LEAST32_MIN	(-0x7fffffff-1)			/* int_least32_t  */
 #ifdef __arch64__
 #define	INT_LEAST64_MIN	(-0x7fffffffffffffffL-1)	/* int_least64_t  */
 #else
 # 83 "/usr/include/sparc/int_limits.h" 3 4
 #define	INT_LEAST64_MIN	(-0x7fffffffffffffffLL-1)	/* int_least64_t  */
 #endif
 # 85 "/usr/include/sparc/int_limits.h" 3 4

 /* maximum values of minimum-width signed integer types */
 #define	INT_LEAST8_MAX	0x7f				/* int_least8_t	  */
 #define	INT_LEAST16_MAX	0x7fff				/* int_least16_t  */
 #define	INT_LEAST32_MAX	0x7fffffff			/* int_least32_t  */
 #ifdef __arch64__
 #define	INT_LEAST64_MAX	0x7fffffffffffffffL		/* int_least64_t  */
 #else
 # 93 "/usr/include/sparc/int_limits.h" 3 4
 #define	INT_LEAST64_MAX	0x7fffffffffffffffLL		/* int_least64_t  */
 #endif
 # 95 "/usr/include/sparc/int_limits.h" 3 4

 /* maximum values of minimum-width unsigned integer types */
 #define	UINT_LEAST8_MAX	 0xff				/* uint_least8_t  */
 #define	UINT_LEAST16_MAX 0xffff				/* uint_least16_t */
 #define	UINT_LEAST32_MAX 0xffffffffU			/* uint_least32_t */
 #ifdef __arch64__
 #define	UINT_LEAST64_MAX 0xffffffffffffffffUL		/* uint_least64_t */
 #else
 # 103 "/usr/include/sparc/int_limits.h" 3 4
 #define	UINT_LEAST64_MAX 0xffffffffffffffffULL		/* uint_least64_t */
 #endif
 # 105 "/usr/include/sparc/int_limits.h" 3 4

 /* 7.18.2.3 Limits of fastest minimum-width integer types */
 =20
 /* minimum values of fastest minimum-width signed integer types */
 #define	INT_FAST8_MIN	(-0x7fffffff-1)			/* int_fast8_t	  */
 #define	INT_FAST16_MIN	(-0x7fffffff-1)			/* int_fast16_t	  */
 #define	INT_FAST32_MIN	(-0x7fffffff-1)			/* int_fast32_t	  */
 #ifdef __arch64__
 #define	INT_FAST64_MIN	(-0x7fffffffffffffffL-1)	/* int_fast64_t	  */
 #else
 # 115 "/usr/include/sparc/int_limits.h" 3 4
 #define	INT_FAST64_MIN	(-0x7fffffffffffffffLL-1)	/* int_fast64_t	  */
 #endif
 # 117 "/usr/include/sparc/int_limits.h" 3 4

 /* maximum values of fastest minimum-width signed integer types */
 #define	INT_FAST8_MAX	0x7fffffff			/* int_fast8_t	  */
 #define	INT_FAST16_MAX	0x7fffffff			/* int_fast16_t	  */
 #define	INT_FAST32_MAX	0x7fffffff			/* int_fast32_t	  */
 #ifdef __arch64__
 #define	INT_FAST64_MAX	0x7fffffffffffffffL		/* int_fast64_t	  */
 #else
 # 125 "/usr/include/sparc/int_limits.h" 3 4
 #define	INT_FAST64_MAX	0x7fffffffffffffffLL		/* int_fast64_t	  */
 #endif
 # 127 "/usr/include/sparc/int_limits.h" 3 4

 /* maximum values of fastest minimum-width unsigned integer types */
 #define	UINT_FAST8_MAX	0xffffffffU			/* uint_fast8_t	  */
 #define	UINT_FAST16_MAX	0xffffffffU			/* uint_fast16_t  */
 #define	UINT_FAST32_MAX	0xffffffffU			/* uint_fast32_t  */
 #ifdef __arch64__
 #define	UINT_FAST64_MAX	0xffffffffffffffffUL		/* uint_fast64_t  */
 #else
 # 135 "/usr/include/sparc/int_limits.h" 3 4
 #define	UINT_FAST64_MAX	0xffffffffffffffffULL		/* uint_fast64_t  */
 #endif
 # 137 "/usr/include/sparc/int_limits.h" 3 4

 /* 7.18.2.4 Limits of integer types capable of holding object pointers */

 #ifdef __arch64__
 #define	INTPTR_MIN	(-0x7fffffffffffffffL-1)	/* intptr_t	  */
 #define	INTPTR_MAX	0x7fffffffffffffffL		/* intptr_t	  */
 #define	UINTPTR_MAX	0xffffffffffffffffUL		/* uintptr_t	  */
 #else
 # 145 "/usr/include/sparc/int_limits.h" 3 4
 #define	INTPTR_MIN	(-0x7fffffffL-1)		/* intptr_t	  */
 #define	INTPTR_MAX	0x7fffffffL			/* intptr_t	  */
 #define	UINTPTR_MAX	0xffffffffUL			/* uintptr_t	  */
 #endif
 # 149 "/usr/include/sparc/int_limits.h" 3 4

 /* 7.18.2.5 Limits of greatest-width integer types */

 #ifdef __arch64__
 #define	INTMAX_MIN	(-0x7fffffffffffffffL-1)	/* intmax_t	  */
 #define	INTMAX_MAX	0x7fffffffffffffffL		/* intmax_t	  */
 #define	UINTMAX_MAX	0xffffffffffffffffUL		/* uintmax_t	  */
 #else
 # 157 "/usr/include/sparc/int_limits.h" 3 4
 #define	INTMAX_MIN	(-0x7fffffffffffffffLL-1)	/* intmax_t	  */
 #define	INTMAX_MAX	0x7fffffffffffffffLL		/* intmax_t	  */
 #define	UINTMAX_MAX	0xffffffffffffffffULL		/* uintmax_t	  */
 #endif
 # 161 "/usr/include/sparc/int_limits.h" 3 4


 /*
  * 7.18.3 Limits of other integer types
  */

 /* limits of ptrdiff_t */
 #ifdef __arch64__
 #define	PTRDIFF_MIN	(-0x7fffffffffffffffL-1)	/* ptrdiff_t	  */
 #define	PTRDIFF_MAX	0x7fffffffffffffffL		/* ptrdiff_t	  */
 #else
 # 172 "/usr/include/sparc/int_limits.h" 3 4
 #define	PTRDIFF_MIN	(-0x7fffffffL-1)		/* ptrdiff_t	  */
 #define	PTRDIFF_MAX	0x7fffffffL			/* ptrdiff_t	  */
 #endif
 # 175 "/usr/include/sparc/int_limits.h" 3 4

 /* limits of sig_atomic_t */
 #define	SIG_ATOMIC_MIN	(-0x7fffffff-1)			/* sig_atomic_t	  */
 #define	SIG_ATOMIC_MAX	0x7fffffff			/* sig_atomic_t	  */

 /* limit of size_t */
 #ifdef __arch64__
 #define	SIZE_MAX	0xffffffffffffffffUL		/* size_t	  */
 #else
 # 184 "/usr/include/sparc/int_limits.h" 3 4
 #define	SIZE_MAX	0xffffffffUL			/* size_t	  */
 #endif
 # 186 "/usr/include/sparc/int_limits.h" 3 4

 #endif /* !__SIG_ATOMIC_MAX__ */
 # 188 "/usr/include/sparc/int_limits.h" 3 4

 #endif /* !_SPARC_INT_LIMITS_H_ */
 # 190 "/usr/include/sparc/int_limits.h" 3 4
 # 4 "/usr/include/machine/int_limits.h" 2 3 4
 # 93 "/usr/include/sys/stdint.h" 2 3 4
 #endif
 # 94 "/usr/include/sys/stdint.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) || \
     (__cplusplus >=3D 201103L)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 97 "/usr/include/sys/stdint.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_const.h>
 #endif /* expanded by -frewrite-includes */
 # 97 "/usr/include/sys/stdint.h" 3 4
 # 1 "/usr/include/machine/int_const.h" 1 3 4
 /*       $NetBSD: int_const.h,v 1.2 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_const.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_const.h" 3 4
 # 1 "/usr/include/sparc/int_const.h" 1 3 4
 /*	$NetBSD: int_const.h,v 1.4 2014/08/13 22:51:59 matt Exp $	*/

 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SPARC_INT_CONST_H_
 #define _SPARC_INT_CONST_H_

 #ifdef __INTMAX_C_SUFFIX__
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_int_const.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/sparc/int_const.h" 3 4
 # 1 "/usr/include/sys/common_int_const.h" 1 3 4
 /*	$NetBSD: common_int_const.h,v 1.1 2014/07/25 21:43:13 joerg Exp $	*/

 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Joerg Sonnenberger.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SYS_COMMON_INT_CONST_H_
 #define _SYS_COMMON_INT_CONST_H_

 #ifndef __INTMAX_C_SUFFIX__
 #error Your compiler does not provide inter constant suffix macros.
 #endif
 # 38 "/usr/include/sys/common_int_const.h" 3 4

 #define __int_join_(c,suffix) c ## suffix
 #define __int_join(c,suffix) __int_join_(c,suffix)
 /*
  * 7.18.4 Macros for integer constants
  */

 /* 7.18.4.1 Macros for minimum-width integer constants */

 #define	INT8_C(c)	__int_join(c, __INT8_C_SUFFIX__)
 #define	INT16_C(c)	__int_join(c, __INT16_C_SUFFIX__)
 #define	INT32_C(c)	__int_join(c, __INT32_C_SUFFIX__)
 #define	INT64_C(c)	__int_join(c, __INT64_C_SUFFIX__)

 #define	UINT8_C(c)	__int_join(c, __UINT8_C_SUFFIX__)
 #define	UINT16_C(c)	__int_join(c, __UINT16_C_SUFFIX__)
 #define	UINT32_C(c)	__int_join(c, __UINT32_C_SUFFIX__)
 #define	UINT64_C(c)	__int_join(c, __UINT64_C_SUFFIX__)

 /* 7.18.4.2 Macros for greatest-width integer constants */

 #define	INTMAX_C(c)	__int_join(c, __INTMAX_C_SUFFIX__)
 #define	UINTMAX_C(c)	__int_join(c, __UINTMAX_C_SUFFIX__)

 #endif /* _SYS_COMMON_INT_CONST_H_ */
 # 63 "/usr/include/sys/common_int_const.h" 3 4
 # 37 "/usr/include/sparc/int_const.h" 2 3 4
 #else
 # 38 "/usr/include/sparc/int_const.h" 3 4
 /*
  * 7.18.4 Macros for integer constants
  */

 /* 7.18.4.1 Macros for minimum-width integer constants */

 #define	INT8_C(c)	c
 #define	INT16_C(c)	c
 #define	INT32_C(c)	c
 #ifdef __arch64__
 #define	INT64_C(c)	c ## L
 #else
 # 50 "/usr/include/sparc/int_const.h" 3 4
 #define	INT64_C(c)	c ## LL
 #endif
 # 52 "/usr/include/sparc/int_const.h" 3 4

 #define	UINT8_C(c)	c
 #define	UINT16_C(c)	c
 #define	UINT32_C(c)	c ## U
 #ifdef __arch64__
 #define	UINT64_C(c)	c ## UL
 #else
 # 59 "/usr/include/sparc/int_const.h" 3 4
 #define	UINT64_C(c)	c ## ULL
 #endif
 # 61 "/usr/include/sparc/int_const.h" 3 4

 /* 7.18.4.2 Macros for greatest-width integer constants */

 #ifdef __arch64__
 #define	INTMAX_C(c)	c ## L
 #define	UINTMAX_C(c)	c ## UL
 #else
 # 68 "/usr/include/sparc/int_const.h" 3 4
 #define	INTMAX_C(c)	c ## LL
 #define	UINTMAX_C(c)	c ## ULL
 #endif
 # 71 "/usr/include/sparc/int_const.h" 3 4

 #endif /* !__INTMAX_C_SUFFIX__ */
 # 73 "/usr/include/sparc/int_const.h" 3 4

 #endif /* !_SPARC_INT_CONST_H_ */
 # 75 "/usr/include/sparc/int_const.h" 3 4
 # 4 "/usr/include/machine/int_const.h" 2 3 4
 # 98 "/usr/include/sys/stdint.h" 2 3 4
 #endif
 # 99 "/usr/include/sys/stdint.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/wchar_limits.h>
 #endif /* expanded by -frewrite-includes */
 # 100 "/usr/include/sys/stdint.h" 3 4
 # 1 "/usr/include/machine/wchar_limits.h" 1 3 4
 /*	$NetBSD: wchar_limits.h,v 1.2 2005/12/11 12:19:10 christos Exp $	*/

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/wchar_limits.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/wchar_limits.h" 3 4
 # 1 "/usr/include/sparc/wchar_limits.h" 1 3 4
 /*	$NetBSD: wchar_limits.h,v 1.3 2008/04/28 20:23:36 martin Exp $	*/

 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _SPARC_WCHAR_LIMITS_H_
 #define _SPARC_WCHAR_LIMITS_H_

 /*
  * 7.18.3 Limits of other integer types
  */

 /* limits of wchar_t */
 #define	WCHAR_MIN	(-0x7fffffff-1)			/* wchar_t	  */
 #define	WCHAR_MAX	0x7fffffff			/* wchar_t	  */

 /* limits of wint_t */
 #define	WINT_MIN	(-0x7fffffff-1)			/* wint_t	  */
 #define	WINT_MAX	0x7fffffff			/* wint_t	  */

 #endif /* !_SPARC_WCHAR_LIMITS_H_ */
 # 48 "/usr/include/sparc/wchar_limits.h" 3 4
 # 4 "/usr/include/machine/wchar_limits.h" 2 3 4
 # 101 "/usr/include/sys/stdint.h" 2 3 4

 #endif /* !_SYS_STDINT_H_ */
 # 103 "/usr/include/sys/stdint.h" 3 4
 # 10 "/usr/include/sys/bswap.h" 2 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/bswap.h>
 #endif /* expanded by -frewrite-includes */
 # 11 "/usr/include/sys/bswap.h" 3 4
 # 1 "/usr/include/machine/bswap.h" 1 3 4
 /*      $NetBSD: bswap.h,v 1.2 1999/08/21 05:39:55 simonb Exp $      */

 #ifndef _MACHINE_BSWAP_H_
 #define	_MACHINE_BSWAP_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/bswap.h>
 #endif /* expanded by -frewrite-includes */
 # 6 "/usr/include/machine/bswap.h" 3 4
 # 7 "/usr/include/machine/bswap.h" 3 4

 #endif /* !_MACHINE_BSWAP_H_ */
 # 9 "/usr/include/machine/bswap.h" 3 4
 # 12 "/usr/include/sys/bswap.h" 2 3 4

 __BEGIN_DECLS
 /* Always declare the functions in case their address is taken (etc) */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_STANDALONE) || !defined(__BSWAP_RENAME)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 16 "/usr/include/sys/bswap.h" 3 4
 uint16_t bswap16(uint16_t) __constfunc;
 uint32_t bswap32(uint32_t) __constfunc;
 #else
 # 19 "/usr/include/sys/bswap.h" 3 4
 uint16_t bswap16(uint16_t) __RENAME(__bswap16) __constfunc;
 uint32_t bswap32(uint32_t) __RENAME(__bswap32) __constfunc;
 #endif
 # 22 "/usr/include/sys/bswap.h" 3 4
 uint64_t bswap64(uint64_t) __constfunc;
 __END_DECLS

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__GNUC__) && !defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 26 "/usr/include/sys/bswap.h" 3 4

 /* machine/byte_swap.h might have defined inline versions */
 #ifndef __BYTE_SWAP_U64_VARIABLE
 #define	__BYTE_SWAP_U64_VARIABLE bswap64
 #endif
 # 31 "/usr/include/sys/bswap.h" 3 4

 #ifndef __BYTE_SWAP_U32_VARIABLE
 #define	__BYTE_SWAP_U32_VARIABLE bswap32
 #endif
 # 35 "/usr/include/sys/bswap.h" 3 4

 #ifndef __BYTE_SWAP_U16_VARIABLE
 #define	__BYTE_SWAP_U16_VARIABLE bswap16
 #endif
 # 39 "/usr/include/sys/bswap.h" 3 4

 #define	__byte_swap_u64_constant(x) \
 	(__CAST(uint64_t, \
 	 ((((x) & 0xff00000000000000ull) >> 56) | \
 	  (((x) & 0x00ff000000000000ull) >> 40) | \
 	  (((x) & 0x0000ff0000000000ull) >> 24) | \
 	  (((x) & 0x000000ff00000000ull) >>  8) | \
 	  (((x) & 0x00000000ff000000ull) <<  8) | \
 	  (((x) & 0x0000000000ff0000ull) << 24) | \
 	  (((x) & 0x000000000000ff00ull) << 40) | \
 	  (((x) & 0x00000000000000ffull) << 56))))

 #define	__byte_swap_u32_constant(x) \
 	(__CAST(uint32_t, \
 	((((x) & 0xff000000) >> 24) | \
 	 (((x) & 0x00ff0000) >>  8) | \
 	 (((x) & 0x0000ff00) <<  8) | \
 	 (((x) & 0x000000ff) << 24))))

 #define	__byte_swap_u16_constant(x) \
 	(__CAST(uint16_t, \
 	((((x) & 0xff00) >> 8) | \
 	 (((x) & 0x00ff) << 8))))

 #define	bswap64(x) \
 	__CAST(uint64_t, __builtin_constant_p((x)) ? \
 	 __byte_swap_u64_constant(x) : __BYTE_SWAP_U64_VARIABLE(x))

 #define	bswap32(x) \
 	__CAST(uint32_t, __builtin_constant_p((x)) ? \
 	 __byte_swap_u32_constant(x) : __BYTE_SWAP_U32_VARIABLE(x))

 #define	bswap16(x) \
 	__CAST(uint16_t, __builtin_constant_p((x)) ? \
 	 __byte_swap_u16_constant(x) : __BYTE_SWAP_U16_VARIABLE(x))

 #endif /* __GNUC__ && !__lint__ */
 # 76 "/usr/include/sys/bswap.h" 3 4
 #endif /* !_LOCORE */
 # 77 "/usr/include/sys/bswap.h" 3 4

 #endif /* !_SYS_BSWAP_H_ */
 # 79 "/usr/include/sys/bswap.h" 3 4
 # 7 "/usr/include/machine/bswap.h" 2 3 4

 #endif /* !_MACHINE_BSWAP_H_ */
 # 9 "/usr/include/machine/bswap.h" 3 4
 # 108 "/usr/include/sys/endian.h" 2 3 4

 /*
  * Macros for network/external number representation conversion.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if BYTE_ORDER =3D=3D BIG_ENDIAN && !defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 113 "/usr/include/sys/endian.h" 3 4
 #define	ntohl(x)	(x)
 #define	ntohs(x)	(x)
 #define	htonl(x)	(x)
 #define	htons(x)	(x)

 #define	NTOHL(x)	(void) (x)
 #define	NTOHS(x)	(void) (x)
 #define	HTONL(x)	(void) (x)
 #define	HTONS(x)	(void) (x)

 #else	/* LITTLE_ENDIAN || !defined(__lint__) */
 # 124 "/usr/include/sys/endian.h" 3 4

 #define	ntohl(x)	bswap32(__CAST(uint32_t, (x)))
 #define	ntohs(x)	bswap16(__CAST(uint16_t, (x)))
 #define	htonl(x)	bswap32(__CAST(uint32_t, (x)))
 #define	htons(x)	bswap16(__CAST(uint16_t, (x)))

 #define	NTOHL(x)	(x) =3D ntohl(__CAST(uint32_t, (x)))
 #define	NTOHS(x)	(x) =3D ntohs(__CAST(uint16_t, (x)))
 #define	HTONL(x)	(x) =3D htonl(__CAST(uint32_t, (x)))
 #define	HTONS(x)	(x) =3D htons(__CAST(uint16_t, (x)))
 #endif	/* LITTLE_ENDIAN || !defined(__lint__) */
 # 135 "/usr/include/sys/endian.h" 3 4

 /*
  * Macros to convert to a specific endianness.
  */

 #if 0 /* disabled by -frewrite-includes */
 #if BYTE_ORDER =3D=3D BIG_ENDIAN
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 141 "/usr/include/sys/endian.h" 3 4

 #define htobe16(x)	(x)
 #define htobe32(x)	(x)
 #define htobe64(x)	(x)
 #define htole16(x)	bswap16(__CAST(uint16_t, (x)))
 #define htole32(x)	bswap32(__CAST(uint32_t, (x)))
 #define htole64(x)	bswap64(__CAST(uint64_t, (x)))

 #define HTOBE16(x)	__CAST(void, (x))
 #define HTOBE32(x)	__CAST(void, (x))
 #define HTOBE64(x)	__CAST(void, (x))
 #define HTOLE16(x)	(x) =3D bswap16(__CAST(uint16_t, (x)))
 #define HTOLE32(x)	(x) =3D bswap32(__CAST(uint32_t, (x)))
 #define HTOLE64(x)	(x) =3D bswap64(__CAST(uint64_t, (x)))

 #else	/* LITTLE_ENDIAN */
 # 157 "/usr/include/sys/endian.h" 3 4

 #define htobe16(x)	bswap16(__CAST(uint16_t, (x)))
 #define htobe32(x)	bswap32(__CAST(uint32_t, (x)))
 #define htobe64(x)	bswap64(__CAST(uint64_t, (x)))
 #define htole16(x)	(x)
 #define htole32(x)	(x)
 #define htole64(x)	(x)

 #define HTOBE16(x)	(x) =3D bswap16(__CAST(uint16_t, (x)))
 #define HTOBE32(x)	(x) =3D bswap32(__CAST(uint32_t, (x)))
 #define HTOBE64(x)	(x) =3D bswap64(__CAST(uint64_t, (x)))
 #define HTOLE16(x)	__CAST(void, (x))
 #define HTOLE32(x)	__CAST(void, (x))
 #define HTOLE64(x)	__CAST(void, (x))

 #endif	/* LITTLE_ENDIAN */
 # 173 "/usr/include/sys/endian.h" 3 4

 #define be16toh(x)	htobe16(x)
 #define be32toh(x)	htobe32(x)
 #define be64toh(x)	htobe64(x)
 #define le16toh(x)	htole16(x)
 #define le32toh(x)	htole32(x)
 #define le64toh(x)	htole64(x)

 #define BE16TOH(x)	HTOBE16(x)
 #define BE32TOH(x)	HTOBE32(x)
 #define BE64TOH(x)	HTOBE64(x)
 #define LE16TOH(x)	HTOLE16(x)
 #define LE32TOH(x)	HTOLE32(x)
 #define LE64TOH(x)	HTOLE64(x)

 /*
  * Routines to encode/decode big- and little-endian multi-octet values
  * to/from an octet stream.
  */

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 95)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 194 "/usr/include/sys/endian.h" 3 4

 #define __GEN_ENDIAN_ENC(bits, endian) \
 static __inline void __unused \
 endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
 { \
 	u =3D hto ## endian ## bits (u); \
 	__builtin_memcpy(dst, &u, sizeof(u)); \
 }

 __GEN_ENDIAN_ENC(16, be)
 __GEN_ENDIAN_ENC(32, be)
 __GEN_ENDIAN_ENC(64, be)
 __GEN_ENDIAN_ENC(16, le)
 __GEN_ENDIAN_ENC(32, le)
 __GEN_ENDIAN_ENC(64, le)
 #undef __GEN_ENDIAN_ENC

 #define __GEN_ENDIAN_DEC(bits, endian) \
 static __inline uint ## bits ## _t __unused \
 endian ## bits ## dec(const void *buf) \
 { \
 	uint ## bits ## _t u; \
 	__builtin_memcpy(&u, buf, sizeof(u)); \
 	return endian ## bits ## toh (u); \
 }

 __GEN_ENDIAN_DEC(16, be)
 __GEN_ENDIAN_DEC(32, be)
 __GEN_ENDIAN_DEC(64, be)
 __GEN_ENDIAN_DEC(16, le)
 __GEN_ENDIAN_DEC(32, le)
 __GEN_ENDIAN_DEC(64, le)
 #undef __GEN_ENDIAN_DEC

 #else	/* !(GCC >=3D 2.95) */
 # 229 "/usr/include/sys/endian.h" 3 4

 static __inline void __unused
 be16enc(void *buf, uint16_t u)
 {
 	uint8_t *p =3D __CAST(uint8_t *, buf);

 	p[0] =3D __CAST(uint8_t, ((__CAST(unsigned, u) >> 8) & 0xff));
 	p[1] =3D __CAST(uint8_t, (u & 0xff));
 }

 static __inline void __unused
 le16enc(void *buf, uint16_t u)
 {
 	uint8_t *p =3D __CAST(uint8_t *, buf);

 	p[0] =3D __CAST(uint8_t, (u & 0xff));
 	p[1] =3D __CAST(uint8_t, ((__CAST(unsigned, u) >> 8) & 0xff));
 }

 static __inline uint16_t __unused
 be16dec(const void *buf)
 {
 	const uint8_t *p =3D __CAST(const uint8_t *, buf);

 	return ((__CAST(uint16_t, p[0]) << 8) | p[1]);
 }

 static __inline uint16_t __unused
 le16dec(const void *buf)
 {
 	const uint8_t *p =3D __CAST(const uint8_t *, buf);

 	return (p[0] | (__CAST(uint16_t, p[1]) << 8));
 }

 static __inline void __unused
 be32enc(void *buf, uint32_t u)
 {
 	uint8_t *p =3D __CAST(uint8_t *, buf);

 	p[0] =3D __CAST(uint8_t, ((u >> 24) & 0xff));
 	p[1] =3D __CAST(uint8_t, ((u >> 16) & 0xff));
 	p[2] =3D __CAST(uint8_t, ((u >> 8) & 0xff));
 	p[3] =3D __CAST(uint8_t, (u & 0xff));
 }

 static __inline void __unused
 le32enc(void *buf, uint32_t u)
 {
 	uint8_t *p =3D __CAST(uint8_t *, buf);

 	p[0] =3D __CAST(uint8_t, (u & 0xff));
 	p[1] =3D __CAST(uint8_t, ((u >> 8) & 0xff));
 	p[2] =3D __CAST(uint8_t, ((u >> 16) & 0xff));
 	p[3] =3D __CAST(uint8_t, ((u >> 24) & 0xff));
 }

 static __inline uint32_t __unused
 be32dec(const void *buf)
 {
 	const uint8_t *p =3D __CAST(const uint8_t *, buf);

 	return ((__CAST(uint32_t, be16dec(p)) << 16) | be16dec(p + 2));
 }

 static __inline uint32_t __unused
 le32dec(const void *buf)
 {
 	const uint8_t *p =3D __CAST(const uint8_t *, buf);

 	return (le16dec(p) | (__CAST(uint32_t, le16dec(p + 2)) << 16));
 }

 static __inline void __unused
 be64enc(void *buf, uint64_t u)
 {
 	uint8_t *p =3D __CAST(uint8_t *, buf);

 	be32enc(p, __CAST(uint32_t, (u >> 32)));
 	be32enc(p + 4, __CAST(uint32_t, (u & 0xffffffffULL)));
 }

 static __inline void __unused
 le64enc(void *buf, uint64_t u)
 {
 	uint8_t *p =3D __CAST(uint8_t *, buf);

 	le32enc(p, __CAST(uint32_t, (u & 0xffffffffULL)));
 	le32enc(p + 4, __CAST(uint32_t, (u >> 32)));
 }

 static __inline uint64_t __unused
 be64dec(const void *buf)
 {
 	const uint8_t *p =3D (const uint8_t *)buf;

 	return ((__CAST(uint64_t, be32dec(p)) << 32) | be32dec(p + 4));
 }

 static __inline uint64_t __unused
 le64dec(const void *buf)
 {
 	const uint8_t *p =3D (const uint8_t *)buf;

 	return (le32dec(p) | (__CAST(uint64_t, le32dec(p + 4)) << 32));
 }

 #endif	/* GCC >=3D 2.95 */
 # 337 "/usr/include/sys/endian.h" 3 4

 #endif /* !_LOCORE */
 # 339 "/usr/include/sys/endian.h" 3 4
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 340 "/usr/include/sys/endian.h" 3 4
 #endif /* !_SYS_ENDIAN_H_ */
 # 341 "/usr/include/sys/endian.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/endian.h" =
 2 3
 #pragma GCC visibility pop
 # 4 "/usr/include/machine/endian.h" 2 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/endian=
 =2Eh" 2 3
 #pragma GCC visibility pop
 # 99 "/usr/include/sys/types.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 101 "/usr/include/sys/types.h" 3 4
 typedef	unsigned char	u_char;
 typedef	unsigned short	u_short;
 typedef	unsigned int	u_int;
 typedef	unsigned long	u_long;

 typedef unsigned char	unchar;		/* Sys V compatibility */
 typedef	unsigned short	ushort;		/* Sys V compatibility */
 typedef	unsigned int	uint;		/* Sys V compatibility */
 typedef unsigned long	ulong;		/* Sys V compatibility */
 #endif
 # 111 "/usr/include/sys/types.h" 3 4

 typedef	uint64_t	u_quad_t;	/* quads */
 typedef	int64_t		quad_t;
 typedef	quad_t *	qaddr_t;

 /*
  * The types longlong_t and u_longlong_t exist for use with the
  * Sun-derived XDR routines involving these types, and their usage
  * in other contexts is discouraged.  Further note that these types
  * may not be equivalent to "long long" and "unsigned long long",
  * they are only guaranteed to be signed and unsigned 64-bit types
  * respectively.  Portable programs that need 64-bit types should use
  * the C99 types int64_t and uint64_t instead.
  */

 typedef	int64_t		longlong_t;	/* for XDR */
 typedef	uint64_t	u_longlong_t;	/* for XDR */

 typedef	int64_t		blkcnt_t;	/* fs block count */
 typedef	int32_t		blksize_t;	/* fs optimal block size */

 #ifndef	fsblkcnt_t
 typedef	__fsblkcnt_t	fsblkcnt_t;	/* fs block count (statvfs) */
 #define fsblkcnt_t	__fsblkcnt_t
 #endif
 # 136 "/usr/include/sys/types.h" 3 4

 #ifndef	fsfilcnt_t
 typedef	__fsfilcnt_t	fsfilcnt_t;	/* fs file count */
 #define fsfilcnt_t	__fsfilcnt_t
 #endif
 # 141 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 143 "/usr/include/sys/types.h" 3 4
 /* We don't and shouldn't use caddr_t in the kernel anymore */
 #ifndef	caddr_t
 typedef	__caddr_t	caddr_t;	/* core address */
 #define	caddr_t		__caddr_t
 #endif
 # 148 "/usr/include/sys/types.h" 3 4
 #endif
 # 149 "/usr/include/sys/types.h" 3 4

 #ifdef __daddr_t
 typedef	__daddr_t	daddr_t;	/* disk address */
 #undef __daddr_t
 #else
 # 154 "/usr/include/sys/types.h" 3 4
 typedef	int64_t		daddr_t;	/* disk address */
 #endif
 # 156 "/usr/include/sys/types.h" 3 4

 typedef	uint64_t	dev_t;		/* device number */
 typedef	uint32_t	fixpt_t;	/* fixed point number */

 #ifndef	gid_t
 typedef	__gid_t		gid_t;		/* group id */
 #define	gid_t		__gid_t
 #endif
 # 164 "/usr/include/sys/types.h" 3 4

 typedef	uint32_t	id_t;		/* group id, process id or user id */
 typedef	uint64_t	ino_t;		/* inode number */
 typedef	long		key_t;		/* IPC key (for Sys V IPC) */

 #ifndef	mode_t
 typedef	__mode_t	mode_t;		/* permissions */
 #define	mode_t		__mode_t
 #endif
 # 173 "/usr/include/sys/types.h" 3 4

 #ifndef	accmode_t
 typedef	__accmode_t	accmode_t;	/* access permissions */
 #define	accmode_t	__accmode_t
 #endif
 # 178 "/usr/include/sys/types.h" 3 4

 typedef	uint32_t	nlink_t;	/* link count */

 #ifndef	off_t
 typedef	__off_t		off_t;		/* file offset */
 #define	off_t		__off_t
 #endif
 # 185 "/usr/include/sys/types.h" 3 4

 #ifndef	pid_t
 typedef	__pid_t		pid_t;		/* process id */
 #define	pid_t		__pid_t
 #endif
 # 190 "/usr/include/sys/types.h" 3 4
 typedef int32_t		lwpid_t;	/* LWP id */
 typedef uint64_t	rlim_t;		/* resource limit */
 typedef	int32_t		segsz_t;	/* segment size */
 typedef	int32_t		swblk_t;	/* swap offset */

 #ifndef	uid_t
 typedef	__uid_t		uid_t;		/* user id */
 #define	uid_t		__uid_t
 #endif
 # 199 "/usr/include/sys/types.h" 3 4

 typedef int		mqd_t;

 typedef	unsigned long	cpuid_t;

 typedef	int		psetid_t;

 typedef volatile __cpu_simple_lock_nv_t __cpu_simple_lock_t;

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 209 "/usr/include/sys/types.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/stdbool.h>
 #endif /* expanded by -frewrite-includes */
 # 210 "/usr/include/sys/types.h" 3 4
 # 211 "/usr/include/sys/types.h" 3 4

 /*
  * Deprecated Mach-style boolean_t type.  Should not be used by new code.
  */
 typedef int	boolean_t;
 #ifndef TRUE
 #define	TRUE	1
 #endif
 # 219 "/usr/include/sys/types.h" 3 4
 #ifndef FALSE
 #define	FALSE	0
 #endif
 # 222 "/usr/include/sys/types.h" 3 4

 #endif /* _KERNEL || _STANDALONE */
 # 224 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_LIBC) || defined(_KMEMUSER)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 226 "/usr/include/sys/types.h" 3 4
 /*
  * semctl(2)'s argument structure.  This is here for the benefit of
  * <sys/syscallargs.h>.  It is not in the user's namespace in SUSv2.
  * The SUSv2 semctl(2) takes variable arguments.
  */
 union __semun {
 	int		val;		/* value for SETVAL */
 	struct semid_ds	*buf;		/* buffer for IPC_STAT & IPC_SET */
 	unsigned short	*array;		/* array for GETALL & SETALL */
 };
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/stdint.h>
 #endif /* expanded by -frewrite-includes */
 # 236 "/usr/include/sys/types.h" 3 4
 # 237 "/usr/include/sys/types.h" 3 4
 #endif /* _KERNEL || _LIBC || _KMEMUSER */
 # 238 "/usr/include/sys/types.h" 3 4

 /*
  * These belong in unistd.h, but are placed here too to ensure that
  * long arguments will be promoted to off_t if the program fails to
  * include that header or explicitly cast them to off_t.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 245 "/usr/include/sys/types.h" 3 4
 #ifndef __OFF_T_SYSCALLS_DECLARED
 #define __OFF_T_SYSCALLS_DECLARED
 #ifndef _KERNEL
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 248 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 249 "/usr/include/sys/types.h" 2 3 4
 __BEGIN_DECLS
 off_t	 lseek(int, off_t, int);
 int	 ftruncate(int, off_t);
 int	 truncate(const char *, off_t);
 __END_DECLS
 #endif /* !_KERNEL */
 # 255 "/usr/include/sys/types.h" 3 4
 #endif /* __OFF_T_SYSCALLS_DECLARED */
 # 256 "/usr/include/sys/types.h" 3 4
 #endif /* defined(_NETBSD_SOURCE) */
 # 257 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 259 "/usr/include/sys/types.h" 3 4
 /* Major, minor numbers, dev_t's. */
 typedef int32_t __devmajor_t, __devminor_t;
 #define devmajor_t __devmajor_t
 #define devminor_t __devminor_t
 #define NODEVMAJOR (-1)
 #define	major(x)	((devmajor_t)(((uint32_t)(x) & 0x000fff00) >>  8))
 #define	minor(x)	((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \
 				   (((uint32_t)(x) & 0x000000ff) >>  0)))
 #define	makedev(x,y)	((dev_t)((((dev_t)(x) <<  8) & 0x000fff00U) | \
 				 (((dev_t)(y) << 12) & 0xfff00000U) | \
 				 (((dev_t)(y) <<  0) & 0x000000ffU)))
 #endif
 # 271 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_CLOCK_T_
 typedef	_BSD_CLOCK_T_		clock_t;
 #undef	_BSD_CLOCK_T_
 #endif
 # 276 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_PTRDIFF_T_
 typedef	_BSD_PTRDIFF_T_		ptrdiff_t;
 #undef	_BSD_PTRDIFF_T_
 #endif
 # 281 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_		size_t;
 #define _SIZE_T
 #undef	_BSD_SIZE_T_
 #endif
 # 287 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_SSIZE_T_
 typedef	_BSD_SSIZE_T_		ssize_t;
 #undef	_BSD_SSIZE_T_
 #endif
 # 292 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_TIME_T_
 typedef	_BSD_TIME_T_		time_t;
 #undef	_BSD_TIME_T_
 #endif
 # 297 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_CLOCKID_T_
 typedef	_BSD_CLOCKID_T_		clockid_t;
 #undef	_BSD_CLOCKID_T_
 #endif
 # 302 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_TIMER_T_
 typedef	_BSD_TIMER_T_		timer_t;
 #undef	_BSD_TIMER_T_
 #endif
 # 307 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_SUSECONDS_T_
 typedef	_BSD_SUSECONDS_T_	suseconds_t;
 #undef	_BSD_SUSECONDS_T_
 #endif
 # 312 "/usr/include/sys/types.h" 3 4

 #ifdef	_BSD_USECONDS_T_
 typedef	_BSD_USECONDS_T_	useconds_t;
 #undef	_BSD_USECONDS_T_
 #endif
 # 317 "/usr/include/sys/types.h" 3 4

 #ifdef _NETBSD_SOURCE
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/fd_set.h>
 #endif /* expanded by -frewrite-includes */
 # 319 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/include/sys/fd_set.h" 1 3 4
 /*	$NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $	*/

 /*-
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	from: @(#)types.h	8.4 (Berkeley) 1/21/94
  */

 #ifndef _SYS_FD_SET_H_
 #define	_SYS_FD_SET_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sys/fd_set.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 38 "/usr/include/sys/fd_set.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 38 "/usr/include/sys/fd_set.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 39 "/usr/include/sys/fd_set.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 39 "/usr/include/sys/fd_set.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 3 4
 # 40 "/usr/include/sys/fd_set.h" 2 3 4

 /*
  * Implementation dependent defines, hidden from user space.
  * POSIX does not specify them.
  */

 typedef	__uint32_t	__fd_mask;

 /* 32 =3D 2 ^ 5 */
 #define	__NFDBITS	(32)
 #define	__NFDSHIFT	(5)
 #define	__NFDMASK	(__NFDBITS - 1)

 /*
  * Select uses bit fields of file descriptors.  These macros manipulate
  * such bit fields.  Note: FD_SETSIZE may be defined by the user.
  */

 #ifndef	FD_SETSIZE
 #define	FD_SETSIZE	256
 #endif
 # 61 "/usr/include/sys/fd_set.h" 3 4

 #define	__NFD_LEN(a)	(((a) + (__NFDBITS - 1)) / __NFDBITS)
 #define	__NFD_SIZE	__NFD_LEN(FD_SETSIZE)
 #define	__NFD_BYTES(a)	(__NFD_LEN(a) * sizeof(__fd_mask))

 typedef	struct fd_set {
 	__fd_mask	fds_bits[__NFD_SIZE];
 } fd_set;

 #define	FD_SET(n, p)	\
     ((p)->fds_bits[(unsigned)(n) >> __NFDSHIFT] |=3D (1U << ((n) & __NFDMAS=
 K)))
 #define	FD_CLR(n, p)	\
     ((p)->fds_bits[(unsigned)(n) >> __NFDSHIFT] &=3D ~(1U << ((n) & __NFDMA=
 SK)))
 #define	FD_ISSET(n, p)	\
     ((p)->fds_bits[(unsigned)(n) >> __NFDSHIFT] & (1U << ((n) & __NFDMASK)))
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 95)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 77 "/usr/include/sys/fd_set.h" 3 4
 #define	FD_ZERO(p)	(void)__builtin_memset((p), 0, sizeof(*(p)))
 #else
 # 79 "/usr/include/sys/fd_set.h" 3 4
 #define	FD_ZERO(p)	do {						\
 	fd_set *__fds =3D (p);						\
 	unsigned int __i;						\
 	for (__i =3D 0; __i < __NFD_SIZE; __i++)				\
 		__fds->fds_bits[__i] =3D 0;				\
 	} while (/* CONSTCOND */ 0)
 #endif /* GCC 2.95 */
 # 86 "/usr/include/sys/fd_set.h" 3 4

 /*
  * Expose our internals if we are not required to hide them.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 91 "/usr/include/sys/fd_set.h" 3 4

 #define	fd_mask		__fd_mask
 #define	NFDBITS		__NFDBITS

 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(2, 95)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 96 "/usr/include/sys/fd_set.h" 3 4
 #define	FD_COPY(f, t)	(void)__builtin_memcpy((t), (f), sizeof(*(f)))
 #else
 # 98 "/usr/include/sys/fd_set.h" 3 4
 #define	FD_COPY(f, t)	do {						\
 	fd_set *__f =3D (f), *__t =3D (t);					\
 	unsigned int __i;						\
 	for (__i =3D 0; __i < __NFD_SIZE; __i++)				\
 		__t->fds_bits[__i] =3D __f->fds_bits[__i];		\
 	} while (/* CONSTCOND */ 0)
 #endif /* GCC 2.95 */
 # 105 "/usr/include/sys/fd_set.h" 3 4

 #endif /* _NETBSD_SOURCE */
 # 107 "/usr/include/sys/fd_set.h" 3 4

 #endif /* _SYS_FD_SET_H_ */
 # 109 "/usr/include/sys/fd_set.h" 3 4
 # 320 "/usr/include/sys/types.h" 2 3 4

 #define	NBBY			8

 typedef struct kauth_cred *kauth_cred_t;

 typedef int pri_t;

 #endif
 # 328 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER))
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 330 "/usr/include/sys/types.h" 3 4
 /*
  * Forward structure declarations for function prototypes.  We include the
  * common structures that cross subsystem boundaries here; others are mostly
  * used in the same place that the structure is defined.
  */
 struct	lwp;
 typedef struct lwp lwp_t;
 struct	__ucontext;
 struct	proc;
 typedef struct proc proc_t;
 struct	pgrp;
 struct	rusage;
 struct	file;
 typedef struct file file_t;
 struct	buf;
 typedef struct buf buf_t;
 struct	tty;
 struct	uio;
 #endif
 # 349 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL) || defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 351 "/usr/include/sys/types.h" 3 4
 #define SET(t, f)	((t) |=3D (f))
 #define	ISSET(t, f)	((t) & (f))
 #define	CLR(t, f)	((t) &=3D ~(f))
 #endif
 # 355 "/usr/include/sys/types.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 357 "/usr/include/sys/types.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0L) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 359 "/usr/include/sys/types.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <pthread_types.h>
 #endif /* expanded by -frewrite-includes */
 # 359 "/usr/include/sys/types.h" 3 4
 # 1 "/usr/include/pthread_types.h" 1 3 4
 /*	$NetBSD: pthread_types.h,v 1.25 2020/06/10 22:45:15 ad Exp $	*/

 /*-
  * Copyright (c) 2001, 2008, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Nathan J. Williams.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _LIB_PTHREAD_TYPES_H
 #define _LIB_PTHREAD_TYPES_H

 /*
  * We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the
  * POSIX spinlock object.=20
  *
  * C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer.
  * This does not work for volatile types.  Since C++ does not touch the guts
  * of those types, we do not include volatile in the C++ definitions.
  */
 typedef __cpu_simple_lock_t pthread_spin_t;
 #ifdef __cplusplus
 typedef __cpu_simple_lock_nv_t __pthread_spin_t;
 #define __pthread_volatile
 #else
 # 48 "/usr/include/pthread_types.h" 3 4
 typedef pthread_spin_t __pthread_spin_t;
 #define __pthread_volatile volatile
 #endif
 # 51 "/usr/include/pthread_types.h" 3 4

 /*
  * Copied from PTQ_HEAD in pthread_queue.h
  */
 #define _PTQ_HEAD(name, type)	       				\
 struct name {								\
 	struct type *ptqh_first;/* first element */			\
 	struct type **ptqh_last;/* addr of last next element */		\
 }

 _PTQ_HEAD(pthread_queue_struct_t, __pthread_st);
 typedef struct pthread_queue_struct_t pthread_queue_t;

 struct	__pthread_st;
 struct	__pthread_attr_st;
 struct	__pthread_mutex_st;
 struct	__pthread_mutexattr_st;
 struct	__pthread_cond_st;
 struct	__pthread_condattr_st;
 struct	__pthread_spin_st;
 struct	__pthread_rwlock_st;
 struct	__pthread_rwlockattr_st;
 struct	__pthread_barrier_st;
 struct	__pthread_barrierattr_st;

 typedef struct __pthread_st *pthread_t;
 typedef struct __pthread_attr_st pthread_attr_t;
 typedef struct __pthread_mutex_st pthread_mutex_t;
 typedef struct __pthread_mutexattr_st pthread_mutexattr_t;
 typedef struct __pthread_cond_st pthread_cond_t;
 typedef struct __pthread_condattr_st pthread_condattr_t;
 typedef struct __pthread_once_st pthread_once_t;
 typedef struct __pthread_spinlock_st pthread_spinlock_t;
 typedef struct __pthread_rwlock_st pthread_rwlock_t;
 typedef struct __pthread_rwlockattr_st pthread_rwlockattr_t;
 typedef struct __pthread_barrier_st pthread_barrier_t;
 typedef struct __pthread_barrierattr_st pthread_barrierattr_t;
 typedef int pthread_key_t;

 struct	__pthread_attr_st {
 	unsigned int	pta_magic;

 	int	pta_flags;
 	void	*pta_private;
 };

 /*
  * ptm_owner is the actual lock field which is locked via CAS operation.
  * This structure's layout is designed to compatible with the previous
  * version used in SA pthreads.
  */
 #ifdef __CPU_SIMPLE_LOCK_PAD
 /*
  * If __SIMPLE_UNLOCKED !=3D 0 and we have to pad, we have to worry about
  * endianness.  Currently that isn't an issue but put in a check in case
  * something changes in the future.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __SIMPLELOCK_UNLOCKED !=3D 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 109 "/usr/include/pthread_types.h" 3 4
 #error __CPU_SIMPLE_LOCK_PAD incompatible with __SIMPLELOCK_UNLOCKED =3D=3D=
  0
 #endif
 # 111 "/usr/include/pthread_types.h" 3 4
 #endif
 # 112 "/usr/include/pthread_types.h" 3 4
 struct	__pthread_mutex_st {
 	unsigned int	ptm_magic;
 	__pthread_spin_t ptm_errorcheck;
 #ifdef __CPU_SIMPLE_LOCK_PAD
 	uint8_t		ptm_pad1[3];
 #if 0 /* disabled by -frewrite-includes */
 #if (__STDC_VERSION__ - 0) >=3D 199901L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 118 "/usr/include/pthread_types.h" 3 4
 #define _PTHREAD_MUTEX_PAD(a)	.a =3D { 0, 0, 0 },
 #else
 # 120 "/usr/include/pthread_types.h" 3 4
 #define _PTHREAD_MUTEX_PAD(a)	{ 0, 0, 0 },
 #endif
 # 122 "/usr/include/pthread_types.h" 3 4
 #else
 # 123 "/usr/include/pthread_types.h" 3 4
 #define _PTHREAD_MUTEX_PAD(a)
 #endif
 # 125 "/usr/include/pthread_types.h" 3 4
 	union {
 		unsigned char ptm_ceiling;
 		__pthread_spin_t ptm_unused;
 	};
 #ifdef __CPU_SIMPLE_LOCK_PAD
 	uint8_t		ptm_pad2[3];
 #endif
 # 132 "/usr/include/pthread_types.h" 3 4
 	__pthread_volatile pthread_t ptm_owner;
 	void * __pthread_volatile ptm_waiters;
 	unsigned int	ptm_recursed;
 	void		*ptm_spare2;	/* unused - backwards compat */
 };

 #define	_PT_MUTEX_MAGIC	0x33330003
 #define	_PT_MUTEX_DEAD	0xDEAD0003

 #if 0 /* disabled by -frewrite-includes */
 #if (__STDC_VERSION__ - 0) >=3D 199901L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 142 "/usr/include/pthread_types.h" 3 4
 #define _PTHREAD_MUTEX_INI(a, b) .a =3D b
 #define _PTHREAD_MUTEX_UNI(a) .a =3D 0
 #else
 # 145 "/usr/include/pthread_types.h" 3 4
 #define _PTHREAD_MUTEX_INI(a, b) b
 #define _PTHREAD_MUTEX_UNI(a) { 0 }
 #endif
 # 148 "/usr/include/pthread_types.h" 3 4

 #define _PTHREAD_MUTEX_INITIALIZER {					\
 	_PTHREAD_MUTEX_INI(ptm_magic, _PT_MUTEX_MAGIC), 		\
 	_PTHREAD_MUTEX_INI(ptm_errorcheck, __SIMPLELOCK_UNLOCKED),	\
 	_PTHREAD_MUTEX_PAD(ptm_pad1)					\
 	_PTHREAD_MUTEX_UNI(ptm_ceiling),				\
 	_PTHREAD_MUTEX_PAD(ptm_pad2)					\
 	_PTHREAD_MUTEX_INI(ptm_owner, NULL),				\
 	_PTHREAD_MUTEX_INI(ptm_waiters, NULL),				\
 	_PTHREAD_MUTEX_INI(ptm_recursed, 0),				\
 	_PTHREAD_MUTEX_INI(ptm_spare2, NULL),				\
 }

 struct	__pthread_mutexattr_st {
 	unsigned int	ptma_magic;
 	void	*ptma_private;
 };

 #define _PT_MUTEXATTR_MAGIC	0x44440004
 #define _PT_MUTEXATTR_DEAD	0xDEAD0004


 struct	__pthread_cond_st {
 	unsigned int	ptc_magic;

 	/* Protects the queue of waiters */
 	__pthread_spin_t ptc_lock;
 	void *volatile ptc_waiters;
 	void *ptc_spare;

 	pthread_mutex_t	*ptc_mutex;	/* Current mutex */
 	void	*ptc_private;
 };

 #define	_PT_COND_MAGIC	0x55550005
 #define	_PT_COND_DEAD	0xDEAD0005

 #define _PTHREAD_COND_INITIALIZER { _PT_COND_MAGIC,			\
 				   __SIMPLELOCK_UNLOCKED,		\
 				   NULL,				\
 				   NULL,				\
 				   NULL,				\
 				   NULL  				\
 				 }

 struct	__pthread_condattr_st {
 	unsigned int	ptca_magic;
 	void	*ptca_private;
 };

 #define	_PT_CONDATTR_MAGIC	0x66660006
 #define	_PT_CONDATTR_DEAD	0xDEAD0006

 struct	__pthread_once_st {
 	pthread_mutex_t	pto_mutex;
 	int	pto_done;
 };

 #define _PTHREAD_ONCE_INIT	{ PTHREAD_MUTEX_INITIALIZER, 0 }

 struct	__pthread_spinlock_st {
 	unsigned int	pts_magic;
 	__pthread_spin_t pts_spin;
 	int		pts_flags;
 };
 =09
 #define	_PT_SPINLOCK_MAGIC	0x77770007
 #define	_PT_SPINLOCK_DEAD	0xDEAD0007
 #define _PT_SPINLOCK_PSHARED	0x00000001

 /* PTHREAD_SPINLOCK_INITIALIZER is an extension not specified by POSIX. */
 #define _PTHREAD_SPINLOCK_INITIALIZER { _PT_SPINLOCK_MAGIC,		\
 				       __SIMPLELOCK_UNLOCKED,		\
 				       0				\
 				     }

 struct	__pthread_rwlock_st {
 	unsigned int	ptr_magic;

 	/* Protects data below */
 	__pthread_spin_t ptr_interlock;

 	pthread_queue_t	ptr_rblocked;
 	pthread_queue_t	ptr_wblocked;
 	unsigned int	ptr_nreaders;
 	__pthread_volatile pthread_t ptr_owner;
 	void	*ptr_private;
 };

 #define	_PT_RWLOCK_MAGIC	0x99990009
 #define	_PT_RWLOCK_DEAD		0xDEAD0009

 #define _PTHREAD_RWLOCK_INITIALIZER { _PT_RWLOCK_MAGIC,			\
 				     __SIMPLELOCK_UNLOCKED,		\
 				     {NULL, NULL},			\
 				     {NULL, NULL},			\
 				     0,					\
 				     NULL,				\
 				     NULL,				\
 				   }

 struct	__pthread_rwlockattr_st {
 	unsigned int	ptra_magic;
 	void *ptra_private;
 };

 #define _PT_RWLOCKATTR_MAGIC	0x99990909
 #define _PT_RWLOCKATTR_DEAD	0xDEAD0909

 struct	__pthread_barrier_st {
 	unsigned int	ptb_magic;

 	/* Protects data below */
 	pthread_spin_t	ptb_lock;

 	pthread_queue_t	ptb_waiters;
 	unsigned int	ptb_initcount;
 	unsigned int	ptb_curcount;
 	unsigned int	ptb_generation;

 	void		*ptb_private;
 };

 #define	_PT_BARRIER_MAGIC	0x88880008
 #define	_PT_BARRIER_DEAD	0xDEAD0008

 struct	__pthread_barrierattr_st {
 	unsigned int	ptba_magic;
 	void		*ptba_private;
 };

 #define	_PT_BARRIERATTR_MAGIC	0x88880808
 #define	_PT_BARRIERATTR_DEAD	0xDEAD0808

 #endif	/* _LIB_PTHREAD_TYPES_H */
 # 283 "/usr/include/pthread_types.h" 3 4
 # 360 "/usr/include/sys/types.h" 2 3 4
 #endif
 # 361 "/usr/include/sys/types.h" 3 4
 #endif
 # 362 "/usr/include/sys/types.h" 3 4

 #endif /* !_SYS_TYPES_H_ */
 # 364 "/usr/include/sys/types.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 2=
  3
 #pragma GCC visibility pop
 # 42 "/usr/include/stdlib.h" 2 3 4
 #endif
 # 43 "/usr/include/stdlib.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 44 "/usr/include/stdlib.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 45 "/usr/include/stdlib.h" 2 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 50 "/usr/include/stdlib.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_BSD_WCHAR_T_) && !defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 52 "/usr/include/stdlib.h" 3 4
 typedef	_BSD_WCHAR_T_	wchar_t;
 #undef	_BSD_WCHAR_T_
 #endif
 # 55 "/usr/include/stdlib.h" 3 4

 typedef struct {
 	int quot;		/* quotient */
 	int rem;		/* remainder */
 } div_t;

 typedef struct {
 	long quot;		/* quotient */
 	long rem;		/* remainder */
 } ldiv_t;

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && \
     (defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >=3D 199901L || \
      (__cplusplus - 0) >=3D 201103L || defined(_NETBSD_SOURCE))
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 69 "/usr/include/stdlib.h" 3 4
 typedef struct {
 	/* LONGLONG */
 	long long int quot;	/* quotient */
 	/* LONGLONG */
 	long long int rem;	/* remainder */
 } lldiv_t;
 #endif
 # 76 "/usr/include/stdlib.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 78 "/usr/include/stdlib.h" 3 4
 typedef struct {
 	quad_t quot;		/* quotient */
 	quad_t rem;		/* remainder */
 } qdiv_t;
 #endif
 # 83 "/usr/include/stdlib.h" 3 4


 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 85 "/usr/include/stdlib.h" 3 4
 # 1 "/usr/include/sys/null.h" 1 3 4
 /*	$NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999.
  * Public domain.
  */

 #ifndef _SYS_NULL_H_
 #define _SYS_NULL_H_
 #ifndef	NULL
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__GNUG__) || __GNUG__ < 2 || (__GNUG__ =3D=3D 2 && __GNUC_MINO=
 R__ < 90)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 12 "/usr/include/sys/null.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 13 "/usr/include/sys/null.h" 3 4
 #define	NULL	((void *)0)
 #else
 # 15 "/usr/include/sys/null.h" 3 4
 #define	NULL	0
 #endif /* !__cplusplus */
 # 17 "/usr/include/sys/null.h" 3 4
 #else
 # 18 "/usr/include/sys/null.h" 3 4
 #define	NULL	__null
 #endif
 # 20 "/usr/include/sys/null.h" 3 4
 #endif
 # 21 "/usr/include/sys/null.h" 3 4
 #endif /* _SYS_NULL_H_ */
 # 22 "/usr/include/sys/null.h" 3 4
 # 86 "/usr/include/stdlib.h" 2 3 4

 #define	EXIT_FAILURE	1
 #define	EXIT_SUCCESS	0

 #define	RAND_MAX	0x7fffffff

 extern size_t __mb_cur_max;
 #define	MB_CUR_MAX	__mb_cur_max

 __BEGIN_DECLS
 __dead	 void _Exit(int);
 __dead	 void abort(void);
 __constfunc	int abs(int);
 int	 atexit(void (*)(void));
 double	 atof(const char *);
 int	 atoi(const char *);
 long	 atol(const char *);
 #ifndef __BSEARCH_DECLARED
 #define __BSEARCH_DECLARED
 /* also in search.h */
 void	*bsearch(const void *, const void *, size_t, size_t,
     int (*)(const void *, const void *));
 #endif /* __BSEARCH_DECLARED */
 # 109 "/usr/include/stdlib.h" 3 4
 void	*calloc(size_t, size_t);
 div_t	 div(int, int);
 __dead	 void exit(int);
 void	 free(void *);
 __aconst char *getenv(const char *);
 __constfunc long
 	 labs(long);
 ldiv_t	 ldiv(long, long);
 void	*malloc(size_t);
 void	 qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 int	 rand(void);
 void	*realloc(void *, size_t);
 void	 srand(unsigned);
 double	 strtod(const char * __restrict, char ** __restrict);
 long	 strtol(const char * __restrict, char ** __restrict, int);
 unsigned long
 	 strtoul(const char * __restrict, char ** __restrict, int);
 #ifdef _OPENBSD_SOURCE
 long long strtonum(const char *, long long, long long, const char **);
 void	*reallocarray(void *, size_t, size_t);
 #endif
 # 130 "/usr/include/stdlib.h" 3 4
 int	 system(const char *);

 /* These are currently just stubs. */
 int	 mblen(const char *, size_t);
 size_t	 mbstowcs(wchar_t * __restrict, const char * __restrict, size_t);
 int	 wctomb(char *, wchar_t);
 int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
 size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t);

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 141 "/usr/include/stdlib.h" 3 4


 /*
  * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 148 "/usr/include/stdlib.h" 3 4
 int	 rand_r(unsigned int *);
 #endif
 # 150 "/usr/include/stdlib.h" 3 4


 /*
  * X/Open Portability Guide >=3D Issue 4
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 156 "/usr/include/stdlib.h" 3 4
 double	 drand48(void);
 double	 erand48(unsigned short[3]);
 long	 jrand48(unsigned short[3]);
 void	 lcong48(unsigned short[7]);
 long	 lrand48(void);
 long	 mrand48(void);
 long	 nrand48(unsigned short[3]);
 unsigned short *
 	 seed48(unsigned short[3]);
 void	 srand48(long);

 #ifndef __LIBC12_SOURCE__
 int	 putenv(char *) __RENAME(__putenv50);
 #endif
 # 170 "/usr/include/stdlib.h" 3 4
 #endif
 # 171 "/usr/include/stdlib.h" 3 4


 /*
  * X/Open Portability Guide >=3D Issue 4 Version 2
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     (_XOPEN_SOURCE - 0) >=3D 500 || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 178 "/usr/include/stdlib.h" 3 4
 long	 a64l(const char *);
 char	*l64a(long);

 long	 random(void);
 char	*setstate(char *);
 #ifndef __LIBC12_SOURCE__
 char	*initstate(unsigned int, char *, size_t) __RENAME(__initstate60);
 void	 srandom(unsigned int) __RENAME(__srandom60);
 #endif
 # 187 "/usr/include/stdlib.h" 3 4
 #ifdef _NETBSD_SOURCE
 #define	RANDOM_MAX	0x7fffffff	/* (((long)1 << 31) - 1) */
 int	 mkostemp(char *, int);
 int	 mkostemps(char *, int, int);
 #endif
 # 192 "/usr/include/stdlib.h" 3 4

 char	*mkdtemp(char *);
 int	 mkstemp(char *);
 char	*mktemp(char *)
 #ifdef __MKTEMP_OK__
 	__RENAME(_mktemp)
 #endif
 # 199 "/usr/include/stdlib.h" 3 4
 	;

 int	 setkey(const char *);

 char	*realpath(const char * __restrict, char * __restrict);

 int	 ttyslot(void);

 void	*valloc(size_t);		/* obsoleted by malloc() */

 int	 getsubopt(char **, char * const *, char **);

 int	 grantpt(int);
 int	 unlockpt(int);
 char	*ptsname(int);
 #endif
 # 215 "/usr/include/stdlib.h" 3 4

 /*
  * ISO C99
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >=3D 199901L || \
     defined(_NETBSD_SOURCE) || (__cplusplus - 0) >=3D 201103L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 221 "/usr/include/stdlib.h" 3 4

 /* LONGLONG */
 long long int	atoll(const char *);
 /* LONGLONG */
 long long int	llabs(long long int);
 /* LONGLONG */
 lldiv_t		lldiv(long long int, long long int);
 /* LONGLONG */
 long long int	strtoll(const char * __restrict, char ** __restrict, int);
 /* LONGLONG */
 unsigned long long int
 		strtoull(const char * __restrict, char ** __restrict, int);
 float		strtof(const char * __restrict, char ** __restrict);
 long double	strtold(const char * __restrict, char ** __restrict);
 #endif
 # 236 "/usr/include/stdlib.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >=3D 201101L || \
     defined(_NETBSD_SOURCE) || (__cplusplus - 0) >=3D 201103L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 239 "/usr/include/stdlib.h" 3 4
 void	*aligned_alloc(size_t, size_t);
 int	at_quick_exit(void (*)(void));
 __dead void quick_exit(int);
 #endif
 # 243 "/usr/include/stdlib.h" 3 4

 /*
  * The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX)
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200112L || (_XOPEN_SOURCE - 0) >=3D 600 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 249 "/usr/include/stdlib.h" 3 4
 int	 setenv(const char *, const char *, int);
 #ifndef __LIBC12_SOURCE__
 int	 unsetenv(const char *) __RENAME(__unsetenv13);
 #endif
 # 253 "/usr/include/stdlib.h" 3 4

 int	 posix_openpt(int);
 int	 posix_memalign(void **, size_t, size_t);
 #endif
 # 257 "/usr/include/stdlib.h" 3 4

 /*
  * Implementation-defined extensions
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 262 "/usr/include/stdlib.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if defined(alloca) && (alloca =3D=3D __builtin_alloca) && \
 	defined(__GNUC__) && (__GNUC__ < 2)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 264 "/usr/include/stdlib.h" 3 4
 void	*alloca(int);     /* built-in for gcc */
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__PCC__) && !defined(__GNUC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 266 "/usr/include/stdlib.h" 3 4
 #define alloca(size) __builtin_alloca(size)
 #else
 # 268 "/usr/include/stdlib.h" 3 4
 void	*alloca(size_t);
 #endif /* __GNUC__ */
 # 270 "/usr/include/stdlib.h" 3 4

 uint32_t arc4random(void);
 void	 arc4random_stir(void);
 void	 arc4random_buf(void *, size_t);
 uint32_t arc4random_uniform(uint32_t);
 void	 arc4random_addrandom(unsigned char *, int);
 char	*getbsize(int *, long *);
 char	*cgetcap(char *, const char *, int);
 int	 cgetclose(void);
 int	 cgetent(char **, const char * const *, const char *);
 int	 cgetfirst(char **, const char * const *);
 int	 cgetmatch(const char *, const char *);
 int	 cgetnext(char **, const char * const *);
 int	 cgetnum(char *, const char *, long *);
 int	 cgetset(const char *);
 int	 cgetstr(char *, const char *, char **);
 int	 cgetustr(char *, const char *, char **);
 void	 csetexpandtc(int);

 int	 daemon(int, int);
 int	 devname_r(dev_t, mode_t, char *, size_t);
 #ifndef __LIBC12_SOURCE__
 __aconst char *devname(dev_t, mode_t) __RENAME(__devname50);
 #endif
 # 294 "/usr/include/stdlib.h" 3 4

 #define	HN_DECIMAL		0x01
 #define	HN_NOSPACE		0x02
 #define	HN_B			0x04
 #define	HN_DIVISOR_1000		0x08

 #define	HN_GETSCALE		0x10
 #define	HN_AUTOSCALE		0x20

 int	 humanize_number(char *, size_t, int64_t, const char *, int, int);
 int	 dehumanize_number(const char *, int64_t *);
 ssize_t	 hmac(const char *, const void *, size_t, const void *, size_t, voi=
 d *,
    size_t);

 devmajor_t getdevmajor(const char *, mode_t);
 int	 getloadavg(double [], int);

 int	 getenv_r(const char *, char *, size_t);

 void	 cfree(void *);

 int	 heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
 int	 mergesort(void *, size_t, size_t,
 	    int (*)(const void *, const void *));
 int	 ptsname_r(int, char *, size_t);
 int	 radixsort(const unsigned char **, int, const unsigned char *,
 	    unsigned);
 int	 sradixsort(const unsigned char **, int, const unsigned char *,
 	    unsigned);

 void	 mi_vector_hash(const void * __restrict, size_t, uint32_t,
 	    uint32_t[3]);

 void	 setproctitle(const char *, ...)
 	    __printflike(1, 2);
 const char *getprogname(void) __constfunc;
 void	setprogname(const char *);

 quad_t	 qabs(quad_t);
 quad_t	 strtoq(const char * __restrict, char ** __restrict, int);
 u_quad_t strtouq(const char * __restrict, char ** __restrict, int);

 	/* LONGLONG */
 long long strsuftoll(const char *, const char *, long long, long long);
 	/* LONGLONG */
 long long strsuftollx(const char *, const char *, long long, long long,
 	    		char *, size_t);

 int	 l64a_r(long, char *, int);

 size_t	shquote(const char *, char *, size_t);
 size_t	shquotev(int, char * const *, char *, size_t);

 int	reallocarr(void *, size_t, size_t);
 #endif /* _NETBSD_SOURCE */
 # 349 "/usr/include/stdlib.h" 3 4
 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 350 "/usr/include/stdlib.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 352 "/usr/include/stdlib.h" 3 4
 qdiv_t	 qdiv(quad_t, quad_t);
 #endif
 # 354 "/usr/include/stdlib.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 356 "/usr/include/stdlib.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 360 "/usr/include/stdlib.h" 3 4
 double		strtod_l(const char * __restrict, char ** __restrict, locale_t);
 float		strtof_l(const char * __restrict, char ** __restrict, locale_t);
 long double	strtold_l(const char * __restrict, char ** __restrict,
 			  locale_t);
 long	 strtol_l(const char * __restrict, char ** __restrict, int, locale_t);
 unsigned long
 	 strtoul_l(const char * __restrict, char ** __restrict, int, locale_t);
 /* LONGLONG */
 long long int
 	strtoll_l(const char * __restrict, char ** __restrict, int, locale_t);
 /* LONGLONG */
 unsigned long long int
 	strtoull_l(const char * __restrict, char ** __restrict, int, locale_t);

 #if 0 /* disabled by -frewrite-includes */
 #  if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 375 "/usr/include/stdlib.h" 3 4
 quad_t	 strtoq_l(const char * __restrict, char ** __restrict, int, locale_t=
 );
 u_quad_t strtouq_l(const char * __restrict, char ** __restrict, int, locale=
 _t);

 size_t	_mb_cur_max_l(locale_t);
 #define	MB_CUR_MAX_L(loc)	_mb_cur_max_l(loc)
 int	 mblen_l(const char *, size_t, locale_t);
 size_t	 mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t,
 		    locale_t);
 int	 wctomb_l(char *, wchar_t, locale_t);
 int	 mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t,
 	          locale_t);
 size_t	 wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t,
 		    locale_t);

 #  endif /* _NETBSD_SOURCE */
 # 390 "/usr/include/stdlib.h" 3 4
 #endif /* _POSIX_C_SOURCE >=3D 200809 || _NETBSD_SOURCE */
 # 391 "/usr/include/stdlib.h" 3 4

 __END_DECLS

 #endif /* !_STDLIB_H_ */
 # 395 "/usr/include/stdlib.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdlib.h" 2 3
 #pragma GCC visibility pop
 # 6 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include <stdint.h>
 #endif /* expanded by -frewrite-includes */
 # 6 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdint.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdint.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <stdint.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdint.h" 3
 # 1 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 1 3 4
 /*=3D=3D=3D---- stdint.h - Standard header for sized integer types --------=
 ------=3D=3D=3D*\
  *
  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Except=
 ions.
  * See https://llvm.org/LICENSE.txt for license information.
  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  *
 \*=3D=3D=3D----------------------------------------------------------------=
 ------=3D=3D=3D*/

 #ifndef __CLANG_STDINT_H
 // AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T
 // is defined until an inclusion of it without _STD_TYPES_T occurs, in which
 // case the header guard macro is defined.
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_AIX) || !defined(_STD_TYPES_T) || !defined(__STDC_HOSTED__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 14 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #define __CLANG_STDINT_H
 #endif
 # 16 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* If we're hosted, fall back to the system's stdint.h, which might have
  * additional definitions.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __STDC_HOSTED__ && __has_include_next(<stdint.h>)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 21 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 // C99 7.18.3 Limits of other integer types
 //
 //  Footnote 219, 220: C++ implementations should define these macros only =
 when
 //  __STDC_LIMIT_MACROS is defined before <stdint.h> is included.
 //
 //  Footnote 222: C++ implementations should define these macros only when
 //  __STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
 //
 // C++11 [cstdint.syn]p2:
 //
 //  The macros defined by <cstdint> are provided unconditionally. In partic=
 ular,
 //  the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in
 //  footnotes 219, 220, and 222 in the C standard) play no role in C++.
 //
 // C11 removed the problematic footnotes.
 //
 // Work around this inconsistency by always defining those macros in C++ mo=
 de,
 // so that a C library implementation which follows the C99 standard can be
 // used in C++.
 # ifdef __cplusplus
 #if 0 /* disabled by -frewrite-includes */
 #  if !defined(__STDC_LIMIT_MACROS)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 43 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #   define __STDC_LIMIT_MACROS
 #   define __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
 #  endif
 # 46 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #  if !defined(__STDC_CONSTANT_MACROS)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 47 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #   define __STDC_CONSTANT_MACROS
 #   define __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
 #  endif
 # 50 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 # endif
 # 51 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 # include_next <stdint.h>
 #endif /* expanded by -frewrite-includes */
 # 52 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 # 53 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 # ifdef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
 #  undef __STDC_LIMIT_MACROS
 #  undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
 # endif
 # 58 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 # ifdef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
 #  undef __STDC_CONSTANT_MACROS
 #  undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
 # endif
 # 62 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #else
 # 64 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* C99 7.18.1.1 Exact-width integer types.
  * C99 7.18.1.2 Minimum-width integer types.
  * C99 7.18.1.3 Fastest minimum-width integer types.
  *
  * The standard requires that exact-width type be defined for 8-, 16-, 32-,=
  and
  * 64-bit types if they are implemented. Other exact width types are option=
 al.
  * This implementation defines an exact-width types for every integer width
  * that is represented in the standard integer types.
  *
  * The standard also requires minimum-width types be defined for 8-, 16-, 3=
 2-,
  * and 64-bit widths regardless of whether there are corresponding exact-wi=
 dth
  * types.
  *
  * To accommodate targets that are missing types that are exactly 8, 16, 32=
 , or
  * 64 bits wide, this implementation takes an approach of cascading
  * redefinitions, redefining __int_leastN_t to successively smaller exact-w=
 idth
  * types. It is therefore important that the types are defined in order of
  * descending widths.
  *
  * We currently assume that the minimum-width types and the fastest
  * minimum-width types are the same. This is allowed by the standard, but is
  * suboptimal.
  *
  * In violation of the standard, some targets do not implement a type that =
 is
  * wide enough to represent all of the required widths (8-, 16-, 32-, 64-bi=
 t).
  * To accommodate these targets, a required minimum-width type is only
  * defined if there exists an exact-width type of equal or greater width.
  */

 #ifdef __INT64_TYPE__
 # ifndef __int8_t_defined /* glibc sys/types.h also defines int64_t*/
 typedef __INT64_TYPE__ int64_t;
 # endif /* __int8_t_defined */
 # 98 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 typedef __UINT64_TYPE__ uint64_t;
 # define __int_least64_t int64_t
 # define __uint_least64_t uint64_t
 # define __int_least32_t int64_t
 # define __uint_least32_t uint64_t
 # define __int_least16_t int64_t
 # define __uint_least16_t uint64_t
 # define __int_least8_t int64_t
 # define __uint_least8_t uint64_t
 #endif /* __INT64_TYPE__ */
 # 108 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least64_t
 typedef __int_least64_t int_least64_t;
 typedef __uint_least64_t uint_least64_t;
 typedef __int_least64_t int_fast64_t;
 typedef __uint_least64_t uint_fast64_t;
 #endif /* __int_least64_t */
 # 115 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT56_TYPE__
 typedef __INT56_TYPE__ int56_t;
 typedef __UINT56_TYPE__ uint56_t;
 typedef int56_t int_least56_t;
 typedef uint56_t uint_least56_t;
 typedef int56_t int_fast56_t;
 typedef uint56_t uint_fast56_t;
 # define __int_least32_t int56_t
 # define __uint_least32_t uint56_t
 # define __int_least16_t int56_t
 # define __uint_least16_t uint56_t
 # define __int_least8_t int56_t
 # define __uint_least8_t uint56_t
 #endif /* __INT56_TYPE__ */
 # 130 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT48_TYPE__
 typedef __INT48_TYPE__ int48_t;
 typedef __UINT48_TYPE__ uint48_t;
 typedef int48_t int_least48_t;
 typedef uint48_t uint_least48_t;
 typedef int48_t int_fast48_t;
 typedef uint48_t uint_fast48_t;
 # define __int_least32_t int48_t
 # define __uint_least32_t uint48_t
 # define __int_least16_t int48_t
 # define __uint_least16_t uint48_t
 # define __int_least8_t int48_t
 # define __uint_least8_t uint48_t
 #endif /* __INT48_TYPE__ */
 # 146 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT40_TYPE__
 typedef __INT40_TYPE__ int40_t;
 typedef __UINT40_TYPE__ uint40_t;
 typedef int40_t int_least40_t;
 typedef uint40_t uint_least40_t;
 typedef int40_t int_fast40_t;
 typedef uint40_t uint_fast40_t;
 # define __int_least32_t int40_t
 # define __uint_least32_t uint40_t
 # define __int_least16_t int40_t
 # define __uint_least16_t uint40_t
 # define __int_least8_t int40_t
 # define __uint_least8_t uint40_t
 #endif /* __INT40_TYPE__ */
 # 162 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT32_TYPE__

 # ifndef __int8_t_defined /* glibc sys/types.h also defines int32_t*/
 typedef __INT32_TYPE__ int32_t;
 # endif /* __int8_t_defined */
 # 169 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 # ifndef __uint32_t_defined  /* more glibc compatibility */
 # define __uint32_t_defined
 typedef __UINT32_TYPE__ uint32_t;
 # endif /* __uint32_t_defined */
 # 174 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 # define __int_least32_t int32_t
 # define __uint_least32_t uint32_t
 # define __int_least16_t int32_t
 # define __uint_least16_t uint32_t
 # define __int_least8_t int32_t
 # define __uint_least8_t uint32_t
 #endif /* __INT32_TYPE__ */
 # 182 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least32_t
 typedef __int_least32_t int_least32_t;
 typedef __uint_least32_t uint_least32_t;
 typedef __int_least32_t int_fast32_t;
 typedef __uint_least32_t uint_fast32_t;
 #endif /* __int_least32_t */
 # 189 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT24_TYPE__
 typedef __INT24_TYPE__ int24_t;
 typedef __UINT24_TYPE__ uint24_t;
 typedef int24_t int_least24_t;
 typedef uint24_t uint_least24_t;
 typedef int24_t int_fast24_t;
 typedef uint24_t uint_fast24_t;
 # define __int_least16_t int24_t
 # define __uint_least16_t uint24_t
 # define __int_least8_t int24_t
 # define __uint_least8_t uint24_t
 #endif /* __INT24_TYPE__ */
 # 202 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT16_TYPE__
 #ifndef __int8_t_defined /* glibc sys/types.h also defines int16_t*/
 typedef __INT16_TYPE__ int16_t;
 #endif /* __int8_t_defined */
 # 207 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 typedef __UINT16_TYPE__ uint16_t;
 # define __int_least16_t int16_t
 # define __uint_least16_t uint16_t
 # define __int_least8_t int16_t
 # define __uint_least8_t uint16_t
 #endif /* __INT16_TYPE__ */
 # 213 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least16_t
 typedef __int_least16_t int_least16_t;
 typedef __uint_least16_t uint_least16_t;
 typedef __int_least16_t int_fast16_t;
 typedef __uint_least16_t uint_fast16_t;
 #endif /* __int_least16_t */
 # 220 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT8_TYPE__
 #ifndef __int8_t_defined  /* glibc sys/types.h also defines int8_t*/
 typedef __INT8_TYPE__ int8_t;
 #endif /* __int8_t_defined */
 # 226 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 typedef __UINT8_TYPE__ uint8_t;
 # define __int_least8_t int8_t
 # define __uint_least8_t uint8_t
 #endif /* __INT8_TYPE__ */
 # 230 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least8_t
 typedef __int_least8_t int_least8_t;
 typedef __uint_least8_t uint_least8_t;
 typedef __int_least8_t int_fast8_t;
 typedef __uint_least8_t uint_fast8_t;
 #endif /* __int_least8_t */
 # 237 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* prevent glibc sys/types.h from defining conflicting types */
 #ifndef __int8_t_defined
 # define __int8_t_defined
 #endif /* __int8_t_defined */
 # 242 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* C99 7.18.1.4 Integer types capable of holding object pointers.
  */
 #define __stdint_join3(a,b,c) a ## b ## c

 #ifndef _INTPTR_T
 #ifndef __intptr_t_defined
 typedef __INTPTR_TYPE__ intptr_t;
 #define __intptr_t_defined
 #define _INTPTR_T
 #endif
 # 253 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif
 # 254 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifndef _UINTPTR_T
 typedef __UINTPTR_TYPE__ uintptr_t;
 #define _UINTPTR_T
 #endif
 # 259 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* C99 7.18.1.5 Greatest-width integer types.
  */
 typedef __INTMAX_TYPE__  intmax_t;
 typedef __UINTMAX_TYPE__ uintmax_t;

 /* C99 7.18.4 Macros for minimum-width integer constants.
  *
  * The standard requires that integer constant macros be defined for all the
  * minimum-width types defined above. As 8-, 16-, 32-, and 64-bit minimum-w=
 idth
  * types are required, the corresponding integer constant macros are defined
  * here. This implementation also defines minimum-width types for every oth=
 er
  * integer width that the target implements, so corresponding macros are
  * defined below, too.
  *
  * These macros are defined using the same successive-shrinking approach as
  * the type definitions above. It is likewise important that macros are def=
 ined
  * in order of decending width.
  *
  * Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to =
 the
  * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
  */

 #define __int_c_join(a, b) a ## b
 #define __int_c(v, suffix) __int_c_join(v, suffix)
 #define __uint_c(v, suffix) __int_c_join(v##U, suffix)


 #ifdef __INT64_TYPE__
 # ifdef __INT64_C_SUFFIX__
 #  define __int64_c_suffix __INT64_C_SUFFIX__
 #  define __int32_c_suffix __INT64_C_SUFFIX__
 #  define __int16_c_suffix __INT64_C_SUFFIX__
 #  define  __int8_c_suffix __INT64_C_SUFFIX__
 # else
 # 294 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  undef __int64_c_suffix
 #  undef __int32_c_suffix
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT64_C_SUFFIX__ */
 # 299 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT64_TYPE__ */
 # 300 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least64_t
 # ifdef __int64_c_suffix
 #  define INT64_C(v) __int_c(v, __int64_c_suffix)
 #  define UINT64_C(v) __uint_c(v, __int64_c_suffix)
 # else
 # 306 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT64_C(v) v
 #  define UINT64_C(v) v ## U
 # endif /* __int64_c_suffix */
 # 309 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __int_least64_t */
 # 310 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT56_TYPE__
 # ifdef __INT56_C_SUFFIX__
 #  define INT56_C(v) __int_c(v, __INT56_C_SUFFIX__)
 #  define UINT56_C(v) __uint_c(v, __INT56_C_SUFFIX__)
 #  define __int32_c_suffix __INT56_C_SUFFIX__
 #  define __int16_c_suffix __INT56_C_SUFFIX__
 #  define __int8_c_suffix  __INT56_C_SUFFIX__
 # else
 # 320 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT56_C(v) v
 #  define UINT56_C(v) v ## U
 #  undef __int32_c_suffix
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT56_C_SUFFIX__ */
 # 326 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT56_TYPE__ */
 # 327 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT48_TYPE__
 # ifdef __INT48_C_SUFFIX__
 #  define INT48_C(v) __int_c(v, __INT48_C_SUFFIX__)
 #  define UINT48_C(v) __uint_c(v, __INT48_C_SUFFIX__)
 #  define __int32_c_suffix __INT48_C_SUFFIX__
 #  define __int16_c_suffix __INT48_C_SUFFIX__
 #  define __int8_c_suffix  __INT48_C_SUFFIX__
 # else
 # 337 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT48_C(v) v
 #  define UINT48_C(v) v ## U
 #  undef __int32_c_suffix
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT48_C_SUFFIX__ */
 # 343 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT48_TYPE__ */
 # 344 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT40_TYPE__
 # ifdef __INT40_C_SUFFIX__
 #  define INT40_C(v) __int_c(v, __INT40_C_SUFFIX__)
 #  define UINT40_C(v) __uint_c(v, __INT40_C_SUFFIX__)
 #  define __int32_c_suffix __INT40_C_SUFFIX__
 #  define __int16_c_suffix __INT40_C_SUFFIX__
 #  define __int8_c_suffix  __INT40_C_SUFFIX__
 # else
 # 354 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT40_C(v) v
 #  define UINT40_C(v) v ## U
 #  undef __int32_c_suffix
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT40_C_SUFFIX__ */
 # 360 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT40_TYPE__ */
 # 361 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT32_TYPE__
 # ifdef __INT32_C_SUFFIX__
 #  define __int32_c_suffix __INT32_C_SUFFIX__
 #  define __int16_c_suffix __INT32_C_SUFFIX__
 #  define __int8_c_suffix  __INT32_C_SUFFIX__
 #else
 # 369 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  undef __int32_c_suffix
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT32_C_SUFFIX__ */
 # 373 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT32_TYPE__ */
 # 374 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least32_t
 # ifdef __int32_c_suffix
 #  define INT32_C(v) __int_c(v, __int32_c_suffix)
 #  define UINT32_C(v) __uint_c(v, __int32_c_suffix)
 # else
 # 380 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT32_C(v) v
 #  define UINT32_C(v) v ## U
 # endif /* __int32_c_suffix */
 # 383 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __int_least32_t */
 # 384 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT24_TYPE__
 # ifdef __INT24_C_SUFFIX__
 #  define INT24_C(v) __int_c(v, __INT24_C_SUFFIX__)
 #  define UINT24_C(v) __uint_c(v, __INT24_C_SUFFIX__)
 #  define __int16_c_suffix __INT24_C_SUFFIX__
 #  define __int8_c_suffix  __INT24_C_SUFFIX__
 # else
 # 393 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT24_C(v) v
 #  define UINT24_C(v) v ## U
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT24_C_SUFFIX__ */
 # 398 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT24_TYPE__ */
 # 399 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT16_TYPE__
 # ifdef __INT16_C_SUFFIX__
 #  define __int16_c_suffix __INT16_C_SUFFIX__
 #  define __int8_c_suffix  __INT16_C_SUFFIX__
 #else
 # 406 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  undef __int16_c_suffix
 #  undef  __int8_c_suffix
 # endif /* __INT16_C_SUFFIX__ */
 # 409 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT16_TYPE__ */
 # 410 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least16_t
 # ifdef __int16_c_suffix
 #  define INT16_C(v) __int_c(v, __int16_c_suffix)
 #  define UINT16_C(v) __uint_c(v, __int16_c_suffix)
 # else
 # 416 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT16_C(v) v
 #  define UINT16_C(v) v ## U
 # endif /* __int16_c_suffix */
 # 419 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __int_least16_t */
 # 420 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT8_TYPE__
 # ifdef __INT8_C_SUFFIX__
 #  define __int8_c_suffix __INT8_C_SUFFIX__
 #else
 # 426 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  undef  __int8_c_suffix
 # endif /* __INT8_C_SUFFIX__ */
 # 428 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __INT8_TYPE__ */
 # 429 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __int_least8_t
 # ifdef __int8_c_suffix
 #  define INT8_C(v) __int_c(v, __int8_c_suffix)
 #  define UINT8_C(v) __uint_c(v, __int8_c_suffix)
 # else
 # 435 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define INT8_C(v) v
 #  define UINT8_C(v) v ## U
 # endif /* __int8_c_suffix */
 # 438 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __int_least8_t */
 # 439 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 /* C99 7.18.2.1 Limits of exact-width integer types.
  * C99 7.18.2.2 Limits of minimum-width integer types.
  * C99 7.18.2.3 Limits of fastest minimum-width integer types.
  *
  * The presence of limit macros are completely optional in C99.  This
  * implementation defines limits for all of the types (exact- and
  * minimum-width) that it defines above, using the limits of the minimum-wi=
 dth
  * type for any types that do not have exact-width representations.
  *
  * As in the type definitions, this section takes an approach of
  * successive-shrinking to determine which limits to use for the standard (=
 8,
  * 16, 32, 64) bit widths when they don't have exact representations. It is
  * therefore important that the definitions be kept in order of decending
  * widths.
  *
  * Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the
  * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
  */

 #ifdef __INT64_TYPE__
 # define INT64_MAX           INT64_C( 9223372036854775807)
 # define INT64_MIN         (-INT64_C( 9223372036854775807)-1)
 # define UINT64_MAX         UINT64_C(18446744073709551615)
 # define __INT_LEAST64_MIN   INT64_MIN
 # define __INT_LEAST64_MAX   INT64_MAX
 # define __UINT_LEAST64_MAX UINT64_MAX
 # define __INT_LEAST32_MIN   INT64_MIN
 # define __INT_LEAST32_MAX   INT64_MAX
 # define __UINT_LEAST32_MAX UINT64_MAX
 # define __INT_LEAST16_MIN   INT64_MIN
 # define __INT_LEAST16_MAX   INT64_MAX
 # define __UINT_LEAST16_MAX UINT64_MAX
 # define __INT_LEAST8_MIN    INT64_MIN
 # define __INT_LEAST8_MAX    INT64_MAX
 # define __UINT_LEAST8_MAX  UINT64_MAX
 #endif /* __INT64_TYPE__ */
 # 477 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT_LEAST64_MIN
 # define INT_LEAST64_MIN   __INT_LEAST64_MIN
 # define INT_LEAST64_MAX   __INT_LEAST64_MAX
 # define UINT_LEAST64_MAX __UINT_LEAST64_MAX
 # define INT_FAST64_MIN    __INT_LEAST64_MIN
 # define INT_FAST64_MAX    __INT_LEAST64_MAX
 # define UINT_FAST64_MAX  __UINT_LEAST64_MAX
 #endif /* __INT_LEAST64_MIN */
 # 486 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT56_TYPE__
 # define INT56_MAX           INT56_C(36028797018963967)
 # define INT56_MIN         (-INT56_C(36028797018963967)-1)
 # define UINT56_MAX         UINT56_C(72057594037927935)
 # define INT_LEAST56_MIN     INT56_MIN
 # define INT_LEAST56_MAX     INT56_MAX
 # define UINT_LEAST56_MAX   UINT56_MAX
 # define INT_FAST56_MIN      INT56_MIN
 # define INT_FAST56_MAX      INT56_MAX
 # define UINT_FAST56_MAX    UINT56_MAX
 # define __INT_LEAST32_MIN   INT56_MIN
 # define __INT_LEAST32_MAX   INT56_MAX
 # define __UINT_LEAST32_MAX UINT56_MAX
 # define __INT_LEAST16_MIN   INT56_MIN
 # define __INT_LEAST16_MAX   INT56_MAX
 # define __UINT_LEAST16_MAX UINT56_MAX
 # define __INT_LEAST8_MIN    INT56_MIN
 # define __INT_LEAST8_MAX    INT56_MAX
 # define __UINT_LEAST8_MAX  UINT56_MAX
 #endif /* __INT56_TYPE__ */
 # 508 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT48_TYPE__
 # define INT48_MAX           INT48_C(140737488355327)
 # define INT48_MIN         (-INT48_C(140737488355327)-1)
 # define UINT48_MAX         UINT48_C(281474976710655)
 # define INT_LEAST48_MIN     INT48_MIN
 # define INT_LEAST48_MAX     INT48_MAX
 # define UINT_LEAST48_MAX   UINT48_MAX
 # define INT_FAST48_MIN      INT48_MIN
 # define INT_FAST48_MAX      INT48_MAX
 # define UINT_FAST48_MAX    UINT48_MAX
 # define __INT_LEAST32_MIN   INT48_MIN
 # define __INT_LEAST32_MAX   INT48_MAX
 # define __UINT_LEAST32_MAX UINT48_MAX
 # define __INT_LEAST16_MIN   INT48_MIN
 # define __INT_LEAST16_MAX   INT48_MAX
 # define __UINT_LEAST16_MAX UINT48_MAX
 # define __INT_LEAST8_MIN    INT48_MIN
 # define __INT_LEAST8_MAX    INT48_MAX
 # define __UINT_LEAST8_MAX  UINT48_MAX
 #endif /* __INT48_TYPE__ */
 # 530 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT40_TYPE__
 # define INT40_MAX           INT40_C(549755813887)
 # define INT40_MIN         (-INT40_C(549755813887)-1)
 # define UINT40_MAX         UINT40_C(1099511627775)
 # define INT_LEAST40_MIN     INT40_MIN
 # define INT_LEAST40_MAX     INT40_MAX
 # define UINT_LEAST40_MAX   UINT40_MAX
 # define INT_FAST40_MIN      INT40_MIN
 # define INT_FAST40_MAX      INT40_MAX
 # define UINT_FAST40_MAX    UINT40_MAX
 # define __INT_LEAST32_MIN   INT40_MIN
 # define __INT_LEAST32_MAX   INT40_MAX
 # define __UINT_LEAST32_MAX UINT40_MAX
 # define __INT_LEAST16_MIN   INT40_MIN
 # define __INT_LEAST16_MAX   INT40_MAX
 # define __UINT_LEAST16_MAX UINT40_MAX
 # define __INT_LEAST8_MIN    INT40_MIN
 # define __INT_LEAST8_MAX    INT40_MAX
 # define __UINT_LEAST8_MAX  UINT40_MAX
 #endif /* __INT40_TYPE__ */
 # 552 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT32_TYPE__
 # define INT32_MAX           INT32_C(2147483647)
 # define INT32_MIN         (-INT32_C(2147483647)-1)
 # define UINT32_MAX         UINT32_C(4294967295)
 # define __INT_LEAST32_MIN   INT32_MIN
 # define __INT_LEAST32_MAX   INT32_MAX
 # define __UINT_LEAST32_MAX UINT32_MAX
 # define __INT_LEAST16_MIN   INT32_MIN
 # define __INT_LEAST16_MAX   INT32_MAX
 # define __UINT_LEAST16_MAX UINT32_MAX
 # define __INT_LEAST8_MIN    INT32_MIN
 # define __INT_LEAST8_MAX    INT32_MAX
 # define __UINT_LEAST8_MAX  UINT32_MAX
 #endif /* __INT32_TYPE__ */
 # 568 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT_LEAST32_MIN
 # define INT_LEAST32_MIN   __INT_LEAST32_MIN
 # define INT_LEAST32_MAX   __INT_LEAST32_MAX
 # define UINT_LEAST32_MAX __UINT_LEAST32_MAX
 # define INT_FAST32_MIN    __INT_LEAST32_MIN
 # define INT_FAST32_MAX    __INT_LEAST32_MAX
 # define UINT_FAST32_MAX  __UINT_LEAST32_MAX
 #endif /* __INT_LEAST32_MIN */
 # 577 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT24_TYPE__
 # define INT24_MAX           INT24_C(8388607)
 # define INT24_MIN         (-INT24_C(8388607)-1)
 # define UINT24_MAX         UINT24_C(16777215)
 # define INT_LEAST24_MIN     INT24_MIN
 # define INT_LEAST24_MAX     INT24_MAX
 # define UINT_LEAST24_MAX   UINT24_MAX
 # define INT_FAST24_MIN      INT24_MIN
 # define INT_FAST24_MAX      INT24_MAX
 # define UINT_FAST24_MAX    UINT24_MAX
 # define __INT_LEAST16_MIN   INT24_MIN
 # define __INT_LEAST16_MAX   INT24_MAX
 # define __UINT_LEAST16_MAX UINT24_MAX
 # define __INT_LEAST8_MIN    INT24_MIN
 # define __INT_LEAST8_MAX    INT24_MAX
 # define __UINT_LEAST8_MAX  UINT24_MAX
 #endif /* __INT24_TYPE__ */
 # 596 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT16_TYPE__
 #define INT16_MAX            INT16_C(32767)
 #define INT16_MIN          (-INT16_C(32767)-1)
 #define UINT16_MAX          UINT16_C(65535)
 # define __INT_LEAST16_MIN   INT16_MIN
 # define __INT_LEAST16_MAX   INT16_MAX
 # define __UINT_LEAST16_MAX UINT16_MAX
 # define __INT_LEAST8_MIN    INT16_MIN
 # define __INT_LEAST8_MAX    INT16_MAX
 # define __UINT_LEAST8_MAX  UINT16_MAX
 #endif /* __INT16_TYPE__ */
 # 609 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT_LEAST16_MIN
 # define INT_LEAST16_MIN   __INT_LEAST16_MIN
 # define INT_LEAST16_MAX   __INT_LEAST16_MAX
 # define UINT_LEAST16_MAX __UINT_LEAST16_MAX
 # define INT_FAST16_MIN    __INT_LEAST16_MIN
 # define INT_FAST16_MAX    __INT_LEAST16_MAX
 # define UINT_FAST16_MAX  __UINT_LEAST16_MAX
 #endif /* __INT_LEAST16_MIN */
 # 618 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4


 #ifdef __INT8_TYPE__
 # define INT8_MAX            INT8_C(127)
 # define INT8_MIN          (-INT8_C(127)-1)
 # define UINT8_MAX          UINT8_C(255)
 # define __INT_LEAST8_MIN    INT8_MIN
 # define __INT_LEAST8_MAX    INT8_MAX
 # define __UINT_LEAST8_MAX  UINT8_MAX
 #endif /* __INT8_TYPE__ */
 # 628 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifdef __INT_LEAST8_MIN
 # define INT_LEAST8_MIN   __INT_LEAST8_MIN
 # define INT_LEAST8_MAX   __INT_LEAST8_MAX
 # define UINT_LEAST8_MAX __UINT_LEAST8_MAX
 # define INT_FAST8_MIN    __INT_LEAST8_MIN
 # define INT_FAST8_MAX    __INT_LEAST8_MAX
 # define UINT_FAST8_MAX  __UINT_LEAST8_MAX
 #endif /* __INT_LEAST8_MIN */
 # 637 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* Some utility macros */
 #define  __INTN_MIN(n)  __stdint_join3( INT, n, _MIN)
 #define  __INTN_MAX(n)  __stdint_join3( INT, n, _MAX)
 #define __UINTN_MAX(n)  __stdint_join3(UINT, n, _MAX)
 #define  __INTN_C(n, v) __stdint_join3( INT, n, _C(v))
 #define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v))

 /* C99 7.18.2.4 Limits of integer types capable of holding object pointers.=
  */
 /* C99 7.18.3 Limits of other integer types. */

 #define  INTPTR_MIN  (-__INTPTR_MAX__-1)
 #define  INTPTR_MAX    __INTPTR_MAX__
 #define UINTPTR_MAX   __UINTPTR_MAX__
 #define PTRDIFF_MIN (-__PTRDIFF_MAX__-1)
 #define PTRDIFF_MAX   __PTRDIFF_MAX__
 #define    SIZE_MAX      __SIZE_MAX__

 /* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT=
 1__
  * is enabled. */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >=3D 1
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 658 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #define   RSIZE_MAX            (SIZE_MAX >> 1)
 #endif
 # 660 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* C99 7.18.2.5 Limits of greatest-width integer types. */
 #define  INTMAX_MIN (-__INTMAX_MAX__-1)
 #define  INTMAX_MAX   __INTMAX_MAX__
 #define UINTMAX_MAX  __UINTMAX_MAX__

 /* C99 7.18.3 Limits of other integer types. */
 #define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
 #define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__)
 #ifdef __WINT_UNSIGNED__
 # define WINT_MIN       __UINTN_C(__WINT_WIDTH__, 0)
 # define WINT_MAX       __UINTN_MAX(__WINT_WIDTH__)
 #else
 # 673 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 # define WINT_MIN       __INTN_MIN(__WINT_WIDTH__)
 # define WINT_MAX       __INTN_MAX(__WINT_WIDTH__)
 #endif
 # 676 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 #ifndef WCHAR_MAX
 # define WCHAR_MAX __WCHAR_MAX__
 #endif
 # 680 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #ifndef WCHAR_MIN
 #if 0 /* disabled by -frewrite-includes */
 # if __WCHAR_MAX__ =3D=3D __INTN_MAX(__WCHAR_WIDTH__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 682 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__)
 # else
 # 684 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #  define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0)
 # endif
 # 686 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif
 # 687 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4

 /* 7.18.4.2 Macros for greatest-width integer constants. */
 #define  INTMAX_C(v) __int_c(v,  __INTMAX_C_SUFFIX__)
 #define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__)

 #endif /* __STDC_HOSTED__ */
 # 693 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 #endif /* __CLANG_STDINT_H */
 # 694 "/usr/pkg/lib/clang/10.0.1/include/stdint.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdint.h" 2 3
 #pragma GCC visibility pop
 # 7 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include <string.h>
 #endif /* expanded by -frewrite-includes */
 # 7 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <string.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 3
 # 1 "/usr/include/string.h" 1 3 4
 /*	$NetBSD: string.h,v 1.52 2018/02/20 02:35:24 kamil Exp $	*/

 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)string.h	8.1 (Berkeley) 6/2/93
  */

 #ifndef _STRING_H_
 #define	_STRING_H_
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/string.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 37 "/usr/include/string.h" 2 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 42 "/usr/include/string.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 43 "/usr/include/string.h" 3 4
 # 44 "/usr/include/string.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 45 "/usr/include/string.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 46 "/usr/include/string.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 46 "/usr/include/string.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 47 "/usr/include/string.h" 2 3 4

 __BEGIN_DECLS
 void	*memchr(const void *, int, size_t);
 int	 memcmp(const void *, const void *, size_t);
 void	*memcpy(void * __restrict, const void * __restrict, size_t);
 void	*memmove(void *, const void *, size_t);
 void	*memset(void *, int, size_t);
 char	*strcat(char * __restrict, const char * __restrict);
 char	*strchr(const char *, int);
 int	 strcmp(const char *, const char *);
 int	 strcoll(const char *, const char *);
 char	*strcpy(char * __restrict, const char * __restrict);
 size_t	 strcspn(const char *, const char *);
 __aconst char *strerror(int);
 size_t	 strlen(const char *);
 char	*strncat(char * __restrict, const char * __restrict, size_t);
 int	 strncmp(const char *, const char *, size_t);
 char	*strncpy(char * __restrict, const char * __restrict, size_t);
 char	*strpbrk(const char *, const char *);
 char	*strrchr(const char *, int);
 size_t	 strspn(const char *, const char *);
 char	*strstr(const char *, const char *);
 char	*strtok(char * __restrict, const char * __restrict);
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0 >=3D 199506L) || (_XOPEN_SOURCE - 0 >=3D 500) || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 72 "/usr/include/string.h" 3 4
 char	*strtok_r(char *, const char *, char **);
 int	 strerror_r(int, char *, size_t);
 #endif /* _POSIX_C_SOURCE >=3D 199506 || XOPEN_SOURCE >=3D 500 || ... */
 # 75 "/usr/include/string.h" 3 4
 size_t	 strxfrm(char * __restrict, const char * __restrict, size_t);

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0 >=3D 200112L) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 79 "/usr/include/string.h" 3 4
 void	*memccpy(void *, const void *, int, size_t);
 char	*strdup(const char *);
 #endif
 # 82 "/usr/include/string.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0 >=3D 200809L) || (_XOPEN_SOURCE - 0 >=3D 700) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 85 "/usr/include/string.h" 3 4
 char	*stpcpy(char * __restrict, const char * __restrict);
 char	*stpncpy(char * __restrict, const char * __restrict, size_t);
 char	*strndup(const char *, size_t);
 size_t	strnlen(const char *, size_t);
 #ifndef __STRSIGNAL_DECLARED
 #define __STRSIGNAL_DECLARED
 /* also in unistd.h */
 __aconst char *strsignal(int);
 #endif /* __STRSIGNAL_DECLARED */
 # 94 "/usr/include/string.h" 3 4
 #endif
 # 95 "/usr/include/string.h" 3 4
 __END_DECLS

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 98 "/usr/include/string.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <strings.h>		/* for backwards-compatibilty */
 #endif /* expanded by -frewrite-includes */
 # 98 "/usr/include/string.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/strings.h" 1 3=
  4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/strings.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <strings.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/strings.h" 3
 # 1 "/usr/include/strings.h" 1 3 4
 /*	$NetBSD: strings.h,v 1.18 2011/08/22 01:24:15 dholland Exp $	*/

 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Klaus Klein.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */

 #ifndef _STRINGS_H_
 #define _STRINGS_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 35 "/usr/include/strings.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 36 "/usr/include/strings.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/strings.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 37 "/usr/include/strings.h" 2 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 42 "/usr/include/strings.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 44 "/usr/include/strings.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 44 "/usr/include/strings.h" 3 4
 # 45 "/usr/include/strings.h" 3 4
 #endif
 # 46 "/usr/include/strings.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 47 "/usr/include/strings.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 48 "/usr/include/strings.h" 2 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 49 "/usr/include/strings.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 3 4
 # 50 "/usr/include/strings.h" 2 3 4

 __BEGIN_DECLS
 int	 bcmp(const void *, const void *, size_t);
 void	 bcopy(const void *, void *, size_t);
 void	 bzero(void *, size_t);
 int	 ffs(int);
 char	*index(const char *, int);
 unsigned int	popcount(unsigned int) __constfunc;
 unsigned int	popcountl(unsigned long) __constfunc;
 unsigned int	popcountll(unsigned long long) __constfunc;
 unsigned int	popcount32(__uint32_t) __constfunc;
 unsigned int	popcount64(__uint64_t) __constfunc;
 char	*rindex(const char *, int);
 int	 strcasecmp(const char *, const char *);
 int	 strncasecmp(const char *, const char *, size_t);
 __END_DECLS

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 68 "/usr/include/strings.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <string.h>
 #endif /* expanded by -frewrite-includes */
 # 68 "/usr/include/strings.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <string.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 3
 # 1 "/usr/include/string.h" 1 3 4
 /*	$NetBSD: string.h,v 1.52 2018/02/20 02:35:24 kamil Exp $	*/

 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)string.h	8.1 (Berkeley) 6/2/93
  */

 #ifndef _STRING_H_
 #define	_STRING_H_
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 36 "/usr/include/string.h" 3 4
 # 37 "/usr/include/string.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 42 "/usr/include/string.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 43 "/usr/include/string.h" 3 4
 # 44 "/usr/include/string.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 45 "/usr/include/string.h" 3 4
 # 46 "/usr/include/string.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 46 "/usr/include/string.h" 3 4
 # 47 "/usr/include/string.h" 3 4

 __BEGIN_DECLS
 void	*memchr(const void *, int, size_t);
 int	 memcmp(const void *, const void *, size_t);
 void	*memcpy(void * __restrict, const void * __restrict, size_t);
 void	*memmove(void *, const void *, size_t);
 void	*memset(void *, int, size_t);
 char	*strcat(char * __restrict, const char * __restrict);
 char	*strchr(const char *, int);
 int	 strcmp(const char *, const char *);
 int	 strcoll(const char *, const char *);
 char	*strcpy(char * __restrict, const char * __restrict);
 size_t	 strcspn(const char *, const char *);
 __aconst char *strerror(int);
 size_t	 strlen(const char *);
 char	*strncat(char * __restrict, const char * __restrict, size_t);
 int	 strncmp(const char *, const char *, size_t);
 char	*strncpy(char * __restrict, const char * __restrict, size_t);
 char	*strpbrk(const char *, const char *);
 char	*strrchr(const char *, int);
 size_t	 strspn(const char *, const char *);
 char	*strstr(const char *, const char *);
 char	*strtok(char * __restrict, const char * __restrict);
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0 >=3D 199506L) || (_XOPEN_SOURCE - 0 >=3D 500) || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 72 "/usr/include/string.h" 3 4
 char	*strtok_r(char *, const char *, char **);
 int	 strerror_r(int, char *, size_t);
 #endif /* _POSIX_C_SOURCE >=3D 199506 || XOPEN_SOURCE >=3D 500 || ... */
 # 75 "/usr/include/string.h" 3 4
 size_t	 strxfrm(char * __restrict, const char * __restrict, size_t);

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0 >=3D 200112L) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 79 "/usr/include/string.h" 3 4
 void	*memccpy(void *, const void *, int, size_t);
 char	*strdup(const char *);
 #endif
 # 82 "/usr/include/string.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0 >=3D 200809L) || (_XOPEN_SOURCE - 0 >=3D 700) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 85 "/usr/include/string.h" 3 4
 char	*stpcpy(char * __restrict, const char * __restrict);
 char	*stpncpy(char * __restrict, const char * __restrict, size_t);
 char	*strndup(const char *, size_t);
 size_t	strnlen(const char *, size_t);
 #ifndef __STRSIGNAL_DECLARED
 #define __STRSIGNAL_DECLARED
 /* also in unistd.h */
 __aconst char *strsignal(int);
 #endif /* __STRSIGNAL_DECLARED */
 # 94 "/usr/include/string.h" 3 4
 #endif
 # 95 "/usr/include/string.h" 3 4
 __END_DECLS

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 98 "/usr/include/string.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <strings.h>		/* for backwards-compatibilty */
 #endif /* expanded by -frewrite-includes */
 # 98 "/usr/include/string.h" 3 4
 # 99 "/usr/include/string.h" 3 4
 __BEGIN_DECLS
 void	*memmem(const void *, size_t, const void *, size_t);
 char	*strcasestr(const char *, const char *);
 char	*strchrnul(const char *, int);
 size_t	 strlcat(char *, const char *, size_t);
 size_t	 strlcpy(char *, const char *, size_t);
 char	*strsep(char **, const char *);
 char	*stresep(char **, const char *, int);
 char	*strnstr(const char *, const char *, size_t);
 void	*memrchr(const void *, int, size_t);
 void	*explicit_memset(void *, int, size_t);
 int	consttime_memequal(const void *, const void *, size_t);
 __END_DECLS
 #endif
 # 113 "/usr/include/string.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 115 "/usr/include/string.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 119 "/usr/include/string.h" 3 4
 __BEGIN_DECLS
 int	 strcoll_l(const char *, const char *, locale_t);
 size_t	 strxfrm_l(char * __restrict, const char * __restrict, size_t, local=
 e_t);
 __aconst char *strerror_l(int, locale_t);
 __END_DECLS
 #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */
 # 125 "/usr/include/string.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if _FORTIFY_SOURCE > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 127 "/usr/include/string.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/string.h>
 #endif /* expanded by -frewrite-includes */
 # 127 "/usr/include/string.h" 3 4
 # 128 "/usr/include/string.h" 3 4
 #endif
 # 129 "/usr/include/string.h" 3 4
 #endif /* !defined(_STRING_H_) */
 # 130 "/usr/include/string.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 2 3
 #pragma GCC visibility pop
 # 69 "/usr/include/strings.h" 2 3 4
 #endif
 # 70 "/usr/include/strings.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if _FORTIFY_SOURCE > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 72 "/usr/include/strings.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/strings.h>
 #endif /* expanded by -frewrite-includes */
 # 72 "/usr/include/strings.h" 3 4
 # 1 "/usr/include/ssp/strings.h" 1 3 4
 /*	$NetBSD: strings.h,v 1.3 2008/04/28 20:22:54 martin Exp $	*/

 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Christos Zoulas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _SSP_STRINGS_H_
 #define _SSP_STRINGS_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/ssp.h>
 #endif /* expanded by -frewrite-includes */
 # 34 "/usr/include/ssp/strings.h" 3 4
 # 1 "/usr/include/ssp/ssp.h" 1 3 4
 /*	$NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $	*/

 /*-
  * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Christos Zoulas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _SSP_SSP_H_
 #define _SSP_SSP_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 34 "/usr/include/ssp/ssp.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 35 "/usr/include/ssp/ssp.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 37 "/usr/include/ssp/ssp.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 # if _FORTIFY_SOURCE > 0 && !defined(__lint__) && \
      (__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4, 1)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 39 "/usr/include/ssp/ssp.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #  if _FORTIFY_SOURCE > 1
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 40 "/usr/include/ssp/ssp.h" 3 4
 #   define __SSP_FORTIFY_LEVEL 2
 #  else
 # 42 "/usr/include/ssp/ssp.h" 3 4
 #   define __SSP_FORTIFY_LEVEL 1
 #  endif
 # 44 "/usr/include/ssp/ssp.h" 3 4
 # else
 # 45 "/usr/include/ssp/ssp.h" 3 4
 #  define __SSP_FORTIFY_LEVEL 0
 # endif
 # 47 "/usr/include/ssp/ssp.h" 3 4
 #else
 # 48 "/usr/include/ssp/ssp.h" 3 4
 # define __SSP_FORTIFY_LEVEL 0
 #endif
 # 50 "/usr/include/ssp/ssp.h" 3 4

 /* __ssp_real is used by the implementation in libc */
 #if 0 /* disabled by -frewrite-includes */
 #if __SSP_FORTIFY_LEVEL =3D=3D 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 53 "/usr/include/ssp/ssp.h" 3 4
 #define __ssp_real_(fun)	fun
 #else
 # 55 "/usr/include/ssp/ssp.h" 3 4
 #define __ssp_real_(fun)	__ssp_real_ ## fun
 #endif
 # 57 "/usr/include/ssp/ssp.h" 3 4
 #define __ssp_real(fun)		__ssp_real_(fun)

 #define __ssp_inline static __inline __attribute__((__always_inline__))

 #define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
 #define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)

 #define __ssp_check(buf, len, bos) \
 	if (bos(buf) !=3D (size_t)-1 && len > bos(buf)) \
 		__chk_fail()
 #define __ssp_redirect_raw(rtype, fun, symbol, args, call, cond, bos) \
 rtype __ssp_real_(fun) args __RENAME(symbol); \
 __ssp_inline rtype fun args __RENAME(__ssp_protected_ ## fun); \
 __ssp_inline rtype fun args { \
 	if (cond) \
 		__ssp_check(__buf, __len, bos); \
 	return __ssp_real_(fun) call; \
 }

 #define __ssp_redirect(rtype, fun, args, call) \
     __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos)
 #define __ssp_redirect0(rtype, fun, args, call) \
     __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0)

 #define __ssp_overlap(a, b, l) \
     (((a) <=3D (b) && (b) < (a) + (l)) || ((b) <=3D (a) && (a) < (b) + (l)))

 __BEGIN_DECLS
 void __stack_chk_fail(void) __dead;
 void __chk_fail(void) __dead;
 __END_DECLS

 #endif /* _SSP_SSP_H_ */
 # 90 "/usr/include/ssp/ssp.h" 3 4
 # 35 "/usr/include/ssp/strings.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if __SSP_FORTIFY_LEVEL > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 37 "/usr/include/ssp/strings.h" 3 4

 #define bcopy(src, dst, len) \
     ((__ssp_bos0(dst) !=3D (size_t)-1) ? \
     __builtin___memmove_chk(dst, src, len, __ssp_bos0(dst)) : \
     __memmove_ichk(dst, src, len))
 #define bzero(dst, len) \
     ((__ssp_bos0(dst) !=3D (size_t)-1) ? \
     __builtin___memset_chk(dst, 0, len, __ssp_bos0(dst)) : \
     __memset_ichk(dst, 0, len))

 #endif /* __SSP_FORTIFY_LEVEL > 0 */
 # 48 "/usr/include/ssp/strings.h" 3 4
 #endif /* _SSP_STRINGS_H_ */
 # 49 "/usr/include/ssp/strings.h" 3 4
 # 73 "/usr/include/strings.h" 2 3 4
 #endif
 # 74 "/usr/include/strings.h" 3 4
 #endif /* !defined(_STRINGS_H_) */
 # 75 "/usr/include/strings.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/strings.h" 2 3
 #pragma GCC visibility pop
 # 99 "/usr/include/string.h" 2 3 4
 __BEGIN_DECLS
 void	*memmem(const void *, size_t, const void *, size_t);
 char	*strcasestr(const char *, const char *);
 char	*strchrnul(const char *, int);
 size_t	 strlcat(char *, const char *, size_t);
 size_t	 strlcpy(char *, const char *, size_t);
 char	*strsep(char **, const char *);
 char	*stresep(char **, const char *, int);
 char	*strnstr(const char *, const char *, size_t);
 void	*memrchr(const void *, int, size_t);
 void	*explicit_memset(void *, int, size_t);
 int	consttime_memequal(const void *, const void *, size_t);
 __END_DECLS
 #endif
 # 113 "/usr/include/string.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 115 "/usr/include/string.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 119 "/usr/include/string.h" 3 4
 __BEGIN_DECLS
 int	 strcoll_l(const char *, const char *, locale_t);
 size_t	 strxfrm_l(char * __restrict, const char * __restrict, size_t, local=
 e_t);
 __aconst char *strerror_l(int, locale_t);
 __END_DECLS
 #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */
 # 125 "/usr/include/string.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if _FORTIFY_SOURCE > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 127 "/usr/include/string.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/string.h>
 #endif /* expanded by -frewrite-includes */
 # 127 "/usr/include/string.h" 3 4
 # 1 "/usr/include/ssp/string.h" 1 3 4
 /*	$NetBSD: string.h,v 1.14 2020/09/05 13:37:59 mrg Exp $	*/

 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Christos Zoulas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _SSP_STRING_H_
 #define _SSP_STRING_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 34 "/usr/include/ssp/string.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 35 "/usr/include/ssp/string.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/ssp.h>
 #endif /* expanded by -frewrite-includes */
 # 35 "/usr/include/ssp/string.h" 3 4
 # 36 "/usr/include/ssp/string.h" 3 4

 __BEGIN_DECLS
 void *__memcpy_chk(void *, const void *, size_t, size_t);
 void *__memmove_chk(void *, const void *, size_t, size_t);
 void *__memset_chk(void *, int, size_t, size_t);
 char *__stpcpy_chk(char *, const char *, size_t);
 char *__strcat_chk(char *, const char *, size_t);
 char *__strcpy_chk(char *, const char *, size_t);
 char *__strncat_chk(char *, const char *, size_t, size_t);
 char *__strncpy_chk(char *, const char *, size_t, size_t);
 __END_DECLS

 #if 0 /* disabled by -frewrite-includes */
 #if __SSP_FORTIFY_LEVEL > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 49 "/usr/include/ssp/string.h" 3 4

 #define __ssp_bos_check3(fun, dst, src, len) \
     ((__ssp_bos0(dst) !=3D (size_t)-1) ? \
     __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)) : \
     __ ## fun ## _ichk(dst, src, len))

 #define __ssp_bos_check2(fun, dst, src) \
     ((__ssp_bos0(dst) !=3D (size_t)-1) ? \
     __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)) : \
     __ ## fun ## _ichk(dst, src))

 #define __ssp_bos_icheck3_restrict(fun, type1, type2) \
 static __inline type1 __ ## fun ## _ichk(type1 __restrict, type2 __restrict=
 , size_t); \
 static __inline __attribute__((__always_inline__)) type1 \
 __ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src, size_t len) =
 { \
 	return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); \
 }

 #define __ssp_bos_icheck3(fun, type1, type2) \
 static __inline type1 __ ## fun ## _ichk(type1, type2, size_t); \
 static __inline __attribute__((__always_inline__)) type1 \
 __ ## fun ## _ichk(type1 dst, type2 src, size_t len) { \
 	return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); \
 }

 #define __ssp_bos_icheck2_restrict(fun, type1, type2) \
 static __inline type1 __ ## fun ## _ichk(type1, type2); \
 static __inline __attribute__((__always_inline__)) type1 \
 __ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src) { \
 	return __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)); \
 }

 __BEGIN_DECLS
 __ssp_bos_icheck3_restrict(memcpy, void *, const void *)
 __ssp_bos_icheck3(memmove, void *, const void *)
 __ssp_bos_icheck3(memset, void *, int)
 __ssp_bos_icheck2_restrict(stpcpy, char *, const char *)
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4,8) || defined(__clang__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 87 "/usr/include/ssp/string.h" 3 4
 __ssp_bos_icheck3_restrict(stpncpy, char *, const char *)
 #endif
 # 89 "/usr/include/ssp/string.h" 3 4
 __ssp_bos_icheck2_restrict(strcpy, char *, const char *)
 __ssp_bos_icheck2_restrict(strcat, char *, const char *)
 __ssp_bos_icheck3_restrict(strncpy, char *, const char *)
 __ssp_bos_icheck3_restrict(strncat, char *, const char *)
 __END_DECLS

 #define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len)
 #define memmove(dst, src, len) __ssp_bos_check3(memmove, dst, src, len)
 #define memset(dst, val, len) __ssp_bos_check3(memset, dst, val, len)
 #define stpcpy(dst, src) __ssp_bos_check2(stpcpy, dst, src)
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(4,8) || defined(__clang__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 100 "/usr/include/ssp/string.h" 3 4
 #define stpncpy(dst, src, len) __ssp_bos_check3(stpncpy, dst, src, len)
 #endif
 # 102 "/usr/include/ssp/string.h" 3 4
 #define strcpy(dst, src) __ssp_bos_check2(strcpy, dst, src)
 #define strcat(dst, src) __ssp_bos_check2(strcat, dst, src)
 #define strncpy(dst, src, len) __ssp_bos_check3(strncpy, dst, src, len)
 #define strncat(dst, src, len) __ssp_bos_check3(strncat, dst, src, len)

 #endif /* __SSP_FORTIFY_LEVEL > 0 */
 # 108 "/usr/include/ssp/string.h" 3 4
 #endif /* _SSP_STRING_H_ */
 # 109 "/usr/include/ssp/string.h" 3 4
 # 128 "/usr/include/string.h" 2 3 4
 #endif
 # 129 "/usr/include/string.h" 3 4
 #endif /* !defined(_STRING_H_) */
 # 130 "/usr/include/string.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/string.h" 2 3
 #pragma GCC visibility pop
 # 8 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include <assert.h>
 #endif /* expanded by -frewrite-includes */
 # 8 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/assert.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/assert.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <assert.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/assert.h" 3
 # 1 "/usr/include/assert.h" 1 3 4
 /*	$NetBSD: assert.h,v 1.25 2020/04/17 15:22:34 kamil Exp $	*/

 /*-
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)assert.h	8.2 (Berkeley) 1/21/94
  */

 /*
  * Unlike other ANSI header files, <assert.h> may usefully be included
  * multiple times, with and without NDEBUG defined.
  */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 44 "/usr/include/assert.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 45 "/usr/include/assert.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 45 "/usr/include/assert.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 46 "/usr/include/assert.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 46 "/usr/include/assert.h" 3 4
 # 47 "/usr/include/assert.h" 3 4

 #undef assert

 #ifdef NDEBUG
 # ifndef __lint__
 #  define assert(e)	(__static_cast(void,0))
 # else /* !__lint__ */
 # 54 "/usr/include/assert.h" 3 4
 #  define assert(e)
 # endif /* __lint__ */
 # 56 "/usr/include/assert.h" 3 4
 #else /* !NDEBUG */
 # 57 "/usr/include/assert.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 # if __STDC__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 58 "/usr/include/assert.h" 3 4
 #  define assert(e)							\
 	((e) ? __static_cast(void,0) : __assert13(__FILE__, __LINE__,	\
 	                                          __assert_function__, #e))
 # else	/* PCC */
 # 62 "/usr/include/assert.h" 3 4
 #  define assert(e)							\
 	((e) ? __static_cast(void,0) : __assert13(__FILE__, __LINE__,	\
 	                                          __assert_function__, "e"))
 # endif /* !__STDC__ */
 # 66 "/usr/include/assert.h" 3 4
 #endif /* NDEBUG */
 # 67 "/usr/include/assert.h" 3 4

 #undef _DIAGASSERT
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_DIAGNOSTIC)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/assert.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 # if !defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 71 "/usr/include/assert.h" 3 4
 #  define _DIAGASSERT(e) (__static_cast(void,0))
 # else /* !__lint__ */
 # 73 "/usr/include/assert.h" 3 4
 #  define _DIAGASSERT(e)
 # endif /* __lint__ */
 # 75 "/usr/include/assert.h" 3 4
 #else /* _DIAGNOSTIC */
 # 76 "/usr/include/assert.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 # if __STDC__
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 77 "/usr/include/assert.h" 3 4
 #  define _DIAGASSERT(e)						\
 	((e) ? __static_cast(void,0) : __diagassert13(__FILE__, __LINE__, \
 	                                              __assert_function__, #e))
 # else	/* !__STDC__ */
 # 81 "/usr/include/assert.h" 3 4
 #  define _DIAGASSERT(e)	 					\
 	((e) ? __static_cast(void,0) : __diagassert13(__FILE__, __LINE__, \
 	                                              __assert_function__, "e"))
 # endif
 # 85 "/usr/include/assert.h" 3 4
 #endif /* _DIAGNOSTIC */
 # 86 "/usr/include/assert.h" 3 4


 #if 0 /* disabled by -frewrite-includes */
 #if defined(__lint__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 89 "/usr/include/assert.h" 3 4
 #define	__assert_function__	(__static_cast(const void *,0))
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 199901L
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 91 "/usr/include/assert.h" 3 4
 #define	__assert_function__	__func__
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(2, 6)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 1 /* evaluated by -frewrite-includes */
 # 93 "/usr/include/assert.h" 3 4
 #define	__assert_function__	__PRETTY_FUNCTION__
 #else
 # 95 "/usr/include/assert.h" 3 4
 #define	__assert_function__	(__static_cast(const void *,0))
 #endif
 # 97 "/usr/include/assert.h" 3 4

 #ifndef __ASSERT_DECLARED
 #define __ASSERT_DECLARED
 __BEGIN_DECLS
 __dead void __assert(const char *, int, const char *);
 __dead void __assert13(const char *, int, const char *, const char *);
 void __diagassert(const char *, int, const char *);
 void __diagassert13(const char *, int, const char *, const char *);
 __END_DECLS
 #endif /* __ASSERT_DECLARED */
 # 107 "/usr/include/assert.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >=3D 201101L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 109 "/usr/include/assert.h" 3 4
 #ifndef static_assert
 #define static_assert _Static_assert
 #endif /* static_assert */
 # 112 "/usr/include/assert.h" 3 4
 #endif
 # 113 "/usr/include/assert.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/assert.h" 2 3
 #pragma GCC visibility pop
 # 9 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include <stdio.h>
 #endif /* expanded by -frewrite-includes */
 # 9 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdio.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdio.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <stdio.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdio.h" 3
 # 1 "/usr/include/stdio.h" 1 3 4
 /*	$NetBSD: stdio.h,v 1.99 2020/03/20 01:08:42 joerg Exp $	*/

 /*-
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
  * Chris Torek.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
  */

 #ifndef	_STDIO_H_
 #define	_STDIO_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 40 "/usr/include/stdio.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 41 "/usr/include/stdio.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 41 "/usr/include/stdio.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 42 "/usr/include/stdio.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/stdio.h" 3 4
 # 43 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE)) || ((_POSIX_C_SOURCE - 0) >=3D 200809L || \
      defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >=3D 199901L || \
      (__cplusplus - 0) >=3D 201103L || defined(_NETBSD_SOURCE))
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 48 "/usr/include/stdio.h" 3 4
 #define __STDIO_C99_FEATURES
 #endif
 # 50 "/usr/include/stdio.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 55 "/usr/include/stdio.h" 3 4
 #ifdef	_BSD_SSIZE_T_
 typedef	_BSD_SSIZE_T_	ssize_t;
 #undef	_BSD_SSIZE_T_
 #endif
 # 59 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 61 "/usr/include/stdio.h" 3 4
 #ifndef __VA_LIST_DECLARED
 typedef __va_list va_list;
 #define __VA_LIST_DECLARED
 #endif
 # 65 "/usr/include/stdio.h" 3 4
 #endif
 # 66 "/usr/include/stdio.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 67 "/usr/include/stdio.h" 3 4
 # 68 "/usr/include/stdio.h" 3 4

 /*     =20
  * This is fairly grotesque, but pure ANSI code must not inspect the
  * innards of an fpos_t anyway.  The library internally uses off_t,
  * which we assume is exactly as big as eight chars.
  */
 typedef struct __sfpos {
 	__off_t _pos;
 	__mbstate_t _mbstate_in, _mbstate_out;
 } fpos_t;

 #define	_FSTDIO			/* Define for new stdio with functions. */

 /*
  * NB: to fit things in six character monocase externals, the stdio
  * code uses the prefix `__s' for stdio objects, typically followed
  * by a three-character attempt at a mnemonic.
  */

 /* stdio buffers */
 struct __sbuf {
 	unsigned char *_base;
 	int	_size;
 };

 /*
  * stdio state variables.
  *
  * The following always hold:
  *
  *	if (_flags&(__SLBF|__SWR)) =3D=3D (__SLBF|__SWR),
  *		_lbfsize is -_bf._size, else _lbfsize is 0
  *	if _flags&__SRD, _w is 0
  *	if _flags&__SWR, _r is 0
  *
  * This ensures that the getc and putc macros (or inline functions) never
  * try to write or read from a file that is in `read' or `write' mode.
  * (Moreover, they can, and do, automatically switch from read mode to
  * write mode, and back, on "r+" and "w+" files.)
  *
  * _lbfsize is used only to make the inline line-buffered output stream
  * code as compact as possible.
  *
  * _ub, _up, and _ur are used when ungetc() pushes back more characters
  * than fit in the current _bf, or when ungetc() pushes back a character
  * that does not match the previous one in _bf.  When this happens,
  * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  * _ub._base!=3DNULL) and _up and _ur save the current values of _p and _r.
  *
  * NB: see WARNING above before changing the layout of this structure!
  */
 typedef	struct __sFILE {
 	unsigned char *_p;	/* current position in (some) buffer */
 	int	_r;		/* read space left for getc() */
 	int	_w;		/* write space left for putc() */
 	unsigned short _flags;	/* flags, below; this FILE is free if 0 */
 	short	_file;		/* fileno, if Unix descriptor, else -1 */
 	struct	__sbuf _bf;	/* the buffer (at least 1 byte, if !NULL) */
 	int	_lbfsize;	/* 0 or -_bf._size, for inline putc */

 	/* operations */
 	void	*_cookie;	/* cookie passed to io functions */
 	int	(*_close)(void *);
 	ssize_t	(*_read) (void *, void *, size_t);
 	__off_t	(*_seek) (void *, __off_t, int);
 	ssize_t	(*_write)(void *, const void *, size_t);

 	/* file extension */
 	struct	__sbuf _ext;

 	/* separate buffer for long sequences of ungetc() */
 	unsigned char *_up;	/* saved _p when _p is doing ungetc data */
 	int	_ur;		/* saved _r when _r is counting ungetc data */

 	/* tricks to meet minimum requirements even when malloc() fails */
 	unsigned char _ubuf[3];	/* guarantee an ungetc() buffer */
 	unsigned char _nbuf[1];	/* guarantee a getc() buffer */

 	int	(*_flush)(void *);
 	/* Formerly used by fgetln/fgetwln; kept for binary compatibility */
 	char	_lb_unused[sizeof(struct __sbuf) - sizeof(int (*)(void *))];

 	/* Unix stdio files get aligned to block boundaries on fseek() */
 	int	_blksize;	/* stat.st_blksize (may be !=3D _bf._size) */
 	__off_t	_offset;	/* current lseek offset */
 } FILE;

 __BEGIN_DECLS
 extern FILE __sF[3];
 __END_DECLS

 #define	__SLBF	0x0001		/* line buffered */
 #define	__SNBF	0x0002		/* unbuffered */
 #define	__SRD	0x0004		/* OK to read */
 #define	__SWR	0x0008		/* OK to write */
 	/* RD and WR are never simultaneously asserted */
 #define	__SRW	0x0010		/* open for reading & writing */
 #define	__SEOF	0x0020		/* found EOF */
 #define	__SERR	0x0040		/* found error */
 #define	__SMBF	0x0080		/* _buf is from malloc */
 #define	__SAPP	0x0100		/* fdopen()ed in append mode */
 #define	__SSTR	0x0200		/* this is an sprintf/snprintf string */
 #define	__SOPT	0x0400		/* do fseek() optimization */
 #define	__SNPT	0x0800		/* do not do fseek() optimization */
 #define	__SOFF	0x1000		/* set iff _offset is in fact correct */
 #define	__SMOD	0x2000		/* true =3D> fgetln modified _p text */
 #define	__SALC	0x4000		/* allocate string space dynamically */

 /*
  * The following three definitions are for ANSI C, which took them
  * from System V, which brilliantly took internal interface macros and
  * made them official arguments to setvbuf(), without renaming them.
  * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
  *
  * Although numbered as their counterparts above, the implementation
  * does not rely on this.
  */
 #define	_IOFBF	0		/* setvbuf should set fully buffered */
 #define	_IOLBF	1		/* setvbuf should set line buffered */
 #define	_IONBF	2		/* setvbuf should set unbuffered */

 #define	BUFSIZ	1024		/* size of buffer used by setbuf */
 #define	EOF	(-1)

 /*
  * FOPEN_MAX is a minimum maximum, and is the number of streams that
  * stdio can provide without attempting to allocate further resources
  * (which could fail).  Do not use this for anything.
  */
 				/* must be =3D=3D _POSIX_STREAM_MAX <limits.h> */
 #define	FOPEN_MAX	20	/* must be <=3D OPEN_MAX <sys/syslimits.h> */
 #define	FILENAME_MAX	1024	/* must be <=3D PATH_MAX <sys/syslimits.h> */

 /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 203 "/usr/include/stdio.h" 3 4
 #define	P_tmpdir	"/tmp/"
 #endif
 # 205 "/usr/include/stdio.h" 3 4
 #define	L_tmpnam	1024	/* XXX must be =3D=3D PATH_MAX */
 /* Always ensure that this is consistent with <limits.h> */
 #ifndef TMP_MAX
 #define TMP_MAX			308915776	/* Legacy */
 #endif
 # 210 "/usr/include/stdio.h" 3 4

 /* Always ensure that these are consistent with <fcntl.h> and <unistd.h>! */
 #ifndef SEEK_SET
 #define	SEEK_SET	0	/* set file offset to offset */
 #endif
 # 215 "/usr/include/stdio.h" 3 4
 #ifndef SEEK_CUR
 #define	SEEK_CUR	1	/* set file offset to current plus offset */
 #endif
 # 218 "/usr/include/stdio.h" 3 4
 #ifndef SEEK_END
 #define	SEEK_END	2	/* set file offset to EOF plus offset */
 #endif
 # 221 "/usr/include/stdio.h" 3 4

 #define	stdin	(&__sF[0])
 #define	stdout	(&__sF[1])
 #define	stderr	(&__sF[2])

 /*
  * Functions defined in ANSI C standard.
  */
 __BEGIN_DECLS
 void	 clearerr(FILE *);
 int	 fclose(FILE *);
 int	 feof(FILE *);
 int	 ferror(FILE *);
 int	 fflush(FILE *);
 int	 fgetc(FILE *);
 char	*fgets(char * __restrict, int, FILE * __restrict);
 FILE	*fopen(const char * __restrict , const char * __restrict);
 int	 fprintf(FILE * __restrict, const char * __restrict, ...)
 		__printflike(2, 3);
 int	 fputc(int, FILE *);
 int	 fputs(const char * __restrict, FILE * __restrict);
 size_t	 fread(void * __restrict, size_t, size_t, FILE * __restrict);
 FILE	*freopen(const char * __restrict, const char * __restrict,
 	    FILE * __restrict);
 int	 fscanf(FILE * __restrict, const char * __restrict, ...)
 		__scanflike(2, 3);
 int	 fseek(FILE *, long, int);
 long	 ftell(FILE *);
 size_t	 fwrite(const void * __restrict, size_t, size_t, FILE * __restrict);
 int	 getc(FILE *);
 int	 getchar(void);
 void	 perror(const char *);
 int	 printf(const char * __restrict, ...)
 		__printflike(1, 2);
 int	 putc(int, FILE *);
 int	 putchar(int);
 int	 puts(const char *);
 int	 remove(const char *);
 void	 rewind(FILE *);
 int	 scanf(const char * __restrict, ...)
 		__scanflike(1, 2);
 void	 setbuf(FILE * __restrict, char * __restrict);
 int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t);
 int	 sscanf(const char * __restrict, const char * __restrict, ...)
 		__scanflike(2, 3);
 FILE	*tmpfile(void);
 int	 ungetc(int, FILE *);
 int	 vfprintf(FILE * __restrict, const char * __restrict, __va_list)
 		__printflike(2, 0);
 int	 vprintf(const char * __restrict, __va_list)
 		__printflike(1, 0);

 #ifndef __AUDIT__
 char	*gets(char *);
 int	 sprintf(char * __restrict, const char * __restrict, ...)
 		__printflike(2, 3);
 char	*tmpnam(char *);
 int	 vsprintf(char * __restrict, const char * __restrict,
     __va_list)
 		__printflike(2, 0);
 #endif
 # 282 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 284 "/usr/include/stdio.h" 3 4
 int	 rename (const char *, const char *) __RENAME(__posix_rename);
 #else
 # 286 "/usr/include/stdio.h" 3 4
 int	 rename (const char *, const char *);
 #endif
 # 288 "/usr/include/stdio.h" 3 4
 __END_DECLS

 #ifndef __LIBC12_SOURCE__
 int	 fgetpos(FILE * __restrict, fpos_t * __restrict) __RENAME(__fgetpos50);
 int	 fsetpos(FILE *, const fpos_t *) __RENAME(__fsetpos50);
 #endif
 # 294 "/usr/include/stdio.h" 3 4
 /*
  * IEEE Std 1003.1-90
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 299 "/usr/include/stdio.h" 3 4
 #define	L_ctermid	1024	/* size for ctermid(); PATH_MAX */
 #define L_cuserid	9	/* size for cuserid(); UT_NAMESIZE + 1 */

 __BEGIN_DECLS
 char	*ctermid(char *);
 #ifndef __CUSERID_DECLARED
 #define __CUSERID_DECLARED
 /* also declared in unistd.h */
 char	*cuserid(char *);
 #endif /* __CUSERID_DECLARED */
 # 309 "/usr/include/stdio.h" 3 4
 FILE	*fdopen(int, const char *);
 int	 fileno(FILE *);
 __END_DECLS
 #endif /* not ANSI */
 # 313 "/usr/include/stdio.h" 3 4

 /*
  * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >=3D 199506L || \
     (_XOPEN_SOURCE - 0) >=3D 500 || defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 319 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 void	flockfile(FILE *);
 int	ftrylockfile(FILE *);
 void	funlockfile(FILE *);
 int	getc_unlocked(FILE *);
 int	getchar_unlocked(void);
 int	putc_unlocked(int, FILE *);
 int	putchar_unlocked(int);
 __END_DECLS
 #endif /* C99 || _POSIX_C_SOURCE >=3D 1995056 || _XOPEN_SOURCE >=3D 500 || =
 =2E.. */
 # 329 "/usr/include/stdio.h" 3 4

 /*
  * Functions defined in POSIX 1003.2 and XPG2 or later.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 2 || (_XOPEN_SOURCE - 0) >=3D 2 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 335 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 int	 pclose(FILE *);
 FILE	*popen(const char *, const char *);
 __END_DECLS
 #endif
 # 340 "/usr/include/stdio.h" 3 4
 #ifdef _NETBSD_SOURCE
 __BEGIN_DECLS
 FILE	*popenve(const char *, char *const *, char *const *, const char *);
 __END_DECLS
 #endif
 # 345 "/usr/include/stdio.h" 3 4

 /*
  * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >=3D 200112L || \
     (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     (_XOPEN_SOURCE - 0) >=3D 500
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 352 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 int	 snprintf(char * __restrict, size_t, const char * __restrict, ...)
 		__printflike(3, 4);
 int	 vsnprintf(char * __restrict, size_t, const char * __restrict,
 	    __va_list)
 		__printflike(3, 0);
 __END_DECLS
 #endif
 # 360 "/usr/include/stdio.h" 3 4

 /*
  * Functions defined in XPG4.2.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 365 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 int	 getw(FILE *);
 int	 putw(int, FILE *);

 #ifndef __AUDIT__
 char	*tempnam(const char *, const char *);
 #endif
 # 372 "/usr/include/stdio.h" 3 4
 __END_DECLS
 #endif
 # 374 "/usr/include/stdio.h" 3 4

 /*
  * X/Open CAE Specification Issue 5 Version 2
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200112L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 380 "/usr/include/stdio.h" 3 4
 #ifndef	off_t
 typedef	__off_t		off_t;
 #define	off_t		__off_t
 #endif /* off_t */
 # 384 "/usr/include/stdio.h" 3 4

 __BEGIN_DECLS
 int	 fseeko(FILE *, off_t, int);
 off_t	 ftello(FILE *);
 __END_DECLS
 #endif /* (_POSIX_C_SOURCE - 0) >=3D 200112L || _XOPEN_SOURCE >=3D 500 || .=
 =2E. */
 # 390 "/usr/include/stdio.h" 3 4

 /*
  * Functions defined in ISO C99.  Still put under _NETBSD_SOURCE due to
  * backward compatible.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__STDIO_C99_FEATURES)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 396 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 int	 vscanf(const char * __restrict, __va_list)
 		__scanflike(1, 0);
 int	 vfscanf(FILE * __restrict, const char * __restrict, __va_list)
 		__scanflike(2, 0);
 int	 vsscanf(const char * __restrict, const char * __restrict,
     __va_list)
     __scanflike(2, 0);
 __END_DECLS
 #endif /* C99 */
 # 406 "/usr/include/stdio.h" 3 4

 /*
  * Routines that are purely local.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 411 "/usr/include/stdio.h" 3 4

 #define	FPARSELN_UNESCESC	0x01
 #define	FPARSELN_UNESCCONT	0x02
 #define	FPARSELN_UNESCCOMM	0x04
 #define	FPARSELN_UNESCREST	0x08
 #define	FPARSELN_UNESCALL	0x0f

 __BEGIN_DECLS
 int	 asprintf(char ** __restrict, const char * __restrict, ...)
 		__printflike(2, 3);
 char	*fgetln(FILE * __restrict, size_t * __restrict);
 char	*fparseln(FILE *, size_t *, size_t *, const char[3], int);
 int	 fpurge(FILE *);
 void	 setbuffer(FILE *, char *, int);
 int	 setlinebuf(FILE *);
 int	 vasprintf(char ** __restrict, const char * __restrict,
     __va_list)
 		__printflike(2, 0);
 const char *fmtcheck(const char *, const char *)
 		__format_arg(2);
 __END_DECLS

 /*
  * Stdio function-access interface.
  */
 __BEGIN_DECLS
 FILE	*funopen(const void *,
     int (*)(void *, char *, int),
     int (*)(void *, const char *, int),
     off_t (*)(void *, off_t, int),
     int (*)(void *));
 FILE	*funopen2(const void *,
     ssize_t (*)(void *, void *, size_t),
     ssize_t (*)(void *, const void *, size_t),
     off_t (*)(void *, off_t, int),
     int (*)(void *),
     int (*)(void *));
 __END_DECLS
 #define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
 #define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
 #define	fropen2(cookie, fn) funopen2(cookie, fn, 0, 0, 0, 0)
 #define	fwopen2(cookie, fn) funopen2(cookie, 0, fn, 0, 0, 0)
 #endif /* _NETBSD_SOURCE */
 # 454 "/usr/include/stdio.h" 3 4

 /*
  * Functions internal to the implementation.
  */
 __BEGIN_DECLS
 int	__srget(FILE *);
 int	__swbuf(int, FILE *);
 __END_DECLS

 /*
  * The __sfoo macros are here so that we can=20
  * define function versions in the C library.
  */
 #define	__sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__GNUC__) && defined(__STDC__)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 469 "/usr/include/stdio.h" 3 4
 static __inline int __sputc(int _c, FILE *_p) {
 	if (--_p->_w >=3D 0 || (_p->_w >=3D _p->_lbfsize && (char)_c !=3D '\n'))
 		return *_p->_p++ =3D (unsigned char)_c;
 	else
 		return __swbuf(_c, _p);
 }
 #else
 # 476 "/usr/include/stdio.h" 3 4
 /*
  * This has been tuned to generate reasonable code on the vax using pcc.
  */
 #define	__sputc(c, p) \
 	(--(p)->_w < 0 ? \
 		(p)->_w >=3D (p)->_lbfsize ? \
 			(*(p)->_p =3D (c)), *(p)->_p !=3D '\n' ? \
 				(int)*(p)->_p++ : \
 				__swbuf('\n', p) : \
 			__swbuf((int)(c), p) : \
 		(*(p)->_p =3D (c), (int)*(p)->_p++))
 #endif
 # 488 "/usr/include/stdio.h" 3 4

 #define	__sfeof(p)	(((p)->_flags & __SEOF) !=3D 0)
 #define	__sferror(p)	(((p)->_flags & __SERR) !=3D 0)
 #define	__sclearerr(p)	((void)((p)->_flags &=3D (unsigned short)~(__SERR|__=
 SEOF)))
 #define	__sfileno(p)	\
     ((p)->_file =3D=3D -1 ? -1 : (int)(unsigned short)(p)->_file)

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(__lint__) && !defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 496 "/usr/include/stdio.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_REENTRANT) && !defined(_PTHREADS)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 497 "/usr/include/stdio.h" 3 4
 #define	feof(p)		__sfeof(p)
 #define	ferror(p)	__sferror(p)
 #define	clearerr(p)	__sclearerr(p)

 #define	getc(fp)	__sgetc(fp)
 #define putc(x, fp)	__sputc(x, fp)
 #endif /* !_REENTRANT && !_PTHREADS */
 # 504 "/usr/include/stdio.h" 3 4

 #define	getchar()	getc(stdin)
 #define	putchar(x)	putc(x, stdout)

 #endif /* !__lint__ && !__cplusplus */
 # 509 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)) && !defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 512 "/usr/include/stdio.h" 3 4
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_REENTRANT) && !defined(_PTHREADS)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 513 "/usr/include/stdio.h" 3 4
 #define	fileno(p)	__sfileno(p)
 #endif /* !_REENTRANT && !_PTHREADS */
 # 515 "/usr/include/stdio.h" 3 4
 #endif /* !_ANSI_SOURCE && !__cplusplus*/
 # 516 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 518 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 int	 vdprintf(int, const char * __restrict, __va_list)
 		__printflike(2, 0);
 int	 dprintf(int, const char * __restrict, ...)
 		__printflike(2, 3);
 __END_DECLS
 #endif /* (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE) */
 # 525 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE) && !defined(__cplusplus)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 528 "/usr/include/stdio.h" 3 4
 #define getc_unlocked(fp)	__sgetc(fp)
 #define putc_unlocked(x, fp)	__sputc(x, fp)

 #define getchar_unlocked()	getc_unlocked(stdin)
 #define putchar_unlocked(x)	putc_unlocked(x, stdout)
 #endif /* _POSIX_C_SOURCE >=3D 199506 || _XOPEN_SOURCE >=3D 500 || _REENTRA=
 NT... */
 # 534 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || (_XOPEN_SOURCE - 0) >=3D 700 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 537 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 FILE *fmemopen(void * __restrict, size_t, const char * __restrict);
 FILE *open_memstream(char **, size_t *);
 ssize_t	 getdelim(char ** __restrict, size_t * __restrict, int,
 	    FILE * __restrict);
 ssize_t	 getline(char ** __restrict, size_t * __restrict, FILE * __restrict=
 );
 __END_DECLS
 #endif
 # 545 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 547 "/usr/include/stdio.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 551 "/usr/include/stdio.h" 3 4
 __BEGIN_DECLS
 int	 fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...)
 		__printflike(3, 4);
 int	 vfprintf_l(FILE * __restrict, locale_t, const char * __restrict,
 		__va_list) __printflike(3, 0);
 int	 printf_l(locale_t, const char * __restrict, ...)
 		__printflike(2, 3);
 int	 vprintf_l(locale_t, const char * __restrict, __va_list)
 		__printflike(2, 0);
 int	 asprintf_l(char ** __restrict, locale_t, const char * __restrict, ...)
 		__printflike(3, 4);
 int	 vasprintf_l(char ** __restrict, locale_t, const char * __restrict,
     __va_list)
 		__printflike(3, 0);
 int	 vdprintf_l(int, locale_t, const char * __restrict, __va_list)
 		__printflike(3, 0);
 int	 dprintf_l(int, locale_t, const char * __restrict, ...)
 		__printflike(3, 4);
 int	 snprintf_l(char * __restrict, size_t, locale_t,
 		    const char * __restrict, ...) __printflike(4, 5);
 int	 vsnprintf_l(char * __restrict, size_t, locale_t,
 		     const char * __restrict, __va_list) __printflike(4, 0);
 #ifndef __AUDIT__
 int	 sprintf_l(char * __restrict, locale_t, const char * __restrict, ...)
 		   __printflike(3, 4);
 int	 vsprintf_l(char * __restrict, locale_t, const char * __restrict,
 		    __va_list) __printflike(3, 0);
 #endif
 # 579 "/usr/include/stdio.h" 3 4

 int	 fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...)
     __scanflike(3, 4);
 int	 scanf_l(locale_t, const char * __restrict, ...)
     __scanflike(2, 3);
 int	 sscanf_l(const char * __restrict, locale_t,
     const char * __restrict, ...) __scanflike(3, 4);
 int	 vscanf_l(locale_t, const char * __restrict, __va_list)
     __scanflike(2, 0);
 int	 vfscanf_l(FILE * __restrict, locale_t, const char * __restrict,
     __va_list) __scanflike(3, 0);
 int	 vsscanf_l(const char * __restrict, locale_t, const char * __restrict,
     __va_list) __scanflike(3, 0);
 #ifdef _NETBSD_SOURCE
 int	snprintf_ss(char *restrict, size_t, const char * __restrict, ...)
     __printflike(3, 4);
 int	vsnprintf_ss(char *restrict, size_t, const char * __restrict, __va_list)
     __printflike(3, 0);
 #endif
 # 598 "/usr/include/stdio.h" 3 4
 __END_DECLS
 #endif
 # 600 "/usr/include/stdio.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if _FORTIFY_SOURCE > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 602 "/usr/include/stdio.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/stdio.h>
 #endif /* expanded by -frewrite-includes */
 # 602 "/usr/include/stdio.h" 3 4
 # 1 "/usr/include/ssp/stdio.h" 1 3 4
 /*	$NetBSD: stdio.h,v 1.5 2011/07/17 20:54:34 joerg Exp $	*/

 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Christos Zoulas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _SSP_STDIO_H_
 #define _SSP_STDIO_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <ssp/ssp.h>
 #endif /* expanded by -frewrite-includes */
 # 34 "/usr/include/ssp/stdio.h" 3 4
 # 35 "/usr/include/ssp/stdio.h" 3 4

 __BEGIN_DECLS
 int __sprintf_chk(char *__restrict, int, size_t, const char *__restrict, ..=
 =2E)
     __printflike(4, 5);
 int __vsprintf_chk(char *__restrict, int, size_t, const char *__restrict,
     __va_list)
     __printflike(4, 0);
 int __snprintf_chk(char *__restrict, size_t, int, size_t,
     const char *__restrict, ...)
     __printflike(5, 6);
 int __vsnprintf_chk(char *__restrict, size_t, int, size_t,
      const char *__restrict, __va_list)
     __printflike(5, 0);
 char *__gets_chk(char *, size_t);
 char *__fgets_chk(char *, int, size_t, FILE *);
 __END_DECLS

 #if 0 /* disabled by -frewrite-includes */
 #if __SSP_FORTIFY_LEVEL > 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 53 "/usr/include/ssp/stdio.h" 3 4


 #define sprintf(str, ...) \
     __builtin___sprintf_chk(str, 0, __ssp_bos(str), __VA_ARGS__)

 #define vsprintf(str, fmt, ap) \
     __builtin___vsprintf_chk(str, 0, __ssp_bos(str), fmt, ap)

 #define snprintf(str, len, ...) \
     __builtin___snprintf_chk(str, len, 0, __ssp_bos(str), __VA_ARGS__)

 #define vsnprintf(str, len, fmt, ap) \
     __builtin___vsnprintf_chk(str, len, 0, __ssp_bos(str), fmt, ap)

 #define gets(str) \
     __gets_chk(str, __ssp_bos(str))

 #define fgets(str, len, fp) \
     __fgets_chk(str, len, __ssp_bos(str), fp)
 #endif /* __SSP_FORTIFY_LEVEL > 0 */
 # 73 "/usr/include/ssp/stdio.h" 3 4

 #endif /* _SSP_STDIO_H_ */
 # 75 "/usr/include/ssp/stdio.h" 3 4
 # 603 "/usr/include/stdio.h" 2 3 4
 #endif
 # 604 "/usr/include/stdio.h" 3 4

 #endif /* _STDIO_H_ */
 # 606 "/usr/include/stdio.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/stdio.h" 2 3
 #pragma GCC visibility pop
 # 10 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include <math.h>
 #endif /* expanded by -frewrite-includes */
 # 10 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/math.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/math.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <math.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/math.h" 3
 # 1 "/usr/include/math.h" 1 3 4
 /*	$NetBSD: math.h,v 1.66 2020/02/22 22:47:35 joerg Exp $	*/

 /*
  * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D
  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  *
  * Developed at SunPro, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
  * software is freely granted, provided that this notice
  * is preserved.
  * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D
  */

 /*
  * @(#)fdlibm.h 5.1 93/09/24
  */

 #ifndef _MATH_H_
 #define _MATH_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 21 "/usr/include/math.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 22 "/usr/include/math.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 22 "/usr/include/math.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 23 "/usr/include/math.h" 2 3 4

 /*
  * Missing for C99 support:
  * - MATH_ERRNO
  * - MATH_ERREXCEPT
  * - FP_FAST_FMA
  * - FP_FAST_FMAF
  * - FP_FAST_FMAL
  * - math_errhandling
  */

 union __float_u {
 	unsigned char __dummy[sizeof(float)];
 	float __val;
 };

 union __double_u {
 	unsigned char __dummy[sizeof(double)];
 	double __val;
 };

 union __long_double_u {
 	unsigned char __dummy[sizeof(long double)];
 	long double __val;
 };

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/math.h>		/* may use __float_u, __double_u,
 					   or __long_double_u */
 #endif /* expanded by -frewrite-includes */
 # 50 "/usr/include/math.h" 3 4
 # 1 "/usr/include/machine/math.h" 1 3 4
 /*	$NetBSD: math.h,v 1.7 2008/12/15 00:25:05 mrg Exp $	*/

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/math.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/math.h" 3 4
 # 1 "/usr/include/sparc/math.h" 1 3 4
 /*	$NetBSD: math.h,v 1.7 2014/02/01 16:10:12 matt Exp $	*/

 #define	__HAVE_NANF

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_LP64) || defined(_KERNEL)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 6 "/usr/include/sparc/math.h" 3 4
 #define	__HAVE_LONG_DOUBLE	128
 #endif
 # 8 "/usr/include/sparc/math.h" 3 4
 # 4 "/usr/include/machine/math.h" 2 3 4
 # 51 "/usr/include/math.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <limits.h>			/* for INT_{MIN,MAX} */
 #endif /* expanded by -frewrite-includes */
 # 51 "/usr/include/math.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/limits.h" 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/limits.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <limits.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/limits.h" 3
 # 1 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 1 3 4
 /*=3D=3D=3D---- limits.h - Standard header for integer sizes --------------=
 ------=3D=3D=3D*\
  *
  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Except=
 ions.
  * See https://llvm.org/LICENSE.txt for license information.
  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  *
 \*=3D=3D=3D----------------------------------------------------------------=
 ------=3D=3D=3D*/

 #ifndef __CLANG_LIMITS_H
 #define __CLANG_LIMITS_H

 /* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
    Avert this #include_next madness. */
 #if 0 /* disabled by -frewrite-includes */
 #if defined __GNUC__ && !defined _GCC_LIMITS_H_
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 15 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4
 #define _GCC_LIMITS_H_
 #endif
 # 17 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 /* System headers include a number of constants from POSIX in <limits.h>.
    Include it if we're hosted. */
 #if 0 /* disabled by -frewrite-includes */
 #if __STDC_HOSTED__ && __has_include_next(<limits.h>)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 21 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include_next <limits.h>
 #endif /* expanded by -frewrite-includes */
 # 21 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4
 # 1 "/usr/include/limits.h" 1 3 4
 /*	$NetBSD: limits.h,v 1.42 2019/09/15 23:52:59 christos Exp $	*/

 /*
  * Copyright (c) 1988, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)limits.h	8.2 (Berkeley) 1/4/94
  */

 #ifndef _LIMITS_H_
 #define	_LIMITS_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/limits.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 38 "/usr/include/limits.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 41 "/usr/include/limits.h" 3 4
 #define	_POSIX_AIO_LISTIO_MAX	2
 #define	_POSIX_AIO_MAX		1
 #define	_POSIX_ARG_MAX		4096
 #define	_POSIX_CHILD_MAX	25
 #define	_POSIX_HOST_NAME_MAX	255
 #define	_POSIX_LINK_MAX		8
 #define	_POSIX_LOGIN_NAME_MAX	9
 #define	_POSIX_MAX_CANON	255
 #define	_POSIX_MAX_INPUT	255
 #define	_POSIX_MQ_OPEN_MAX	8
 #define	_POSIX_MQ_PRIO_MAX	32
 #define	_POSIX_NAME_MAX		14
 #define	_POSIX_NGROUPS_MAX	8
 #define	_POSIX_OPEN_MAX		20
 #define	_POSIX_PATH_MAX		256
 #define	_POSIX_PIPE_BUF		512
 #define	_POSIX_RE_DUP_MAX	255
 #define	_POSIX_SSIZE_MAX	32767
 #define	_POSIX_STREAM_MAX	8
 #define	_POSIX_SYMLINK_MAX	255
 #define	_POSIX_SYMLOOP_MAX	8

 /*
  * We have not implemented these yet
  *
  * _POSIX_THREAD_ATTR_STACKADDR
  * _POSIX_THREAD_ATTR_STACKSIZE
  * _POSIX_THREAD_CPUTIME
  * _POSIX_THREAD_PRIORITY_SCHEDULING
  * _POSIX_THREAD_PRIO_INHERIT
  * _POSIX_THREAD_PRIO_PROTECT
  * _POSIX_THREAD_PROCESS_SHARED
  * _POSIX_THREAD_SAFE_FUNCTIONS
  * _POSIX_THREAD_SPORADIC_SERVER
  */

 /*
  * The following 3 are defined in=20
  * Open Group Base Specifications Issue 7
  */
 #define	_POSIX_THREAD_DESTRUCTOR_ITERATIONS	4
 #define	_POSIX_THREAD_KEYS_MAX			128
 #define	_POSIX_THREAD_THREADS_MAX		64

 /*
  * These are the correct names, defined in terms of the above
  * except for PTHREAD_KEYS_MAX which is bigger than standard=20
  * mandated minimum value _POSIX_THREAD_KEYS_MAX.
  */
 #define	PTHREAD_DESTRUCTOR_ITERATIONS 	_POSIX_THREAD_DESTRUCTOR_ITERATIONS
 #define	PTHREAD_KEYS_MAX		256
 /* Not yet: PTHREAD_STACK_MIN */
 #define	PTHREAD_THREADS_MAX		_POSIX_THREAD_THREADS_MAX

 #define	_POSIX_TIMER_MAX	32
 #define	_POSIX_SEM_NSEMS_MAX	256
 #define	_POSIX_SIGQUEUE_MAX	32
 #define	_POSIX_REALTIME_SIGNALS	200112L
 #define	_POSIX_DELAYTIMER_MAX	32
 #define	_POSIX_TTY_NAME_MAX	9
 #define	_POSIX_TZNAME_MAX	6

 #define	_POSIX2_BC_BASE_MAX	99
 #define	_POSIX2_BC_DIM_MAX	2048
 #define	_POSIX2_BC_SCALE_MAX	99
 #define	_POSIX2_BC_STRING_MAX	1000
 #define	_POSIX2_CHARCLASS_NAME_MAX	14
 #define	_POSIX2_COLL_WEIGHTS_MAX	2
 #define	_POSIX2_EXPR_NEST_MAX	32
 #define	_POSIX2_LINE_MAX	2048
 #define	_POSIX2_RE_DUP_MAX	255

 /*
  * X/Open CAE Specifications,
  * adopted in IEEE Std 1003.1-2001 XSI.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200112L || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 119 "/usr/include/limits.h" 3 4
 #define	_XOPEN_IOV_MAX		16
 #define	_XOPEN_NAME_MAX		256
 #define	_XOPEN_PATH_MAX		1024

 #define PASS_MAX		128		/* Legacy */

 #define CHARCLASS_NAME_MAX	14
 #define NL_ARGMAX		9
 #define NL_LANGMAX		14
 #define NL_MSGMAX		32767
 #define NL_NMAX			1
 #define NL_SETMAX		255
 #define NL_TEXTMAX		2048

 	/* IEEE Std 1003.1-2001 TSF */
 #define	_GETGR_R_SIZE_MAX	1024
 #define	_GETPW_R_SIZE_MAX	1024

 /* Always ensure that this is consistent with <stdio.h> */
 #ifndef TMP_MAX
 #define TMP_MAX			308915776	/* Legacy */
 #endif
 # 141 "/usr/include/limits.h" 3 4
 #endif /* _POSIX_C_SOURCE >=3D 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 142 "/usr/include/limits.h" 3 4

 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 144 "/usr/include/limits.h" 3 4

 #define MB_LEN_MAX		32	/* Allow ISO/IEC 2022 */

 #if 0 /* expanded by -frewrite-includes */
 #include <machine/limits.h>
 #endif /* expanded by -frewrite-includes */
 # 147 "/usr/include/limits.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/limits=
 =2Eh" 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/limits=
 =2Eh" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/limits.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/limits=
 =2Eh" 3
 # 1 "/usr/include/machine/limits.h" 1 3 4
 /*       $NetBSD: limits.h,v 1.10 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/limits.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/limits.h" 3 4
 # 1 "/usr/include/sparc/limits.h" 1 3 4
 /*	$NetBSD: limits.h,v 1.23 2019/01/21 20:28:18 dholland Exp $ */

 /*
  * Copyright (c) 1988 The Regents of the University of California.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)limits.h	8.3 (Berkeley) 1/4/94
  */

 #ifndef	_MACHINE_LIMITS_H_
 #define	_MACHINE_LIMITS_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sparc/limits.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 38 "/usr/include/sparc/limits.h" 2 3 4

 #define	CHAR_BIT	8		/* number of bits in a char */

 #define	UCHAR_MAX	0xff		/* max value for an unsigned char */
 #define	SCHAR_MAX	0x7f		/* max value for a signed char */
 #define	SCHAR_MIN	(-0x7f-1)	/* min value for a signed char */

 #define	USHRT_MAX	0xffff		/* max value for an unsigned short */
 #define	SHRT_MAX	0x7fff		/* max value for a short */
 #define	SHRT_MIN	(-0x7fff-1)	/* min value for a short */

 #define	UINT_MAX	0xffffffffU	/* max value for an unsigned int */
 #define	INT_MAX		0x7fffffff	/* max value for an int */
 #define	INT_MIN		(-0x7fffffff-1)	/* min value for an int */

 #ifdef __arch64__
 #define	ULONG_MAX	0xffffffffffffffffUL	/* max value for an unsigned long */
 #define	LONG_MAX	0x7fffffffffffffffL	/* max value for a long */
 #define	LONG_MIN	(-0x7fffffffffffffffL-1)	/* min value for a long */
 #else
 # 58 "/usr/include/sparc/limits.h" 3 4
 #define	ULONG_MAX	0xffffffffUL	/* max value for an unsigned long */
 #define	LONG_MAX	0x7fffffffL	/* max value for a long */
 #define	LONG_MIN	(-0x7fffffffL-1)	/* min value for a long */
 #endif
 # 62 "/usr/include/sparc/limits.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >=3D 199901L || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sparc/limits.h" 3 4
 #define	ULLONG_MAX	0xffffffffffffffffULL	/* max unsigned long long */
 #define	LLONG_MAX	0x7fffffffffffffffLL	/* max signed long long */
 #define	LLONG_MIN	(-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 # 69 "/usr/include/sparc/limits.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 72 "/usr/include/sparc/limits.h" 3 4
 #define	SSIZE_MAX	LONG_MAX	/* max value for a ssize_t */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sparc/limits.h" 3 4
 #define	SSIZE_MIN	LONG_MIN	/* min value for a ssize_t */
 #define	SIZE_T_MAX	ULONG_MAX	/* max value for a size_t */

 /* GCC requires that quad constants be written as expressions. */
 #define	UQUAD_MAX	((u_quad_t)0-1)	/* max value for a uquad_t */
 					/* max value for a quad_t */
 #define	QUAD_MAX	((quad_t)(UQUAD_MAX >> 1))
 #define	QUAD_MIN	(-QUAD_MAX-1)	/* min value for a quad_t */

 #endif /* _NETBSD_SOURCE */
 # 85 "/usr/include/sparc/limits.h" 3 4
 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 86 "/usr/include/sparc/limits.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 88 "/usr/include/sparc/limits.h" 3 4
 #ifdef __arch64__
 #define LONG_BIT	64
 #else
 # 91 "/usr/include/sparc/limits.h" 3 4
 #define LONG_BIT	32
 #endif
 # 93 "/usr/include/sparc/limits.h" 3 4
 #define WORD_BIT	32

 #define DBL_DIG		__DBL_DIG__
 #define DBL_MAX		__DBL_MAX__
 #define DBL_MIN		__DBL_MIN__

 #define FLT_DIG		__FLT_DIG__
 #define FLT_MAX		__FLT_MAX__
 #define FLT_MIN		__FLT_MIN__
 #endif
 # 103 "/usr/include/sparc/limits.h" 3 4

 #endif	/* _MACHINE_LIMITS_H_ */
 # 105 "/usr/include/sparc/limits.h" 3 4
 # 4 "/usr/include/machine/limits.h" 2 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/limits=
 =2Eh" 2 3
 #pragma GCC visibility pop
 # 148 "/usr/include/limits.h" 2 3 4

 #ifdef __CHAR_UNSIGNED__
 # define CHAR_MIN     0
 # define CHAR_MAX     UCHAR_MAX
 #else
 # 153 "/usr/include/limits.h" 3 4
 # define CHAR_MIN     SCHAR_MIN
 # define CHAR_MAX     SCHAR_MAX
 #endif
 # 156 "/usr/include/limits.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/syslimits.h>
 #endif /* expanded by -frewrite-includes */
 # 157 "/usr/include/limits.h" 3 4
 # 1 "/usr/include/sys/syslimits.h" 1 3 4
 /*	$NetBSD: syslimits.h,v 1.28 2015/08/21 07:19:39 uebayasi Exp $	*/

 /*
  * Copyright (c) 1988, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)syslimits.h	8.1 (Berkeley) 6/2/93
  */

 #ifndef _SYS_SYSLIMITS_H_
 #define _SYS_SYSLIMITS_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sys/syslimits.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 38 "/usr/include/sys/syslimits.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_KERNEL_OPT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 40 "/usr/include/sys/syslimits.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include "opt_syslimits.h"
 #endif /* expanded by -frewrite-includes */
 # 40 "/usr/include/sys/syslimits.h" 3 4
 # 41 "/usr/include/sys/syslimits.h" 3 4
 #endif
 # 42 "/usr/include/sys/syslimits.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 45 "/usr/include/sys/syslimits.h" 3 4
 #define	ARG_MAX		 (256 * 1024)	/* max bytes for an exec function */
 #ifndef CHILD_MAX
 #define	CHILD_MAX		  160	/* max simultaneous processes */
 #endif
 # 49 "/usr/include/sys/syslimits.h" 3 4
 #define	GID_MAX		   2147483647U	/* max value for a gid_t (2^31-2) */
 #define	LINK_MAX		32767	/* max file link count */
 #define	MAX_CANON		  255	/* max bytes in term canon input line */
 #define	MAX_INPUT		  255	/* max bytes in terminal input */
 #define	NAME_MAX		  511	/* max bytes in a file name, must be */
 					/* kept in sync with MAXNAMLEN */
 #define	NGROUPS_MAX		   16	/* max supplemental group id's */
 #define	UID_MAX		   2147483647U	/* max value for a uid_t (2^31-2) */
 #ifndef OPEN_MAX
 #define	OPEN_MAX		  128	/* max open files per process */
 #endif
 # 60 "/usr/include/sys/syslimits.h" 3 4
 #define	PATH_MAX		 1024	/* max bytes in pathname */
 #define	PIPE_BUF		  512	/* max bytes for atomic pipe writes */

 #define	BC_BASE_MAX	      INT_MAX	/* max ibase/obase values in bc(1) */
 #define	BC_DIM_MAX		65535	/* max array elements in bc(1) */
 #define	BC_SCALE_MAX	      INT_MAX	/* max scale value in bc(1) */
 #define	BC_STRING_MAX	      INT_MAX	/* max const string length in bc(1) */
 #define	COLL_WEIGHTS_MAX	    2	/* max weights for order keyword */
 #define	EXPR_NEST_MAX		   32	/* max expressions nested in expr(1) */
 #define	LINE_MAX		 2048	/* max bytes in an input line */
 #define	RE_DUP_MAX		  255	/* max RE's in interval notation */

 /*
  * IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version=
  2
  */
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 77 "/usr/include/sys/syslimits.h" 3 4
 #define	LOGIN_NAME_MAX		   17	/* max login name length incl. NUL */
 #endif
 # 79 "/usr/include/sys/syslimits.h" 3 4

 /*
  * X/Open CAE Specification Issue 5 Version 2
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 84 "/usr/include/sys/syslimits.h" 3 4
 #define	IOV_MAX			 1024	/* max # of iovec's for readv(2) etc. */
 #define	NZERO			   20	/* default "nice" */
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 87 "/usr/include/sys/syslimits.h" 3 4

 #endif /* !_ANSI_SOURCE */
 # 89 "/usr/include/sys/syslimits.h" 3 4

 #endif /* !_SYS_SYSLIMITS_H_ */
 # 91 "/usr/include/sys/syslimits.h" 3 4
 # 158 "/usr/include/limits.h" 2 3 4

 #endif /* !_LIMITS_H_ */
 # 160 "/usr/include/limits.h" 3 4
 # 22 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 2 3 4
 #endif
 # 23 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 /* Many system headers try to "help us out" by defining these.  No really, =
 we
    know how big each datatype is. */
 #undef  SCHAR_MIN
 #undef  SCHAR_MAX
 #undef  UCHAR_MAX
 #undef  SHRT_MIN
 #undef  SHRT_MAX
 #undef  USHRT_MAX
 #undef  INT_MIN
 #undef  INT_MAX
 #undef  UINT_MAX
 #undef  LONG_MIN
 #undef  LONG_MAX
 #undef  ULONG_MAX

 #undef  CHAR_BIT
 #undef  CHAR_MIN
 #undef  CHAR_MAX

 /* C90/99 5.2.4.2.1 */
 #define SCHAR_MAX __SCHAR_MAX__
 #define SHRT_MAX  __SHRT_MAX__
 #define INT_MAX   __INT_MAX__
 #define LONG_MAX  __LONG_MAX__

 #define SCHAR_MIN (-__SCHAR_MAX__-1)
 #define SHRT_MIN  (-__SHRT_MAX__ -1)
 #define INT_MIN   (-__INT_MAX__  -1)
 #define LONG_MIN  (-__LONG_MAX__ -1L)

 #define UCHAR_MAX (__SCHAR_MAX__*2  +1)
 #define USHRT_MAX (__SHRT_MAX__ *2  +1)
 #define UINT_MAX  (__INT_MAX__  *2U +1U)
 #define ULONG_MAX (__LONG_MAX__ *2UL+1UL)

 #ifndef MB_LEN_MAX
 #define MB_LEN_MAX 1
 #endif
 # 62 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 #define CHAR_BIT  __CHAR_BIT__

 #ifdef __CHAR_UNSIGNED__  /* -funsigned-char */
 #define CHAR_MIN 0
 #define CHAR_MAX UCHAR_MAX
 #else
 # 69 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4
 #define CHAR_MIN SCHAR_MIN
 #define CHAR_MAX __SCHAR_MAX__
 #endif
 # 72 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 /* C99 5.2.4.2.1: Added long long.
    C++11 18.3.3.2: same contents as the Standard C Library header <limits.h=
 >.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if __STDC_VERSION__ >=3D 199901L || __cplusplus >=3D 201103L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 77 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 #undef  LLONG_MIN
 #undef  LLONG_MAX
 #undef  ULLONG_MAX

 #define LLONG_MAX  __LONG_LONG_MAX__
 #define LLONG_MIN  (-__LONG_LONG_MAX__-1LL)
 #define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
 #endif
 # 86 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 /* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension.  It's to=
 o bad
    that we don't have something like #pragma poison that could be used to
    deprecate a macro - the code should just use LLONG_MAX and friends.
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI_=
 _)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 92 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 #undef   LONG_LONG_MIN
 #undef   LONG_LONG_MAX
 #undef   ULONG_LONG_MAX

 #define LONG_LONG_MAX  __LONG_LONG_MAX__
 #define LONG_LONG_MIN  (-__LONG_LONG_MAX__-1LL)
 #define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
 #endif
 # 101 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4

 #endif /* __CLANG_LIMITS_H */
 # 103 "/usr/pkg/lib/clang/10.0.1/include/limits.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/limits.h" 2 3
 #pragma GCC visibility pop
 # 52 "/usr/include/math.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE)) || ((_POSIX_C_SOURCE - 0) >=3D 200809L || \
      defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >=3D 199901L || \
      (__cplusplus - 0) >=3D 201103L || defined(_NETBSD_SOURCE))
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 57 "/usr/include/math.h" 3 4
 #define __MATH_C99_FEATURES
 #endif
 # 59 "/usr/include/math.h" 3 4

 #ifdef __MATH_C99_FEATURES
 #if 0 /* disabled by -frewrite-includes */
 #  if defined(__FLT_EVAL_METHOD__) && (__FLT_EVAL_METHOD__ - 0) =3D=3D 0
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 62 "/usr/include/math.h" 3 4
 typedef double double_t;
 typedef float float_t;
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #  elif (__FLT_EVAL_METHOD__ - 0) =3D=3D 1
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/math.h" 3 4
 typedef double double_t;
 typedef double float_t;
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #  elif (__FLT_EVAL_METHOD__ - 0) =3D=3D 2
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 68 "/usr/include/math.h" 3 4
 typedef long double double_t;
 typedef long double float_t;
 #  endif
 # 71 "/usr/include/math.h" 3 4
 #endif
 # 72 "/usr/include/math.h" 3 4

 #ifdef __HAVE_LONG_DOUBLE
 #define	__fpmacro_unary_floating(__name, __arg0)			\
 	/* LINTED */							\
 	((sizeof (__arg0) =3D=3D sizeof (float))				\
 	?	__ ## __name ## f (__arg0)				\
 	: (sizeof (__arg0) =3D=3D sizeof (double))				\
 	?	__ ## __name ## d (__arg0)				\
 	:	__ ## __name ## l (__arg0))
 #else
 # 82 "/usr/include/math.h" 3 4
 #define	__fpmacro_unary_floating(__name, __arg0)			\
 	/* LINTED */							\
 	((sizeof (__arg0) =3D=3D sizeof (float))				\
 	?	__ ## __name ## f (__arg0)				\
 	:	__ ## __name ## d (__arg0))
 #endif /* __HAVE_LONG_DOUBLE */
 # 88 "/usr/include/math.h" 3 4

 /*
  * ANSI/POSIX
  */
 /* 7.12#3 HUGE_VAL, HUGELF, HUGE_VALL */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3, 3)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 94 "/usr/include/math.h" 3 4
 #define HUGE_VAL	__builtin_huge_val()
 #else
 # 96 "/usr/include/math.h" 3 4
 extern const union __double_u __infinity;
 #define HUGE_VAL	__infinity.__val
 #endif
 # 99 "/usr/include/math.h" 3 4

 /*
  * ISO C99
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__MATH_C99_FEATURES) || \
     (_POSIX_C_SOURCE - 0) >=3D 200112L || (_XOPEN_SOURCE  - 0) >=3D 600
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 105 "/usr/include/math.h" 3 4
 /* 7.12#3 HUGE_VAL, HUGELF, HUGE_VALL */
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3, 3)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 107 "/usr/include/math.h" 3 4
 #define	HUGE_VALF	__builtin_huge_valf()
 #define	HUGE_VALL	__builtin_huge_vall()
 #else
 # 110 "/usr/include/math.h" 3 4
 extern const union __float_u __infinityf;
 #define	HUGE_VALF	__infinityf.__val

 extern const union __long_double_u __infinityl;
 #define	HUGE_VALL	__infinityl.__val
 #endif
 # 116 "/usr/include/math.h" 3 4

 /* 7.12#4 INFINITY */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__INFINITY)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 119 "/usr/include/math.h" 3 4
 #define	INFINITY	__INFINITY	/* float constant which overflows */
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif __GNUC_PREREQ__(3, 3)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 1 /* evaluated by -frewrite-includes */
 # 121 "/usr/include/math.h" 3 4
 #define	INFINITY	__builtin_inff()
 #else
 # 123 "/usr/include/math.h" 3 4
 #define	INFINITY	HUGE_VALF	/* positive infinity */
 #endif /* __INFINITY */
 # 125 "/usr/include/math.h" 3 4

 /* 7.12#5 NAN: a quiet NaN, if supported */
 #ifdef __HAVE_NANF
 #if 0 /* disabled by -frewrite-includes */
 #if __GNUC_PREREQ__(3,3)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 129 "/usr/include/math.h" 3 4
 #define	NAN	__builtin_nanf("")
 #else
 # 131 "/usr/include/math.h" 3 4
 extern const union __float_u __nanf;
 #define	NAN		__nanf.__val
 #endif
 # 134 "/usr/include/math.h" 3 4
 #endif /* __HAVE_NANF */
 # 135 "/usr/include/math.h" 3 4

 /* 7.12#6 number classification macros */
 #define	FP_INFINITE	0x00
 #define	FP_NAN		0x01
 #define	FP_NORMAL	0x02
 #define	FP_SUBNORMAL	0x03
 #define	FP_ZERO		0x04
 /* NetBSD extensions */
 #define	_FP_LOMD	0x80		/* range for machine-specific classes */
 #define	_FP_HIMD	0xff

 #define	FP_ILOGB0	INT_MIN
 #define	FP_ILOGBNAN	INT_MAX

 #endif /* C99 || _XOPEN_SOURCE >=3D 600 */
 # 150 "/usr/include/math.h" 3 4

 /*
  * XOPEN/SVID
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 155 "/usr/include/math.h" 3 4
 #define	M_E		2.7182818284590452354	/* e */
 #define	M_LOG2E		1.4426950408889634074	/* log 2e */
 #define	M_LOG10E	0.43429448190325182765	/* log 10e */
 #define	M_LN2		0.69314718055994530942	/* log e2 */
 #define	M_LN10		2.30258509299404568402	/* log e10 */
 #define	M_PI		3.14159265358979323846	/* pi */
 #define	M_PI_2		1.57079632679489661923	/* pi/2 */
 #define	M_PI_4		0.78539816339744830962	/* pi/4 */
 #define	M_1_PI		0.31830988618379067154	/* 1/pi */
 #define	M_2_PI		0.63661977236758134308	/* 2/pi */
 #define	M_2_SQRTPI	1.12837916709551257390	/* 2/sqrt(pi) */
 #define	M_SQRT2		1.41421356237309504880	/* sqrt(2) */
 #define	M_SQRT1_2	0.70710678118654752440	/* 1/sqrt(2) */

 #define	MAXFLOAT	((float)3.40282346638528860e+38)
 extern int signgam;
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 172 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 174 "/usr/include/math.h" 3 4
 enum fdversion {fdlibm_ieee =3D -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix=
 };

 #define _LIB_VERSION_TYPE enum fdversion
 #define _LIB_VERSION _fdlib_version

 /* if global variable _LIB_VERSION is not desirable, one may
  * change the following to be a constant by:
  *	#define _LIB_VERSION_TYPE const enum version
  * In that case, after one initializes the value _LIB_VERSION (see
  * s_lib_version.c) during compile time, it cannot be modified
  * in the middle of a program
  */
 extern  _LIB_VERSION_TYPE  _LIB_VERSION;

 #define _IEEE_  fdlibm_ieee
 #define _SVID_  fdlibm_svid
 #define _XOPEN_ fdlibm_xopen
 #define _POSIX_ fdlibm_posix

 #ifndef __cplusplus
 struct exception {
 	int type;
 	const char *name;
 	double arg1;
 	double arg2;
 	double retval;
 };
 #endif
 # 202 "/usr/include/math.h" 3 4

 #define	HUGE		MAXFLOAT

 /*
  * set X_TLOSS =3D pi*2**52, which is possibly defined in <values.h>
  * (one may replace the following line by "#include <values.h>")
  */

 #define X_TLOSS		1.41484755040568800000e+16

 #define	DOMAIN		1
 #define	SING		2
 #define	OVERFLOW	3
 #define	UNDERFLOW	4
 #define	TLOSS		5
 #define	PLOSS		6

 #endif /* _NETBSD_SOURCE */
 # 220 "/usr/include/math.h" 3 4

 __BEGIN_DECLS
 /*
  * ANSI/POSIX
  */
 double	acos(double);
 double	asin(double);
 double	atan(double);
 double	atan2(double, double);
 double	cos(double);
 double	sin(double);
 double	tan(double);

 double	cosh(double);
 double	sinh(double);
 double	tanh(double);

 double	exp(double);
 double	exp2(double);
 double	frexp(double, int *);
 double	ldexp(double, int);
 double	log(double);
 double	log2(double);
 double	log10(double);
 double	modf(double, double *);

 double	pow(double, double);
 double	sqrt(double);

 double	ceil(double);
 double	fabs(double);
 double	floor(double);
 double	fmod(double, double);

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__MATH_C99_FEATURES) || defined(_XOPEN_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 255 "/usr/include/math.h" 3 4
 double	erf(double);
 double	erfc(double);
 double	hypot(double, double);
 #endif
 # 259 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 261 "/usr/include/math.h" 3 4
 int	finite(double);
 double	gamma(double);
 double	j0(double);
 double	j1(double);
 double	jn(int, double);
 double	y0(double);
 double	y1(double);
 double	yn(int, double);

 #if 0 /* disabled by -frewrite-includes */
 #if (_XOPEN_SOURCE - 0) >=3D 500 || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 271 "/usr/include/math.h" 3 4
 double	scalb(double, double);
 #endif /* (_XOPEN_SOURCE - 0) >=3D 500 || defined(_NETBSD_SOURCE)*/
 # 273 "/usr/include/math.h" 3 4
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 274 "/usr/include/math.h" 3 4

 /*
  * ISO C99
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__MATH_C99_FEATURES) || (_XOPEN_SOURCE - 0) >=3D 500
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 279 "/usr/include/math.h" 3 4
 double	acosh(double);
 double	asinh(double);
 double	atanh(double);
 double	cbrt(double);
 double	expm1(double);
 int	ilogb(double);
 double	log1p(double);
 double	logb(double);
 double	nextafter(double, double);
 double	remainder(double, double);
 double	rint(double);
 #endif
 # 291 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__MATH_C99_FEATURES) || (_XOPEN_SOURCE - 0) >=3D 600 || \
     (_POSIX_C_SOURCE - 0) >=3D 200112L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 294 "/usr/include/math.h" 3 4
 /* 7.12.3.1 int fpclassify(real-floating x) */
 #define	fpclassify(__x)	__fpmacro_unary_floating(fpclassify, __x)

 /* 7.12.3.2 int isfinite(real-floating x) */
 #define	isfinite(__x)	__fpmacro_unary_floating(isfinite, __x)

 /* 7.12.3.5 int isnormal(real-floating x) */
 #define	isnormal(__x)	(fpclassify(__x) =3D=3D FP_NORMAL)

 /* 7.12.3.6 int signbit(real-floating x) */
 #define	signbit(__x)	__fpmacro_unary_floating(signbit, __x)

 /* 7.12.4 trigonometric */

 float	acosf(float);
 float	asinf(float);
 float	atanf(float);
 float	atan2f(float, float);
 float	cosf(float);
 float	sinf(float);
 float	tanf(float);

 long double	acosl(long double);
 long double	asinl(long double);
 long double	atanl(long double);
 long double	atan2l(long double, long double);
 long double	cosl(long double);
 long double	sinl(long double);
 long double	tanl(long double);

 /* 7.12.5 hyperbolic */

 float	acoshf(float);
 float	asinhf(float);
 float	atanhf(float);
 float	coshf(float);
 float	sinhf(float);
 float	tanhf(float);
 long double	acoshl(long double);
 long double	asinhl(long double);
 long double	atanhl(long double);
 long double	coshl(long double);
 long double	sinhl(long double);
 long double	tanhl(long double);

 /* 7.12.6 exp / log */
 double	scalbn(double, int);
 double	scalbln(double, long);

 float	expf(float);
 float	exp2f(float);
 float	expm1f(float);
 float	frexpf(float, int *);
 int	ilogbf(float);
 float	ldexpf(float, int);
 float	logf(float);
 float	log2f(float);
 float	log10f(float);
 float	log1pf(float);
 float	logbf(float);
 float	modff(float, float *);
 float	scalbnf(float, int);
 float	scalblnf(float, long);

 long double	expl(long double);
 long double	exp2l(long double);
 long double	expm1l(long double);
 long double	frexpl(long double, int *);
 int		ilogbl(long double);
 long double	ldexpl(long double, int);
 long double	logl(long double);
 long double	log2l(long double);
 long double	log10l(long double);
 long double	log1pl(long double);
 long double	logbl(long double);
 long double	modfl(long double, long double *);
 long double	scalbnl(long double, int);
 long double	scalblnl(long double, long);


 /* 7.12.7 power / absolute */

 float	cbrtf(float);
 float	fabsf(float);
 float	hypotf(float, float);
 float	powf(float, float);
 float	sqrtf(float);
 long double	cbrtl(long double);
 long double	fabsl(long double);
 long double	hypotl(long double, long double);
 long double	powl(long double, long double);
 long double	sqrtl(long double);

 /* 7.12.8 error / gamma */

 double	lgamma(double);
 double	tgamma(double);
 float	erff(float);
 float	erfcf(float);
 float	lgammaf(float);
 float	tgammaf(float);
 long double	erfl(long double);
 long double	erfcl(long double);
 long double	lgammal(long double);
 long double	tgammal(long double);

 /* 7.12.9 nearest integer */

 /* LONGLONG */
 long long int	llrint(double);
 long int	lround(double);
 /* LONGLONG */
 long long int	llround(double);
 long int	lrint(double);
 double	round(double);
 double	trunc(double);

 float	ceilf(float);
 float	floorf(float);
 /* LONGLONG */
 long long int	llrintf(float);
 long int	lroundf(float);
 /* LONGLONG */
 long long int	llroundf(float);
 long int	lrintf(float);
 float	rintf(float);
 float	roundf(float);
 float	truncf(float);
 long double	ceill(long double);
 long double	floorl(long double);
 /* LONGLONG */
 long long int	llrintl(long double);
 long int	lroundl(long double);
 /* LONGLONG */
 long long int	llroundl(long double);
 long int	lrintl(long double);
 long double	rintl(long double);
 long double	roundl(long double);
 long double	truncl(long double);

 /* 7.12.10 remainder */

 float	fmodf(float, float);
 float	remainderf(float, float);
 long double	fmodl(long double, long double);
 long double	remainderl(long double, long double);

 /* 7.12.10.3 The remquo functions */
 double	remquo(double, double, int *);
 float	remquof(float, float, int *);
 long double	remquol(long double, long double, int *);

 /* 7.12.11 manipulation */

 double	copysign(double, double);
 double	nan(const char *);
 double	nearbyint(double);
 double	nexttoward(double, long double);
 float	copysignf(float, float);
 float	nanf(const char *);
 float	nearbyintf(float);
 float	nextafterf(float, float);
 float	nexttowardf(float, long double);
 long double	copysignl(long double, long double);
 long double	nanl(const char *);
 long double	nearbyintl(long double);
 long double     nextafterl(long double, long double);
 long double	nexttowardl(long double, long double);

 /* 7.12.14 comparison */

 #define isunordered(x, y)	(isnan(x) || isnan(y))
 #define isgreater(x, y)		(!isunordered((x), (y)) && (x) > (y))
 #define isgreaterequal(x, y)	(!isunordered((x), (y)) && (x) >=3D (y))
 #define isless(x, y)		(!isunordered((x), (y)) && (x) < (y))
 #define islessequal(x, y)	(!isunordered((x), (y)) && (x) <=3D (y))
 #define islessgreater(x, y)	(!isunordered((x), (y)) && \
 				 ((x) > (y) || (y) > (x)))
 double	fdim(double, double);
 double	fma(double, double, double);
 double	fmax(double, double);
 double	fmin(double, double);
 float	fdimf(float, float);
 float	fmaf(float, float, float);
 float	fmaxf(float, float);
 float	fminf(float, float);
 long double fdiml(long double, long double);
 long double fmal(long double, long double, long double);
 long double fmaxl(long double, long double);
 long double fminl(long double, long double);

 #endif /* !_ANSI_SOURCE && ... */
 # 486 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(__MATH_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >=3D 200112L
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 488 "/usr/include/math.h" 3 4
 /* 7.12.3.3 int isinf(real-floating x) */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__isinf) || defined(__HAVE_INLINE___ISINF)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 490 "/usr/include/math.h" 3 4
 #define	isinf(__x)	__isinf(__x)
 #else
 # 492 "/usr/include/math.h" 3 4
 #define	isinf(__x)	__fpmacro_unary_floating(isinf, __x)
 #endif
 # 494 "/usr/include/math.h" 3 4

 /* 7.12.3.4 int isnan(real-floating x) */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(__isnan) || defined(__HAVE_INLINE___ISNAN)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 497 "/usr/include/math.h" 3 4
 #define	isnan(__x)	__isnan(__x)
 #else
 # 499 "/usr/include/math.h" 3 4
 #define	isnan(__x)	__fpmacro_unary_floating(isnan, __x)
 #endif
 # 501 "/usr/include/math.h" 3 4
 #endif /* !_ANSI_SOURCE && ... */
 # 502 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 504 "/usr/include/math.h" 3 4
 #ifndef __cplusplus
 int	matherr(struct exception *);
 #endif
 # 507 "/usr/include/math.h" 3 4

 /*
  * IEEE Test Vector
  */
 double	significand(double);

 /*
  * BSD math library entry points
  */
 double	drem(double, double);

 #endif /* _NETBSD_SOURCE */
 # 519 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE) || defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 521 "/usr/include/math.h" 3 4
 /*
  * Reentrant version of gamma & lgamma; passes signgam back by reference
  * as the second argument; user must allocate space for signgam.
  */
 double	gamma_r(double, int *);
 double	lgamma_r(double, int *);
 #endif /* _NETBSD_SOURCE || _REENTRANT */
 # 528 "/usr/include/math.h" 3 4


 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 531 "/usr/include/math.h" 3 4

 /* float versions of ANSI/POSIX functions */

 float	gammaf(float);
 int	isinff(float);
 int	isnanf(float);
 int	finitef(float);
 float	j0f(float);
 float	j1f(float);
 float	jnf(int, float);
 float	y0f(float);
 float	y1f(float);
 float	ynf(int, float);

 float	scalbf(float, float);

 /*
  * float version of IEEE Test Vector
  */
 float	significandf(float);

 /*
  * float versions of BSD math library entry points
  */
 float	dremf(float, float);
 #endif /* _NETBSD_SOURCE */
 # 557 "/usr/include/math.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE) || defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 559 "/usr/include/math.h" 3 4
 /*
  * Float versions of reentrant version of gamma & lgamma; passes
  * signgam back by reference as the second argument; user must
  * allocate space for signgam.
  */
 float	gammaf_r(float, int *);
 float	lgammaf_r(float, int *);
 #endif /* !... || _REENTRANT */
 # 567 "/usr/include/math.h" 3 4

 /*
  * Library implementation
  */
 int	__fpclassifyf(float);
 int	__fpclassifyd(double);
 int	__isfinitef(float);
 int	__isfinited(double);
 int	__isinff(float);
 int	__isinfd(double);
 int	__isnanf(float);
 int	__isnand(double);
 int	__signbitf(float);
 int	__signbitd(double);

 #ifdef __HAVE_LONG_DOUBLE
 int	__fpclassifyl(long double);
 int	__isfinitel(long double);
 int	__isinfl(long double);
 int	__isnanl(long double);
 int	__signbitl(long double);
 #endif
 # 589 "/usr/include/math.h" 3 4

 __END_DECLS

 #endif /* _MATH_H_ */
 # 593 "/usr/include/math.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/math.h" 2 3
 #pragma GCC visibility pop
 # 11 "src/gl.cc" 2

 #ifdef __MACH__
 #if 0 /* expanded by -frewrite-includes */
 #  include <mach/mach.h>
 #endif /* expanded by -frewrite-includes */
 # 13 "src/gl.cc"
 # 14 "src/gl.cc"
 #if 0 /* expanded by -frewrite-includes */
 #  include <mach/mach_time.h>
 #endif /* expanded by -frewrite-includes */
 # 14 "src/gl.cc"
 # 15 "src/gl.cc"
 #else
 # 16 "src/gl.cc"
 #if 0 /* expanded by -frewrite-includes */
 #  include <time.h>
 #endif /* expanded by -frewrite-includes */
 # 16 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <time.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 3
 # 1 "/usr/include/time.h" 1 3 4
 /*	$NetBSD: time.h,v 1.47 2016/10/04 09:41:41 kamil Exp $	*/

 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)time.h	8.3 (Berkeley) 1/21/94
  */

 #ifndef _TIME_H_
 #define	_TIME_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 43 "/usr/include/time.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 43 "/usr/include/time.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 44 "/usr/include/time.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 44 "/usr/include/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 45 "/usr/include/time.h" 2 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 46 "/usr/include/time.h" 3 4
 # 47 "/usr/include/time.h" 3 4

 #ifdef	_BSD_CLOCK_T_
 typedef	_BSD_CLOCK_T_	clock_t;
 #undef	_BSD_CLOCK_T_
 #endif
 # 52 "/usr/include/time.h" 3 4

 #ifdef	_BSD_TIME_T_
 typedef	_BSD_TIME_T_	time_t;
 #undef	_BSD_TIME_T_
 #endif
 # 57 "/usr/include/time.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 62 "/usr/include/time.h" 3 4

 #ifdef	_BSD_CLOCKID_T_
 typedef	_BSD_CLOCKID_T_	clockid_t;
 #undef	_BSD_CLOCKID_T_
 #endif
 # 67 "/usr/include/time.h" 3 4

 #ifdef	_BSD_TIMER_T_
 typedef	_BSD_TIMER_T_	timer_t;
 #undef	_BSD_TIMER_T_
 #endif
 # 72 "/usr/include/time.h" 3 4

 #define CLOCKS_PER_SEC	100

 struct tm {
 	int	tm_sec;		/* seconds after the minute [0-61] */
 	int	tm_min;		/* minutes after the hour [0-59] */
 	int	tm_hour;	/* hours since midnight [0-23] */
 	int	tm_mday;	/* day of the month [1-31] */
 	int	tm_mon;		/* months since January [0-11] */
 	int	tm_year;	/* years since 1900 */
 	int	tm_wday;	/* days since Sunday [0-6] */
 	int	tm_yday;	/* days since January 1 [0-365] */
 	int	tm_isdst;	/* Daylight Savings Time flag */
 	long	tm_gmtoff;	/* offset from UTC in seconds */
 	__aconst char *tm_zone;	/* timezone abbreviation */
 };

 __BEGIN_DECLS
 char *asctime(const struct tm *);
 clock_t clock(void);
 #ifndef __LIBC12_SOURCE__
 char *ctime(const time_t *) __RENAME(__ctime50);
 double difftime(time_t, time_t) __RENAME(__difftime50);
 struct tm *gmtime(const time_t *) __RENAME(__gmtime50);
 struct tm *localtime(const time_t *) __RENAME(__locatime50);
 time_t time(time_t *) __RENAME(__time50);
 time_t mktime(struct tm *) __RENAME(__mktime50);
 #endif
 # 100 "/usr/include/time.h" 3 4
 size_t strftime(char * __restrict, size_t, const char * __restrict,
     const struct tm * __restrict)
     __attribute__((__format__(__strftime__, 3, 0)));

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 106 "/usr/include/time.h" 3 4
 #ifndef __LIBC12_SOURCE__
 /*
  * CLK_TCK uses libc's internal __sysconf() to retrieve the machine's
  * HZ. The value of _SC_CLK_TCK is 39 -- we hard code it so we do not
  * need to include unistd.h
  */
 long __sysconf(int);
 #define CLK_TCK		(__sysconf(39))
 #endif
 # 115 "/usr/include/time.h" 3 4
 #endif
 # 116 "/usr/include/time.h" 3 4

 extern __aconst char *tzname[2];
 #ifndef __LIBC12_SOURCE__
 void tzset(void) __RENAME(__tzset50);
 #endif
 # 121 "/usr/include/time.h" 3 4

 /*
  * X/Open Portability Guide >=3D Issue 4
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 126 "/usr/include/time.h" 3 4
 extern int daylight;
 #ifndef __LIBC12_SOURCE__
 extern long int timezone __RENAME(__timezone13);
 #endif
 # 130 "/usr/include/time.h" 3 4
 char *strptime(const char * __restrict, const char * __restrict,
     struct tm * __restrict);
 #endif
 # 133 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 136 "/usr/include/time.h" 3 4
 struct tm *getdate(const char *);
 extern int getdate_err;
 #endif
 # 139 "/usr/include/time.h" 3 4

 /* ISO/IEC 9899:201x 7.27.1/3 Components of time */
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/timespec.h>
 #endif /* expanded by -frewrite-includes */
 # 141 "/usr/include/time.h" 3 4
 # 1 "/usr/include/sys/timespec.h" 1 3 4
 /*	$NetBSD: timespec.h,v 1.1 2015/07/31 12:51:32 kamil Exp $	*/

 /*
  * Copyright (c) 1982, 1986, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)time.h	8.5 (Berkeley) 5/4/95
  *
  * Extracted by Kamil Rytarowski from:
  * NetBSD: src/sys/sys/time.h,v 1.69 2015/05/19 23:35:11 riastradh Exp
  */

 #ifndef _SYS_TIMESPEC_H_
 #define	_SYS_TIMESPEC_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 40 "/usr/include/sys/timespec.h" 3 4
 # 41 "/usr/include/sys/timespec.h" 3 4

 #ifdef	_BSD_TIME_T_
 typedef	_BSD_TIME_T_	time_t;
 #undef	_BSD_TIME_T_
 #endif
 # 46 "/usr/include/sys/timespec.h" 3 4

 struct timespec {
 	time_t	tv_sec;		/* seconds */
 	long	tv_nsec;	/* and nanoseconds */
 };

 #endif /* !_SYS_TIMESPEC_H_ */
 # 53 "/usr/include/sys/timespec.h" 3 4
 # 142 "/usr/include/time.h" 2 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199309L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 145 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/time.h>
 #endif /* expanded by -frewrite-includes */
 # 145 "/usr/include/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/time.h" 1 =
 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/time.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/time.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/time.h" 3
 # 1 "/usr/include/sys/time.h" 1 3 4
 /*	$NetBSD: time.h,v 1.79 2017/01/17 15:28:34 maya Exp $	*/

 /*
  * Copyright (c) 1982, 1986, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)time.h	8.5 (Berkeley) 5/4/95
  */

 #ifndef _SYS_TIME_H_
 #define	_SYS_TIME_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sys/time.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 38 "/usr/include/sys/time.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/types.h>
 #endif /* expanded by -frewrite-includes */
 # 38 "/usr/include/sys/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/types.h" 3
 #pragma GCC visibility pop
 # 39 "/usr/include/sys/time.h" 2 3 4

 /*
  * Structure returned by gettimeofday(2) system call,
  * and used in other calls.
  */
 struct timeval {
 	time_t    	tv_sec;		/* seconds */
 	suseconds_t	tv_usec;	/* and microseconds */
 };

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/timespec.h>
 #endif /* expanded by -frewrite-includes */
 # 49 "/usr/include/sys/time.h" 3 4
 # 50 "/usr/include/sys/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 52 "/usr/include/sys/time.h" 3 4
 #define	TIMEVAL_TO_TIMESPEC(tv, ts) do {				\
 	(ts)->tv_sec =3D (tv)->tv_sec;					\
 	(ts)->tv_nsec =3D (tv)->tv_usec * 1000;				\
 } while (/*CONSTCOND*/0)
 #define	TIMESPEC_TO_TIMEVAL(tv, ts) do {				\
 	(tv)->tv_sec =3D (ts)->tv_sec;					\
 	(tv)->tv_usec =3D (suseconds_t)(ts)->tv_nsec / 1000;		\
 } while (/*CONSTCOND*/0)

 /*
  * Note: timezone is obsolete. All timezone handling is now in
  * userland. Its just here for back compatibility.
  */
 struct timezone {
 	int	tz_minuteswest;	/* minutes west of Greenwich */
 	int	tz_dsttime;	/* type of dst correction */
 };

 /* Operations on timevals. */
 #define	timerclear(tvp)		(tvp)->tv_sec =3D (tvp)->tv_usec =3D 0L
 #define	timerisset(tvp)		((tvp)->tv_sec || (tvp)->tv_usec)
 #define	timercmp(tvp, uvp, cmp)						\
 	(((tvp)->tv_sec =3D=3D (uvp)->tv_sec) ?				\
 	    ((tvp)->tv_usec cmp (uvp)->tv_usec) :			\
 	    ((tvp)->tv_sec cmp (uvp)->tv_sec))
 #define	timeradd(tvp, uvp, vvp)						\
 	do {								\
 		(vvp)->tv_sec =3D (tvp)->tv_sec + (uvp)->tv_sec;		\
 		(vvp)->tv_usec =3D (tvp)->tv_usec + (uvp)->tv_usec;	\
 		if ((vvp)->tv_usec >=3D 1000000) {			\
 			(vvp)->tv_sec++;				\
 			(vvp)->tv_usec -=3D 1000000;			\
 		}							\
 	} while (/* CONSTCOND */ 0)
 #define	timersub(tvp, uvp, vvp)						\
 	do {								\
 		(vvp)->tv_sec =3D (tvp)->tv_sec - (uvp)->tv_sec;		\
 		(vvp)->tv_usec =3D (tvp)->tv_usec - (uvp)->tv_usec;	\
 		if ((vvp)->tv_usec < 0) {				\
 			(vvp)->tv_sec--;				\
 			(vvp)->tv_usec +=3D 1000000;			\
 		}							\
 	} while (/* CONSTCOND */ 0)

 /*
  * hide bintime for _STANDALONE because this header is used for hpcboot.exe,
  * which is built with compilers which don't recognize LL suffix.
  *	http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html
  */
 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_STANDALONE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 102 "/usr/include/sys/time.h" 3 4
 struct bintime {
 	time_t	sec;
 	uint64_t frac;
 };

 static __inline void
 bintime_addx(struct bintime *bt, uint64_t x)
 {
 	uint64_t u;

 	u =3D bt->frac;
 	bt->frac +=3D x;
 	if (u > bt->frac)
 		bt->sec++;
 }

 static __inline void
 bintime_add(struct bintime *bt, const struct bintime *bt2)
 {
 	uint64_t u;

 	u =3D bt->frac;
 	bt->frac +=3D bt2->frac;
 	if (u > bt->frac)
 		bt->sec++;
 	bt->sec +=3D bt2->sec;
 }

 static __inline void
 bintime_sub(struct bintime *bt, const struct bintime *bt2)
 {
 	uint64_t u;

 	u =3D bt->frac;
 	bt->frac -=3D bt2->frac;
 	if (u < bt->frac)
 		bt->sec--;
 	bt->sec -=3D bt2->sec;
 }

 #define	bintimecmp(bta, btb, cmp)					\
 	(((bta)->sec =3D=3D (btb)->sec) ?					\
 	    ((bta)->frac cmp (btb)->frac) :				\
 	    ((bta)->sec cmp (btb)->sec))

 /*-
  * Background information:
  *
  * When converting between timestamps on parallel timescales of differing
  * resolutions it is historical and scientific practice to round down rather
  * than doing 4/5 rounding.
  *
  *   The date changes at midnight, not at noon.
  *
  *   Even at 15:59:59.999999999 it's not four'o'clock.
  *
  *   time_second ticks after N.999999999 not after N.4999999999
  */

 /*
  * The magic numbers for converting ms/us/ns to fractions
  */

 /* 1ms =3D (2^64) / 1000       */
 #define	BINTIME_SCALE_MS	((uint64_t)18446744073709551ULL)

 /* 1us =3D (2^64) / 1000000    */
 #define	BINTIME_SCALE_US	((uint64_t)18446744073709ULL)

 /* 1ns =3D (2^64) / 1000000000 */
 #define	BINTIME_SCALE_NS	((uint64_t)18446744073ULL)

 static __inline void
 bintime2timespec(const struct bintime *bt, struct timespec *ts)
 {

 	ts->tv_sec =3D bt->sec;
 	ts->tv_nsec =3D
 	    (long)((1000000000ULL * (uint32_t)(bt->frac >> 32)) >> 32);
 }

 static __inline void
 timespec2bintime(const struct timespec *ts, struct bintime *bt)
 {

 	bt->sec =3D ts->tv_sec;
 	bt->frac =3D (uint64_t)ts->tv_nsec * BINTIME_SCALE_NS;
 }

 static __inline void
 bintime2timeval(const struct bintime *bt, struct timeval *tv)
 {

 	tv->tv_sec =3D bt->sec;
 	tv->tv_usec =3D
 	    (suseconds_t)((1000000ULL * (uint32_t)(bt->frac >> 32)) >> 32);
 }

 static __inline void
 timeval2bintime(const struct timeval *tv, struct bintime *bt)
 {

 	bt->sec =3D tv->tv_sec;
 	bt->frac =3D (uint64_t)tv->tv_usec * BINTIME_SCALE_US;
 }

 static __inline struct bintime
 ms2bintime(uint64_t ms)
 {
 	struct bintime bt;

 	bt.sec =3D (time_t)(ms / 1000U);
 	bt.frac =3D (uint64_t)(ms % 1000U) * BINTIME_SCALE_MS;

 	return bt;
 }

 static __inline struct bintime
 us2bintime(uint64_t us)
 {
 	struct bintime bt;

 	bt.sec =3D (time_t)(us / 1000000U);
 	bt.frac =3D (uint64_t)(us % 1000000U) * BINTIME_SCALE_US;

 	return bt;
 }

 static __inline struct bintime
 ns2bintime(uint64_t ns)
 {
 	struct bintime bt;

 	bt.sec =3D (time_t)(ns / 1000000000U);
 	bt.frac =3D (uint64_t)(ns % 1000000000U) * BINTIME_SCALE_NS;

 	return bt;
 }
 #endif /* !defined(_STANDALONE) */
 # 241 "/usr/include/sys/time.h" 3 4

 /* Operations on timespecs. */
 #define	timespecclear(tsp)	(tsp)->tv_sec =3D (time_t)((tsp)->tv_nsec =3D 0L)
 #define	timespecisset(tsp)	((tsp)->tv_sec || (tsp)->tv_nsec)
 #define	timespeccmp(tsp, usp, cmp)					\
 	(((tsp)->tv_sec =3D=3D (usp)->tv_sec) ?				\
 	    ((tsp)->tv_nsec cmp (usp)->tv_nsec) :			\
 	    ((tsp)->tv_sec cmp (usp)->tv_sec))
 #define	timespecadd(tsp, usp, vsp)					\
 	do {								\
 		(vsp)->tv_sec =3D (tsp)->tv_sec + (usp)->tv_sec;		\
 		(vsp)->tv_nsec =3D (tsp)->tv_nsec + (usp)->tv_nsec;	\
 		if ((vsp)->tv_nsec >=3D 1000000000L) {			\
 			(vsp)->tv_sec++;				\
 			(vsp)->tv_nsec -=3D 1000000000L;			\
 		}							\
 	} while (/* CONSTCOND */ 0)
 #define	timespecsub(tsp, usp, vsp)					\
 	do {								\
 		(vsp)->tv_sec =3D (tsp)->tv_sec - (usp)->tv_sec;		\
 		(vsp)->tv_nsec =3D (tsp)->tv_nsec - (usp)->tv_nsec;	\
 		if ((vsp)->tv_nsec < 0) {				\
 			(vsp)->tv_sec--;				\
 			(vsp)->tv_nsec +=3D 1000000000L;			\
 		}							\
 	} while (/* CONSTCOND */ 0)
 #define timespec2ns(x) (((uint64_t)(x)->tv_sec) * 1000000000L + (x)->tv_nse=
 c)
 #endif /* _NETBSD_SOURCE */
 # 269 "/usr/include/sys/time.h" 3 4

 /*
  * Names of the interval timers, and structure
  * defining a timer setting.
  * NB: Must match the CLOCK_ constants below.
  */
 #define	ITIMER_REAL		0
 #define	ITIMER_VIRTUAL		1
 #define	ITIMER_PROF		2
 #define	ITIMER_MONOTONIC	3

 struct	itimerval {
 	struct	timeval it_interval;	/* timer interval */
 	struct	timeval it_value;	/* current value */
 };

 /*
  * Structure defined by POSIX.1b to be like a itimerval, but with
  * timespecs. Used in the timer_*() system calls.
  */
 struct	itimerspec {
 	struct	timespec it_interval;
 	struct	timespec it_value;
 };

 #define	CLOCK_REALTIME	0
 #define	CLOCK_VIRTUAL	1
 #define	CLOCK_PROF	2
 #define	CLOCK_MONOTONIC	3
 #define CLOCK_THREAD_CPUTIME_ID		0x20000000
 #define CLOCK_PROCESS_CPUTIME_ID	0x40000000

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 302 "/usr/include/sys/time.h" 3 4
 #define	TIMER_RELTIME	0x0	/* relative timer */
 #endif
 # 304 "/usr/include/sys/time.h" 3 4
 #define	TIMER_ABSTIME	0x1	/* absolute timer */

 #ifdef _KERNEL
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/timevar.h>
 #endif /* expanded by -frewrite-includes */
 # 307 "/usr/include/sys/time.h" 3 4
 # 308 "/usr/include/sys/time.h" 3 4
 #else /* !_KERNEL */
 # 309 "/usr/include/sys/time.h" 3 4
 #ifndef _STANDALONE
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200112L || \
     (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     (_XOPEN_SOURCE - 0) >=3D 500 || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 313 "/usr/include/sys/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/select.h>
 #endif /* expanded by -frewrite-includes */
 # 313 "/usr/include/sys/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/select.h" =
 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/select.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/select.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/select.h" 3
 # 1 "/usr/include/sys/select.h" 1 3 4
 /*	$NetBSD: select.h,v 1.37 2014/04/25 15:52:45 pooka Exp $	*/

 /*-
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)select.h	8.2 (Berkeley) 1/4/94
  */

 #ifndef _SYS_SELECT_H_
 #define	_SYS_SELECT_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 37 "/usr/include/sys/select.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 38 "/usr/include/sys/select.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 38 "/usr/include/sys/select.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 39 "/usr/include/sys/select.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/fd_set.h>
 #endif /* expanded by -frewrite-includes */
 # 39 "/usr/include/sys/select.h" 3 4
 # 40 "/usr/include/sys/select.h" 3 4

 #ifdef _KERNEL
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/selinfo.h>		/* for struct selinfo */
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/sys/select.h" 3 4
 # 43 "/usr/include/sys/select.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/signal.h>			/* for sigset_t */
 #endif /* expanded by -frewrite-includes */
 # 43 "/usr/include/sys/select.h" 3 4
 # 44 "/usr/include/sys/select.h" 3 4

 struct lwp;
 struct proc;
 struct timespec;
 struct cpu_info;
 struct socket;

 int	selcommon(register_t *, int, fd_set *, fd_set *, fd_set *,
     struct timespec *, sigset_t *);
 void	selrecord(struct lwp *selector, struct selinfo *);
 void	selnotify(struct selinfo *, int, long);
 void	selsysinit(struct cpu_info *);
 void	selinit(struct selinfo *);
 void	seldestroy(struct selinfo *);

 #else /* _KERNEL */
 # 60 "/usr/include/sys/select.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/sigtypes.h>
 #endif /* expanded by -frewrite-includes */
 # 61 "/usr/include/sys/select.h" 3 4
 # 1 "/usr/include/sys/sigtypes.h" 1 3 4
 /*	$NetBSD: sigtypes.h,v 1.11 2017/01/12 18:29:14 christos Exp $	*/

 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)signal.h	8.4 (Berkeley) 5/4/95
  */

 #ifndef	_SYS_SIGTYPES_H_
 #define	_SYS_SIGTYPES_H_

 /*
  * This header file defines various signal-related types.  We also keep
  * the macros to manipulate sigset_t here, to encapsulate knowledge of
  * its internals.
  */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 48 "/usr/include/sys/sigtypes.h" 3 4
 # 1 "/usr/include/sys/featuretest.h" 1 3 4
 /*	$NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $	*/

 /*
  * Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  * Public domain.
  *
  * NOTE: Do not protect this header against multiple inclusion.  Doing
  * so can have subtle side-effects due to header file inclusion order
  * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
  * protect each CPP macro that we want to supply.
  */

 /*
  * Feature-test macros are defined by several standards, and allow an
  * application to specify what symbols they want the system headers to
  * expose, and hence what standard they want them to conform to.
  * There are two classes of feature-test macros.  The first class
  * specify complete standards, and if one of these is defined, header
  * files will try to conform to the relevant standard.  They are:
  *
  * ANSI macros:
  * _ANSI_SOURCE			ANSI C89
  *
  * POSIX macros:
  * _POSIX_SOURCE =3D=3D 1		IEEE Std 1003.1 (version?)
  * _POSIX_C_SOURCE =3D=3D 1		IEEE Std 1003.1-1990
  * _POSIX_C_SOURCE =3D=3D 2		IEEE Std 1003.2-1992
  * _POSIX_C_SOURCE =3D=3D 199309L	IEEE Std 1003.1b-1993
  * _POSIX_C_SOURCE =3D=3D 199506L	ISO/IEC 9945-1:1996
  * _POSIX_C_SOURCE =3D=3D 200112L	IEEE Std 1003.1-2001
  * _POSIX_C_SOURCE =3D=3D 200809L   IEEE Std 1003.1-2008
  *
  * X/Open macros:
  * _XOPEN_SOURCE		System Interfaces and Headers, Issue 4, Ver 2
  * _XOPEN_SOURCE_EXTENDED =3D=3D 1	XSH4.2 UNIX extensions
  * _XOPEN_SOURCE =3D=3D 500		System Interfaces and Headers, Issue 5
  * _XOPEN_SOURCE =3D=3D 520		Networking Services (XNS), Issue 5.2
  * _XOPEN_SOURCE =3D=3D 600		IEEE Std 1003.1-2001, XSI option
  * _XOPEN_SOURCE =3D=3D 700		IEEE Std 1003.1-2008, XSI option
  *
  * NetBSD macros:
  * _NETBSD_SOURCE =3D=3D 1		Make all NetBSD features available.
  *
  * If more than one of these "major" feature-test macros is defined,
  * then the set of facilities provided (and namespace used) is the
  * union of that specified by the relevant standards, and in case of
  * conflict, the earlier standard in the above list has precedence (so
  * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  * of rename() that's used is the POSIX one).  If none of the "major"
  * feature-test macros is defined, _NETBSD_SOURCE is assumed.
  *
  * There are also "minor" feature-test macros, which enable extra
  * functionality in addition to some base standard.  They should be
  * defined along with one of the "major" macros.  The "minor" macros
  * are:
  *
  * _REENTRANT
  * _ISOC99_SOURCE
  * _ISOC11_SOURCE
  * _LARGEFILE_SOURCE		Large File Support
  *		<http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  */

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 65 "/usr/include/sys/featuretest.h" 3 4
 #define _POSIX_C_SOURCE	1L
 #endif
 # 67 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 70 "/usr/include/sys/featuretest.h" 3 4
 #define _NETBSD_SOURCE 1
 #endif
 # 72 "/usr/include/sys/featuretest.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if ((_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500) &&=
  \
     !defined(_REENTRANT)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 75 "/usr/include/sys/featuretest.h" 3 4
 #define _REENTRANT
 #endif
 # 77 "/usr/include/sys/featuretest.h" 3 4
 # 49 "/usr/include/sys/sigtypes.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 49 "/usr/include/sys/sigtypes.h" 3 4
 # 1 "/usr/include/machine/int_types.h" 1 3 4
 /*       $NetBSD: int_types.h,v 1.8 2002/07/20 11:52:21 mrg Exp $        */

 #if 0 /* expanded by -frewrite-includes */
 #include <sparc/int_types.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/int_types.h" 3 4
 # 4 "/usr/include/machine/int_types.h" 3 4
 # 50 "/usr/include/sys/sigtypes.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 50 "/usr/include/sys/sigtypes.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 3
 # 1 "/usr/include/machine/ansi.h" 1 3 4
 /*	$NetBSD: ansi.h,v 1.19 2019/05/07 03:49:27 kamil Exp $ */

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/common_ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/include/machine/ansi.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/machine/ansi.h=
 " 2 3
 #pragma GCC visibility pop
 # 51 "/usr/include/sys/sigtypes.h" 2 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 56 "/usr/include/sys/sigtypes.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 59 "/usr/include/sys/sigtypes.h" 3 4

 typedef struct {
 	__uint32_t	__bits[4];
 } sigset_t;

 /*
  * Macro for manipulating signal masks.
  */
 #define __sigmask(n)		(1U << (((unsigned int)(n) - 1) & 31))
 #define	__sigword(n)		(((unsigned int)(n) - 1) >> 5)
 #define	__sigaddset(s, n)	((s)->__bits[__sigword(n)] |=3D __sigmask(n))
 #define	__sigdelset(s, n)	((s)->__bits[__sigword(n)] &=3D ~__sigmask(n))
 #define	__sigismember(s, n)	(((s)->__bits[__sigword(n)] & __sigmask(n)) !=
 =3D 0)
 #define	__sigemptyset(s)	((s)->__bits[0] =3D 0x00000000, \
 				 (s)->__bits[1] =3D 0x00000000, \
 				 (s)->__bits[2] =3D 0x00000000, \
 				 (s)->__bits[3] =3D 0x00000000)
 #define __sigsetequal(s1,s2)	((s1)->__bits[0] =3D=3D (s2)->__bits[0] && \
 				 (s1)->__bits[1] =3D=3D (s2)->__bits[1] && \
 				 (s1)->__bits[2] =3D=3D (s2)->__bits[2] && \
 				 (s1)->__bits[3] =3D=3D (s2)->__bits[3])
 #define	__sigfillset(s)		((s)->__bits[0] =3D 0xffffffff, \
 				 (s)->__bits[1] =3D 0xffffffff, \
 				 (s)->__bits[2] =3D 0xffffffff, \
 				 (s)->__bits[3] =3D 0xffffffff)
 #define	__sigplusset(s, t) \
 	do {						\
 		(t)->__bits[0] |=3D (s)->__bits[0];	\
 		(t)->__bits[1] |=3D (s)->__bits[1];	\
 		(t)->__bits[2] |=3D (s)->__bits[2];	\
 		(t)->__bits[3] |=3D (s)->__bits[3];	\
 	} while (/* CONSTCOND */ 0)
 #define	__sigminusset(s, t) \
 	do {						\
 		(t)->__bits[0] &=3D ~(s)->__bits[0];	\
 		(t)->__bits[1] &=3D ~(s)->__bits[1];	\
 		(t)->__bits[2] &=3D ~(s)->__bits[2];	\
 		(t)->__bits[3] &=3D ~(s)->__bits[3];	\
 	} while (/* CONSTCOND */ 0)
 #define	__sigandset(s, t) \
 	do {						\
 		(t)->__bits[0] &=3D (s)->__bits[0];	\
 		(t)->__bits[1] &=3D (s)->__bits[1];	\
 		(t)->__bits[2] &=3D (s)->__bits[2];	\
 		(t)->__bits[3] &=3D (s)->__bits[3];	\
 	} while (/* CONSTCOND */ 0)

 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     (_XOPEN_SOURCE - 0) >=3D 500 || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 108 "/usr/include/sys/sigtypes.h" 3 4
 typedef struct
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 110 "/usr/include/sys/sigtypes.h" 3 4
                sigaltstack
 #endif /* _NETBSD_SOURCE */
 # 112 "/usr/include/sys/sigtypes.h" 3 4
 			   {
 	void	*ss_sp;			/* signal stack base */
 	size_t	ss_size;		/* signal stack length */
 	int	ss_flags;		/* SS_DISABLE and/or SS_ONSTACK */
 } stack_t;

 #endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >=3D 500 || _NETBSD_SOURCE=
  */
 # 119 "/usr/include/sys/sigtypes.h" 3 4

 #endif	/* _POSIX_C_SOURCE || _XOPEN_SOURCE || ... */
 # 121 "/usr/include/sys/sigtypes.h" 3 4

 #endif	/* !_SYS_SIGTYPES_H_ */
 # 123 "/usr/include/sys/sigtypes.h" 3 4
 # 62 "/usr/include/sys/select.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <time.h>
 #endif /* expanded by -frewrite-includes */
 # 62 "/usr/include/sys/select.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <time.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 3
 # 1 "/usr/include/time.h" 1 3 4
 /*	$NetBSD: time.h,v 1.47 2016/10/04 09:41:41 kamil Exp $	*/

 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)time.h	8.3 (Berkeley) 1/21/94
  */

 #ifndef _TIME_H_
 #define	_TIME_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/time.h" 3 4
 # 43 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 43 "/usr/include/time.h" 3 4
 # 44 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 44 "/usr/include/time.h" 3 4
 # 45 "/usr/include/time.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 46 "/usr/include/time.h" 3 4
 # 47 "/usr/include/time.h" 3 4

 #ifdef	_BSD_CLOCK_T_
 typedef	_BSD_CLOCK_T_	clock_t;
 #undef	_BSD_CLOCK_T_
 #endif
 # 52 "/usr/include/time.h" 3 4

 #ifdef	_BSD_TIME_T_
 typedef	_BSD_TIME_T_	time_t;
 #undef	_BSD_TIME_T_
 #endif
 # 57 "/usr/include/time.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 62 "/usr/include/time.h" 3 4

 #ifdef	_BSD_CLOCKID_T_
 typedef	_BSD_CLOCKID_T_	clockid_t;
 #undef	_BSD_CLOCKID_T_
 #endif
 # 67 "/usr/include/time.h" 3 4

 #ifdef	_BSD_TIMER_T_
 typedef	_BSD_TIMER_T_	timer_t;
 #undef	_BSD_TIMER_T_
 #endif
 # 72 "/usr/include/time.h" 3 4

 #define CLOCKS_PER_SEC	100

 struct tm {
 	int	tm_sec;		/* seconds after the minute [0-61] */
 	int	tm_min;		/* minutes after the hour [0-59] */
 	int	tm_hour;	/* hours since midnight [0-23] */
 	int	tm_mday;	/* day of the month [1-31] */
 	int	tm_mon;		/* months since January [0-11] */
 	int	tm_year;	/* years since 1900 */
 	int	tm_wday;	/* days since Sunday [0-6] */
 	int	tm_yday;	/* days since January 1 [0-365] */
 	int	tm_isdst;	/* Daylight Savings Time flag */
 	long	tm_gmtoff;	/* offset from UTC in seconds */
 	__aconst char *tm_zone;	/* timezone abbreviation */
 };

 __BEGIN_DECLS
 char *asctime(const struct tm *);
 clock_t clock(void);
 #ifndef __LIBC12_SOURCE__
 char *ctime(const time_t *) __RENAME(__ctime50);
 double difftime(time_t, time_t) __RENAME(__difftime50);
 struct tm *gmtime(const time_t *) __RENAME(__gmtime50);
 struct tm *localtime(const time_t *) __RENAME(__locatime50);
 time_t time(time_t *) __RENAME(__time50);
 time_t mktime(struct tm *) __RENAME(__mktime50);
 #endif
 # 100 "/usr/include/time.h" 3 4
 size_t strftime(char * __restrict, size_t, const char * __restrict,
     const struct tm * __restrict)
     __attribute__((__format__(__strftime__, 3, 0)));

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 106 "/usr/include/time.h" 3 4
 #ifndef __LIBC12_SOURCE__
 /*
  * CLK_TCK uses libc's internal __sysconf() to retrieve the machine's
  * HZ. The value of _SC_CLK_TCK is 39 -- we hard code it so we do not
  * need to include unistd.h
  */
 long __sysconf(int);
 #define CLK_TCK		(__sysconf(39))
 #endif
 # 115 "/usr/include/time.h" 3 4
 #endif
 # 116 "/usr/include/time.h" 3 4

 extern __aconst char *tzname[2];
 #ifndef __LIBC12_SOURCE__
 void tzset(void) __RENAME(__tzset50);
 #endif
 # 121 "/usr/include/time.h" 3 4

 /*
  * X/Open Portability Guide >=3D Issue 4
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 126 "/usr/include/time.h" 3 4
 extern int daylight;
 #ifndef __LIBC12_SOURCE__
 extern long int timezone __RENAME(__timezone13);
 #endif
 # 130 "/usr/include/time.h" 3 4
 char *strptime(const char * __restrict, const char * __restrict,
     struct tm * __restrict);
 #endif
 # 133 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 136 "/usr/include/time.h" 3 4
 struct tm *getdate(const char *);
 extern int getdate_err;
 #endif
 # 139 "/usr/include/time.h" 3 4

 /* ISO/IEC 9899:201x 7.27.1/3 Components of time */
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/timespec.h>
 #endif /* expanded by -frewrite-includes */
 # 141 "/usr/include/time.h" 3 4
 # 142 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199309L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 145 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/time.h>
 #endif /* expanded by -frewrite-includes */
 # 145 "/usr/include/time.h" 3 4
 # 146 "/usr/include/time.h" 3 4
 struct sigevent;
 struct itimerspec;
 int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespe=
 c *);
 #ifndef __LIBC12_SOURCE__
 int clock_getres(clockid_t, struct timespec *)
     __RENAME(__clock_getres50);
 int clock_gettime(clockid_t, struct timespec *)
     __RENAME(__clock_gettime50);
 int clock_settime(clockid_t, const struct timespec *)
     __RENAME(__clock_settime50);
 int nanosleep(const struct timespec *, struct timespec *)
     __RENAME(__nanosleep50);
 int timer_gettime(timer_t, struct itimerspec *) __RENAME(__timer_gettime50);
 int timer_settime(timer_t, int, const struct itimerspec * __restrict,=20
     struct itimerspec * __restrict) __RENAME(__timer_settime50);
 #endif
 # 162 "/usr/include/time.h" 3 4
 #ifdef _NETBSD_SOURCE
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/idtype.h>
 #endif /* expanded by -frewrite-includes */
 # 163 "/usr/include/time.h" 3 4
 # 164 "/usr/include/time.h" 3 4
 int clock_getcpuclockid2(idtype_t, id_t, clockid_t *);
 #endif
 # 166 "/usr/include/time.h" 3 4
 int clock_getcpuclockid(pid_t, clockid_t *);

 int timer_create(clockid_t, struct sigevent * __restrict,
     timer_t * __restrict);
 int timer_delete(timer_t);
 int timer_getoverrun(timer_t);
 #endif /* _POSIX_C_SOURCE >=3D 199309 || _XOPEN_SOURCE >=3D 500 || ... */
 # 173 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 176 "/usr/include/time.h" 3 4
 char *asctime_r(const struct tm * __restrict, char * __restrict);
 #ifndef __LIBC12_SOURCE__
 char *ctime_r(const time_t *, char *) __RENAME(__ctime_r50);
 struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict)
     __RENAME(__gmtime_r50);
 struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict)
     __RENAME(__localtime_r50);
 #endif
 # 184 "/usr/include/time.h" 3 4
 #endif
 # 185 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 187 "/usr/include/time.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 191 "/usr/include/time.h" 3 4
 size_t strftime_l(char * __restrict, size_t, const char * __restrict,
     const struct tm * __restrict, locale_t)
     __attribute__((__format__(__strftime__, 3, 0)));
 #endif
 # 195 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 197 "/usr/include/time.h" 3 4

 typedef struct __state *timezone_t;

 #ifndef __LIBC12_SOURCE__
 time_t time2posix(time_t) __RENAME(__time2posix50);
 time_t posix2time(time_t) __RENAME(__posix2time50);
 time_t timegm(struct tm *) __RENAME(__timegm50);
 time_t timeoff(struct tm *, long) __RENAME(__timeoff50);
 time_t timelocal(struct tm *) __RENAME(__timelocal50);
 struct tm *offtime(const time_t *, long) __RENAME(__offtime50);
 void tzsetwall(void) __RENAME(__tzsetwall50);

 struct tm *offtime_r(const time_t *, long, struct tm *) __RENAME(__offtime_=
 r50);
 struct tm *localtime_rz(timezone_t __restrict, const time_t * __restrict,
     struct tm * __restrict) __RENAME(__localtime_rz50);
 char *ctime_rz(timezone_t __restrict, const time_t *, char *)
     __RENAME(__ctime_rz50);
 time_t mktime_z(timezone_t __restrict, struct tm * __restrict)
     __RENAME(__mktime_z50);
 time_t timelocal_z(timezone_t __restrict, struct tm *)
     __RENAME(__timelocal_z50);
 time_t time2posix_z(timezone_t __restrict, time_t) __RENAME(__time2posix_z5=
 0);
 time_t posix2time_z(timezone_t __restrict, time_t) __RENAME(__posix2time_z5=
 0);
 timezone_t tzalloc(const char *) __RENAME(__tzalloc50);
 void tzfree(timezone_t __restrict) __RENAME(__tzfree50);
 const char *tzgetname(timezone_t __restrict, int) __RENAME(__tzgetname50);
 long tzgetgmtoff(timezone_t __restrict, int) __RENAME(__tzgetgmtoff50);
 #endif
 # 225 "/usr/include/time.h" 3 4

 size_t strftime_lz(timezone_t __restrict, char * __restrict, size_t,
     const char * __restrict, const struct tm * __restrict, locale_t)
     __attribute__((__format__(__strftime__, 4, 0)));
 size_t strftime_z(timezone_t __restrict, char * __restrict, size_t,
     const char * __restrict, const struct tm * __restrict)
     __attribute__((__format__(__strftime__, 4, 0)));
 char *strptime_l(const char * __restrict, const char * __restrict,
     struct tm * __restrict, locale_t);

 #endif /* _NETBSD_SOURCE */
 # 236 "/usr/include/time.h" 3 4

 /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */
 #define TIME_UTC	1	/* time elapsed since epoch */
 int timespec_get(struct timespec *ts, int base);

 __END_DECLS

 #endif /* !_TIME_H_ */
 # 244 "/usr/include/time.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 2 3
 #pragma GCC visibility pop
 # 63 "/usr/include/sys/select.h" 2 3 4

 __BEGIN_DECLS
 #ifndef __LIBC12_SOURCE__
 int	pselect(int, fd_set * __restrict, fd_set * __restrict,
     fd_set * __restrict, const struct timespec * __restrict,
     const sigset_t * __restrict) __RENAME(__pselect50);
 int	select(int, fd_set * __restrict, fd_set * __restrict,
     fd_set * __restrict, struct timeval * __restrict) __RENAME(__select50);
 #endif /* __LIBC12_SOURCE__ */
 # 72 "/usr/include/sys/select.h" 3 4
 __END_DECLS
 #endif /* _KERNEL */
 # 74 "/usr/include/sys/select.h" 3 4

 #endif /* !_SYS_SELECT_H_ */
 # 76 "/usr/include/sys/select.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/select.h" =
 2 3
 #pragma GCC visibility pop
 # 314 "/usr/include/sys/time.h" 2 3 4
 #endif
 # 315 "/usr/include/sys/time.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 316 "/usr/include/sys/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 1=
  3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/cdefs.h" 3
 #pragma GCC visibility pop
 # 317 "/usr/include/sys/time.h" 2 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <time.h>
 #endif /* expanded by -frewrite-includes */
 # 317 "/usr/include/sys/time.h" 3 4
 # 1 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 1 3 4
 #if 0 /* expanded by -frewrite-includes */
 #pragma GCC system_header
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 3
 #pragma GCC visibility push(default)
 #if 0 /* expanded by -frewrite-includes */
 #include_next <time.h>
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 3
 # 1 "/usr/include/time.h" 1 3 4
 /*	$NetBSD: time.h,v 1.47 2016/10/04 09:41:41 kamil Exp $	*/

 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.
  * All or some portions of this file are derived from material licensed
  * to the University of California by American Telephone and Telegraph
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO=
 SE
  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI=
 AL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI=
 CT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  *	@(#)time.h	8.3 (Berkeley) 1/21/94
  */

 #ifndef _TIME_H_
 #define	_TIME_H_

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/cdefs.h>
 #endif /* expanded by -frewrite-includes */
 # 42 "/usr/include/time.h" 3 4
 # 43 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/featuretest.h>
 #endif /* expanded by -frewrite-includes */
 # 43 "/usr/include/time.h" 3 4
 # 44 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <machine/ansi.h>
 #endif /* expanded by -frewrite-includes */
 # 44 "/usr/include/time.h" 3 4
 # 45 "/usr/include/time.h" 3 4

 #if 0 /* expanded by -frewrite-includes */
 #include <sys/null.h>
 #endif /* expanded by -frewrite-includes */
 # 46 "/usr/include/time.h" 3 4
 # 47 "/usr/include/time.h" 3 4

 #ifdef	_BSD_CLOCK_T_
 typedef	_BSD_CLOCK_T_	clock_t;
 #undef	_BSD_CLOCK_T_
 #endif
 # 52 "/usr/include/time.h" 3 4

 #ifdef	_BSD_TIME_T_
 typedef	_BSD_TIME_T_	time_t;
 #undef	_BSD_TIME_T_
 #endif
 # 57 "/usr/include/time.h" 3 4

 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
 #endif
 # 62 "/usr/include/time.h" 3 4

 #ifdef	_BSD_CLOCKID_T_
 typedef	_BSD_CLOCKID_T_	clockid_t;
 #undef	_BSD_CLOCKID_T_
 #endif
 # 67 "/usr/include/time.h" 3 4

 #ifdef	_BSD_TIMER_T_
 typedef	_BSD_TIMER_T_	timer_t;
 #undef	_BSD_TIMER_T_
 #endif
 # 72 "/usr/include/time.h" 3 4

 #define CLOCKS_PER_SEC	100

 struct tm {
 	int	tm_sec;		/* seconds after the minute [0-61] */
 	int	tm_min;		/* minutes after the hour [0-59] */
 	int	tm_hour;	/* hours since midnight [0-23] */
 	int	tm_mday;	/* day of the month [1-31] */
 	int	tm_mon;		/* months since January [0-11] */
 	int	tm_year;	/* years since 1900 */
 	int	tm_wday;	/* days since Sunday [0-6] */
 	int	tm_yday;	/* days since January 1 [0-365] */
 	int	tm_isdst;	/* Daylight Savings Time flag */
 	long	tm_gmtoff;	/* offset from UTC in seconds */
 	__aconst char *tm_zone;	/* timezone abbreviation */
 };

 __BEGIN_DECLS
 char *asctime(const struct tm *);
 clock_t clock(void);
 #ifndef __LIBC12_SOURCE__
 char *ctime(const time_t *) __RENAME(__ctime50);
 double difftime(time_t, time_t) __RENAME(__difftime50);
 struct tm *gmtime(const time_t *) __RENAME(__gmtime50);
 struct tm *localtime(const time_t *) __RENAME(__locatime50);
 time_t time(time_t *) __RENAME(__time50);
 time_t mktime(struct tm *) __RENAME(__mktime50);
 #endif
 # 100 "/usr/include/time.h" 3 4
 size_t strftime(char * __restrict, size_t, const char * __restrict,
     const struct tm * __restrict)
     __attribute__((__format__(__strftime__, 3, 0)));

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 106 "/usr/include/time.h" 3 4
 #ifndef __LIBC12_SOURCE__
 /*
  * CLK_TCK uses libc's internal __sysconf() to retrieve the machine's
  * HZ. The value of _SC_CLK_TCK is 39 -- we hard code it so we do not
  * need to include unistd.h
  */
 long __sysconf(int);
 #define CLK_TCK		(__sysconf(39))
 #endif
 # 115 "/usr/include/time.h" 3 4
 #endif
 # 116 "/usr/include/time.h" 3 4

 extern __aconst char *tzname[2];
 #ifndef __LIBC12_SOURCE__
 void tzset(void) __RENAME(__tzset50);
 #endif
 # 121 "/usr/include/time.h" 3 4

 /*
  * X/Open Portability Guide >=3D Issue 4
  */
 #if 0 /* disabled by -frewrite-includes */
 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 126 "/usr/include/time.h" 3 4
 extern int daylight;
 #ifndef __LIBC12_SOURCE__
 extern long int timezone __RENAME(__timezone13);
 #endif
 # 130 "/usr/include/time.h" 3 4
 char *strptime(const char * __restrict, const char * __restrict,
     struct tm * __restrict);
 #endif
 # 133 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 136 "/usr/include/time.h" 3 4
 struct tm *getdate(const char *);
 extern int getdate_err;
 #endif
 # 139 "/usr/include/time.h" 3 4

 /* ISO/IEC 9899:201x 7.27.1/3 Components of time */
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/timespec.h>
 #endif /* expanded by -frewrite-includes */
 # 141 "/usr/include/time.h" 3 4
 # 142 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199309L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 145 "/usr/include/time.h" 3 4
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/time.h>
 #endif /* expanded by -frewrite-includes */
 # 145 "/usr/include/time.h" 3 4
 # 146 "/usr/include/time.h" 3 4
 struct sigevent;
 struct itimerspec;
 int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespe=
 c *);
 #ifndef __LIBC12_SOURCE__
 int clock_getres(clockid_t, struct timespec *)
     __RENAME(__clock_getres50);
 int clock_gettime(clockid_t, struct timespec *)
     __RENAME(__clock_gettime50);
 int clock_settime(clockid_t, const struct timespec *)
     __RENAME(__clock_settime50);
 int nanosleep(const struct timespec *, struct timespec *)
     __RENAME(__nanosleep50);
 int timer_gettime(timer_t, struct itimerspec *) __RENAME(__timer_gettime50);
 int timer_settime(timer_t, int, const struct itimerspec * __restrict,=20
     struct itimerspec * __restrict) __RENAME(__timer_settime50);
 #endif
 # 162 "/usr/include/time.h" 3 4
 #ifdef _NETBSD_SOURCE
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/idtype.h>
 #endif /* expanded by -frewrite-includes */
 # 163 "/usr/include/time.h" 3 4
 # 164 "/usr/include/time.h" 3 4
 int clock_getcpuclockid2(idtype_t, id_t, clockid_t *);
 #endif
 # 166 "/usr/include/time.h" 3 4
 int clock_getcpuclockid(pid_t, clockid_t *);

 int timer_create(clockid_t, struct sigevent * __restrict,
     timer_t * __restrict);
 int timer_delete(timer_t);
 int timer_getoverrun(timer_t);
 #endif /* _POSIX_C_SOURCE >=3D 199309 || _XOPEN_SOURCE >=3D 500 || ... */
 # 173 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 176 "/usr/include/time.h" 3 4
 char *asctime_r(const struct tm * __restrict, char * __restrict);
 #ifndef __LIBC12_SOURCE__
 char *ctime_r(const time_t *, char *) __RENAME(__ctime_r50);
 struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict)
     __RENAME(__gmtime_r50);
 struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict)
     __RENAME(__localtime_r50);
 #endif
 # 184 "/usr/include/time.h" 3 4
 #endif
 # 185 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 187 "/usr/include/time.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 191 "/usr/include/time.h" 3 4
 size_t strftime_l(char * __restrict, size_t, const char * __restrict,
     const struct tm * __restrict, locale_t)
     __attribute__((__format__(__strftime__, 3, 0)));
 #endif
 # 195 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 197 "/usr/include/time.h" 3 4

 typedef struct __state *timezone_t;

 #ifndef __LIBC12_SOURCE__
 time_t time2posix(time_t) __RENAME(__time2posix50);
 time_t posix2time(time_t) __RENAME(__posix2time50);
 time_t timegm(struct tm *) __RENAME(__timegm50);
 time_t timeoff(struct tm *, long) __RENAME(__timeoff50);
 time_t timelocal(struct tm *) __RENAME(__timelocal50);
 struct tm *offtime(const time_t *, long) __RENAME(__offtime50);
 void tzsetwall(void) __RENAME(__tzsetwall50);

 struct tm *offtime_r(const time_t *, long, struct tm *) __RENAME(__offtime_=
 r50);
 struct tm *localtime_rz(timezone_t __restrict, const time_t * __restrict,
     struct tm * __restrict) __RENAME(__localtime_rz50);
 char *ctime_rz(timezone_t __restrict, const time_t *, char *)
     __RENAME(__ctime_rz50);
 time_t mktime_z(timezone_t __restrict, struct tm * __restrict)
     __RENAME(__mktime_z50);
 time_t timelocal_z(timezone_t __restrict, struct tm *)
     __RENAME(__timelocal_z50);
 time_t time2posix_z(timezone_t __restrict, time_t) __RENAME(__time2posix_z5=
 0);
 time_t posix2time_z(timezone_t __restrict, time_t) __RENAME(__posix2time_z5=
 0);
 timezone_t tzalloc(const char *) __RENAME(__tzalloc50);
 void tzfree(timezone_t __restrict) __RENAME(__tzfree50);
 const char *tzgetname(timezone_t __restrict, int) __RENAME(__tzgetname50);
 long tzgetgmtoff(timezone_t __restrict, int) __RENAME(__tzgetgmtoff50);
 #endif
 # 225 "/usr/include/time.h" 3 4

 size_t strftime_lz(timezone_t __restrict, char * __restrict, size_t,
     const char * __restrict, const struct tm * __restrict, locale_t)
     __attribute__((__format__(__strftime__, 4, 0)));
 size_t strftime_z(timezone_t __restrict, char * __restrict, size_t,
     const char * __restrict, const struct tm * __restrict)
     __attribute__((__format__(__strftime__, 4, 0)));
 char *strptime_l(const char * __restrict, const char * __restrict,
     struct tm * __restrict, locale_t);

 #endif /* _NETBSD_SOURCE */
 # 236 "/usr/include/time.h" 3 4

 /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */
 #define TIME_UTC	1	/* time elapsed since epoch */
 int timespec_get(struct timespec *ts, int base);

 __END_DECLS

 #endif /* !_TIME_H_ */
 # 244 "/usr/include/time.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 2 3
 #pragma GCC visibility pop
 # 318 "/usr/include/sys/time.h" 2 3 4

 __BEGIN_DECLS
 #ifndef __LIBC12_SOURCE__
 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200112L || \
     defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 323 "/usr/include/sys/time.h" 3 4
 int	getitimer(int, struct itimerval *) __RENAME(__getitimer50);
 int	gettimeofday(struct timeval * __restrict, void *__restrict)
     __RENAME(__gettimeofday50);
 int	setitimer(int, const struct itimerval * __restrict,
 	    struct itimerval * __restrict) __RENAME(__setitimer50);
 int	utimes(const char *, const struct timeval [2]) __RENAME(__utimes50);
 #endif /* _POSIX_C_SOURCE >=3D 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */
 # 330 "/usr/include/sys/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 332 "/usr/include/sys/time.h" 3 4
 int	adjtime(const struct timeval *, struct timeval *) __RENAME(__adjtime50);
 int	futimes(int, const struct timeval [2]) __RENAME(__futimes50);
 int	lutimes(const char *, const struct timeval [2]) __RENAME(__lutimes50);
 int	settimeofday(const struct timeval * __restrict,
 	    const void *__restrict) __RENAME(__settimeofday50);
 #endif /* _NETBSD_SOURCE */
 # 338 "/usr/include/sys/time.h" 3 4
 #endif /* __LIBC12_SOURCE__ */
 # 339 "/usr/include/sys/time.h" 3 4
 __END_DECLS

 #endif	/* !_STANDALONE */
 # 342 "/usr/include/sys/time.h" 3 4
 #endif /* !_KERNEL */
 # 343 "/usr/include/sys/time.h" 3 4
 #endif /* !_SYS_TIME_H_ */
 # 344 "/usr/include/sys/time.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/sys/time.h" 2 3
 #pragma GCC visibility pop
 # 146 "/usr/include/time.h" 2 3 4
 struct sigevent;
 struct itimerspec;
 int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespe=
 c *);
 #ifndef __LIBC12_SOURCE__
 int clock_getres(clockid_t, struct timespec *)
     __RENAME(__clock_getres50);
 int clock_gettime(clockid_t, struct timespec *)
     __RENAME(__clock_gettime50);
 int clock_settime(clockid_t, const struct timespec *)
     __RENAME(__clock_settime50);
 int nanosleep(const struct timespec *, struct timespec *)
     __RENAME(__nanosleep50);
 int timer_gettime(timer_t, struct itimerspec *) __RENAME(__timer_gettime50);
 int timer_settime(timer_t, int, const struct itimerspec * __restrict,=20
     struct itimerspec * __restrict) __RENAME(__timer_settime50);
 #endif
 # 162 "/usr/include/time.h" 3 4
 #ifdef _NETBSD_SOURCE
 #if 0 /* expanded by -frewrite-includes */
 #include <sys/idtype.h>
 #endif /* expanded by -frewrite-includes */
 # 163 "/usr/include/time.h" 3 4
 # 1 "/usr/include/sys/idtype.h" 1 3 4
 /*	$NetBSD: idtype.h,v 1.5 2016/04/09 17:02:51 riastradh Exp $	*/

 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
  * by Christos Zoulas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMI=
 TED
  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICUL=
 AR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T=
 HE
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _SYS_IDTYPE_H_
 #define _SYS_IDTYPE_H_

 /*
  * Using the solaris constants, some of them are not applicable to us
  * Do not re-order the list, or add elements in the middle as this will
  * break the ABI of the system calls using this.  We set a high private
  * maximum so that new values can be added in the future without
  * changing the width of the type.
  */
 typedef enum {
 	P_MYID =3D -1,	/* Me/my process group */
 	P_ALL,		/* All processes. */
 	P_PID,		/* A process identifier. */
 	P_LWPID,	/* An LWP identifier. */
 	P_PPID,		/* A parent process identifier.	*/
 	P_PGID,		/* A process group identifier. */
 	P_SID,		/* A session identifier. */
 	P_CID,		/* A scheduling class identifier. */
 	P_UID,		/* A user identifier. */
 	P_GID,		/* A group identifier. */
 	P_TASKID,	/* A task identifier. */
 	P_PROJID,	/* A project identifier. */
 	P_POOLID,	/* A pool identifier. */
 	P_ZONEID,	/* A zone identifier. */
 	P_CTID,		/* A (process) contract identifier. */
 	P_CPUID,	/* CPU identifier. */
 	P_PSETID,	/* Processor set identifier. */
 	_P_MAXIDTYPE =3D 0x7fffffff
 } idtype_t;

 #endif /* _SYS_IDTYPE_H_ */
 # 63 "/usr/include/sys/idtype.h" 3 4
 # 164 "/usr/include/time.h" 2 3 4
 int clock_getcpuclockid2(idtype_t, id_t, clockid_t *);
 #endif
 # 166 "/usr/include/time.h" 3 4
 int clock_getcpuclockid(pid_t, clockid_t *);

 int timer_create(clockid_t, struct sigevent * __restrict,
     timer_t * __restrict);
 int timer_delete(timer_t);
 int timer_getoverrun(timer_t);
 #endif /* _POSIX_C_SOURCE >=3D 199309 || _XOPEN_SOURCE >=3D 500 || ... */
 # 173 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 199506L || (_XOPEN_SOURCE - 0) >=3D 500 || \
     defined(_REENTRANT) || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 176 "/usr/include/time.h" 3 4
 char *asctime_r(const struct tm * __restrict, char * __restrict);
 #ifndef __LIBC12_SOURCE__
 char *ctime_r(const time_t *, char *) __RENAME(__ctime_r50);
 struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict)
     __RENAME(__gmtime_r50);
 struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict)
     __RENAME(__localtime_r50);
 #endif
 # 184 "/usr/include/time.h" 3 4
 #endif
 # 185 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if (_POSIX_C_SOURCE - 0) >=3D 200809L || defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 187 "/usr/include/time.h" 3 4
 #  ifndef __LOCALE_T_DECLARED
 typedef struct _locale		*locale_t;
 #  define __LOCALE_T_DECLARED
 #  endif
 # 191 "/usr/include/time.h" 3 4
 size_t strftime_l(char * __restrict, size_t, const char * __restrict,
     const struct tm * __restrict, locale_t)
     __attribute__((__format__(__strftime__, 3, 0)));
 #endif
 # 195 "/usr/include/time.h" 3 4

 #if 0 /* disabled by -frewrite-includes */
 #if defined(_NETBSD_SOURCE)
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 1 /* evaluated by -frewrite-includes */
 # 197 "/usr/include/time.h" 3 4

 typedef struct __state *timezone_t;

 #ifndef __LIBC12_SOURCE__
 time_t time2posix(time_t) __RENAME(__time2posix50);
 time_t posix2time(time_t) __RENAME(__posix2time50);
 time_t timegm(struct tm *) __RENAME(__timegm50);
 time_t timeoff(struct tm *, long) __RENAME(__timeoff50);
 time_t timelocal(struct tm *) __RENAME(__timelocal50);
 struct tm *offtime(const time_t *, long) __RENAME(__offtime50);
 void tzsetwall(void) __RENAME(__tzsetwall50);

 struct tm *offtime_r(const time_t *, long, struct tm *) __RENAME(__offtime_=
 r50);
 struct tm *localtime_rz(timezone_t __restrict, const time_t * __restrict,
     struct tm * __restrict) __RENAME(__localtime_rz50);
 char *ctime_rz(timezone_t __restrict, const time_t *, char *)
     __RENAME(__ctime_rz50);
 time_t mktime_z(timezone_t __restrict, struct tm * __restrict)
     __RENAME(__mktime_z50);
 time_t timelocal_z(timezone_t __restrict, struct tm *)
     __RENAME(__timelocal_z50);
 time_t time2posix_z(timezone_t __restrict, time_t) __RENAME(__time2posix_z5=
 0);
 time_t posix2time_z(timezone_t __restrict, time_t) __RENAME(__posix2time_z5=
 0);
 timezone_t tzalloc(const char *) __RENAME(__tzalloc50);
 void tzfree(timezone_t __restrict) __RENAME(__tzfree50);
 const char *tzgetname(timezone_t __restrict, int) __RENAME(__tzgetname50);
 long tzgetgmtoff(timezone_t __restrict, int) __RENAME(__tzgetgmtoff50);
 #endif
 # 225 "/usr/include/time.h" 3 4

 size_t strftime_lz(timezone_t __restrict, char * __restrict, size_t,
     const char * __restrict, const struct tm * __restrict, locale_t)
     __attribute__((__format__(__strftime__, 4, 0)));
 size_t strftime_z(timezone_t __restrict, char * __restrict, size_t,
     const char * __restrict, const struct tm * __restrict)
     __attribute__((__format__(__strftime__, 4, 0)));
 char *strptime_l(const char * __restrict, const char * __restrict,
     struct tm * __restrict, locale_t);

 #endif /* _NETBSD_SOURCE */
 # 236 "/usr/include/time.h" 3 4

 /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */
 #define TIME_UTC	1	/* time elapsed since epoch */
 int timespec_get(struct timespec *ts, int base);

 __END_DECLS

 #endif /* !_TIME_H_ */
 # 244 "/usr/include/time.h" 3 4
 # 4 "/usr/pkgobj/www/firefox/work/build/dist/system_wrappers/time.h" 2 3
 #pragma GCC visibility pop
 # 17 "src/gl.cc" 2
 #endif
 # 18 "src/gl.cc"

 #ifdef NDEBUG
 #  define debugf(...)
 #else
 # 22 "src/gl.cc"
 #  define debugf(...) printf(__VA_ARGS__)
 #endif
 # 24 "src/gl.cc"

 #ifdef _WIN32
 #  define ALWAYS_INLINE __forceinline
 #else
 # 28 "src/gl.cc"
 #  define ALWAYS_INLINE __attribute__((always_inline)) inline
 #endif
 # 30 "src/gl.cc"

 #define UNREACHABLE __builtin_unreachable()

 #define UNUSED __attribute__((unused))

 #ifdef MOZILLA_CLIENT
 #  define IMPLICIT __attribute__((annotate("moz_implicit")))
 #else
 # 38 "src/gl.cc"
 #  define IMPLICIT
 #endif
 # 40 "src/gl.cc"

 #if 0 /* expanded by -frewrite-includes */
 #include "gl_defs.h"
 #endif /* expanded by -frewrite-includes */
 # 41 "src/gl.cc"
 # 1 "src/gl_defs.h" 1
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 typedef int8_t GLbyte;
 typedef uint8_t GLubyte;
 typedef int16_t GLshort;
 typedef uint16_t GLushort;
 typedef int32_t GLint;
 typedef uint32_t GLuint;
 typedef int64_t GLint64;
 typedef uint64_t GLuint64;

 typedef float GLfloat;
 typedef double GLdouble;

 typedef uint32_t GLenum;
 typedef uint8_t GLboolean;
 typedef uint32_t GLbitfield;

 typedef int32_t GLsizei;
 typedef size_t GLsizeiptr;
 typedef intptr_t GLintptr;

 #define GL_NO_ERROR 0

 #define GL_RGBA32F 0x8814
 #define GL_RGBA8 0x8058
 #define GL_R8 0x8229
 #define GL_RGBA32I 0x8D82
 #define GL_BGRA8 0x93A1
 #define GL_RG8 0x822B

 #define GL_BYTE 0x1400
 #define GL_UNSIGNED_BYTE 0x1401
 #define GL_SHORT 0x1402
 #define GL_UNSIGNED_SHORT 0x1403
 #define GL_INT 0x1404
 #define GL_UNSIGNED_INT 0x1405
 #define GL_FLOAT 0x1406

 #define GL_RED 0x1903
 #define GL_GREEN 0x1904
 #define GL_BLUE 0x1905
 #define GL_ALPHA 0x1906
 #define GL_RGB 0x1907
 #define GL_RGBA 0x1908
 #define GL_RGBA_INTEGER 0x8D99
 #define GL_BGRA 0x80E1
 #define GL_RG 0x8227

 #define GL_DEPTH_COMPONENT 0x1902
 #define GL_DEPTH_COMPONENT16 0x81A5
 #define GL_DEPTH_COMPONENT24 0x81A6
 #define GL_DEPTH_COMPONENT32 0x81A7

 #define GL_ARRAY_BUFFER 0x8892
 #define GL_ELEMENT_ARRAY_BUFFER 0x8893

 #define GL_READ_FRAMEBUFFER 0x8CA8
 #define GL_DRAW_FRAMEBUFFER 0x8CA9
 #define GL_FRAMEBUFFER 0x8D40
 #define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
 #define GL_RENDERBUFFER 0x8D41
 #define GL_COLOR_ATTACHMENT0 0x8CE0
 #define GL_DEPTH_ATTACHMENT 0x8D00
 #define GL_STENCIL_ATTACHMENT 0x8D20
 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
 #define GL_COLOR_BUFFER_BIT 0x00004000
 #define GL_DEPTH_BUFFER_BIT 0x00000100
 #define GL_STENCIL_BUFFER_BIT 0x00000400

 #define GL_PIXEL_PACK_BUFFER 0x88EB
 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
 #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
 #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
 #define GL_UNPACK_ROW_LENGTH 0x0CF2
 #define GL_UNPACK_ALIGNMENT 0x0CF5

 #define GL_QUERY_RESULT 0x8866
 #define GL_QUERY_RESULT_AVAILABLE 0x8867
 #define GL_TIME_ELAPSED 0x88BF
 #define GL_SAMPLES_PASSED 0x8914

 #define GL_NEAREST 0x2600
 #define GL_LINEAR 0x2601
 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
 #define GL_TEXTURE_WRAP_S 0x2802
 #define GL_TEXTURE_WRAP_T 0x2803
 #define GL_TEXTURE_MAG_FILTER 0x2800
 #define GL_TEXTURE_MIN_FILTER 0x2801
 #define GL_CLAMP_TO_EDGE 0x812F
 #define GL_TEXTURE_2D 0x0DE1
 #define GL_TEXTURE_3D 0x806F
 #define GL_TEXTURE_2D_ARRAY 0x8C1A
 #define GL_TEXTURE_RECTANGLE 0x84F5
 #define GL_TEXTURE0 0x84C0
 #define GL_TEXTURE1 0x84C1
 #define GL_TEXTURE2 0x84C2
 #define GL_TEXTURE3 0x84C3
 #define GL_TEXTURE4 0x84C4
 #define GL_TEXTURE5 0x84C5
 #define GL_TEXTURE6 0x84C6
 #define GL_TEXTURE7 0x84C7
 #define GL_TEXTURE8 0x84C8
 #define GL_TEXTURE9 0x84C9
 #define GL_TEXTURE10 0x84CA
 #define GL_TEXTURE11 0x84CB
 #define GL_TEXTURE12 0x84CC
 #define GL_TEXTURE13 0x84CD
 #define GL_TEXTURE14 0x84CE
 #define GL_TEXTURE15 0x84CF
 #define GL_MAX_TEXTURE_UNITS 0x84E2
 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
 #define GL_MAX_TEXTURE_SIZE 0x0D33
 #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF

 #define GL_VERTEX_SHADER 0x8B31
 #define GL_FRAGMENT_SHADER 0x8B30

 #define GL_BLEND 0x0BE2
 #define GL_ZERO 0
 #define GL_ONE 1
 #define GL_SRC_COLOR 0x0300
 #define GL_ONE_MINUS_SRC_COLOR 0x0301
 #define GL_SRC_ALPHA 0x0302
 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
 #define GL_DST_ALPHA 0x0304
 #define GL_ONE_MINUS_DST_ALPHA 0x0305
 #define GL_DST_COLOR 0x0306
 #define GL_ONE_MINUS_DST_COLOR 0x0307
 #define GL_CONSTANT_COLOR 0x8001
 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
 #define GL_CONSTANT_ALPHA 0x8003
 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
 #define GL_SRC1_ALPHA 0x8589
 #define GL_SRC1_COLOR 0x88F9
 #define GL_ONE_MINUS_SRC1_COLOR 0x88FA
 #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB

 #define GL_FUNC_ADD 0x8006

 #define GL_NEVER 0x0200
 #define GL_LESS 0x0201
 #define GL_EQUAL 0x0202
 #define GL_LEQUAL 0x0203
 #define GL_GREATER 0x0204
 #define GL_NOTEQUAL 0x0205
 #define GL_GEQUAL 0x0206
 #define GL_ALWAYS 0x0207
 #define GL_DEPTH_TEST 0x0B71
 #define GL_DEPTH_WRITEMASK 0x0B72

 #define GL_SCISSOR_TEST 0x0C11

 #define GL_VENDOR 0x1F00
 #define GL_RENDERER 0x1F01
 #define GL_VERSION 0x1F02
 #define GL_EXTENSIONS 0x1F03
 #define GL_NUM_EXTENSIONS 0x821D

 #define GL_POINTS 0x0000
 #define GL_LINES 0x0001
 #define GL_LINE_LOOP 0x0002
 #define GL_LINE_STRIP 0x0003
 #define GL_TRIANGLES 0x0004
 #define GL_TRIANGLE_STRIP 0x0005
 #define GL_TRIANGLE_FAN 0x0006
 #define GL_QUADS 0x0007

 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367

 # 42 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "glsl.h"
 #endif /* expanded by -frewrite-includes */
 # 42 "src/gl.cc"
 # 1 "src/glsl.h" 1
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 #define SI ALWAYS_INLINE static

 #if 0 /* expanded by -frewrite-includes */
 #include "vector_type.h"
 #endif /* expanded by -frewrite-includes */
 # 7 "src/glsl.h"
 # 1 "src/vector_type.h" 1
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 #ifdef __clang__
 #  ifdef __SSE2__
 #if 0 /* expanded by -frewrite-includes */
 #    include <xmmintrin.h>
 #endif /* expanded by -frewrite-includes */
 # 7 "src/vector_type.h"
 # 8 "src/vector_type.h"
 #    define USE_SSE2 1
 #  endif
 # 10 "src/vector_type.h"
 #  ifdef __ARM_NEON
 #if 0 /* expanded by -frewrite-includes */
 #    include <arm_neon.h>
 #endif /* expanded by -frewrite-includes */
 # 11 "src/vector_type.h"
 # 12 "src/vector_type.h"
 #    define USE_NEON 1
 #  endif
 # 14 "src/vector_type.h"
 #endif
 # 15 "src/vector_type.h"

 namespace glsl {

 #ifdef __clang__
 template <typename T, int N>
 using VectorType =3D T __attribute__((ext_vector_type(N)));

 #  define CONVERT(vector, type) __builtin_convertvector(vector, type)
 #  define SHUFFLE(a, b, ...) __builtin_shufflevector(a, b, __VA_ARGS__)

 template <typename T>
 SI VectorType<T, 4> combine(VectorType<T, 2> a, VectorType<T, 2> b) {
   return __builtin_shufflevector(a, b, 0, 1, 2, 3);
 }

 template <typename T>
 SI VectorType<T, 8> combine(VectorType<T, 4> a, VectorType<T, 4> b) {
   return __builtin_shufflevector(a, b, 0, 1, 2, 3, 4, 5, 6, 7);
 }

 template <typename T>
 SI VectorType<T, 16> combine(VectorType<T, 8> a, VectorType<T, 8> b) {
   return __builtin_shufflevector(a, b, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11=
 , 12,
                                  13, 14, 15);
 }

 template <typename T>
 SI VectorType<T, 4> lowHalf(VectorType<T, 8> a) {
   return __builtin_shufflevector(a, a, 0, 1, 2, 3);
 }

 template <typename T>
 SI VectorType<T, 4> highHalf(VectorType<T, 8> a) {
   return __builtin_shufflevector(a, a, 4, 5, 6, 7);
 }

 template <typename T>
 SI VectorType<T, 8> lowHalf(VectorType<T, 16> a) {
   return __builtin_shufflevector(a, a, 0, 1, 2, 3, 4, 5, 6, 7);
 }

 template <typename T>
 SI VectorType<T, 8> highHalf(VectorType<T, 16> a) {
   return __builtin_shufflevector(a, a, 8, 9, 10, 11, 12, 13, 14, 15);
 }

 template <typename T>
 SI VectorType<T, 8> expand(VectorType<T, 4> a) {
   return __builtin_shufflevector(a, a, 0, 1, 2, 3, -1, -1, -1, -1);
 }
 #else
 # 66 "src/vector_type.h"
 template <typename T>
 struct VectorMask {
   typedef T type;
 };
 template <>
 struct VectorMask<uint32_t> {
   typedef int32_t type;
 };
 template <>
 struct VectorMask<uint16_t> {
   typedef int16_t type;
 };
 template <>
 struct VectorMask<uint8_t> {
   typedef int8_t type;
 };
 template <>
 struct VectorMask<float> {
   typedef int type;
 };

 template <typename T, int N>
 struct VectorType {
   enum { SIZE =3D N };

   typedef T data_type __attribute__((vector_size(sizeof(T) * N)));
   typedef typename VectorMask<T>::type mask_index;
   typedef mask_index mask_type
       __attribute__((vector_size(sizeof(mask_index) * N)));
   typedef T half_type __attribute__((vector_size(sizeof(T) * (N / 2))));
   union {
     data_type data;
     struct {
       T x, y, z, w;
     };
     T elements[N];
     struct {
       half_type low_half, high_half;
     };
   };

   VectorType() : data{0} { }

   constexpr VectorType(const VectorType& rhs) : data(rhs.data) {}
   // GCC vector extensions only support broadcasting scalars on arithmetic =
 ops,
   // but not on initializers, hence the following...
   constexpr VectorType(T n) : data((data_type){0} + n) {}
   constexpr VectorType(T a, T b, T c, T d) : data{a, b, c, d} {}
   constexpr VectorType(T a, T b, T c, T d, T e, T f, T g, T h)
       : data{a, b, c, d, e, f, g, h} {}
   constexpr VectorType(T a, T b, T c, T d, T e, T f, T g, T h, T i, T j, T =
 k,
                        T l, T m, T n, T o, T p)
       : data{a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p} {}

   SI VectorType wrap(const data_type& data) {
     VectorType v;
     v.data =3D data;
     return v;
   }

   T& operator[](size_t i) { return elements[i]; }
   T operator[](size_t i) const { return elements[i]; }

   template <typename U>
   operator VectorType<U, 2>() const {
     return VectorType<U, 2>::wrap(
         (typename VectorType<U, N>::data_type){U(x), U(y)});
   }
   template <typename U>
   operator VectorType<U, 4>() const {
     return VectorType<U, 4>::wrap(
         (typename VectorType<U, N>::data_type){U(x), U(y), U(z), U(w)});
   }
   template <typename U>
   operator VectorType<U, 8>() const {
     return VectorType<U, 8>::wrap((typename VectorType<U, N>::data_type){
         U(elements[0]), U(elements[1]), U(elements[2]), U(elements[3]),
         U(elements[4]), U(elements[5]), U(elements[6]), U(elements[7])});
   }
   template <typename U>
   operator VectorType<U, 16>() const {
     return VectorType<U, 16>::wrap((typename VectorType<U, N>::data_type){
         U(elements[0]),
         U(elements[1]),
         U(elements[2]),
         U(elements[3]),
         U(elements[4]),
         U(elements[5]),
         U(elements[6]),
         U(elements[7]),
         U(elements[8]),
         U(elements[9]),
         U(elements[10]),
         U(elements[11]),
         U(elements[12]),
         U(elements[13]),
         U(elements[14]),
         U(elements[15]),
     });
   }

   VectorType operator-() const { return wrap(-data); }
   VectorType operator~() const { return wrap(~data); }

   VectorType operator&(VectorType x) const { return wrap(data & x.data); }
   VectorType operator&(T x) const { return wrap(data & x); }
   VectorType operator|(VectorType x) const { return wrap(data | x.data); }
   VectorType operator|(T x) const { return wrap(data | x); }
   VectorType operator^(VectorType x) const { return wrap(data ^ x.data); }
   VectorType operator^(T x) const { return wrap(data ^ x); }
   VectorType operator<<(int x) const { return wrap(data << x); }
   VectorType operator>>(int x) const { return wrap(data >> x); }
   VectorType operator+(VectorType x) const { return wrap(data + x.data); }
   VectorType operator+(T x) const { return wrap(data + x); }
   friend VectorType operator+(T x, VectorType y) { return wrap(x + y.data);=
  }
   VectorType operator-(VectorType x) const { return wrap(data - x.data); }
   VectorType operator-(T x) const { return wrap(data - x); }
   friend VectorType operator-(T x, VectorType y) { return wrap(x - y.data);=
  }
   VectorType operator*(VectorType x) const { return wrap(data * x.data); }
   VectorType operator*(T x) const { return wrap(data * x); }
   friend VectorType operator*(T x, VectorType y) { return wrap(x * y.data);=
  }
   VectorType operator/(VectorType x) const { return wrap(data / x.data); }
   VectorType operator/(T x) const { return wrap(data / x); }
   friend VectorType operator/(T x, VectorType y) { return wrap(x / y.data);=
  }
   VectorType operator%(int x) const { return wrap(data % x); }

   VectorType& operator&=3D(VectorType x) {
     data &=3D x.data;
     return *this;
   }
   VectorType& operator|=3D(VectorType x) {
     data |=3D x.data;
     return *this;
   }
   VectorType& operator^=3D(VectorType x) {
     data ^=3D x.data;
     return *this;
   }
   VectorType& operator<<=3D(int x) {
     data <<=3D x;
     return *this;
   }
   VectorType& operator>>=3D(int x) {
     data >>=3D x;
     return *this;
   }
   VectorType& operator+=3D(VectorType x) {
     data +=3D x.data;
     return *this;
   }
   VectorType& operator-=3D(VectorType x) {
     data -=3D x.data;
     return *this;
   }
   VectorType& operator*=3D(VectorType x) {
     data *=3D x.data;
     return *this;
   }
   VectorType& operator/=3D(VectorType x) {
     data /=3D x.data;
     return *this;
   }
   VectorType& operator%=3D(int x) {
     data %=3D x;
     return *this;
   }

   VectorType<mask_type, N> operator=3D=3D(VectorType x) const {
     return VectorType<mask_type, N>::wrap(data =3D=3D x.data);
   }
   VectorType<mask_type, N> operator!=3D(VectorType x) const {
     return VectorType<mask_type, N>::wrap(data !=3D x.data);
   }
   VectorType<mask_type, N> operator<(VectorType x) const {
     return VectorType<mask_type, N>::wrap(data < x.data);
   }
   VectorType<mask_type, N> operator>(VectorType x) const {
     return VectorType<mask_type, N>::wrap(data > x.data);
   }
   VectorType<mask_type, N> operator<=3D(VectorType x) const {
     return VectorType<mask_type, N>::wrap(data <=3D x.data);
   }
   VectorType<mask_type, N> operator>=3D(VectorType x) const {
     return VectorType<mask_type, N>::wrap(data >=3D x.data);
   }

   VectorType operator!() const { return wrap(!data); }
   VectorType operator&&(VectorType x) const { return wrap(data & x.data); }
   VectorType operator||(VectorType x) const { return wrap(data | x.data); }

   VectorType& operator=3D(VectorType x) {
     data =3D x.data;
     return *this;
   }

   VectorType<T, 4> shuffle(VectorType b, mask_index x, mask_index y,
                            mask_index z, mask_index w) const {
     return VectorType<T, 4>::wrap(__builtin_shuffle(
         data, b.data, (typename VectorType<T, 4>::mask_type){x, y, z, w}));
   }
   VectorType<T, 8> shuffle(VectorType b, mask_index x, mask_index y,
                            mask_index z, mask_index w, mask_index s,
                            mask_index t, mask_index u, mask_index v) const {
     return VectorType<T, 8>::wrap(__builtin_shuffle(
         data, b.data,
         (typename VectorType<T, 8>::mask_type){x, y, z, w, s, t, u, v}));
   }
   VectorType<T, 16> shuffle(VectorType b, mask_index x, mask_index y,
                             mask_index z, mask_index w, mask_index s,
                             mask_index t, mask_index u, mask_index v,
                             mask_index i, mask_index j, mask_index k,
                             mask_index l, mask_index m, mask_index n,
                             mask_index o, mask_index p) const {
     return VectorType<T, 16>::wrap(
         __builtin_shuffle(data, b.data,
                           (typename VectorType<T, 16>::mask_type){
                               x, y, z, w, s, t, u, v, i, j, k, l, m, n, o, =
 p}));
   }

   VectorType<T, 4> swizzle(mask_index x, mask_index y, mask_index z,
                            mask_index w) const {
     return VectorType<T, 4>::wrap(__builtin_shuffle(
         data, (typename VectorType<T, 4>::mask_type){x, y, z, w}));
   }
   VectorType<T, 8> swizzle(mask_index x, mask_index y, mask_index z,
                            mask_index w, mask_index s, mask_index t,
                            mask_index u, mask_index v) const {
     return VectorType<T, 8>::wrap(__builtin_shuffle(
         data, (typename VectorType<T, 8>::mask_type){x, y, z, w, s, t, u, v=
 }));
   }

   SI VectorType wrap(half_type low, half_type high) {
     VectorType v;
     v.low_half =3D low;
     v.high_half =3D high;
     return v;
   }

   VectorType<T, N * 2> combine(VectorType high) const {
     return VectorType<T, N * 2>::wrap(data, high.data);
   }

 #  define xyxy swizzle(0, 1, 0, 1)
 #  define zwzw swizzle(2, 3, 2, 3)
 #  define zyxw swizzle(2, 1, 0, 3)
 #  define xyzz swizzle(0, 1, 2, 2)
 #  define xxxxyyyy XXXXYYYY()
   VectorType<T, 8> XXXXYYYY() const {
     return swizzle(0, 0, 0, 0).combine(swizzle(1, 1, 1, 1));
   }
 #  define zzzzwwww ZZZZWWWW()
   VectorType<T, 8> ZZZZWWWW() const {
     return swizzle(2, 2, 2, 2).combine(swizzle(3, 3, 3, 3));
   }
 #  define xyzwxyzw XYZWXYZW()
   VectorType<T, 8> XYZWXYZW() const { return combine(*this); }
 #  define xyxyxyxy XYXYXYXY()
   VectorType<T, 8> XYXYXYXY() const {
     return swizzle(0, 1, 0, 1).combine(swizzle(0, 1, 0, 1));
   }
 #  define zwzwzwzw ZWZWZWZW()
   VectorType<T, 8> ZWZWZWZW() const {
     return swizzle(2, 3, 2, 3).combine(swizzle(2, 3, 2, 3));
   }
 #  define xxyyzzww XXYYZZWW()
   VectorType<T, 8> XXYYZZWW() const {
     return swizzle(0, 0, 1, 1).combine(swizzle(2, 2, 3, 3));
   }
 };

 template <typename T>
 struct VectorType<T, 2> {
   typedef T data_type __attribute__((vector_size(sizeof(T) * 2)));
   union {
     data_type data;
     struct {
       T x, y;
     };
     T elements[2];
   };
 };

 #  define CONVERT(vector, type) ((type)(vector))
 #  define SHUFFLE(a, b, ...) a.shuffle(b, __VA_ARGS__)

 template <typename T, int N>
 SI VectorType<T, N * 2> combine(VectorType<T, N> a, VectorType<T, N> b) {
   return VectorType<T, N * 2>::wrap(a.data, b.data);
 }

 template <typename T, int N>
 SI VectorType<T, N / 2> lowHalf(VectorType<T, N> a) {
   return VectorType<T, N / 2>::wrap(a.low_half);
 }

 template <typename T, int N>
 SI VectorType<T, N / 2> highHalf(VectorType<T, N> a) {
   return VectorType<T, N / 2>::wrap(a.high_half);
 }

 template <typename T, int N>
 SI VectorType<T, N * 2> expand(VectorType<T, N> a) {
   return combine(a, a);
 }
 #endif
 # 371 "src/vector_type.h"

 template <typename T>
 SI VectorType<T, 4> zipLow(VectorType<T, 4> a, VectorType<T, 4> b) {
   return SHUFFLE(a, b, 0, 4, 1, 5);
 }

 template <typename T>
 SI VectorType<T, 4> zipHigh(VectorType<T, 4> a, VectorType<T, 4> b) {
   return SHUFFLE(a, b, 2, 6, 3, 7);
 }

 template <typename T>
 SI VectorType<T, 8> zipLow(VectorType<T, 8> a, VectorType<T, 8> b) {
   return SHUFFLE(a, b, 0, 8, 1, 9, 2, 10, 3, 11);
 }

 template <typename T>
 SI VectorType<T, 8> zipHigh(VectorType<T, 8> a, VectorType<T, 8> b) {
   return SHUFFLE(a, b, 4, 12, 5, 13, 6, 14, 7, 15);
 }

 template <typename T>
 SI VectorType<T, 16> zipLow(VectorType<T, 16> a, VectorType<T, 16> b) {
   return SHUFFLE(a, b, 0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, =
 23);
 }

 template <typename T>
 SI VectorType<T, 16> zipHigh(VectorType<T, 16> a, VectorType<T, 16> b) {
   return SHUFFLE(a, b, 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29=
 , 30,
                  31);
 }

 template <typename T>
 SI VectorType<T, 8> zip2Low(VectorType<T, 8> a, VectorType<T, 8> b) {
   return SHUFFLE(a, b, 0, 1, 8, 9, 2, 3, 10, 11);
 }

 template <typename T>
 SI VectorType<T, 8> zip2High(VectorType<T, 8> a, VectorType<T, 8> b) {
   return SHUFFLE(a, b, 4, 5, 12, 13, 6, 7, 14, 15);
 }

 #ifdef __clang__
 template <typename T>
 SI VectorType<T, 8> zip(VectorType<T, 4> a, VectorType<T, 4> b) {
   return SHUFFLE(a, b, 0, 4, 1, 5, 2, 6, 3, 7);
 }

 template <typename T>
 SI VectorType<T, 16> zip(VectorType<T, 8> a, VectorType<T, 8> b) {
   return SHUFFLE(a, b, 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15=
 );
 }
 #else
 # 424 "src/vector_type.h"
 template <typename T, int N>
 SI VectorType<T, N * 2> zip(VectorType<T, N> a, VectorType<T, N> b) {
   return combine(zipLow(a, b), zipHigh(a, b));
 }
 #endif
 # 429 "src/vector_type.h"

 template <typename T>
 struct Unaligned {
   template <typename P>
   SI T load(const P* p) {
     T v;
     memcpy(&v, p, sizeof(v));
     return v;
   }

   template <typename P>
   SI void store(P* p, T v) {
     memcpy(p, &v, sizeof(v));
   }
 };

 #ifndef __clang__
 template <typename T, int N>
 struct Unaligned<VectorType<T, N>> {
   template <typename P>
   SI VectorType<T, N> load(const P* p) {
     VectorType<T, N> v;
     memcpy(v.elements, p, sizeof(v));
     return v;
   }

   template <typename P>
   SI void store(P* p, VectorType<T, N> v) {
     memcpy(p, v.elements, sizeof(v));
   }
 };
 #endif
 # 461 "src/vector_type.h"

 template <typename T, typename P>
 SI T unaligned_load(const P* p) {
   return Unaligned<T>::load(p);
 }

 template <typename T, typename P>
 SI void unaligned_store(P* p, T v) {
   Unaligned<T>::store(p, v);
 }

 template <typename D, typename S>
 SI D bit_cast(const S& src) {
   static_assert(sizeof(D) =3D=3D sizeof(S), "");
   return unaligned_load<D>(&src);
 }

 template <typename T>
 using V2 =3D VectorType<T, 2>;
 template <typename T>
 using V4 =3D VectorType<T, 4>;
 using Float =3D V4<float>;
 using I32 =3D V4<int32_t>;
 using I16 =3D V4<int16_t>;
 using U64 =3D V4<uint64_t>;
 using U32 =3D V4<uint32_t>;
 using U16 =3D V4<uint16_t>;
 using U8 =3D V4<uint8_t>;
 using Bool =3D V4<int>;
 template <typename T>
 using V8 =3D VectorType<T, 8>;
 template <typename T>
 using V16 =3D VectorType<T, 16>;

 }  // namespace glsl
 # 8 "src/glsl.h" 2

 namespace glsl {

 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 12 "src/glsl.h"
 SI bool test_all(Bool cond) { return _mm_movemask_ps(cond) =3D=3D 0xF; }
 SI bool test_any(Bool cond) { return _mm_movemask_ps(cond) !=3D 0; }
 SI bool test_none(Bool cond) { return _mm_movemask_ps(cond) =3D=3D 0; }
 #else
 # 16 "src/glsl.h"
 SI bool test_all(Bool cond) {
   return bit_cast<uint32_t>(CONVERT(cond, U8)) =3D=3D 0xFFFFFFFFU;
 }
 SI bool test_any(Bool cond) { return bit_cast<uint32_t>(CONVERT(cond, U8)) =
 !=3D 0; }
 SI bool test_none(Bool cond) { return bit_cast<uint32_t>(CONVERT(cond, U8))=
  =3D=3D 0; }
 #endif
 # 22 "src/glsl.h"

 float make_float(float n) { return n; }

 float make_float(int32_t n) { return float(n); }

 float make_float(uint32_t n) { return float(n); }

 float make_float(bool n) { return float(n); }

 template <typename T>
 Float make_float(T v) {
   return CONVERT(v, Float);
 }

 int32_t make_int(uint32_t n) { return n; }

 int32_t make_int(int32_t n) { return n; }

 int32_t make_int(float n) { return int32_t(n); }

 int32_t make_int(bool n) { return int32_t(n); }

 template <typename T>
 I32 make_int(T v) {
   return CONVERT(v, I32);
 }

 uint32_t make_uint(uint32_t n) { return n; }

 uint32_t make_uint(int32_t n) { return n; }

 uint32_t make_uint(float n) { return uint32_t(n); }

 uint32_t make_uint(bool n) { return uint32_t(n); }

 template <typename T>
 U32 make_uint(T v) {
   return CONVERT(v, U32);
 }

 template <typename T>
 T force_scalar(T n) {
   return n;
 }

 float force_scalar(Float f) { return f[0]; }

 int32_t force_scalar(I32 i) { return i[0]; }

 struct vec4;
 struct ivec2;

 SI int32_t if_then_else(int32_t c, int32_t t, int32_t e) { return c ? t : e=
 ; }

 SI float if_then_else(int32_t c, float t, float e) { return c ? t : e; }

 SI Float if_then_else(I32 c, float t, float e) {
   return bit_cast<Float>((c & bit_cast<I32>(Float(t))) | (~c & bit_cast<I32=
 >(Float(e))));
 }

 SI I32 if_then_else(I32 c, int32_t t, int32_t e) {
   return (c & I32(t)) | (~c & I32(e));
 }

 SI Float if_then_else(I32 c, Float t, Float e) {
   return bit_cast<Float>((c & bit_cast<I32>(t)) | (~c & bit_cast<I32>(e)));
 }

 SI Float if_then_else(int32_t c, Float t, Float e) { return c ? t : e; }

 SI Bool if_then_else(I32 c, Bool t, Bool e) { return (c & t) | (~c & e); }

 SI Bool if_then_else(int32_t c, Bool t, Bool e) { return c ? t : e; }

 template <typename T> SI void swap(T& a, T& b) {
   T t(a);
   a =3D b;
   b =3D t;
 }

 SI int32_t min(int32_t a, int32_t b) { return a < b ? a : b; }
 SI int32_t max(int32_t a, int32_t b) { return a > b ? a : b; }

 SI int32_t clamp(int32_t a, int32_t minVal, int32_t maxVal) {
   return min(max(a, minVal), maxVal);
 }

 SI float min(float a, float b) { return a < b ? a : b; }
 SI float max(float a, float b) { return a > b ? a : b; }

 SI float clamp(float a, float minVal, float maxVal) {
   return min(max(a, minVal), maxVal);
 }

 SI Float min(Float a, Float b) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 118 "src/glsl.h"
   return _mm_min_ps(a, b);
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 120 "src/glsl.h"
   return vminq_f32(a, b);
 #else
 # 122 "src/glsl.h"
   return if_then_else(a < b, a, b);
 #endif
 # 124 "src/glsl.h"
 }

 SI Float max(Float a, Float b) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 128 "src/glsl.h"
   return _mm_max_ps(a, b);
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 130 "src/glsl.h"
   return vmaxq_f32(a, b);
 #else
 # 132 "src/glsl.h"
   return if_then_else(a > b, a, b);
 #endif
 # 134 "src/glsl.h"
 }

 SI Float clamp(Float a, Float minVal, Float maxVal) {
   return min(max(a, minVal), maxVal);
 }

 #define sqrt __glsl_sqrt

 SI float sqrt(float x) { return sqrtf(x); }

 SI Float sqrt(Float v) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 146 "src/glsl.h"
   return _mm_sqrt_ps(v);
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 148 "src/glsl.h"
   Float e =3D vrsqrteq_f32(v);
   e *=3D vrsqrtsq_f32(v, e * e);
   e *=3D vrsqrtsq_f32(v, e * e);
   return v * e;
 #else
 # 153 "src/glsl.h"
   return (Float){sqrtf(v.x), sqrtf(v.y), sqrtf(v.z), sqrtf(v.w)};
 #endif
 # 155 "src/glsl.h"
 }

 SI float inversesqrt(float x) { return 1.0f / sqrtf(x); }

 SI Float inversesqrt(Float v) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 161 "src/glsl.h"
   return _mm_rsqrt_ps(v);
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 163 "src/glsl.h"
   Float e =3D vrsqrteq_f32(v);
   return vrsqrtsq_f32(v, e * e) * e;
 #else
 # 166 "src/glsl.h"
   return 1.0f / sqrt(v);
 #endif
 # 168 "src/glsl.h"
 }

 SI float step(float edge, float x) { return float(x >=3D edge); }

 SI Float step(Float edge, Float x) {
   return if_then_else(x < edge, Float(0), Float(1));
 }

 /*
 enum RGBA {
         R,
         G,
         B,
         A
 };*/

 enum XYZW {
   X =3D 0,
   Y =3D 1,
   Z =3D 2,
   W =3D 3,
   R =3D 0,
   G =3D 1,
   B =3D 2,
   A =3D 3,
 };

 struct bvec2_scalar {
   bool x;
   bool y;

   bvec2_scalar() : bvec2_scalar(false) {}
   constexpr bvec2_scalar(bool a) : x(a), y(a) {}
   constexpr bvec2_scalar(bool x, bool y) : x(x), y(y) {}
 };

 struct bvec2 {
   bvec2() : bvec2(0) {}
   bvec2(Bool a) : x(a), y(a) {}
   bvec2(Bool x, Bool y) : x(x), y(y) {}
   Bool& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   Bool sel(XYZW c1) { return select(c1); }

   bvec2 operator~() { return bvec2(~x, ~y); }

   Bool x;
   Bool y;
 };

 bvec2_scalar make_bvec2(bool n) { return bvec2_scalar{n, n}; }

 bvec2_scalar make_bvec2(bool x, bool y) { return bvec2_scalar{x, y}; }

 template <typename N>
 bvec2 make_bvec2(const N& n) {
   return bvec2(n);
 }

 template <typename X, typename Y>
 bvec2 make_bvec2(const X& x, const Y& y) {
   return bvec2(x, y);
 }

 struct vec4_scalar;

 struct vec2_scalar {
   typedef struct vec2 vector_type;
   typedef float element_type;

   float x;
   float y;

   constexpr vec2_scalar() : vec2_scalar(0.0f) {}
   constexpr vec2_scalar(float a) : x(a), y(a) {}
   constexpr vec2_scalar(int a) : x(a), y(a) {}
   constexpr vec2_scalar(float x, float y) : x(x), y(y) {}

   float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   float& sel(XYZW c1) { return select(c1); }
   vec2_scalar sel(XYZW c1, XYZW c2) {
     return vec2_scalar(select(c1), select(c2));
   }
   vec4_scalar sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4);

   friend bool operator=3D=3D(const vec2_scalar& l, const vec2_scalar& r) {
     return l.x =3D=3D r.x && l.y =3D=3D r.y;
   }

   friend bool operator!=3D(const vec2_scalar& l, const vec2_scalar& r) {
     return l.x !=3D r.x || l.y !=3D r.y;
   }

   friend vec2_scalar operator*(float a, vec2_scalar b) {
     return vec2_scalar(a * b.x, a * b.y);
   }
   friend vec2_scalar operator*(vec2_scalar a, float b) {
     return vec2_scalar(a.x * b, a.y * b);
   }
   friend vec2_scalar operator*(vec2_scalar a, vec2_scalar b) {
     return vec2_scalar(a.x * b.x, a.y * b.y);
   }
   friend vec2_scalar operator/(vec2_scalar a, vec2_scalar b) {
     return vec2_scalar(a.x / b.x, a.y / b.y);
   }

   friend vec2_scalar operator-(vec2_scalar a, vec2_scalar b) {
     return vec2_scalar(a.x - b.x, a.y - b.y);
   }
   friend vec2_scalar operator+(vec2_scalar a, vec2_scalar b) {
     return vec2_scalar(a.x + b.x, a.y + b.y);
   }
   friend vec2_scalar operator+(vec2_scalar a, float b) {
     return vec2_scalar(a.x + b, a.y + b);
   }

   vec2_scalar operator-() { return vec2_scalar(-x, -y); }

   vec2_scalar operator*=3D(vec2_scalar a) {
     x *=3D a.x;
     y *=3D a.y;
     return *this;
   }

   vec2_scalar operator+=3D(vec2_scalar a) {
     x +=3D a.x;
     y +=3D a.y;
     return *this;
   }

   vec2_scalar operator-=3D(vec2_scalar a) {
     x -=3D a.x;
     y -=3D a.y;
     return *this;
   }
 };

 struct vec2_scalar_ref {
   vec2_scalar_ref(float& x, float& y) : x(x), y(y) {}
   float& x;
   float& y;

   float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   float& sel(XYZW c1) { return select(c1); }

   vec2_scalar_ref& operator=3D(const vec2_scalar& a) {
     x =3D a.x;
     y =3D a.y;
     return *this;
   }
   vec2_scalar_ref& operator*=3D(vec2_scalar a) {
     x *=3D a.x;
     y *=3D a.y;
     return *this;
   }
   operator vec2_scalar() const { return vec2_scalar{x, y}; }
 };

 struct vec2 {
   typedef struct vec2 vector_type;
   typedef float element_type;

   constexpr vec2() : vec2(Float(0.0f)) {}
   constexpr vec2(Float a) : x(a), y(a) {}
   vec2(Float x, Float y) : x(x), y(y) {}
   constexpr vec2(vec2_scalar s) : x(s.x), y(s.y) {}
   constexpr vec2(vec2_scalar s0, vec2_scalar s1, vec2_scalar s2, vec2_scala=
 r s3)
       : x(Float{s0.x, s1.x, s2.x, s3.x}), y(Float{s0.y, s1.y, s2.y, s3.y}) =
 {}
   vec2(ivec2 a);
   Float x;
   Float y;

   Float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   Float& sel(XYZW c1) { return select(c1); }
   vec2 sel(XYZW c1, XYZW c2) { return vec2(select(c1), select(c2)); }

   vec4 sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4);

   vec2 operator*=3D(Float a) {
     x *=3D a;
     y *=3D a;
     return *this;
   }
   vec2 operator*=3D(vec2 a) {
     x *=3D a.x;
     y *=3D a.y;
     return *this;
   }

   vec2 operator/=3D(Float a) {
     x /=3D a;
     y /=3D a;
     return *this;
   }
   vec2 operator/=3D(vec2 a) {
     x /=3D a.x;
     y /=3D a.y;
     return *this;
   }

   vec2 operator+=3D(vec2 a) {
     x +=3D a.x;
     y +=3D a.y;
     return *this;
   }
   vec2 operator-=3D(vec2 a) {
     x -=3D a.x;
     y -=3D a.y;
     return *this;
   }
   vec2 operator-=3D(Float a) {
     x -=3D a;
     y -=3D a;
     return *this;
   }

   vec2 operator-() { return vec2(-x, -y); }

   friend I32 operator=3D=3D(const vec2& l, const vec2& r) {
     return l.x =3D=3D r.x && l.y =3D=3D r.y;
   }

   friend I32 operator!=3D(const vec2& l, const vec2& r) {
     return l.x !=3D r.x || l.y !=3D r.y;
   }

   friend vec2 operator*(vec2 a, Float b) { return vec2(a.x * b, a.y * b); }
   friend vec2 operator*(vec2 a, vec2 b) { return vec2(a.x * b.x, a.y * b.y)=
 ; }
   friend vec2 operator*(Float a, vec2 b) { return vec2(a * b.x, a * b.y); }

   friend vec2 operator/(vec2 a, vec2 b) { return vec2(a.x / b.x, a.y / b.y)=
 ; }
   friend vec2 operator/(vec2 a, Float b) { return vec2(a.x / b, a.y / b); }

   friend vec2 operator-(vec2 a, vec2 b) { return vec2(a.x - b.x, a.y - b.y)=
 ; }
   friend vec2 operator-(vec2 a, Float b) { return vec2(a.x - b, a.y - b); }
   friend vec2 operator-(Float a, vec2 b) { return vec2(a - b.x, a - b.y); }
   friend vec2 operator+(vec2 a, vec2 b) { return vec2(a.x + b.x, a.y + b.y)=
 ; }
   friend vec2 operator+(vec2 a, Float b) { return vec2(a.x + b, a.y + b); }
   friend vec2 operator+(Float a, vec2 b) { return vec2(a + b.x, a + b.y); }
 };

 vec2_scalar force_scalar(const vec2& v) {
   return vec2_scalar{force_scalar(v.x), force_scalar(v.y)};
 }

 vec2_scalar make_vec2(float n) { return vec2_scalar{n, n}; }

 vec2_scalar make_vec2(float x, float y) { return vec2_scalar{x, y}; }

 vec2_scalar make_vec2(int32_t x, int32_t y) {
   return vec2_scalar{float(x), float(y)};
 }

 template <typename N>
 vec2 make_vec2(const N& n) {
   return vec2(n);
 }

 template <typename X, typename Y>
 vec2 make_vec2(const X& x, const Y& y) {
   return vec2(x, y);
 }

 vec2 operator*(vec2_scalar a, Float b) { return vec2(a.x * b, a.y * b); }

 vec2 operator*(Float a, vec2_scalar b) { return vec2(a * b.x, a * b.y); }

 SI vec2 min(vec2 a, vec2 b) { return vec2(min(a.x, b.x), min(a.y, b.y)); }

 SI vec2_scalar min(vec2_scalar a, vec2_scalar b) {
   return vec2_scalar{min(a.x, b.x), min(a.y, b.y)};
 }

 SI vec2 if_then_else(I32 c, vec2 t, vec2 e) {
   return vec2(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y));
 }

 SI vec2 if_then_else(int32_t c, vec2 t, vec2 e) { return c ? t : e; }

 vec2 step(vec2 edge, vec2 x) {
   return vec2(step(edge.x, x.x), step(edge.y, x.y));
 }

 vec2 max(vec2 a, vec2 b) { return vec2(max(a.x, b.x), max(a.y, b.y)); }
 vec2 max(vec2 a, Float b) { return vec2(max(a.x, b), max(a.y, b)); }

 SI vec2_scalar max(vec2_scalar a, vec2_scalar b) {
   return vec2_scalar{max(a.x, b.x), max(a.y, b.y)};
 }
 SI vec2_scalar max(vec2_scalar a, float b) {
   return vec2_scalar{max(a.x, b), max(a.y, b)};
 }

 Float length(vec2 a) { return sqrt(a.x * a.x + a.y * a.y); }

 float length(vec2_scalar a) { return hypotf(a.x, a.y); }

 SI Float distance(vec2 a, vec2 b) { return length(a - b); }

 SI vec2 normalize(vec2 a) { return a / length(a); }

 #define abs __glsl_abs

 int32_t abs(int32_t a) { return a < 0 ? -a : a; }

 float abs(float a) { return fabsf(a); }

 Float abs(Float v) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 512 "src/glsl.h"
   return vabsq_f32(v);
 #else
 # 514 "src/glsl.h"
   return bit_cast<Float>(bit_cast<I32>(v) & bit_cast<I32>(0.0f - v));
 #endif
 # 516 "src/glsl.h"
 }

 Float cast(U32 v) { return CONVERT((I32)v, Float); }
 Float cast(I32 v) { return CONVERT((I32)v, Float); }
 I32 cast(Float v) { return CONVERT(v, I32); }

 #define floor __glsl_floor

 float floor(float a) { return floorf(a); }

 Float floor(Float v) {
   Float roundtrip =3D cast(cast(v));
   return roundtrip - if_then_else(roundtrip > v, Float(1), Float(0));
 }

 vec2 floor(vec2 v) { return vec2(floor(v.x), floor(v.y)); }

 vec2_scalar floor(vec2_scalar v) {
   return vec2_scalar{floorf(v.x), floorf(v.y)};
 }

 #define ceil __glsl_ceil

 float ceil(float a) { return ceilf(a); }

 Float ceil(Float v) {
   Float roundtrip =3D cast(cast(v));
   return roundtrip + if_then_else(roundtrip < v, Float(1), Float(0));
 }

 // Round to nearest even
 SI int32_t roundeven(float v, float scale) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 549 "src/glsl.h"
   return _mm_cvtss_si32(_mm_set_ss(v * scale));
 #else
 # 551 "src/glsl.h"
   return bit_cast<int32_t>(v * scale + float(0xC00000)) - 0x4B400000;
 #endif
 # 553 "src/glsl.h"
 }

 SI I32 roundeven(Float v, Float scale) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 557 "src/glsl.h"
   return _mm_cvtps_epi32(v * scale);
 #else
 # 559 "src/glsl.h"
   // Magic number implementation of round-to-nearest-even
   // see http://stereopsis.com/sree/fpu2006.html
   return bit_cast<I32>(v * scale + Float(0xC00000)) - 0x4B400000;
 #endif
 # 563 "src/glsl.h"
 }

 // Round towards zero
 SI int32_t roundzero(float v, float scale) { return int32_t(v * scale); }

 SI I32 roundzero(Float v, Float scale) { return cast(v * scale); }

 // Round whichever direction is fastest for positive numbers
 SI I32 roundfast(Float v, Float scale) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 573 "src/glsl.h"
   return _mm_cvtps_epi32(v * scale);
 #else
 # 575 "src/glsl.h"
   return cast(v * scale + 0.5f);
 #endif
 # 577 "src/glsl.h"
 }

 template <typename T> SI auto round_pixel(T v) { return roundfast(v, 255.0f=
 ); }

 #define round __glsl_round

 float round(float a) { return roundf(a); }

 float fract(float a) { return a - floor(a); }

 Float round(Float v) { return floor(v + 0.5f); }

 Float fract(Float v) { return v - floor(v); }

 // X derivatives can be approximated by dFdx(x) =3D x[1] - x[0].
 // Y derivatives are not easily available since we operate in terms of X sp=
 ans
 // only. To work around, assume dFdy(p.x) =3D dFdx(p.y), which only holds f=
 or
 // uniform scaling, and thus abs(dFdx(p.x)) + abs(dFdy(p.x)) =3D abs(dFdx(p=
 =2Ex)) +
 // abs(dFdx(p.y)) which mirrors abs(dFdx(p.y)) + abs(dFdy(p.y)) =3D abs(dFd=
 x(p.y))
 // + abs(dFdx(p.x)).
 vec2 fwidth(vec2 p) {
   Float d =3D abs(SHUFFLE(p.x, p.y, 1, 1, 5, 5) - SHUFFLE(p.x, p.y, 0, 0, 4=
 , 4));
   return vec2(d.xyxy + d.zwzw);
 }

 // See
 // http://www.machinedlearnings.com/2011/06/fast-approximate-logarithm-expo=
 nential.html.
 Float approx_log2(Float x) {
   // e - 127 is a fair approximation of log2(x) in its own right...
   Float e =3D cast(bit_cast<U32>(x)) * (1.0f / (1 << 23));

   // ... but using the mantissa to refine its error is _much_ better.
   Float m =3D bit_cast<Float>((bit_cast<U32>(x) & 0x007fffff) | 0x3f000000);
   return e - 124.225514990f - 1.498030302f * m -
          1.725879990f / (0.3520887068f + m);
 }

 Float approx_pow2(Float x) {
   Float f =3D fract(x);
   return bit_cast<Float>(
       roundfast(1.0f * (1 << 23), x + 121.274057500f - 1.490129070f * f +
                                       27.728023300f / (4.84252568f - f)));
 }

 #define pow __glsl_pow

 SI float pow(float x, float y) { return powf(x, y); }

 Float pow(Float x, Float y) {
   return if_then_else((x =3D=3D 0) | (x =3D=3D 1), x, approx_pow2(approx_lo=
 g2(x) * y));
 }

 #define exp __glsl_exp

 SI float exp(float x) { return expf(x); }

 Float exp(Float y) {
   float l2e =3D 1.4426950408889634074f;
   return approx_pow2(l2e * y);
 }

 struct ivec4;

 struct ivec2_scalar {
   typedef int32_t element_type;

   int32_t x;
   int32_t y;

   ivec2_scalar() : ivec2_scalar(0) {}
   constexpr ivec2_scalar(int32_t a) : x(a), y(a) {}
   constexpr ivec2_scalar(int32_t x, int32_t y) : x(x), y(y) {}

   int32_t& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   int32_t& sel(XYZW c1) { return select(c1); }
   ivec2_scalar sel(XYZW c1, XYZW c2) {
     return ivec2_scalar{select(c1), select(c2)};
   }

   ivec2_scalar& operator+=3D(ivec2_scalar a) {
     x +=3D a.x;
     y +=3D a.y;
     return *this;
   }
   ivec2_scalar& operator+=3D(int n) {
     x +=3D n;
     y +=3D n;
     return *this;
   }

   ivec2_scalar& operator>>=3D(int shift) {
     x >>=3D shift;
     y >>=3D shift;
     return *this;
   }

   friend ivec2_scalar operator&(ivec2_scalar a, int b) {
     return ivec2_scalar{a.x & b, a.y & b};
   }

   friend ivec2_scalar operator+(ivec2_scalar a, ivec2_scalar b) {
     return ivec2_scalar{a.x + b.x, a.y + b.y};
   }
 };

 struct ivec2 {
   typedef int32_t element_type;

   ivec2() : ivec2(I32(0)) {}
   ivec2(I32 a) : x(a), y(a) {}
   ivec2(I32 x, I32 y) : x(x), y(y) {}
   ivec2(vec2 a) : x(cast(a.x)), y(cast(a.y)) {}
   ivec2(U32 x, U32 y) : x(CONVERT(x, I32)), y(CONVERT(y, I32)) {}
   constexpr ivec2(ivec2_scalar s) : x(s.x), y(s.y) {}
   constexpr ivec2(ivec2_scalar s0, ivec2_scalar s1, ivec2_scalar s2,
                   ivec2_scalar s3)
       : x(I32{s0.x, s1.x, s2.x, s3.x}), y(I32{s0.y, s1.y, s2.y, s3.y}) {}
   I32 x;
   I32 y;

   I32& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   I32& sel(XYZW c1) { return select(c1); }

   ivec2 sel(XYZW c1, XYZW c2) { return ivec2(select(c1), select(c2)); }

   ivec4 sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4);

   ivec2& operator*=3D(I32 a) {
     x *=3D a;
     y *=3D a;
     return *this;
   }
   ivec2& operator+=3D(ivec2 a) {
     x +=3D a.x;
     y +=3D a.y;
     return *this;
   }
   ivec2& operator>>=3D(int shift) {
     x >>=3D shift;
     y >>=3D shift;
     return *this;
   }

   friend ivec2 operator*(ivec2 a, I32 b) { return ivec2(a.x * b, a.y * b); }
   friend ivec2 operator&(ivec2 a, ivec2 b) {
     return ivec2(a.x & b.x, a.y & b.y);
   }
   friend ivec2 operator&(ivec2 a, I32 b) { return ivec2(a.x & b, a.y & b); }
   friend ivec2 operator+(ivec2 a, ivec2 b) {
     return ivec2(a.x + b.x, a.y + b.y);
   }
 };

 vec2::vec2(ivec2 a) : x(cast(a.x)), y(cast(a.y)) {}

 ivec2_scalar make_ivec2(int32_t n) { return ivec2_scalar{n, n}; }

 ivec2_scalar make_ivec2(uint32_t n) {
   return ivec2_scalar{int32_t(n), int32_t(n)};
 }

 ivec2_scalar make_ivec2(int32_t x, int32_t y) { return ivec2_scalar{x, y}; }

 ivec2_scalar make_ivec2(uint32_t x, uint32_t y) {
   return ivec2_scalar{int32_t(x), int32_t(y)};
 }

 vec2_scalar make_vec2(const ivec2_scalar& v) {
   return vec2_scalar{float(v.x), float(v.y)};
 }

 ivec2_scalar make_ivec2(const vec2_scalar& v) {
   return ivec2_scalar{int32_t(v.x), int32_t(v.y)};
 }

 template <typename N>
 ivec2 make_ivec2(const N& n) {
   return ivec2(n);
 }

 template <typename X, typename Y>
 ivec2 make_ivec2(const X& x, const Y& y) {
   return ivec2(x, y);
 }

 ivec2_scalar force_scalar(const ivec2& v) {
   return ivec2_scalar{force_scalar(v.x), force_scalar(v.y)};
 }

 struct ivec3_scalar {
   int32_t x;
   int32_t y;
   int32_t z;

   ivec3_scalar() : ivec3_scalar(0) {}
   constexpr ivec3_scalar(int32_t a) : x(a), y(a), z(a) {}
   constexpr ivec3_scalar(int32_t x, int32_t y, int32_t z) : x(x), y(y), z(z=
 ) {}

   int32_t& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       default:
         UNREACHABLE;
     }
   }
   int32_t& sel(XYZW c1) { return select(c1); }
   ivec2_scalar sel(XYZW c1, XYZW c2) {
     return ivec2_scalar{select(c1), select(c2)};
   }
 };

 struct ivec3 {
   ivec3() : ivec3(0) {}
   ivec3(I32 a) : x(a), y(a), z(a) {}
   ivec3(I32 x, I32 y, I32 z) : x(x), y(y), z(z) {}
   ivec3(ivec2 a, I32 b) : x(a.x), y(a.y), z(b) {}
   ivec3(vec2 a, Float b) : x(cast(a.x)), y(cast(a.y)), z(cast(b)) {}
   I32 x;
   I32 y;
   I32 z;

   friend ivec3 operator+(ivec3 a, ivec3 b) {
     return ivec3(a.x + b.x, a.y + b.y, a.z + b.z);
   }
 };

 vec2_scalar make_vec2(ivec3_scalar s) {
   return vec2_scalar{float(s.x), float(s.y)};
 }

 ivec3_scalar make_ivec3(int32_t n) { return ivec3_scalar{n, n, n}; }

 ivec3_scalar make_ivec3(const ivec2_scalar& v, int32_t z) {
   return ivec3_scalar{v.x, v.y, z};
 }

 ivec3_scalar make_ivec3(int32_t x, int32_t y, int32_t z) {
   return ivec3_scalar{x, y, z};
 }

 template <typename N>
 ivec3 make_ivec3(const N& n) {
   return ivec3(n);
 }

 template <typename X, typename Y>
 ivec3 make_ivec3(const X& x, const Y& y) {
   return ivec3(x, y);
 }

 template <typename X, typename Y, typename Z>
 ivec3 make_ivec3(const X& x, const Y& y, const Z& z) {
   return ivec3(x, y, z);
 }

 struct ivec4_scalar {
   typedef int32_t element_type;

   int32_t x;
   int32_t y;
   int32_t z;
   int32_t w;

   ivec4_scalar() : ivec4_scalar(0) {}
   constexpr ivec4_scalar(int32_t a) : x(a), y(a), z(a), w(a) {}
   constexpr ivec4_scalar(int32_t x, int32_t y, int32_t z, int32_t w)
       : x(x), y(y), z(z), w(w) {}

   int32_t& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       case W:
         return w;
       default:
         UNREACHABLE;
     }
   }
   int32_t& sel(XYZW c1) { return select(c1); }
   ivec2_scalar sel(XYZW c1, XYZW c2) {
     return ivec2_scalar{select(c1), select(c2)};
   }

   friend ivec4_scalar operator&(int32_t a, ivec4_scalar b) {
     return ivec4_scalar{a & b.x, a & b.y, a & b.z, a & b.w};
   }
 };

 struct ivec4 {
   typedef int32_t element_type;

   ivec4() : ivec4(I32(0)) {}
   ivec4(I32 a) : x(a), y(a), z(a), w(a) {}
   ivec4(I32 x, I32 y, I32 z, I32 w) : x(x), y(y), z(z), w(w) {}
   ivec4(ivec2 a, I32 b, I32 c) : x(a.x), y(a.y), z(b), w(c) {}
   constexpr ivec4(ivec4_scalar s) : x(s.x), y(s.y), z(s.z), w(s.w) {}
   constexpr ivec4(ivec4_scalar s0, ivec4_scalar s1, ivec4_scalar s2,
                   ivec4_scalar s3)
       : x(I32{s0.x, s1.x, s2.x, s3.x}),
         y(I32{s0.y, s1.y, s2.y, s3.y}),
         z(I32{s0.z, s1.z, s2.z, s3.z}),
         w(I32{s0.w, s1.w, s2.w, s3.w}) {}

   I32& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       case W:
         return w;
       default:
         UNREACHABLE;
     }
   }
   I32 sel(XYZW c1) { return select(c1); }

   ivec2 sel(XYZW c1, XYZW c2) { return ivec2(select(c1), select(c2)); }

   ivec3 sel(XYZW c1, XYZW c2, XYZW c3) {
     return ivec3(select(c1), select(c2), select(c3));
   }

   friend ivec4 operator&(I32 a, ivec4 b) {
     return ivec4(a & b.x, a & b.y, a & b.z, a & b.w);
   }

   I32 x;
   I32 y;
   I32 z;
   I32 w;
 };

 ivec4_scalar force_scalar(const ivec4& v) {
   return ivec4_scalar{force_scalar(v.x), force_scalar(v.y), force_scalar(v.=
 z),
                       force_scalar(v.w)};
 }

 ivec4_scalar make_ivec4(int32_t n) { return ivec4_scalar{n, n, n, n}; }

 ivec4_scalar make_ivec4(const ivec2_scalar& xy, int32_t z, int32_t w) {
   return ivec4_scalar{xy.x, xy.y, z, w};
 }

 ivec4_scalar make_ivec4(int32_t x, int32_t y, int32_t z, int32_t w) {
   return ivec4_scalar{x, y, z, w};
 }

 template <typename N>
 ivec4 make_ivec4(const N& n) {
   return ivec4(n);
 }

 template <typename X, typename Y, typename Z>
 ivec4 make_ivec4(const X& x, const Y& y, const Z& z) {
   return ivec4(x, y, z);
 }

 template <typename X, typename Y, typename Z, typename W>
 ivec4 make_ivec4(const X& x, const Y& y, const Z& z, const W& w) {
   return ivec4(x, y, z, w);
 }

 SI ivec2 if_then_else(I32 c, ivec2 t, ivec2 e) {
   return ivec2(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y));
 }

 SI ivec2 if_then_else(int32_t c, ivec2 t, ivec2 e) { return c ? t : e; }

 SI ivec4 if_then_else(I32 c, ivec4 t, ivec4 e) {
   return ivec4(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y),
                if_then_else(c, t.z, e.z), if_then_else(c, t.w, e.w));
 }

 SI ivec4 if_then_else(int32_t c, ivec4 t, ivec4 e) { return c ? t : e; }

 ivec4 operator&(I32 a, ivec4_scalar b) {
   return ivec4(a & b.x, a & b.y, a & b.z, a & b.w);
 }

 struct bvec3_scalar {
   bool x;
   bool y;
   bool z;

   bvec3_scalar() : bvec3_scalar(false) {}
   constexpr bvec3_scalar(bool a) : x(a), y(a), z(a) {}
   constexpr bvec3_scalar(bool x, bool y, bool z) : x(x), y(y), z(z) {}
 };

 struct bvec3 {
   bvec3() : bvec3(0) {}
   bvec3(Bool a) : x(a), y(a), z(a) {}
   bvec3(Bool x, Bool y, Bool z) : x(x), y(y), z(z) {}
   Bool& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       default:
         UNREACHABLE;
     }
   }
   Bool sel(XYZW c1) { return select(c1); }

   Bool x;
   Bool y;
   Bool z;
 };

 struct bvec4_scalar {
   bool x;
   bool y;
   bool z;
   bool w;

   bvec4_scalar() : bvec4_scalar(false) {}
   constexpr bvec4_scalar(bool a) : x(a), y(a), z(a), w(a) {}
   constexpr bvec4_scalar(bool x, bool y, bool z, bool w)
       : x(x), y(y), z(z), w(w) {}
 };

 struct bvec4 {
   bvec4() : bvec4(0) {}
   bvec4(Bool a) : x(a), y(a), z(a), w(a) {}
   bvec4(Bool x, Bool y, Bool z, Bool w) : x(x), y(y), z(z), w(w) {}
   bvec4(bvec2 x, bvec2 y) : x(x.x), y(x.y), z(y.x), w(y.y) {}
   Bool& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       case W:
         return w;
     }
   }
   Bool sel(XYZW c1) { return select(c1); }

   Bool x;
   Bool y;
   Bool z;
   Bool w;
 };

 bvec4_scalar make_bvec4(bool n) { return bvec4_scalar{n, n, n, n}; }

 bvec4_scalar make_bvec4(bool x, bool y, bool z, bool w) {
   return bvec4_scalar{x, y, z, w};
 }

 template <typename N>
 bvec4 make_bvec4(const N& n) {
   return bvec4(n);
 }

 template <typename X, typename Y>
 bvec4 make_bvec4(const X& x, const Y& y) {
   return bvec4(x, y);
 }

 template <typename X, typename Y, typename Z, typename W>
 bvec4 make_bvec4(const X& x, const Y& y, const Z& z, const W& w) {
   return bvec4(x, y, z, w);
 }

 struct vec2_ref {
   vec2_ref(Float& x, Float& y) : x(x), y(y) {}
   Float& x;
   Float& y;

   Float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       default:
         UNREACHABLE;
     }
   }
   Float& sel(XYZW c1) { return select(c1); }

   vec2_ref& operator=3D(const vec2& a) {
     x =3D a.x;
     y =3D a.y;
     return *this;
   }

   vec2_ref& operator/=3D(Float a) {
     x /=3D a;
     y /=3D a;
     return *this;
   }

   vec2_ref& operator/=3D(vec2 a) {
     x /=3D a.x;
     y /=3D a.y;
     return *this;
   }

   vec2_ref& operator+=3D(vec2 a) {
     x +=3D a.x;
     y +=3D a.y;
     return *this;
   }
   vec2_ref& operator-=3D(vec2 a) {
     x -=3D a.x;
     y -=3D a.y;
     return *this;
   }
   vec2_ref& operator*=3D(vec2 a) {
     x *=3D a.x;
     y *=3D a.y;
     return *this;
   }
 };

 struct vec3_scalar {
   typedef struct vec3 vector_type;
   typedef float element_type;

   float x;
   float y;
   float z;

   constexpr vec3_scalar() : vec3_scalar(0.0f) {}
   constexpr vec3_scalar(float a) : x(a), y(a), z(a) {}
   constexpr vec3_scalar(float x, float y, float z) : x(x), y(y), z(z) {}

   float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       default:
         UNREACHABLE;
     }
   }
   float& sel(XYZW c1) { return select(c1); }
   vec2_scalar sel(XYZW c1, XYZW c2) {
     return vec2_scalar(select(c1), select(c2));
   }
   vec3_scalar sel(XYZW c1, XYZW c2, XYZW c3) {
     return vec3_scalar(select(c1), select(c2), select(c3));
   }
   vec2_scalar_ref lsel(XYZW c1, XYZW c2) {
     return vec2_scalar_ref(select(c1), select(c2));
   }

   friend vec3_scalar operator*(vec3_scalar a, vec3_scalar b) {
     return vec3_scalar{a.x * b.x, a.y * b.y, a.z * b.z};
   }
   friend vec3_scalar operator*(vec3_scalar a, float b) {
     return vec3_scalar{a.x * b, a.y * b, a.z * b};
   }

   friend vec3_scalar operator-(vec3_scalar a, vec3_scalar b) {
     return vec3_scalar{a.x - b.x, a.y - b.y, a.z - b.z};
   }
   friend vec3_scalar operator+(vec3_scalar a, vec3_scalar b) {
     return vec3_scalar{a.x + b.x, a.y + b.y, a.z + b.z};
   }

   friend vec3_scalar operator/(vec3_scalar a, float b) {
     return vec3_scalar{a.x / b, a.y / b, a.z / b};
   }

   vec3_scalar operator+=3D(vec3_scalar a) {
     x +=3D a.x;
     y +=3D a.y;
     z +=3D a.z;
     return *this;
   }

   friend bool operator=3D=3D(const vec3_scalar& l, const vec3_scalar& r) {
     return l.x =3D=3D r.x && l.y =3D=3D r.y && l.z =3D=3D r.z;
   }
 };

 struct vec3_scalar_ref {
   vec3_scalar_ref(float& x, float& y, float& z) : x(x), y(y), z(z) {}
   float& x;
   float& y;
   float& z;

   float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       default:
         UNREACHABLE;
     }
   }
   float& sel(XYZW c1) { return select(c1); }

   vec3_scalar_ref& operator=3D(const vec3_scalar& a) {
     x =3D a.x;
     y =3D a.y;
     z =3D a.z;
     return *this;
   }

   operator vec3_scalar() const { return vec3_scalar{x, y, z}; }
 };

 struct vec3 {
   typedef struct vec3 vector_type;
   typedef float element_type;

   constexpr vec3() : vec3(Float(0.0f)) {}
   constexpr vec3(Float a) : x(a), y(a), z(a) {}
   constexpr vec3(Float x, Float y, Float z) : x(x), y(y), z(z) {}
   vec3(vec2 a, Float z) : x(a.x), y(a.y), z(z) {}
   constexpr vec3(vec3_scalar s) : x(s.x), y(s.y), z(s.z) {}
   constexpr vec3(vec3_scalar s0, vec3_scalar s1, vec3_scalar s2, vec3_scala=
 r s3)
       : x(Float{s0.x, s1.x, s2.x, s3.x}),
         y(Float{s0.y, s1.y, s2.y, s3.y}),
         z(Float{s0.z, s1.z, s2.z, s3.z}) {}
   Float x;
   Float y;
   Float z;

   Float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       default:
         UNREACHABLE;
     }
   }
   Float& sel(XYZW c1) { return select(c1); }

   vec2 sel(XYZW c1, XYZW c2) { return vec2(select(c1), select(c2)); }

   vec3 sel(XYZW c1, XYZW c2, XYZW c3) {
     return vec3(select(c1), select(c2), select(c3));
   }

   vec2_ref lsel(XYZW c1, XYZW c2) { return vec2_ref(select(c1), select(c2))=
 ; }

   friend vec3 operator*(vec3 a, Float b) {
     return vec3(a.x * b, a.y * b, a.z * b);
   }
   friend vec3 operator*(vec3 a, vec3 b) {
     return vec3(a.x * b.x, a.y * b.y, a.z * b.z);
   }
   friend vec3 operator*(Float a, vec3 b) {
     return vec3(a * b.x, a * b.y, a * b.z);
   }

   friend vec3 operator/(vec3 a, Float b) {
     return vec3(a.x / b, a.y / b, a.z / b);
   }

   friend I32 operator=3D=3D(const vec3& l, const vec3& r) {
     return l.x =3D=3D r.x && l.y =3D=3D r.y && l.z =3D=3D r.z;
   }

   friend vec3 operator-(vec3 a, Float b) {
     return vec3(a.x - b, a.y - b, a.z - b);
   }
   friend vec3 operator-(vec3 a, vec3 b) {
     return vec3(a.x - b.x, a.y - b.y, a.z - b.z);
   }
   friend vec3 operator+(vec3 a, Float b) {
     return vec3(a.x + b, a.y + b, a.z + b);
   }
   friend vec3 operator+(vec3 a, vec3 b) {
     return vec3(a.x + b.x, a.y + b.y, a.z + b.z);
   }

   vec3 operator+=3D(vec3_scalar a) {
     x +=3D a.x;
     y +=3D a.y;
     z +=3D a.z;
     return *this;
   }
   vec3& operator+=3D(vec3 a) {
     x +=3D a.x;
     y +=3D a.y;
     z +=3D a.z;
     return *this;
   }
 };

 vec3_scalar force_scalar(const vec3& v) {
   return vec3_scalar{force_scalar(v.x), force_scalar(v.y), force_scalar(v.z=
 )};
 }

 vec3_scalar make_vec3(float n) { return vec3_scalar{n, n, n}; }

 vec3_scalar make_vec3(const vec2_scalar& v, float z) {
   return vec3_scalar{v.x, v.y, z};
 }

 vec3_scalar make_vec3(float x, float y, float z) {
   return vec3_scalar{x, y, z};
 }

 vec3_scalar make_vec3(int32_t x, int32_t y, float z) {
   return vec3_scalar{float(x), float(y), z};
 }

 template <typename N>
 vec3 make_vec3(const N& n) {
   return vec3(n);
 }

 template <typename X, typename Y>
 vec3 make_vec3(const X& x, const Y& y) {
   return vec3(x, y);
 }

 template <typename X, typename Y, typename Z>
 vec3 make_vec3(const X& x, const Y& y, const Z& z) {
   return vec3(x, y, z);
 }

 SI vec3 if_then_else(I32 c, vec3 t, vec3 e) {
   return vec3(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y),
               if_then_else(c, t.z, e.z));
 }

 SI vec3 if_then_else(int32_t c, vec3 t, vec3 e) { return c ? t : e; }

 SI vec3 if_then_else(ivec3 c, vec3 t, vec3 e) {
   return vec3(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y),
               if_then_else(c.z, t.z, e.z));
 }

 vec3 step(vec3 edge, vec3 x) {
   return vec3(step(edge.x, x.x), step(edge.y, x.y), step(edge.z, x.z));
 }

 SI vec3 min(vec3 a, vec3 b) {
   return vec3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z));
 }
 SI vec3 max(vec3 a, vec3 b) {
   return vec3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z));
 }

 SI vec3_scalar max(vec3_scalar a, vec3_scalar b) {
   return vec3_scalar{max(a.x, b.x), max(a.y, b.y), max(a.z, b.z)};
 }

 vec3 pow(vec3 x, vec3 y) {
   return vec3(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z));
 }

 struct vec3_ref {
   vec3_ref(Float& x, Float& y, Float& z) : x(x), y(y), z(z) {}
   Float& x;
   Float& y;
   Float& z;
   vec3_ref& operator=3D(const vec3& a) {
     x =3D a.x;
     y =3D a.y;
     z =3D a.z;
     return *this;
   }

   vec3_ref& operator/=3D(Float a) {
     x /=3D a;
     y /=3D a;
     z /=3D a;
     return *this;
   }

   vec3_ref& operator*=3D(Float a) {
     x *=3D a;
     y *=3D a;
     z *=3D a;
     return *this;
   }
 };

 struct vec4_scalar {
   typedef struct vec4 vector_type;
   typedef float element_type;

   float x;
   float y;
   float z;
   float w;

   constexpr vec4_scalar() : vec4_scalar(0.0f) {}
   constexpr vec4_scalar(float a) : x(a), y(a), z(a), w(a) {}
   constexpr vec4_scalar(float x, float y, float z, float w)
       : x(x), y(y), z(z), w(w) {}
   vec4_scalar(vec3_scalar xyz, float w) : x(xyz.x), y(xyz.y), z(xyz.z), w(w=
 ) {}

   ALWAYS_INLINE float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       case W:
         return w;
       default:
         UNREACHABLE;
     }
   }
   float& sel(XYZW c1) { return select(c1); }
   vec2_scalar sel(XYZW c1, XYZW c2) {
     return vec2_scalar{select(c1), select(c2)};
   }
   vec3_scalar sel(XYZW c1, XYZW c2, XYZW c3) {
     return vec3_scalar{select(c1), select(c2), select(c3)};
   }
   vec2_scalar_ref lsel(XYZW c1, XYZW c2) {
     return vec2_scalar_ref(select(c1), select(c2));
   }
   vec3_scalar_ref lsel(XYZW c1, XYZW c2, XYZW c3) {
     return vec3_scalar_ref(select(c1), select(c2), select(c3));
   }

   friend vec4_scalar operator*(vec4_scalar a, vec4_scalar b) {
     return vec4_scalar{a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w};
   }
   friend vec4_scalar operator*(vec4_scalar a, float b) {
     return vec4_scalar{a.x * b, a.y * b, a.z * b, a.w * b};
   }
   vec4_scalar& operator*=3D(float a) {
     x *=3D a;
     y *=3D a;
     z *=3D a;
     w *=3D a;
     return *this;
   }

   friend vec4_scalar operator-(vec4_scalar a, vec4_scalar b) {
     return vec4_scalar{a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w};
   }
   friend vec4_scalar operator+(vec4_scalar a, vec4_scalar b) {
     return vec4_scalar{a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w};
   }

   friend vec4_scalar operator/(vec4_scalar a, vec4_scalar b) {
     return vec4_scalar{a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w};
   }

   vec4_scalar& operator+=3D(vec4_scalar a) {
     x +=3D a.x;
     y +=3D a.y;
     z +=3D a.z;
     w +=3D a.w;
     return *this;
   }

   vec4_scalar& operator/=3D(vec4_scalar a) {
     x /=3D a.x;
     y /=3D a.y;
     z /=3D a.z;
     w /=3D a.w;
     return *this;
   }
 };

 vec4_scalar vec2_scalar::sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4) {
   return vec4_scalar{select(c1), select(c2), select(c3), select(c4)};
 }

 struct vec4 {
   typedef struct vec4 vector_type;
   typedef float element_type;

   constexpr vec4() : vec4(Float(0.0f)) {}
   constexpr vec4(Float a) : x(a), y(a), z(a), w(a) {}
   vec4(Float x, Float y, Float z, Float w) : x(x), y(y), z(z), w(w) {}
   vec4(vec3 xyz, Float w) : x(xyz.x), y(xyz.y), z(xyz.z), w(w) {}
   vec4(vec2 xy, vec2 zw) : x(xy.x), y(xy.y), z(zw.x), w(zw.y) {}
   vec4(vec2 xy, Float z, Float w) : x(xy.x), y(xy.y), z(z), w(w) {}
   vec4(Float x, Float y, vec2 zw) : x(x), y(y), z(zw.x), w(zw.y) {}
   constexpr vec4(vec4_scalar s) : x(s.x), y(s.y), z(s.z), w(s.w) {}
   constexpr vec4(vec4_scalar s0, vec4_scalar s1, vec4_scalar s2, vec4_scala=
 r s3)
       : x(Float{s0.x, s1.x, s2.x, s3.x}),
         y(Float{s0.y, s1.y, s2.y, s3.y}),
         z(Float{s0.z, s1.z, s2.z, s3.z}),
         w(Float{s0.w, s1.w, s2.w, s3.w}) {}
   Float& select(XYZW c) {
     switch (c) {
       case X:
         return x;
       case Y:
         return y;
       case Z:
         return z;
       case W:
         return w;
       default:
         UNREACHABLE;
     }
   }
   Float& sel(XYZW c1) { return select(c1); }

   vec2 sel(XYZW c1, XYZW c2) { return vec2(select(c1), select(c2)); }

   vec3 sel(XYZW c1, XYZW c2, XYZW c3) {
     return vec3(select(c1), select(c2), select(c3));
   }
   vec3_ref lsel(XYZW c1, XYZW c2, XYZW c3) {
     return vec3_ref(select(c1), select(c2), select(c3));
   }

   vec2_ref lsel(XYZW c1, XYZW c2) { return vec2_ref(select(c1), select(c2))=
 ; }

   Float& operator[](int index) {
     switch (index) {
       case 0:
         return x;
       case 1:
         return y;
       case 2:
         return z;
       case 3:
         return w;
       default:
         UNREACHABLE;
     }
   }

   // glsl supports non-const indexing of vecs.
   // hlsl doesn't. The code it generates is probably not wonderful.
   Float operator[](I32 index) {
     float sel_x =3D 0;
     switch (index.x) {
       case 0:
         sel_x =3D x.x;
         break;
       case 1:
         sel_x =3D y.x;
         break;
       case 2:
         sel_x =3D z.x;
         break;
       case 3:
         sel_x =3D w.x;
         break;
     }
     float sel_y =3D 0;
     switch (index.y) {
       case 0:
         sel_y =3D x.y;
         break;
       case 1:
         sel_y =3D y.y;
         break;
       case 2:
         sel_y =3D z.y;
         break;
       case 3:
         sel_y =3D w.y;
         break;
     }
     float sel_z =3D 0;
     switch (index.z) {
       case 0:
         sel_z =3D x.z;
         break;
       case 1:
         sel_z =3D y.z;
         break;
       case 2:
         sel_z =3D z.z;
         break;
       case 3:
         sel_z =3D w.z;
         break;
     }
     float sel_w =3D 0;
     switch (index.w) {
       case 0:
         sel_w =3D x.w;
         break;
       case 1:
         sel_w =3D y.w;
         break;
       case 2:
         sel_w =3D z.w;
         break;
       case 3:
         sel_w =3D w.w;
         break;
     }
     Float ret =3D {sel_x, sel_y, sel_z, sel_w};
     return ret;
   }

   friend vec4 operator/(vec4 a, Float b) {
     return vec4(a.x / b, a.y / b, a.z / b, a.w / b);
   }
   friend vec4 operator/(vec4 a, vec4 b) {
     return vec4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
   }

   friend vec4 operator*(vec4 a, Float b) {
     return vec4(a.x * b, a.y * b, a.z * b, a.w * b);
   }

   friend vec4 operator*(Float b, vec4 a) {
     return vec4(a.x * b, a.y * b, a.z * b, a.w * b);
   }
   friend vec4 operator*(vec4 a, vec4 b) {
     return vec4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
   }

   friend vec4 operator-(vec4 a, vec4 b) {
     return vec4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
   }
   friend vec4 operator+(vec4 a, vec4 b) {
     return vec4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
   }
   vec4& operator+=3D(vec4 a) {
     x +=3D a.x;
     y +=3D a.y;
     z +=3D a.z;
     w +=3D a.w;
     return *this;
   }
   vec4& operator/=3D(vec4 a) {
     x /=3D a.x;
     y /=3D a.y;
     z /=3D a.z;
     w /=3D a.w;
     return *this;
   }
   vec4& operator*=3D(Float a) {
     x *=3D a;
     y *=3D a;
     z *=3D a;
     w *=3D a;
     return *this;
   }

   Float x;
   Float y;
   Float z;
   Float w;
 };

 vec4_scalar force_scalar(const vec4& v) {
   return vec4_scalar{force_scalar(v.x), force_scalar(v.y), force_scalar(v.z=
 ),
                      force_scalar(v.w)};
 }

 vec4_scalar make_vec4(float n) { return vec4_scalar{n, n, n, n}; }

 vec4_scalar make_vec4(const vec2_scalar& v, float z, float w) {
   return vec4_scalar{v.x, v.y, z, w};
 }

 vec4_scalar make_vec4(const vec2_scalar& a, const vec2_scalar& b) {
   return vec4_scalar{a.x, a.y, b.x, b.y};
 }

 vec4_scalar make_vec4(const vec3_scalar& v, float w) {
   return vec4_scalar{v.x, v.y, v.z, w};
 }

 vec4_scalar make_vec4(float x, float y, float z, float w) {
   return vec4_scalar{x, y, z, w};
 }

 vec4_scalar make_vec4(float x, float y, const vec2_scalar& v) {
   return vec4_scalar{x, y, v.x, v.y};
 }

 template <typename N>
 vec4 make_vec4(const N& n) {
   return vec4(n);
 }

 template <typename X, typename Y>
 vec4 make_vec4(const X& x, const Y& y) {
   return vec4(x, y);
 }

 template <typename X, typename Y, typename Z>
 vec4 make_vec4(const X& x, const Y& y, const Z& z) {
   return vec4(x, y, z);
 }

 template <typename X, typename Y, typename Z, typename W>
 vec4 make_vec4(const X& x, const Y& y, const Z& z, const W& w) {
   return vec4(x, y, z, w);
 }

 SI ivec4 roundfast(vec4 v, Float scale) {
   return ivec4(roundfast(v.x, scale), roundfast(v.y, scale),
                roundfast(v.z, scale), roundfast(v.w, scale));
 }

 vec4 operator*(vec4_scalar a, Float b) {
   return vec4(a.x * b, a.y * b, a.z * b, a.w * b);
 }

 SI vec4 if_then_else(I32 c, vec4 t, vec4 e) {
   return vec4(if_then_else(c, t.x, e.x), if_then_else(c, t.y, e.y),
               if_then_else(c, t.z, e.z), if_then_else(c, t.w, e.w));
 }

 SI vec4 if_then_else(int32_t c, vec4 t, vec4 e) { return c ? t : e; }

 SI vec2 clamp(vec2 a, vec2 minVal, vec2 maxVal) {
   return vec2(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y=
 ));
 }

 SI vec2_scalar clamp(vec2_scalar a, vec2_scalar minVal, vec2_scalar maxVal)=
  {
   return vec2_scalar{clamp(a.x, minVal.x, maxVal.x),
                      clamp(a.y, minVal.y, maxVal.y)};
 }

 SI I32 clamp(I32 a, I32 minVal, I32 maxVal) {
   a =3D if_then_else(a < minVal, minVal, a);
   return if_then_else(a > maxVal, maxVal, a);
 }

 SI vec3 clamp(vec3 a, vec3 minVal, vec3 maxVal) {
   return vec3(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y=
 ),
               clamp(a.z, minVal.z, maxVal.z));
 }

 SI vec4 clamp(vec4 a, vec4 minVal, vec4 maxVal) {
   return vec4(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y=
 ),
               clamp(a.z, minVal.z, maxVal.z), clamp(a.w, minVal.w, maxVal.w=
 ));
 }
 template <typename T>
 auto lessThanEqual(T x, T y) -> decltype(x <=3D y) {
   return x <=3D y;
 }

 template <typename T>
 auto lessThan(T x, T y) -> decltype(x < y) {
   return x < y;
 }

 SI bvec3 lessThanEqual(vec3 x, vec3 y) {
   return bvec3(lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y),
                lessThanEqual(x.z, y.z));
 }

 SI bvec2 lessThanEqual(vec2 x, vec2 y) {
   return bvec2(lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y));
 }

 SI bvec2_scalar lessThanEqual(vec2_scalar x, vec2_scalar y) {
   return bvec2_scalar{lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y)};
 }

 SI bvec4 lessThanEqual(vec4 x, vec4 y) {
   return bvec4(lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y),
                lessThanEqual(x.z, y.z), lessThanEqual(x.w, y.w));
 }

 SI bvec4_scalar lessThanEqual(vec4_scalar x, vec4_scalar y) {
   return bvec4_scalar{lessThanEqual(x.x, y.x), lessThanEqual(x.y, y.y),
                       lessThanEqual(x.z, y.z), lessThanEqual(x.w, y.w)};
 }

 SI bvec2 lessThan(vec2 x, vec2 y) {
   return bvec2(lessThan(x.x, y.x), lessThan(x.y, y.y));
 }

 template <typename T>
 auto greaterThan(T x, T y) -> decltype(x > y) {
   return x > y;
 }

 bvec2 greaterThan(vec2 x, vec2 y) {
   return bvec2(greaterThan(x.x, y.x), greaterThan(x.y, y.y));
 }

 template <typename T>
 auto greaterThanEqual(T x, T y) -> decltype(x >=3D y) {
   return x >=3D y;
 }

 bvec4 greaterThanEqual(vec4 x, vec4 y) {
   return bvec4(greaterThanEqual(x.x, y.x), greaterThanEqual(x.y, y.y),
                greaterThanEqual(x.z, y.z), greaterThanEqual(x.w, y.w));
 }

 enum TextureFormat { RGBA32F, RGBA32I, RGBA8, R8, RG8 };

 enum TextureFilter { NEAREST, LINEAR };

 struct samplerCommon {
   uint32_t* buf =3D nullptr;
   uint32_t stride =3D 0;  // in units of BPP if < 4, or dwords if BPP >=3D 4
   uint32_t height =3D 0;
   uint32_t width =3D 0;
   TextureFormat format =3D TextureFormat::RGBA8;
 };

 struct samplerDepth {
   int depth =3D 0;
   uint32_t height_stride =3D 0;  // in units of BPP if < 4, or dwords if BP=
 P >=3D 4
 };

 struct samplerFilter {
   TextureFilter filter =3D TextureFilter::NEAREST;
 };

 struct sampler2DArray_impl : samplerCommon, samplerDepth, samplerFilter {};
 typedef sampler2DArray_impl* sampler2DArray;

 typedef struct sampler2DArrayR8_impl : sampler2DArray_impl{} * sampler2DArr=
 ayR8;
 typedef struct sampler2DArrayRG8_impl : sampler2DArray_impl{} *
                                         sampler2DArrayRG8;
 typedef struct sampler2DArrayRGBA8_impl : sampler2DArray_impl{} *
                                           sampler2DArrayRGBA8;
 typedef struct sampler2DArrayRGBA32F_impl : sampler2DArray_impl{} *
                                             sampler2DArrayRGBA32F;

 struct sampler2D_impl : samplerCommon, samplerFilter {};
 typedef sampler2D_impl* sampler2D;

 typedef struct sampler2DR8_impl : sampler2D_impl{} * sampler2DR8;
 typedef struct sampler2DRG8_impl : sampler2D_impl{} * sampler2DRG8;
 typedef struct sampler2DRGBA8_impl : sampler2D_impl{} * sampler2DRGBA8;
 typedef struct sampler2DRGBA32F_impl : sampler2D_impl{} * sampler2DRGBA32F;

 struct isampler2D_impl : samplerCommon {};
 typedef isampler2D_impl* isampler2D;

 struct isampler2DRGBA32I_impl : isampler2D_impl {};
 typedef isampler2DRGBA32I_impl* isampler2DRGBA32I;

 struct sampler2DRect_impl : samplerCommon, samplerFilter {};
 typedef sampler2DRect_impl* sampler2DRect;

 struct mat4_scalar;

 struct mat2_scalar {
   vec2_scalar data[2];

   mat2_scalar() =3D default;
   constexpr mat2_scalar(float a) {
     data[0] =3D vec2_scalar(a);
     data[1] =3D vec2_scalar(a);
   }
   constexpr mat2_scalar(vec2_scalar a, vec2_scalar b) {
     data[0] =3D a;
     data[1] =3D b;
   }
   mat2_scalar(const mat4_scalar& mat);

   vec2_scalar& operator[](int index) { return data[index]; }
   const vec2_scalar& operator[](int index) const { return data[index]; }

   friend vec2_scalar operator*(mat2_scalar m, vec2_scalar v) {
     vec2_scalar u;
     u.x =3D m[0].x * v.x + m[1].x * v.y;
     u.y =3D m[0].y * v.x + m[1].y * v.y;
     return u;
   }

   friend vec2 operator*(mat2_scalar m, vec2 v) {
     vec2 u;
     u.x =3D m[0].x * v.x + m[1].x * v.y;
     u.y =3D m[0].y * v.x + m[1].y * v.y;
     return u;
   }

   friend mat2_scalar operator*(mat2_scalar m, float f) {
     mat2_scalar u =3D m;
     u[0].x *=3D f;
     u[0].y *=3D f;
     u[1].x *=3D f;
     u[1].y *=3D f;
     return u;
   }
 };

 struct mat4;

 struct mat2 {
   vec2 data[2];

   vec2& operator[](int index) { return data[index]; }
   const vec2& operator[](int index) const { return data[index]; }
   mat2() =3D default;

   mat2(Float a) {
     data[0] =3D vec2(a);
     data[1] =3D vec2(a);
   }

   mat2(vec2 a, vec2 b) {
     data[0] =3D a;
     data[1] =3D b;
   }
   mat2(const mat4& mat);
   constexpr mat2(mat2_scalar s) {
     data[0] =3D vec2(s.data[0]);
     data[1] =3D vec2(s.data[1]);
   }

   friend vec2 operator*(mat2 m, vec2 v) {
     vec2 u;
     u.x =3D m[0].x * v.x + m[1].x * v.y;
     u.y =3D m[0].y * v.x + m[1].y * v.y;
     return u;
   }
   friend mat2 operator*(mat2 m, Float f) {
     mat2 u =3D m;
     u[0].x *=3D f;
     u[0].y *=3D f;
     u[1].x *=3D f;
     u[1].y *=3D f;
     return u;
   }
 };

 mat2_scalar make_mat2(float n) { return mat2_scalar{{n, n}, {n, n}}; }

 mat2_scalar make_mat2(const mat2_scalar& m) { return m; }

 mat2_scalar make_mat2(const vec2_scalar& x, const vec2_scalar& y) {
   return mat2_scalar{x, y};
 }

 template <typename N>
 mat2 make_mat2(const N& n) {
   return mat2(n);
 }

 template <typename X, typename Y>
 mat2 make_mat2(const X& x, const Y& y) {
   return mat2(x, y);
 }

 SI mat2 if_then_else(I32 c, mat2 t, mat2 e) {
   return mat2(if_then_else(c, t[0], e[0]), if_then_else(c, t[0], e[1]));
 }

 SI mat2 if_then_else(int32_t c, mat2 t, mat2 e) { return c ? t : e; }

 struct mat3_scalar {
   vec3_scalar data[3];

   mat3_scalar() =3D default;
   constexpr mat3_scalar(vec3_scalar a, vec3_scalar b, vec3_scalar c) {
     data[0] =3D a;
     data[1] =3D b;
     data[2] =3D c;
   }
   mat3_scalar(const mat4_scalar& mat);

   vec3_scalar& operator[](int index) { return data[index]; }
   const vec3_scalar& operator[](int index) const { return data[index]; }

   friend vec3_scalar operator*(mat3_scalar m, vec3_scalar v) {
     vec3_scalar u;
     u.x =3D m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
     u.y =3D m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
     u.z =3D m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
     return u;
   }

   friend vec3 operator*(mat3_scalar m, vec3 v) {
     vec3 u;
     u.x =3D m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
     u.y =3D m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
     u.z =3D m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
     return u;
   }
 };

 struct mat3 {
   vec3 data[3];

   vec3& operator[](int index) { return data[index]; }
   const vec3& operator[](int index) const { return data[index]; }
   mat3() =3D default;
   mat3(vec3 a, vec3 b, vec3 c) {
     data[0] =3D a;
     data[1] =3D b;
     data[2] =3D c;
   }

   constexpr mat3(mat3_scalar s) {
     data[0] =3D vec3(s.data[0]);
     data[1] =3D vec3(s.data[1]);
     data[2] =3D vec3(s.data[2]);
   }
   constexpr mat3(mat3_scalar s0, mat3_scalar s1, mat3_scalar s2,
                  mat3_scalar s3) {
     data[0] =3D vec3(s0.data[0], s1.data[0], s2.data[0], s3.data[0]);
     data[1] =3D vec3(s0.data[1], s1.data[1], s2.data[1], s3.data[1]);
     data[2] =3D vec3(s0.data[2], s1.data[2], s2.data[2], s3.data[2]);
   }

   constexpr mat3(Float d1, Float d2, Float d3, Float d4, Float d5, Float d6,
                  Float d7, Float d8, Float d9) {
     data[0] =3D vec3(d1, d2, d3);
     data[1] =3D vec3(d4, d5, d6);
     data[2] =3D vec3(d7, d8, d9);
   }

   mat3(const mat4& mat);

   friend vec3 operator*(mat3 m, vec3 v) {
     vec3 u;
     u.x =3D m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
     u.y =3D m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
     u.z =3D m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
     return u;
   }
 };

 mat3_scalar force_scalar(const mat3& v) {
   return mat3_scalar{force_scalar(v[0]), force_scalar(v[1]),
                      force_scalar(v[2])};
 }

 mat3_scalar make_mat3(const mat3_scalar& m) { return m; }

 mat3_scalar make_mat3(const vec3_scalar& x, const vec3_scalar& y,
                       const vec3_scalar& z) {
   return mat3_scalar{x, y, z};
 }

 constexpr mat3_scalar make_mat3(float m0, float m1, float m2, float m3,
                                 float m4, float m5, float m6, float m7,
                                 float m8) {
   return mat3_scalar{{m0, m1, m2}, {m3, m4, m5}, {m6, m7, m8}};
 }

 template <typename N>
 mat3 make_mat3(const N& n) {
   return mat3(n);
 }

 template <typename X, typename Y, typename Z>
 mat3 make_mat3(const X& x, const Y& y, const Z& z) {
   return mat3(x, y, z);
 }

 struct mat4_scalar {
   vec4_scalar data[4];

   mat4_scalar() =3D default;
   constexpr mat4_scalar(vec4_scalar a, vec4_scalar b, vec4_scalar c,
                         vec4_scalar d) {
     data[0] =3D a;
     data[1] =3D b;
     data[2] =3D c;
     data[3] =3D d;
   }

   vec4_scalar& operator[](int index) { return data[index]; }
   const vec4_scalar& operator[](int index) const { return data[index]; }

   static mat4_scalar load_from_ptr(const float* f) {
     mat4_scalar m;
     // XXX: hopefully this is in the right order
     m.data[0] =3D vec4_scalar{f[0], f[1], f[2], f[3]};
     m.data[1] =3D vec4_scalar{f[4], f[5], f[6], f[7]};
     m.data[2] =3D vec4_scalar{f[8], f[9], f[10], f[11]};
     m.data[3] =3D vec4_scalar{f[12], f[13], f[14], f[15]};
     return m;
   }

   friend vec4_scalar operator*(mat4_scalar m, vec4_scalar v) {
     vec4_scalar u;
     u.x =3D m[0].x * v.x + m[1].x * v.y + m[2].x * v.z + m[3].x * v.w;
     u.y =3D m[0].y * v.x + m[1].y * v.y + m[2].y * v.z + m[3].y * v.w;
     u.z =3D m[0].z * v.x + m[1].z * v.y + m[2].z * v.z + m[3].z * v.w;
     u.w =3D m[0].w * v.x + m[1].w * v.y + m[2].w * v.z + m[3].w * v.w;
     return u;
   }

   friend vec4 operator*(mat4_scalar m, vec4 v) {
     vec4 u;
     u.x =3D m[0].x * v.x + m[1].x * v.y + m[2].x * v.z + m[3].x * v.w;
     u.y =3D m[0].y * v.x + m[1].y * v.y + m[2].y * v.z + m[3].y * v.w;
     u.z =3D m[0].z * v.x + m[1].z * v.y + m[2].z * v.z + m[3].z * v.w;
     u.w =3D m[0].w * v.x + m[1].w * v.y + m[2].w * v.z + m[3].w * v.w;
     return u;
   }
 };

 struct mat4 {
   vec4 data[4];

   mat4() =3D default;
   constexpr mat4(mat4_scalar s) {
     data[0] =3D vec4(s.data[0]);
     data[1] =3D vec4(s.data[1]);
     data[2] =3D vec4(s.data[2]);
     data[3] =3D vec4(s.data[3]);
   }

   mat4(vec4 a, vec4 b, vec4 c, vec4 d) {
     data[0] =3D a;
     data[1] =3D b;
     data[2] =3D c;
     data[3] =3D d;
   }

   vec4& operator[](int index) { return data[index]; }
   const vec4& operator[](int index) const { return data[index]; }

   friend vec4 operator*(mat4 m, vec4 v) {
     vec4 u;
     u.x =3D m[0].x * v.x + m[1].x * v.y + m[2].x * v.z + m[3].x * v.w;
     u.y =3D m[0].y * v.x + m[1].y * v.y + m[2].y * v.z + m[3].y * v.w;
     u.z =3D m[0].z * v.x + m[1].z * v.y + m[2].z * v.z + m[3].z * v.w;
     u.w =3D m[0].w * v.x + m[1].w * v.y + m[2].w * v.z + m[3].w * v.w;
     return u;
   }
 };

 mat3::mat3(const mat4& mat)
     : mat3(vec3(mat[0].x, mat[0].y, mat[0].z),
            vec3(mat[1].x, mat[1].y, mat[1].z),
            vec3(mat[2].x, mat[2].y, mat[2].z)) {}

 mat3_scalar::mat3_scalar(const mat4_scalar& mat)
     : mat3_scalar(vec3_scalar(mat[0].x, mat[0].y, mat[0].z),
                   vec3_scalar(mat[1].x, mat[1].y, mat[1].z),
                   vec3_scalar(mat[2].x, mat[2].y, mat[2].z)) {}

 mat2::mat2(const mat4& mat)
     : mat2(vec2(mat[0].x, mat[0].y), vec2(mat[1].x, mat[1].y)) {}

 mat2_scalar::mat2_scalar(const mat4_scalar& mat)
     : mat2_scalar(vec2_scalar(mat[0].x, mat[0].y),
                   vec2_scalar(mat[1].x, mat[1].y)) {}

 mat2_scalar make_mat2(const mat4_scalar& m) { return mat2_scalar(m); }

 mat3_scalar make_mat3(const mat4_scalar& m) { return mat3_scalar(m); }

 mat4_scalar force_scalar(const mat4& v) {
   return mat4_scalar(force_scalar(v[0]), force_scalar(v[1]), force_scalar(v=
 [2]),
                      force_scalar(v[3]));
 }

 mat4_scalar make_mat4(const mat4_scalar& m) { return m; }

 mat4_scalar make_mat4(const vec4_scalar& x, const vec4_scalar& y,
                       const vec4_scalar& z, const vec4_scalar& w) {
   return mat4_scalar{x, y, z, w};
 }

 constexpr mat4_scalar make_mat4(float m0, float m1, float m2, float m3,
                                 float m4, float m5, float m6, float m7,
                                 float m8, float m9, float m10, float m11,
                                 float m12, float m13, float m14, float m15)=
  {
   return mat4_scalar{{m0, m1, m2, m3},
                      {m4, m5, m6, m7},
                      {m8, m9, m10, m11},
                      {m12, m13, m14, m15}};
 }

 template <typename N>
 mat4 make_mat4(const N& n) {
   return mat4(n);
 }

 template <typename X, typename Y, typename Z, typename W>
 mat4 make_mat4(const X& x, const Y& y, const Z& z, const W& w) {
   return mat4(x, y, z, w);
 }

 SI mat3 if_then_else(I32 c, mat3 t, mat3 e) {
   return mat3{if_then_else(c, t[0], e[0]), if_then_else(c, t[1], e[1]),
               if_then_else(c, t[2], e[2])};
 }

 SI mat3 if_then_else(int32_t c, mat3 t, mat3 e) { return c ? t : e; }

 SI mat4 if_then_else(I32 c, mat4 t, mat4 e) {
   return mat4{if_then_else(c, t[0], e[0]), if_then_else(c, t[1], e[1]),
               if_then_else(c, t[2], e[2]), if_then_else(c, t[3], e[3])};
 }

 SI mat4 if_then_else(int32_t c, mat4 t, mat4 e) { return c ? t : e; }

 SI I32 clampCoord(I32 coord, int limit, int base =3D 0) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2209 "src/glsl.h"
   return _mm_min_epi16(_mm_max_epi16(coord, _mm_set1_epi32(base)),
                        _mm_set1_epi32(limit - 1));
 #else
 # 2212 "src/glsl.h"
   return clamp(coord, base, limit - 1);
 #endif
 # 2214 "src/glsl.h"
 }
 SI int clampCoord(int coord, int limit, int base =3D 0) {
   return min(max(coord, base), limit - 1);
 }
 template <typename T, typename S>
 SI T clamp2D(T P, S sampler) {
   return T{clampCoord(P.x, sampler->width), clampCoord(P.y, sampler->height=
 )};
 }
 template <typename T>
 SI T clamp2DArray(T P, sampler2DArray sampler) {
   return T{clampCoord(P.x, sampler->width), clampCoord(P.y, sampler->height=
 ),
            clampCoord(P.z, sampler->depth)};
 }

 float to_float(uint32_t x) { return x * (1.f / 255.f); }

 vec4 pixel_to_vec4(uint32_t a, uint32_t b, uint32_t c, uint32_t d) {
   U32 pixels =3D {a, b, c, d};
   return vec4(cast((pixels >> 16) & 0xFF), cast((pixels >> 8) & 0xFF),
               cast(pixels & 0xFF), cast(pixels >> 24)) *
          (1.0f / 255.0f);
 }

 vec4 pixel_float_to_vec4(Float a, Float b, Float c, Float d) {
   return vec4(Float{a.x, b.x, c.x, d.x}, Float{a.y, b.y, c.y, d.y},
               Float{a.z, b.z, c.z, d.z}, Float{a.w, b.w, c.w, d.w});
 }

 ivec4 pixel_int_to_ivec4(I32 a, I32 b, I32 c, I32 d) {
   return ivec4(I32{a.x, b.x, c.x, d.x}, I32{a.y, b.y, c.y, d.y},
                I32{a.z, b.z, c.z, d.z}, I32{a.w, b.w, c.w, d.w});
 }

 vec4_scalar pixel_to_vec4(uint32_t p) {
   U32 i =3D {(p >> 16) & 0xFF, (p >> 8) & 0xFF, p & 0xFF, p >> 24};
   Float f =3D cast(i) * (1.0f / 255.0f);
   return vec4_scalar(f.x, f.y, f.z, f.w);
 }

 template <typename S>
 SI vec4 fetchOffsetsRGBA8(S sampler, I32 offset) {
   return pixel_to_vec4(sampler->buf[offset.x], sampler->buf[offset.y],
                        sampler->buf[offset.z], sampler->buf[offset.w]);
 }

 template <typename S>
 vec4 texelFetchRGBA8(S sampler, ivec2 P) {
   I32 offset =3D P.x + P.y * sampler->stride;
   return fetchOffsetsRGBA8(sampler, offset);
 }

 vec4 texelFetchRGBA8(sampler2DArray sampler, ivec3 P) {
   assert(test_all(P.z =3D=3D P.z.x));
   I32 offset =3D P.x + P.y * sampler->stride + P.z.x * sampler->height_stri=
 de;
   return fetchOffsetsRGBA8(sampler, offset);
 }

 template <typename S>
 SI Float fetchOffsetsR8(S sampler, I32 offset) {
   U32 i =3D {
       ((uint8_t*)sampler->buf)[offset.x], ((uint8_t*)sampler->buf)[offset.y=
 ],
       ((uint8_t*)sampler->buf)[offset.z], ((uint8_t*)sampler->buf)[offset.w=
 ]};
   return cast(i) * (1.0f / 255.0f);
 }

 template <typename S>
 vec4 texelFetchR8(S sampler, ivec2 P) {
   I32 offset =3D P.x + P.y * sampler->stride;
   return vec4(fetchOffsetsR8(sampler, offset), 0.0f, 0.0f, 1.0f);
 }

 vec4 texelFetchR8(sampler2DArray sampler, ivec3 P) {
   assert(test_all(P.z =3D=3D P.z.x));
   I32 offset =3D P.x + P.y * sampler->stride + P.z.x * sampler->height_stri=
 de;
   return vec4(fetchOffsetsR8(sampler, offset), 0.0f, 0.0f, 1.0f);
 }

 template <typename S>
 SI vec4 fetchOffsetsRG8(S sampler, I32 offset) {
   uint16_t* buf =3D (uint16_t*)sampler->buf;
   U16 pixels =3D {buf[offset.x], buf[offset.y], buf[offset.z], buf[offset.w=
 ]};
   Float r =3D CONVERT(pixels & 0xFF, Float) * (1.0f / 255.0f);
   Float g =3D CONVERT(pixels >> 8, Float) * (1.0f / 255.0f);
   return vec4(r, g, 0.0f, 1.0f);
 }

 template <typename S>
 vec4 texelFetchRG8(S sampler, ivec2 P) {
   I32 offset =3D P.x + P.y * sampler->stride;
   return fetchOffsetsRG8(sampler, offset);
 }

 vec4 texelFetchRG8(sampler2DArray sampler, ivec3 P) {
   assert(test_all(P.z =3D=3D P.z.x));
   I32 offset =3D P.x + P.y * sampler->stride + P.z.x * sampler->height_stri=
 de;
   return fetchOffsetsRG8(sampler, offset);
 }

 template <typename S>
 SI vec4 fetchOffsetsFloat(S sampler, I32 offset) {
   return pixel_float_to_vec4(
       *(Float*)&sampler->buf[offset.x], *(Float*)&sampler->buf[offset.y],
       *(Float*)&sampler->buf[offset.z], *(Float*)&sampler->buf[offset.w]);
 }

 vec4 texelFetchFloat(sampler2D sampler, ivec2 P) {
   I32 offset =3D P.x * 4 + P.y * sampler->stride;
   return fetchOffsetsFloat(sampler, offset);
 }

 SI vec4 texelFetchFloat(sampler2DArray sampler, ivec3 P) {
   assert(test_all(P.z =3D=3D P.z.x));
   I32 offset =3D P.x * 4 + P.y * sampler->stride + P.z.x * sampler->height_=
 stride;
   return fetchOffsetsFloat(sampler, offset);
 }

 vec4 texelFetch(sampler2D sampler, ivec2 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   switch (sampler->format) {
     case TextureFormat::RGBA32F:
       return texelFetchFloat(sampler, P);
     case TextureFormat::RGBA8:
       return texelFetchRGBA8(sampler, P);
     case TextureFormat::R8:
       return texelFetchR8(sampler, P);
     case TextureFormat::RG8:
       return texelFetchRG8(sampler, P);
     default:
       assert(false);
       return vec4();
   }
 }

 vec4 texelFetch(sampler2DRGBA32F sampler, ivec2 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA32F);
   return texelFetchFloat(sampler, P);
 }

 vec4 texelFetch(sampler2DRGBA8 sampler, ivec2 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA8);
   return texelFetchRGBA8(sampler, P);
 }

 vec4 texelFetch(sampler2DR8 sampler, ivec2 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::R8);
   return texelFetchR8(sampler, P);
 }

 vec4 texelFetch(sampler2DRG8 sampler, ivec2 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RG8);
   return texelFetchRG8(sampler, P);
 }

 vec4_scalar texelFetch(sampler2D sampler, ivec2_scalar P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   if (sampler->format =3D=3D TextureFormat::RGBA32F) {
     return *(vec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
   } else {
     assert(sampler->format =3D=3D TextureFormat::RGBA8);
     return pixel_to_vec4(sampler->buf[P.x + P.y * sampler->stride]);
   }
 }

 vec4_scalar texelFetch(sampler2DRGBA32F sampler, ivec2_scalar P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA32F);
   return *(vec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
 }

 vec4_scalar texelFetch(sampler2DRGBA8 sampler, ivec2_scalar P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA8);
   return pixel_to_vec4(sampler->buf[P.x + P.y * sampler->stride]);
 }

 vec4_scalar texelFetch(sampler2DR8 sampler, ivec2_scalar P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::R8);
   return vec4_scalar{
       to_float(((uint8_t*)sampler->buf)[P.x + P.y * sampler->stride]), 0.0f,
       0.0f, 1.0f};
 }

 vec4_scalar texelFetch(sampler2DRG8 sampler, ivec2_scalar P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RG8);
   uint16_t pixel =3D ((uint16_t*)sampler->buf)[P.x + P.y * sampler->stride];
   return vec4_scalar{to_float(pixel & 0xFF), to_float(pixel >> 8), 0.0f, 1.=
 0f};
 }

 vec4 texelFetch(sampler2DRect sampler, ivec2 P) {
   P =3D clamp2D(P, sampler);
   switch (sampler->format) {
     case TextureFormat::RGBA8:
       return texelFetchRGBA8(sampler, P);
     case TextureFormat::R8:
       return texelFetchR8(sampler, P);
     case TextureFormat::RG8:
       return texelFetchRG8(sampler, P);
     default:
       assert(false);
       return vec4();
   }
 }

 SI vec4 texelFetch(sampler2DArray sampler, ivec3 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2DArray(P, sampler);
   switch (sampler->format) {
     case TextureFormat::RGBA32F:
       return texelFetchFloat(sampler, P);
     case TextureFormat::RGBA8:
       return texelFetchRGBA8(sampler, P);
     case TextureFormat::R8:
       return texelFetchR8(sampler, P);
     case TextureFormat::RG8:
       return texelFetchRG8(sampler, P);
     default:
       assert(false);
       return vec4();
   }
 }

 vec4 texelFetch(sampler2DArrayRGBA32F sampler, ivec3 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2DArray(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA32F);
   return texelFetchFloat(sampler, P);
 }

 vec4 texelFetch(sampler2DArrayRGBA8 sampler, ivec3 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2DArray(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA8);
   return texelFetchRGBA8(sampler, P);
 }

 vec4 texelFetch(sampler2DArrayR8 sampler, ivec3 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2DArray(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::R8);
   return texelFetchR8(sampler, P);
 }

 vec4 texelFetch(sampler2DArrayRG8 sampler, ivec3 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2DArray(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RG8);
   return texelFetchRG8(sampler, P);
 }

 template <typename S>
 SI ivec4 fetchOffsetsInt(S sampler, I32 offset) {
   return pixel_int_to_ivec4(
       *(I32*)&sampler->buf[offset.x], *(I32*)&sampler->buf[offset.y],
       *(I32*)&sampler->buf[offset.z], *(I32*)&sampler->buf[offset.w]);
 }

 ivec4 texelFetch(isampler2D sampler, ivec2 P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA32I);
   I32 offset =3D P.x * 4 + P.y * sampler->stride;
   return fetchOffsetsInt(sampler, offset);
 }

 ivec4_scalar texelFetch(isampler2D sampler, ivec2_scalar P, int lod) {
   assert(lod =3D=3D 0);
   P =3D clamp2D(P, sampler);
   assert(sampler->format =3D=3D TextureFormat::RGBA32I);
   return *(ivec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
 }

 SI vec4_scalar* texelFetchPtr(sampler2D sampler, ivec2_scalar P, int min_x,
                               int max_x, int min_y, int max_y) {
   P.x =3D min(max(P.x, -min_x), int(sampler->width) - 1 - max_x);
   P.y =3D min(max(P.y, -min_y), int(sampler->height) - 1 - max_y);
   assert(sampler->format =3D=3D TextureFormat::RGBA32F);
   return (vec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
 }

 SI ivec4_scalar* texelFetchPtr(isampler2D sampler, ivec2_scalar P, int min_=
 x,
                                int max_x, int min_y, int max_y) {
   P.x =3D min(max(P.x, -min_x), int(sampler->width) - 1 - max_x);
   P.y =3D min(max(P.y, -min_y), int(sampler->height) - 1 - max_y);
   assert(sampler->format =3D=3D TextureFormat::RGBA32I);
   return (ivec4_scalar*)&sampler->buf[P.x * 4 + P.y * sampler->stride];
 }

 template <typename S>
 SI I32 texelFetchPtr(S sampler, ivec2 P, int min_x, int max_x, int min_y,
                      int max_y) {
   P.x =3D clampCoord(P.x, int(sampler->width) - max_x, -min_x);
   P.y =3D clampCoord(P.y, int(sampler->height) - max_y, -min_y);
   return P.x * 4 + P.y * sampler->stride;
 }

 template <typename S, typename P>
 SI P texelFetchUnchecked(S sampler, P* ptr, int x, int y =3D 0) {
   return ptr[x + y * (sampler->stride >> 2)];
 }

 SI vec4 texelFetchUnchecked(sampler2D sampler, I32 offset, int x, int y =3D=
  0) {
   assert(sampler->format =3D=3D TextureFormat::RGBA32F);
   return fetchOffsetsFloat(sampler, offset + (x * 4 + y * sampler->stride));
 }

 SI ivec4 texelFetchUnchecked(isampler2D sampler, I32 offset, int x, int y =
 =3D 0) {
   assert(sampler->format =3D=3D TextureFormat::RGBA32I);
   return fetchOffsetsInt(sampler, offset + (x * 4 + y * sampler->stride));
 }

 #define texelFetchOffset(sampler, P, lod, offset) \
   texelFetch(sampler, (P) + (offset), lod)

 template <typename T, typename U, typename A,
           typename R =3D typename T::vector_type>
 SI R mix(T x, U y, A a) {
   return (y - x) * a + x;
 }

 SI Float mix(Float x, Float y, Float a) { return (y - x) * a + x; }

 template <typename T>
 SI T mix(T x, T y, float a) {
   return (y - x) * a + x;
 }

 template <typename T>
 SI T mix(T x, T y, vec4_scalar a) {
   return T{mix(x.x, y.x, a.x), mix(x.y, y.y, a.y), mix(x.z, y.z, a.z),
            mix(x.w, y.w, a.w)};
 }

 // Scale texture coords for quantization, subtract offset for filtering
 // (assuming coords already offset to texel centers), and round to nearest
 // 1/scale increment
 template <typename T>
 SI T linearQuantize(T P, float scale) {
   return P * scale + (0.5f - 0.5f * scale);
 }

 // Helper version that also scales normalized texture coords for sampler
 template <typename T, typename S>
 SI T linearQuantize(T P, float scale, S sampler) {
   P.x *=3D sampler->width;
   P.y *=3D sampler->height;
   return linearQuantize(P, scale);
 }

 template <typename T>
 SI T linearQuantize(T P, float scale, sampler2DRect sampler) {
   return linearQuantize(P, scale);
 }

 template <typename S>
 vec4 textureLinearRGBA8(S sampler, vec2 P, int32_t zoffset =3D 0) {
   assert(sampler->format =3D=3D TextureFormat::RGBA8);

 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2588 "src/glsl.h"
   ivec2 i(linearQuantize(P, 256, sampler));
   ivec2 frac =3D i & (I32)0xFF;
   i >>=3D 8;

   // Pack coords so they get clamped into range, and also for later bounding
   // of fractional coords. Store Y as low-bits for easier access, X as high.
   __m128i yx =3D _mm_packs_epi32(i.y, i.x);
   __m128i hw =3D _mm_packs_epi32(_mm_set1_epi32(sampler->height - 1),
                                _mm_set1_epi32(sampler->width - 1));
   // Clamp coords to valid range to prevent sampling outside texture.
   __m128i clampyx =3D _mm_min_epi16(_mm_max_epi16(yx, _mm_setzero_si128()),=
  hw);
   // Multiply clamped Y by stride and add X offset without overflowing 2^15
   // stride and accidentally yielding signed result.
   __m128i row0 =3D _mm_madd_epi16(
       _mm_unpacklo_epi16(clampyx, clampyx),
       _mm_set1_epi32((sampler->stride - 1) | 0x10000));
   row0 =3D _mm_add_epi32(row0, _mm_unpackhi_epi16(clampyx, _mm_setzero_si12=
 8()));
   // Add in layer offset if available
   row0 =3D _mm_add_epi32(row0, _mm_set1_epi32(zoffset));

   // Check if fractional coords are all zero, in which case skip filtering.
   __m128i fracyx =3D _mm_packs_epi32(frac.y, frac.x);
   if (!_mm_movemask_epi8(_mm_cmpgt_epi16(fracyx, _mm_setzero_si128()))) {
     return fetchOffsetsRGBA8(sampler, row0);
   }

   // Check if coords were clamped at all above. If so, need to adjust fract=
 ions
   // to avoid sampling outside the texture on the edges.
   __m128i yxinside =3D _mm_andnot_si128(
       _mm_cmplt_epi16(yx, _mm_setzero_si128()),
       _mm_cmplt_epi16(yx, hw));
   // Set fraction to zero when outside.
   fracyx =3D _mm_and_si128(fracyx, yxinside);
   // Store two side-by-side copies of X fraction, as below each pixel value
   // will be interleaved to be next to the pixel value for the next row.
   __m128i fracx =3D _mm_unpackhi_epi16(fracyx, fracyx);
   // For Y fraction, we need to store 1-fraction before each fraction, as a
   // madd will be used to weight and collapse all results as last step.
   __m128i fracy =3D _mm_unpacklo_epi16(
       _mm_sub_epi16(_mm_set1_epi16(256), fracyx), fracyx);

   // Ensure we don't sample row off end of texture from added stride.
   __m128i row1 =3D _mm_and_si128(yxinside, _mm_set1_epi16(sampler->stride));

   // Load two adjacent pixels on each row and interleave them.
   // r0,g0,b0,a0,r1,g1,b1,a1 \/ R0,G0,B0,A0,R1,G1,B1,A1
   // r0,R0,g0,G0,b0,B0,a0,A0,r1,R1,g1,G1,b1,B1,a1,A1
 #  define LOAD_LANE(out, idx)                                              =
  \
     {                                                                      =
  \
       uint32_t* buf =3D &sampler->buf[_mm_cvtsi128_si32(                   =
    \
           _mm_shuffle_epi32(row0, _MM_SHUFFLE(idx, idx, idx, idx)))];      =
  \
       out =3D _mm_unpacklo_epi8(                                           =
    \
           _mm_loadl_epi64((__m128i*)buf),                                  =
  \
           _mm_loadl_epi64((__m128i*)(buf + _mm_extract_epi16(row1, idx))));=
  \
     }
   __m128i x, y, z, w;
   LOAD_LANE(x, 0)
   LOAD_LANE(y, 1)
   LOAD_LANE(z, 2)
   LOAD_LANE(w, 3)
 #  undef LOAD_LANE

   // Need to transpose the data from AoS to SoA format. Best to do this here
   // while the data is still packed into 8-bit components, requiring fewer
   // insns.
   // r0,R0,g0,G0,b0,B0,a0,A0,r1,R1,g1,G1,b1,B1,a1,A1 \/
   // r2,R2,g2,G2,b2,B2,a2,A2,r3,R3,g3,G3,b3,B3,a3,A3
   // ... r0,R0,r2,R2,g0,G0,g2,G2,b0,B0,b2,B2,a0,A0,a2,A2
   // ... r1,R1,r3,R3,g1,G1,g3,G3,b1,B1,b3,B3,a1,A1,a3,A3
   __m128i xy0 =3D _mm_unpacklo_epi16(x, y);
   __m128i xy1 =3D _mm_unpackhi_epi16(x, y);
   __m128i zw0 =3D _mm_unpacklo_epi16(z, w);
   __m128i zw1 =3D _mm_unpackhi_epi16(z, w);
   // r0,R0,r2,R2,g0,G0,g2,G2,b0,B0,b2,B2,a0,A0,a2,A2 \/
   // r4,R4,r6,R6,g4,G4,g6,G6,b4,B4,b6,B6,a4,A4,a6,A6
   // ... r0,R0,r2,R2,r4,R4,r6,R6,g0,G0,g2,G2,g4,G4,g6,G6
   // ... b0,B0,b2,B2,b4,B4,b6,B6,a0,A0,a2,A2,a4,A4,a6,A6
   __m128i rg0 =3D _mm_unpacklo_epi32(xy0, zw0);
   __m128i ba0 =3D _mm_unpackhi_epi32(xy0, zw0);
   __m128i rg1 =3D _mm_unpacklo_epi32(xy1, zw1);
   __m128i ba1 =3D _mm_unpackhi_epi32(xy1, zw1);

   // Expand packed SoA pixels for each column. Multiply then add columns wi=
 th
   // 8-bit precision so we don't carry to high byte of word accidentally. U=
 se
   // final madd insn to blend interleaved rows and expand result to 32 bits.
 #  define FILTER_COMPONENT(out, unpack, src0, src1)                        =
     \
     {                                                                      =
     \
       __m128i cc0 =3D unpack(src0, _mm_setzero_si128());                   =
       \
       __m128i cc1 =3D unpack(src1, _mm_setzero_si128());                   =
       \
       cc0 =3D _mm_add_epi8(                                                =
       \
           cc0, _mm_srli_epi16(_mm_mullo_epi16(_mm_sub_epi16(cc1, cc0), frac=
 x), \
                               8));                                         =
     \
       out =3D _mm_cvtepi32_ps(_mm_madd_epi16(cc0, fracy));                 =
       \
     }
   __m128 fr, fg, fb, fa;
   FILTER_COMPONENT(fr, _mm_unpacklo_epi8, rg0, rg1);
   FILTER_COMPONENT(fg, _mm_unpackhi_epi8, rg0, rg1);
   FILTER_COMPONENT(fb, _mm_unpacklo_epi8, ba0, ba1);
   FILTER_COMPONENT(fa, _mm_unpackhi_epi8, ba0, ba1);
 #  undef FILTER_COMPONENT

   return vec4(fb, fg, fr, fa) * (1.0f / 0xFF00);
 #else
 # 2691 "src/glsl.h"
   ivec2 i(linearQuantize(P, 128, sampler));
   ivec2 frac =3D i & (I32)0x7F;
   i >>=3D 7;

   I32 row0 =3D clampCoord(i.x, sampler->width) +
              clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
   I32 row1 =3D row0 + ((i.y >=3D 0 && i.y < int32_t(sampler->height) - 1) &
                      I32(sampler->stride));
   I16 fracx =3D
       CONVERT(frac.x & (i.x >=3D 0 && i.x < int32_t(sampler->width) - 1), I=
 16);
   I16 fracy =3D CONVERT(frac.y, I16);

   auto a0 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.x]), V8<int16=
 _t>);
   auto a1 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.x]), V8<int16=
 _t>);
   a0 +=3D ((a1 - a0) * fracy.x) >> 7;

   auto b0 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.y]), V8<int16=
 _t>);
   auto b1 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.y]), V8<int16=
 _t>);
   b0 +=3D ((b1 - b0) * fracy.y) >> 7;

   auto abl =3D zipLow(a0, b0);
   auto abh =3D zipHigh(a0, b0);
   abl +=3D ((abh - abl) * fracx.xyxyxyxy) >> 7;

   auto c0 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.z]), V8<int16=
 _t>);
   auto c1 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.z]), V8<int16=
 _t>);
   c0 +=3D ((c1 - c0) * fracy.z) >> 7;

   auto d0 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row0.w]), V8<int16=
 _t>);
   auto d1 =3D
       CONVERT(unaligned_load<V8<uint8_t> >(&sampler->buf[row1.w]), V8<int16=
 _t>);
   d0 +=3D ((d1 - d0) * fracy.w) >> 7;

   auto cdl =3D zipLow(c0, d0);
   auto cdh =3D zipHigh(c0, d0);
   cdl +=3D ((cdh - cdl) * fracx.zwzwzwzw) >> 7;

   auto rg =3D CONVERT(V8<uint16_t>(zip2Low(abl, cdl)), V8<float>);
   auto ba =3D CONVERT(V8<uint16_t>(zip2High(abl, cdl)), V8<float>);

   auto r =3D lowHalf(rg);
   auto g =3D highHalf(rg);
   auto b =3D lowHalf(ba);
   auto a =3D highHalf(ba);
   return vec4(b, g, r, a) * (1.0f / 255.0f);
 #endif
 # 2744 "src/glsl.h"
 }

 template <typename S>
 static inline U16 textureLinearPackedR8(S sampler, ivec2 i, int32_t zoffset=
 ) {
   assert(sampler->format =3D=3D TextureFormat::R8);
   ivec2 frac =3D i & (I32)0x7F;
   i >>=3D 7;

   I32 row0 =3D clampCoord(i.x, sampler->width) +
              clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
   I32 row1 =3D row0 + ((i.y >=3D 0 && i.y < int32_t(sampler->height) - 1) &
                      I32(sampler->stride));
   I16 fracx =3D
       CONVERT(frac.x & (i.x >=3D 0 && i.x < int32_t(sampler->width) - 1), I=
 16);
   I16 fracy =3D CONVERT(frac.y, I16);

   uint8_t* buf =3D (uint8_t*)sampler->buf;
   auto a0 =3D unaligned_load<V2<uint8_t> >(&buf[row0.x]);
   auto b0 =3D unaligned_load<V2<uint8_t> >(&buf[row0.y]);
   auto c0 =3D unaligned_load<V2<uint8_t> >(&buf[row0.z]);
   auto d0 =3D unaligned_load<V2<uint8_t> >(&buf[row0.w]);
   auto abcd0 =3D CONVERT(combine(combine(a0, b0), combine(c0, d0)), V8<int1=
 6_t>);

   auto a1 =3D unaligned_load<V2<uint8_t> >(&buf[row1.x]);
   auto b1 =3D unaligned_load<V2<uint8_t> >(&buf[row1.y]);
   auto c1 =3D unaligned_load<V2<uint8_t> >(&buf[row1.z]);
   auto d1 =3D unaligned_load<V2<uint8_t> >(&buf[row1.w]);
   auto abcd1 =3D CONVERT(combine(combine(a1, b1), combine(c1, d1)), V8<int1=
 6_t>);

   abcd0 +=3D ((abcd1 - abcd0) * fracy.xxyyzzww) >> 7;

   abcd0 =3D SHUFFLE(abcd0, abcd0, 0, 2, 4, 6, 1, 3, 5, 7);
   auto abcdl =3D lowHalf(abcd0);
   auto abcdh =3D highHalf(abcd0);
   abcdl +=3D ((abcdh - abcdl) * fracx) >> 7;

   return U16(abcdl);
 }

 template <typename S>
 vec4 textureLinearR8(S sampler, vec2 P, int32_t zoffset =3D 0) {
   assert(sampler->format =3D=3D TextureFormat::R8);

 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2788 "src/glsl.h"
   ivec2 i(linearQuantize(P, 256, sampler));
   ivec2 frac =3D i & (I32)0xFF;
   i >>=3D 8;

   // Pack coords so they get clamped into range, and also for later bounding
   // of fractional coords. Store Y as low-bits for easier access, X as high.
   __m128i yx =3D _mm_packs_epi32(i.y, i.x);
   __m128i hw =3D _mm_packs_epi32(_mm_set1_epi32(sampler->height - 1),
                                _mm_set1_epi32(sampler->width - 1));
   // Clamp coords to valid range to prevent sampling outside texture.
   __m128i clampyx =3D _mm_min_epi16(_mm_max_epi16(yx, _mm_setzero_si128()),=
  hw);
   // Multiply clamped Y by stride and add X offset without overflowing 2^15
   // stride and accidentally yielding signed result.
   __m128i row0 =3D _mm_madd_epi16(
       _mm_unpacklo_epi16(clampyx, clampyx),
       _mm_set1_epi32((sampler->stride - 1) | 0x10000));
   row0 =3D _mm_add_epi32(row0, _mm_unpackhi_epi16(clampyx, _mm_setzero_si12=
 8()));
   // Add in layer offset if available
   row0 =3D _mm_add_epi32(row0, _mm_set1_epi32(zoffset));

   __m128i fracyx =3D _mm_packs_epi32(frac.y, frac.x);

   // Check if coords were clamped at all above. If so, need to adjust fract=
 ions
   // to avoid sampling outside the texture on the edges.
   __m128i yxinside =3D _mm_andnot_si128(
       _mm_cmplt_epi16(yx, _mm_setzero_si128()),
       _mm_cmplt_epi16(yx, hw));
   // Set fraction to zero when outside.
   fracyx =3D _mm_and_si128(fracyx, yxinside);
   // For X fraction, we need to store 1-fraction before each fraction, as a
   // madd will be used to weight and collapse all results as last step.
   __m128i fracx =3D _mm_unpackhi_epi16(
       _mm_sub_epi16(_mm_set1_epi16(256), fracyx), fracyx);
   // Store two side-by-side copies of Y fraction, as below each pixel value
   // will be interleaved to be next to the pixel value for the next column.
   __m128i fracy =3D _mm_unpacklo_epi16(fracyx, fracyx);

   // Ensure we don't sample row off end of texture from added stride.
   __m128i row1 =3D _mm_and_si128(yxinside, _mm_set1_epi16(sampler->stride));

   // Calculate pointers for first row in each lane
   uint8_t* buf =3D (uint8_t*)sampler->buf;
   uint8_t* buf0 =3D
       buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(0, 0, 0, =
 0)));
   uint8_t* buf1 =3D
       buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(1, 1, 1, =
 1)));
   uint8_t* buf2 =3D
       buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(2, 2, 2, =
 2)));
   uint8_t* buf3 =3D
       buf + _mm_cvtsi128_si32(_mm_shuffle_epi32(row0, _MM_SHUFFLE(3, 3, 3, =
 3)));
   // Load adjacent columns from first row, pack into register, then expand.
   __m128i cc0 =3D _mm_unpacklo_epi8(
       _mm_setr_epi16(*(uint16_t*)buf0, *(uint16_t*)buf1, *(uint16_t*)buf2,
                      *(uint16_t*)buf3, 0, 0, 0, 0),
       _mm_setzero_si128());
   // Load adjacent columns from next row, pack into register, then expand.
   __m128i cc1 =3D _mm_unpacklo_epi8(
       _mm_setr_epi16(*(uint16_t*)(buf0 + _mm_extract_epi16(row1, 0)),
                      *(uint16_t*)(buf1 + _mm_extract_epi16(row1, 1)),
                      *(uint16_t*)(buf2 + _mm_extract_epi16(row1, 2)),
                      *(uint16_t*)(buf3 + _mm_extract_epi16(row1, 3)),
                      0, 0, 0, 0),
       _mm_setzero_si128());
   // Multiply then add rows with 8-bit precision so we don't carry to high =
 byte
   // of word accidentally. Use final madd insn to blend interleaved columns=
  and
   // expand result to 32 bits.
   __m128i cc =3D _mm_add_epi8(
       cc0, _mm_srli_epi16(_mm_mullo_epi16(_mm_sub_epi16(cc1, cc0), fracy), =
 8));
   __m128 r =3D _mm_cvtepi32_ps(_mm_madd_epi16(cc, fracx));
   return vec4((Float)r * (1.0f / 0xFF00), 0.0f, 0.0f, 1.0f);
 #else
 # 2859 "src/glsl.h"
   ivec2 i(linearQuantize(P, 128, sampler));
   Float r =3D CONVERT(textureLinearPackedR8(sampler, i, zoffset), Float);
   return vec4(r * (1.0f / 255.0f), 0.0f, 0.0f, 1.0f);
 #endif
 # 2863 "src/glsl.h"
 }

 template <typename S>
 vec4 textureLinearRG8(S sampler, vec2 P, int32_t zoffset =3D 0) {
   assert(sampler->format =3D=3D TextureFormat::RG8);

   ivec2 i(linearQuantize(P, 128, sampler));
   ivec2 frac =3D i & (I32)0x7F;
   i >>=3D 7;

   I32 row0 =3D clampCoord(i.x, sampler->width) +
              clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
   I32 row1 =3D row0 + ((i.y >=3D 0 && i.y < int32_t(sampler->height) - 1) &
                      I32(sampler->stride));
   I16 fracx =3D
       CONVERT(frac.x & (i.x >=3D 0 && i.x < int32_t(sampler->width) - 1), I=
 16);
   I16 fracy =3D CONVERT(frac.y, I16);

   uint16_t* buf =3D (uint16_t*)sampler->buf;

   // Load RG bytes for two adjacent pixels - rgRG
   auto a0 =3D unaligned_load<V4<uint8_t> >(&buf[row0.x]);
   auto b0 =3D unaligned_load<V4<uint8_t> >(&buf[row0.y]);
   auto ab0 =3D CONVERT(combine(a0, b0), V8<int16_t>);
   // Load two pixels for next row
   auto a1 =3D unaligned_load<V4<uint8_t> >(&buf[row1.x]);
   auto b1 =3D unaligned_load<V4<uint8_t> >(&buf[row1.y]);
   auto ab1 =3D CONVERT(combine(a1, b1), V8<int16_t>);
   // Blend rows
   ab0 +=3D ((ab1 - ab0) * fracy.xxxxyyyy) >> 7;

   auto c0 =3D unaligned_load<V4<uint8_t> >(&buf[row0.z]);
   auto d0 =3D unaligned_load<V4<uint8_t> >(&buf[row0.w]);
   auto cd0 =3D CONVERT(combine(c0, d0), V8<int16_t>);
   auto c1 =3D unaligned_load<V4<uint8_t> >(&buf[row1.z]);
   auto d1 =3D unaligned_load<V4<uint8_t> >(&buf[row1.w]);
   auto cd1 =3D CONVERT(combine(c1, d1), V8<int16_t>);
   // Blend rows
   cd0 +=3D ((cd1 - cd0) * fracy.zzzzwwww) >> 7;

   // ab =3D a.rgRG,b.rgRG
   // cd =3D c.rgRG,d.rgRG
   // ... ac =3D ar,cr,ag,cg,aR,cR,aG,cG
   // ... bd =3D br,dr,bg,dg,bR,dR,bG,dG
   auto ac =3D zipLow(ab0, cd0);
   auto bd =3D zipHigh(ab0, cd0);
   // ar,br,cr,dr,ag,bg,cg,dg
   // aR,bR,cR,dR,aG,bG,cG,dG
   auto abcdl =3D zipLow(ac, bd);
   auto abcdh =3D zipHigh(ac, bd);
   // Blend columns
   abcdl +=3D ((abcdh - abcdl) * fracx.xyzwxyzw) >> 7;

   auto rg =3D CONVERT(V8<uint16_t>(abcdl), V8<float>) * (1.0f / 255.0f);
   auto r =3D lowHalf(rg);
   auto g =3D highHalf(rg);

   return vec4(r, g, 0.0f, 1.0f);
 }

 template <typename S>
 vec4 textureLinearRGBA32F(S sampler, vec2 P, int32_t zoffset =3D 0) {
   assert(sampler->format =3D=3D TextureFormat::RGBA32F);
   P.x *=3D sampler->width;
   P.y *=3D sampler->height;
   P -=3D 0.5f;
   vec2 f =3D floor(P);
   vec2 r =3D P - f;
   ivec2 i(f);
   ivec2 c =3D clamp2D(i, sampler);
   r.x =3D if_then_else(i.x >=3D 0 && i.x < sampler->width - 1, r.x, 0.0f);
   I32 offset0 =3D c.x * 4 + c.y * sampler->stride + zoffset;
   I32 offset1 =3D offset0 + ((i.y >=3D 0 && i.y < int32_t(sampler->height) =
 - 1) &
                            I32(sampler->stride));

   Float c0 =3D mix(mix(*(Float*)&sampler->buf[offset0.x],
                      *(Float*)&sampler->buf[offset0.x + 4], r.x),
                  mix(*(Float*)&sampler->buf[offset1.x],
                      *(Float*)&sampler->buf[offset1.x + 4], r.x),
                  r.y);
   Float c1 =3D mix(mix(*(Float*)&sampler->buf[offset0.y],
                      *(Float*)&sampler->buf[offset0.y + 4], r.x),
                  mix(*(Float*)&sampler->buf[offset1.y],
                      *(Float*)&sampler->buf[offset1.y + 4], r.x),
                  r.y);
   Float c2 =3D mix(mix(*(Float*)&sampler->buf[offset0.z],
                      *(Float*)&sampler->buf[offset0.z + 4], r.x),
                  mix(*(Float*)&sampler->buf[offset1.z],
                      *(Float*)&sampler->buf[offset1.z + 4], r.x),
                  r.y);
   Float c3 =3D mix(mix(*(Float*)&sampler->buf[offset0.w],
                      *(Float*)&sampler->buf[offset0.w + 4], r.x),
                  mix(*(Float*)&sampler->buf[offset1.w],
                      *(Float*)&sampler->buf[offset1.w + 4], r.x),
                  r.y);
   return pixel_float_to_vec4(c0, c1, c2, c3);
 }

 SI vec4 texture(sampler2D sampler, vec2 P) {
   if (sampler->filter =3D=3D TextureFilter::LINEAR) {
     switch (sampler->format) {
       case TextureFormat::RGBA32F:
         return textureLinearRGBA32F(sampler, P);
       case TextureFormat::RGBA8:
         return textureLinearRGBA8(sampler, P);
       case TextureFormat::R8:
         return textureLinearR8(sampler, P);
       case TextureFormat::RG8:
         return textureLinearRG8(sampler, P);
       default:
         assert(false);
         return vec4();
     }
   } else {
     ivec2 coord(roundzero(P.x, sampler->width), roundzero(P.y, sampler->hei=
 ght));
     return texelFetch(sampler, coord, 0);
   }
 }

 vec4 texture(sampler2DRect sampler, vec2 P) {
   if (sampler->filter =3D=3D TextureFilter::LINEAR) {
     switch (sampler->format) {
       case TextureFormat::RGBA8:
         return textureLinearRGBA8(sampler, P);
       case TextureFormat::R8:
         return textureLinearR8(sampler, P);
       case TextureFormat::RG8:
         return textureLinearRG8(sampler, P);
       default:
         assert(false);
         return vec4();
     }
   } else {
     ivec2 coord(roundzero(P.x, 1.0f), roundzero(P.y, 1.0f));
     return texelFetch(sampler, coord);
   }
 }

 SI vec4 texture(sampler2DArray sampler, vec3 P) {
   if (sampler->filter =3D=3D TextureFilter::LINEAR) {
     // SSE2 can generate slow code for 32-bit multiply, and we never actual=
 ly sample
     // from different layers in one chunk, so do cheaper scalar multiplicat=
 ion instead.
     assert(test_all(P.z =3D=3D P.z.x));
     int32_t zoffset =3D
         clampCoord(roundeven(P.z.x, 1.0f), sampler->depth) * sampler->heigh=
 t_stride;
     switch (sampler->format) {
       case TextureFormat::RGBA32F:
         return textureLinearRGBA32F(sampler, vec2(P.x, P.y), zoffset);
       case TextureFormat::RGBA8:
         return textureLinearRGBA8(sampler, vec2(P.x, P.y), zoffset);
       case TextureFormat::R8:
         return textureLinearR8(sampler, vec2(P.x, P.y), zoffset);
       case TextureFormat::RG8:
         return textureLinearRG8(sampler, vec2(P.x, P.y), zoffset);
       default:
         assert(false);
         return vec4();
     }
   } else {
     // just do nearest for now
     ivec3 coord(roundzero(P.x, sampler->width), roundzero(P.y, sampler->hei=
 ght),
                 roundeven(P.z, 1.0f));
     return texelFetch(sampler, coord, 0);
   }
 }

 vec4 texture(sampler2DArray sampler, vec3 P, float bias) {
   assert(bias =3D=3D 0.0f);
   return texture(sampler, P);
 }

 vec4 textureLod(sampler2DArray sampler, vec3 P, float lod) {
   assert(lod =3D=3D 0.0f);
   return texture(sampler, P);
 }

 ivec3_scalar textureSize(sampler2DArray sampler, int) {
   return ivec3_scalar{int32_t(sampler->width), int32_t(sampler->height),
                       int32_t(sampler->depth)};
 }

 ivec2_scalar textureSize(sampler2D sampler, int) {
   return ivec2_scalar{int32_t(sampler->width), int32_t(sampler->height)};
 }

 ivec2_scalar textureSize(sampler2DRect sampler) {
   return ivec2_scalar{int32_t(sampler->width), int32_t(sampler->height)};
 }

 ivec4 ivec2::sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4) {
   return ivec4(select(c1), select(c2), select(c3), select(c4));
 }

 vec4 vec2::sel(XYZW c1, XYZW c2, XYZW c3, XYZW c4) {
   return vec4(select(c1), select(c2), select(c3), select(c4));
 }

 bool any(bool x) { return x; }

 Bool any(bvec4 x) { return x.x | x.y | x.z | x.w; }

 bool any(bvec4_scalar x) { return x.x | x.y | x.z | x.w; }

 Bool any(bvec2 x) { return x.x | x.y; }

 bool any(bvec2_scalar x) { return x.x | x.y; }

 bool all(bool x) { return x; }

 Bool all(bvec2 x) { return x.x & x.y; }

 bool all(bvec2_scalar x) { return x.x & x.y; }

 Bool all(bvec4 x) { return x.x & x.y & x.z & x.w; }

 bool all(bvec4_scalar x) { return x.x & x.y & x.z & x.w; }

 SI vec4 if_then_else(bvec4 c, vec4 t, vec4 e) {
   return vec4(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y),
               if_then_else(c.z, t.z, e.z), if_then_else(c.w, t.w, e.w));
 }
 SI vec3 if_then_else(bvec3 c, vec3 t, vec3 e) {
   return vec3(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y),
               if_then_else(c.z, t.z, e.z));
 }

 SI vec2 if_then_else(bvec2 c, vec2 t, vec2 e) {
   return vec2(if_then_else(c.x, t.x, e.x), if_then_else(c.y, t.y, e.y));
 }

 template <typename T, typename R =3D typename T::vector_type>
 SI R mix(T x, T y, bvec4 a) {
   return if_then_else(a, y, x);
 }

 template <typename T, typename R =3D typename T::vector_type>
 SI R mix(T x, T y, bvec3 a) {
   return if_then_else(a, y, x);
 }

 template <typename T, typename R =3D typename T::vector_type>
 SI R mix(T x, T y, bvec2 a) {
   return if_then_else(a, y, x);
 }

 template <typename T>
 SI T mix(T x, T y, bvec4_scalar a) {
   return T{a.x ? y.x : x.x, a.y ? y.y : x.y, a.z ? y.z : x.z, a.w ? y.w : x=
 =2Ew};
 }

 template <typename T>
 SI T mix(T x, T y, bvec3_scalar a) {
   return T{a.x ? y.x : x.x, a.y ? y.y : x.y, a.z ? y.z : x.z};
 }

 template <typename T>
 SI T mix(T x, T y, bvec2_scalar a) {
   return T{a.x ? y.x : x.x, a.y ? y.y : x.y};
 }

 float dot(vec3_scalar a, vec3_scalar b) {
   return a.x * b.x + a.y * b.y + a.z * b.z;
 }

 Float dot(vec3 a, vec3 b) { return a.x * b.x + a.y * b.y + a.z * b.z; }

 float dot(vec2_scalar a, vec2_scalar b) { return a.x * b.x + a.y * b.y; }

 Float dot(vec2 a, vec2 b) { return a.x * b.x + a.y * b.y; }

 #define sin __glsl_sin

 float sin(float x) { return sinf(x); }

 Float sin(Float v) { return {sinf(v.x), sinf(v.y), sinf(v.z), sinf(v.w)}; }

 #define cos __glsl_cos

 float cos(float x) { return cosf(x); }

 Float cos(Float v) { return {cosf(v.x), cosf(v.y), cosf(v.z), cosf(v.w)}; }

 #define tan __glsl_tan

 float tan(float x) { return tanf(x); }

 Float tan(Float v) { return {tanf(v.x), tanf(v.y), tanf(v.z), tanf(v.w)}; }

 #define atan __glsl_atan

 float atan(float x) { return atanf(x); }

 Float atan(Float v) { return {atanf(v.x), atanf(v.y), atanf(v.z), atanf(v.w=
 )}; }

 float atan(float a, float b) { return atan2f(a, b); }

 Float atan(Float a, Float b) {
     return {atan2f(a.x, b.x), atan2f(a.y, b.y), atan2f(a.z, b.z), atan2f(a.=
 w, b.w)};
 }

 bvec4 notEqual(ivec4 a, ivec4 b) {
   return bvec4(a.x !=3D b.x, a.y !=3D b.y, a.z !=3D b.z, a.w !=3D b.w);
 }

 bvec4_scalar notEqual(ivec4_scalar a, ivec4_scalar b) {
   return bvec4_scalar{a.x !=3D b.x, a.y !=3D b.y, a.z !=3D b.z, a.w !=3D b.=
 w};
 }

 mat3 transpose(mat3 m) {
   return mat3(vec3(m[0].x, m[1].x, m[2].x), vec3(m[0].y, m[1].y, m[2].y),
               vec3(m[0].z, m[1].z, m[2].z));
 }

 mat3_scalar transpose(mat3_scalar m) {
   return mat3_scalar{vec3_scalar(m[0].x, m[1].x, m[2].x),
                      vec3_scalar(m[0].y, m[1].y, m[2].y),
                      vec3_scalar(m[0].z, m[1].z, m[2].z)};
 }

 vec2 abs(vec2 v) { return vec2(abs(v.x), abs(v.y)); }

 vec2_scalar abs(vec2_scalar v) { return vec2_scalar{fabsf(v.x), fabsf(v.y)}=
 ; }

 Float mod(Float a, Float b) { return a - b * floor(a / b); }

 vec2 mod(vec2 a, vec2 b) { return vec2(mod(a.x, b.x), mod(a.y, b.y)); }

 vec3 abs(vec3 v) { return vec3(abs(v.x), abs(v.y), abs(v.z)); }

 mat2 inverse(mat2 v) {
   Float det =3D v[0].x * v[1].y - v[0].y * v[1].x;
   return mat2(vec2(v[1].y, -v[0].y), vec2(-v[1].x, v[0].x)) * (1. / det);
 }

 mat2_scalar inverse(mat2_scalar v) {
   float det =3D v[0].x * v[1].y - v[0].y * v[1].x;
   return mat2_scalar{{v[1].y, -v[0].y}, {-v[1].x, v[0].x}} * (1. / det);
 }

 int32_t get_nth(I32 a, int n) { return a[n]; }

 float get_nth(Float a, int n) { return a[n]; }

 float get_nth(float a, int) { return a; }

 ivec2_scalar get_nth(ivec2 a, int n) { return ivec2_scalar{a.x[n], a.y[n]};=
  }

 vec2_scalar get_nth(vec2 a, int n) { return vec2_scalar{a.x[n], a.y[n]}; }

 vec3_scalar get_nth(vec3 a, int n) {
   return vec3_scalar{a.x[n], a.y[n], a.z[n]};
 }

 vec4_scalar get_nth(vec4 a, int n) {
   return vec4_scalar{a.x[n], a.y[n], a.z[n], a.w[n]};
 }

 ivec4_scalar get_nth(ivec4 a, int n) {
   return ivec4_scalar{a.x[n], a.y[n], a.z[n], a.w[n]};
 }

 mat3_scalar get_nth(mat3 a, int n) {
   return make_mat3(get_nth(a[0], n), get_nth(a[1], n), get_nth(a[2], n));
 }

 void put_nth(Float& dst, int n, float src) { dst[n] =3D src; }

 void put_nth(I32& dst, int n, int32_t src) { dst[n] =3D src; }

 void put_nth(ivec2& dst, int n, ivec2_scalar src) {
   dst.x[n] =3D src.x;
   dst.y[n] =3D src.y;
 }

 void put_nth(vec2& dst, int n, vec2_scalar src) {
   dst.x[n] =3D src.x;
   dst.y[n] =3D src.y;
 }

 void put_nth(vec3& dst, int n, vec3_scalar src) {
   dst.x[n] =3D src.x;
   dst.y[n] =3D src.y;
   dst.z[n] =3D src.z;
 }

 void put_nth(ivec4& dst, int n, ivec4_scalar src) {
   dst.x[n] =3D src.x;
   dst.y[n] =3D src.y;
   dst.z[n] =3D src.z;
   dst.w[n] =3D src.w;
 }

 void put_nth(vec4& dst, int n, vec4_scalar src) {
   dst.x[n] =3D src.x;
   dst.y[n] =3D src.y;
   dst.z[n] =3D src.z;
   dst.w[n] =3D src.w;
 }

 // Use an ElementType type constructor
 // so that we can implement element_type for
 // Int and Float
 template <typename V>
 struct ElementType {
   typedef typename V::element_type ty;
 };

 template <>
 struct ElementType<float> {
   typedef float ty;
 };

 template <>
 struct ElementType<int> {
   typedef float ty;
 };

 template <>
 struct ElementType<Float> {
   typedef float ty;
 };

 template <>
 struct ElementType<I32> {
   typedef int32_t ty;
 };

 void put_nth_component(ivec2_scalar& dst, int n, int32_t src) {
   switch (n) {
     case 0:
       dst.x =3D src;
       break;
     case 1:
       dst.y =3D src;
       break;
   }
 }

 void put_nth_component(ivec4_scalar& dst, int n, int32_t src) {
   switch (n) {
     case 0:
       dst.x =3D src;
       break;
     case 1:
       dst.y =3D src;
       break;
     case 2:
       dst.z =3D src;
       break;
     case 3:
       dst.w =3D src;
       break;
   }
 }

 void put_nth_component(int& dst, int n, int src) {
   switch (n) {
     case 0:
       dst =3D src;
       break;
   }
 }

 void put_nth_component(float& dst, int n, float src) {
   switch (n) {
     case 0:
       dst =3D src;
       break;
   }
 }

 void put_nth_component(vec2_scalar& dst, int n, float src) {
   switch (n) {
     case 0:
       dst.x =3D src;
       break;
     case 1:
       dst.y =3D src;
       break;
   }
 }

 void put_nth_component(vec3_scalar& dst, int n, float src) {
   switch (n) {
     case 0:
       dst.x =3D src;
       break;
     case 1:
       dst.y =3D src;
       break;
     case 2:
       dst.z =3D src;
       break;
   }
 }

 void put_nth_component(vec4_scalar& dst, int n, float src) {
   switch (n) {
     case 0:
       dst.x =3D src;
       break;
     case 1:
       dst.y =3D src;
       break;
     case 2:
       dst.z =3D src;
       break;
     case 3:
       dst.w =3D src;
       break;
   }
 }

 Float init_interp(float init0, float step) {
   float init1 =3D init0 + step;
   float init2 =3D init1 + step;
   float init3 =3D init2 + step;
   return {init0, init1, init2, init3};
 }

 vec2 init_interp(vec2_scalar init, vec2_scalar step) {
   return vec2(init_interp(init.x, step.x), init_interp(init.y, step.y));
 }

 vec3 init_interp(vec3_scalar init, vec3_scalar step) {
   return vec3(init_interp(init.x, step.x), init_interp(init.y, step.y),
               init_interp(init.z, step.z));
 }

 vec4 init_interp(vec4_scalar init, vec4_scalar step) {
   return vec4(init_interp(init.x, step.x), init_interp(init.y, step.y),
               init_interp(init.z, step.z), init_interp(init.w, step.w));
 }

 template <typename T, size_t N>
 struct Array {
   T elements[N];
   T& operator[](size_t i) { return elements[i]; }
   const T& operator[](size_t i) const { return elements[i]; }
   template <typename S>
   void convert(const Array<S, N>& s) {
     for (size_t i =3D 0; i < N; ++i) elements[i] =3D T(s[i]);
   }
 };

 template <size_t SIZE>
 Array<vec2, SIZE> if_then_else(I32 c, Array<vec2, SIZE> t,
                                Array<vec2, SIZE> e) {
   Array<vec2, SIZE> r;
   for (size_t i =3D 0; i < SIZE; i++) {
     r[i] =3D if_then_else(c, t[i], e[i]);
   }
   return r;
 }

 }  // namespace glsl
 # 43 "src/gl.cc" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "program.h"
 #endif /* expanded by -frewrite-includes */
 # 43 "src/gl.cc"
 # 1 "src/program.h" 1
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 struct VertexAttrib;

 namespace glsl {

 // Type holding group of scalars interpolated across rasterized rows and sp=
 ans,
 // shuttling values between vertex shaders and fragment shaders.
 // GCC requires power-of-two vector sizes, so must use glsl type as workaro=
 und
 // to operate in Float-sized chunks.
 typedef vec3 Interpolants;

 struct VertexShaderImpl;
 struct FragmentShaderImpl;

 struct ProgramImpl {
   virtual ~ProgramImpl() {}
   virtual int get_uniform(const char* name) const =3D 0;
   virtual void bind_attrib(const char* name, int index) =3D 0;
   virtual int get_attrib(const char* name) const =3D 0;
   virtual size_t interpolants_size() const =3D 0;
   virtual VertexShaderImpl* get_vertex_shader() =3D 0;
   virtual FragmentShaderImpl* get_fragment_shader() =3D 0;
 };

 typedef ProgramImpl* (*ProgramLoader)();

 struct VertexShaderImpl {
   typedef void (*SetUniform1iFunc)(VertexShaderImpl*, int index, int value);
   typedef void (*SetUniform4fvFunc)(VertexShaderImpl*, int index,
                                     const float* value);
   typedef void (*SetUniformMatrix4fvFunc)(VertexShaderImpl*, int index,
                                           const float* value);
   typedef void (*InitBatchFunc)(VertexShaderImpl*);
   typedef void (*LoadAttribsFunc)(VertexShaderImpl*, VertexAttrib* attribs,
                                   uint32_t start, int instance, int count);
   typedef void (*RunPrimitiveFunc)(VertexShaderImpl*, char* interps,
                                    size_t interp_stride);

   SetUniform1iFunc set_uniform_1i_func =3D nullptr;
   SetUniform4fvFunc set_uniform_4fv_func =3D nullptr;
   SetUniformMatrix4fvFunc set_uniform_matrix4fv_func =3D nullptr;
   InitBatchFunc init_batch_func =3D nullptr;
   LoadAttribsFunc load_attribs_func =3D nullptr;
   RunPrimitiveFunc run_primitive_func =3D nullptr;

   vec4 gl_Position;

   void set_uniform_1i(int index, int value) {
     (*set_uniform_1i_func)(this, index, value);
   }

   void set_uniform_4fv(int index, const float* value) {
     (*set_uniform_4fv_func)(this, index, value);
   }

   void set_uniform_matrix4fv(int index, const float* value) {
     (*set_uniform_matrix4fv_func)(this, index, value);
   }

   void init_batch() { (*init_batch_func)(this); }

   ALWAYS_INLINE void load_attribs(VertexAttrib* attribs, uint32_t start,
                                   int instance, int count) {
     (*load_attribs_func)(this, attribs, start, instance, count);
   }

   ALWAYS_INLINE void run_primitive(char* interps, size_t interp_stride) {
     (*run_primitive_func)(this, interps, interp_stride);
   }
 };

 struct FragmentShaderImpl {
   typedef void (*InitSpanFunc)(FragmentShaderImpl*, const void* interps,
                                const void* step, float step_width);
   typedef void (*RunFunc)(FragmentShaderImpl*);
   typedef void (*SkipFunc)(FragmentShaderImpl*, int chunks);
   typedef void (*InitSpanWFunc)(FragmentShaderImpl*, const void* interps,
                                 const void* step, float step_width);
   typedef void (*RunWFunc)(FragmentShaderImpl*);
   typedef void (*SkipWFunc)(FragmentShaderImpl*, int chunks);
   typedef void (*DrawSpanRGBA8Func)(FragmentShaderImpl*, uint32_t* buf,
                                     int len);
   typedef void (*DrawSpanR8Func)(FragmentShaderImpl*, uint8_t* buf, int len=
 );

   InitSpanFunc init_span_func =3D nullptr;
   RunFunc run_func =3D nullptr;
   SkipFunc skip_func =3D nullptr;
   InitSpanWFunc init_span_w_func =3D nullptr;
   RunWFunc run_w_func =3D nullptr;
   SkipWFunc skip_w_func =3D nullptr;
   DrawSpanRGBA8Func draw_span_RGBA8_func =3D nullptr;
   DrawSpanR8Func draw_span_R8_func =3D nullptr;

   enum FLAGS {
     DISCARD =3D 1 << 0,
     PERSPECTIVE =3D 1 << 1,
   };
   int flags =3D 0;
   void enable_discard() { flags |=3D DISCARD; }
   void enable_perspective() { flags |=3D PERSPECTIVE; }
   ALWAYS_INLINE bool use_discard() const { return (flags & DISCARD) !=3D 0;=
  }
   ALWAYS_INLINE bool use_perspective() const {
     return (flags & PERSPECTIVE) !=3D 0;
   }

   vec4 gl_FragCoord;
   vec2_scalar stepZW;
   Bool isPixelDiscarded =3D false;
   vec4 gl_FragColor;
   vec4 gl_SecondaryFragColor;

   ALWAYS_INLINE void step_fragcoord() { gl_FragCoord.x +=3D 4; }

   ALWAYS_INLINE void step_fragcoord(int chunks) {
     gl_FragCoord.x +=3D 4 * chunks;
   }

   ALWAYS_INLINE void step_perspective() {
     gl_FragCoord.z +=3D stepZW.x;
     gl_FragCoord.w +=3D stepZW.y;
   }

   ALWAYS_INLINE void step_perspective(int chunks) {
     gl_FragCoord.z +=3D stepZW.x * chunks;
     gl_FragCoord.w +=3D stepZW.y * chunks;
   }

   template <bool W =3D false>
   ALWAYS_INLINE void init_span(const void* interps, const void* step,
                                float step_width) {
     (*(W ? init_span_w_func : init_span_func))(this, interps, step, step_wi=
 dth);
   }

   template <bool W =3D false>
   ALWAYS_INLINE void run() {
     (*(W ? run_w_func : run_func))(this);
   }

   template <bool W =3D false>
   ALWAYS_INLINE void skip(int chunks =3D 1) {
     (*(W ? skip_w_func : skip_func))(this, chunks);
   }

   ALWAYS_INLINE void draw_span(uint32_t* buf, int len) {
     (*draw_span_RGBA8_func)(this, buf, len);
   }

   ALWAYS_INLINE bool has_draw_span(uint32_t*) {
     return draw_span_RGBA8_func !=3D nullptr;
   }

   ALWAYS_INLINE void draw_span(uint8_t* buf, int len) {
     (*draw_span_R8_func)(this, buf, len);
   }

   ALWAYS_INLINE bool has_draw_span(uint8_t*) {
     return draw_span_R8_func !=3D nullptr;
   }
 };

 }  // namespace glsl
 # 44 "src/gl.cc" 2

 using namespace glsl;

 struct IntRect {
   int x0;
   int y0;
   int x1;
   int y1;

   int width() const { return x1 - x0; }
   int height() const { return y1 - y0; }
   bool is_empty() const { return width() <=3D 0 || height() <=3D 0; }

   bool same_size(const IntRect& o) const {
     return width() =3D=3D o.width() && height() =3D=3D o.height();
   }

   bool contains(const IntRect& o) const {
     return o.x0 >=3D x0 && o.y0 >=3D y0 && o.x1 <=3D x1 && o.y1 <=3D y1;
   }

   IntRect& intersect(const IntRect& o) {
     x0 =3D max(x0, o.x0);
     y0 =3D max(y0, o.y0);
     x1 =3D min(x1, o.x1);
     y1 =3D min(y1, o.y1);
     return *this;
   }

   // Scale from source-space to dest-space, optionally rounding inward
   IntRect& scale(int srcWidth, int srcHeight, int dstWidth, int dstHeight,
                  bool roundIn =3D false) {
     x0 =3D (x0 * dstWidth + (roundIn ? srcWidth - 1 : 0)) / srcWidth;
     y0 =3D (y0 * dstHeight + (roundIn ? srcHeight - 1 : 0)) / srcHeight;
     x1 =3D (x1 * dstWidth) / srcWidth;
     y1 =3D (y1 * dstHeight) / srcHeight;
     return *this;
   }

   // Flip the rect's Y coords around inflection point at Y=3Doffset
   void invert_y(int offset) {
     y0 =3D offset - y0;
     y1 =3D offset - y1;
     swap(y0, y1);
   }

   IntRect& offset(int dx, int dy) {
     x0 +=3D dx;
     y0 +=3D dy;
     x1 +=3D dx;
     y1 +=3D dy;
     return *this;
   }
 };

 struct VertexAttrib {
   size_t size =3D 0;  // in bytes
   GLenum type =3D 0;
   bool normalized =3D false;
   GLsizei stride =3D 0;
   GLuint offset =3D 0;
   bool enabled =3D false;
   GLuint divisor =3D 0;
   int vertex_array =3D 0;
   int vertex_buffer =3D 0;
   char* buf =3D nullptr;  // XXX: this can easily dangle
   size_t buf_size =3D 0;  // this will let us bounds check
 };

 static int bytes_for_internal_format(GLenum internal_format) {
   switch (internal_format) {
     case GL_RGBA32F:
       return 4 * 4;
     case GL_RGBA32I:
       return 4 * 4;
     case GL_RGBA8:
     case GL_BGRA8:
     case GL_RGBA:
       return 4;
     case GL_R8:
     case GL_RED:
       return 1;
     case GL_RG8:
     case GL_RG:
       return 2;
     case GL_DEPTH_COMPONENT:
     case GL_DEPTH_COMPONENT16:
       return 2;
     case GL_DEPTH_COMPONENT24:
     case GL_DEPTH_COMPONENT32:
       return 4;
     default:
       debugf("internal format: %x\n", internal_format);
       assert(0);
       return 0;
   }
 }

 static inline int aligned_stride(int row_bytes) { return (row_bytes + 3) & =
 ~3; }

 static TextureFormat gl_format_to_texture_format(int type) {
   switch (type) {
     case GL_RGBA32F:
       return TextureFormat::RGBA32F;
     case GL_RGBA32I:
       return TextureFormat::RGBA32I;
     case GL_RGBA8:
       return TextureFormat::RGBA8;
     case GL_R8:
       return TextureFormat::R8;
     case GL_RG8:
       return TextureFormat::RG8;
     default:
       assert(0);
       return TextureFormat::RGBA8;
   }
 }

 struct Query {
   uint64_t value =3D 0;
 };

 struct Buffer {
   char* buf =3D nullptr;
   size_t size =3D 0;

   bool allocate(size_t new_size) {
     if (new_size !=3D size) {
       char* new_buf =3D (char*)realloc(buf, new_size);
       assert(new_buf);
       if (new_buf) {
         buf =3D new_buf;
         size =3D new_size;
         return true;
       }
       cleanup();
     }
     return false;
   }

   void cleanup() {
     if (buf) {
       free(buf);
       buf =3D nullptr;
       size =3D 0;
     }
   }

   ~Buffer() { cleanup(); }
 };

 struct Framebuffer {
   GLuint color_attachment =3D 0;
   GLint layer =3D 0;
   GLuint depth_attachment =3D 0;
 };

 struct Renderbuffer {
   GLuint texture =3D 0;

   void on_erase();
 };

 TextureFilter gl_filter_to_texture_filter(int type) {
   switch (type) {
     case GL_NEAREST:
       return TextureFilter::NEAREST;
     case GL_NEAREST_MIPMAP_LINEAR:
       return TextureFilter::NEAREST;
     case GL_NEAREST_MIPMAP_NEAREST:
       return TextureFilter::NEAREST;
     case GL_LINEAR:
       return TextureFilter::LINEAR;
     case GL_LINEAR_MIPMAP_LINEAR:
       return TextureFilter::LINEAR;
     case GL_LINEAR_MIPMAP_NEAREST:
       return TextureFilter::LINEAR;
     default:
       assert(0);
       return TextureFilter::NEAREST;
   }
 }

 struct Texture {
   GLenum internal_format =3D 0;
   int width =3D 0;
   int height =3D 0;
   int depth =3D 0;
   char* buf =3D nullptr;
   size_t buf_size =3D 0;
   uint32_t buf_stride =3D 0;
   uint8_t buf_bpp =3D 0;
   GLenum min_filter =3D GL_NEAREST;
   GLenum mag_filter =3D GL_LINEAR;
   // The number of active locks on this texture. If this texture has any ac=
 tive
   // locks, we need to disallow modifying or destroying the texture as it m=
 ay
   // be accessed by other threads where modifications could lead to races.
   int32_t locked =3D 0;

   enum FLAGS {
     SHOULD_FREE =3D 1 << 1,
   };
   int flags =3D SHOULD_FREE;
   bool should_free() const { return bool(flags & SHOULD_FREE); }

   void set_flag(int flag, bool val) {
     if (val) {
       flags |=3D flag;
     } else {
       flags &=3D ~flag;
     }
   }
   void set_should_free(bool val) { set_flag(SHOULD_FREE, val); }

   // Delayed-clearing state. When a clear of an FB is requested, we don't
   // immediately clear each row, as the rows may be subsequently overwritten
   // by draw calls, allowing us to skip the work of clearing the affected r=
 ows
   // either fully or partially. Instead, we keep a bit vector of rows that =
 need
   // to be cleared later and save the value they need to be cleared with so
   // that we can clear these rows individually when they are touched by dra=
 ws.
   // This currently only works for 2D textures, but not on texture arrays.
   int delay_clear =3D 0;
   uint32_t clear_val =3D 0;
   uint32_t* cleared_rows =3D nullptr;

   void enable_delayed_clear(uint32_t val) {
     delay_clear =3D height;
     clear_val =3D val;
     if (!cleared_rows) {
       cleared_rows =3D new uint32_t[(height + 31) / 32];
     }
     memset(cleared_rows, 0, ((height + 31) / 32) * sizeof(uint32_t));
     if (height & 31) {
       cleared_rows[height / 32] =3D ~0U << (height & 31);
     }
   }

   void disable_delayed_clear() {
     if (cleared_rows) {
       delete[] cleared_rows;
       cleared_rows =3D nullptr;
       delay_clear =3D 0;
     }
   }

   int bpp() const { return buf_bpp; }
   void set_bpp() { buf_bpp =3D bytes_for_internal_format(internal_format); }

   size_t stride() const { return buf_stride; }
   void set_stride() { buf_stride =3D aligned_stride(buf_bpp * width); }

   // Set an external backing buffer of this texture.
   void set_buffer(void* new_buf, size_t new_stride) {
     assert(!should_free());
     // Ensure that the supplied stride is at least as big as the internally
     // calculated aligned stride.
     set_bpp();
     set_stride();
     assert(new_stride >=3D buf_stride);

     buf =3D (char*)new_buf;
     buf_size =3D 0;
     buf_stride =3D new_stride;
   }

   bool allocate(bool force =3D false, int min_width =3D 0, int min_height =
 =3D 0) {
     assert(!locked);  // Locked textures shouldn't be reallocated
     // Check if there is either no buffer currently or if we forced validat=
 ion
     // of the buffer size because some dimension might have changed.
     if ((!buf || force) && should_free()) {
       // Initialize the buffer's BPP and stride, since they may have change=
 d.
       set_bpp();
       set_stride();
       // Compute new size based on the maximum potential stride, rather than
       // the current stride, to hopefully avoid reallocations when size wou=
 ld
       // otherwise change too much...
       size_t max_stride =3D max(buf_stride, aligned_stride(buf_bpp * min_wi=
 dth));
       size_t size =3D max_stride * max(height, min_height) * max(depth, 1);
       if (!buf || size > buf_size) {
         // Allocate with a SIMD register-sized tail of padding at the end s=
 o we
         // can safely read or write past the end of the texture with SIMD o=
 ps.
         char* new_buf =3D (char*)realloc(buf, size + sizeof(Float));
         assert(new_buf);
         if (new_buf) {
           // Successfully reallocated the buffer, so go ahead and set it.
           buf =3D new_buf;
           buf_size =3D size;
           return true;
         }
         // Allocation failed, so ensure we don't leave stale buffer state.
         cleanup();
       }
     }
     // Nothing changed...
     return false;
   }

   void cleanup() {
     assert(!locked);  // Locked textures shouldn't be destroyed
     if (buf && should_free()) {
       free(buf);
       buf =3D nullptr;
       buf_size =3D 0;
       buf_bpp =3D 0;
       buf_stride =3D 0;
     }
     disable_delayed_clear();
   }

   ~Texture() { cleanup(); }

   IntRect bounds() const { return IntRect{0, 0, width, height}; }

   // Find the valid sampling bounds relative to the requested region
   IntRect sample_bounds(const IntRect& req, bool invertY =3D false) const {
     IntRect bb =3D bounds().intersect(req).offset(-req.x0, -req.y0);
     if (invertY) bb.invert_y(req.height());
     return bb;
   }

   // Get a pointer for sampling at the given offset
   char* sample_ptr(int x, int y, int z =3D 0) const {
     return buf + (height * z + y) * stride() + x * bpp();
   }

   // Get a pointer for sampling the requested region and limit to the provi=
 ded
   // sampling bounds
   char* sample_ptr(const IntRect& req, const IntRect& bounds, int z,
                    bool invertY =3D false) const {
     // Offset the sample pointer by the clamped bounds
     int x =3D req.x0 + bounds.x0;
     // Invert the Y offset if necessary
     int y =3D invertY ? req.y1 - 1 - bounds.y0 : req.y0 + bounds.y0;
     return sample_ptr(x, y, z);
   }
 };

 // The last vertex attribute is reserved as a null attribute in case a vert=
 ex
 // attribute is used without being set.
 #define MAX_ATTRIBS 17
 #define NULL_ATTRIB 16
 struct VertexArray {
   VertexAttrib attribs[MAX_ATTRIBS];
   int max_attrib =3D -1;

   void validate();
 };

 struct Shader {
   GLenum type =3D 0;
   ProgramLoader loader =3D nullptr;
 };

 struct Program {
   ProgramImpl* impl =3D nullptr;
   VertexShaderImpl* vert_impl =3D nullptr;
   FragmentShaderImpl* frag_impl =3D nullptr;
   bool deleted =3D false;

   ~Program() { delete impl; }
 };

 // clang-format off
 // for GL defines to fully expand
 #define CONCAT_KEY(prefix, x, y, z, w, ...) prefix##x##y##z##w
 #define BLEND_KEY(...) CONCAT_KEY(BLEND_, __VA_ARGS__, 0, 0)
 #define FOR_EACH_BLEND_KEY(macro)                                          =
     \
   macro(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPH=
 A)  \
   macro(GL_ONE, GL_ONE_MINUS_SRC_ALPHA, 0, 0)                              =
     \
   macro(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, 0, 0)                             =
     \
   macro(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, GL_ZERO, GL_ONE)                  =
     \
   macro(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA, 0, 0)                             =
     \
   macro(GL_ZERO, GL_SRC_COLOR, 0, 0)                                       =
     \
   macro(GL_ONE, GL_ONE, 0, 0)                                              =
     \
   macro(GL_ONE, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)                    =
     \
   macro(GL_ONE, GL_ZERO, 0, 0)                                             =
     \
   macro(GL_ONE_MINUS_DST_ALPHA, GL_ONE, GL_ZERO, GL_ONE)                   =
     \
   macro(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR, 0, 0)                   =
     \
   macro(GL_ONE, GL_ONE_MINUS_SRC1_COLOR, 0, 0)
 // clang-format on

 #define DEFINE_BLEND_KEY(...) BLEND_KEY(__VA_ARGS__),
 enum BlendKey : uint8_t {
   BLEND_KEY_NONE =3D 0,
   FOR_EACH_BLEND_KEY(DEFINE_BLEND_KEY)
 };

 const size_t MAX_TEXTURE_UNITS =3D 16;

 template <typename T>
 static inline bool unlink(T& binding, T n) {
   if (binding =3D=3D n) {
     binding =3D 0;
     return true;
   }
   return false;
 }

 template <typename O>
 struct ObjectStore {
   O** objects =3D nullptr;
   size_t size =3D 0;
   // reserve object 0 as null
   size_t first_free =3D 1;
   O invalid;

   ~ObjectStore() {
     if (objects) {
       for (size_t i =3D 0; i < size; i++) delete objects[i];
       free(objects);
     }
   }

   bool grow(size_t i) {
     size_t new_size =3D size ? size : 8;
     while (new_size <=3D i) new_size +=3D new_size / 2;
     O** new_objects =3D (O**)realloc(objects, new_size * sizeof(O*));
     assert(new_objects);
     if (!new_objects) return false;
     while (size < new_size) new_objects[size++] =3D nullptr;
     objects =3D new_objects;
     return true;
   }

   void insert(size_t i, const O& o) {
     if (i >=3D size && !grow(i)) return;
     if (!objects[i]) objects[i] =3D new O(o);
   }

   size_t next_free() {
     size_t i =3D first_free;
     while (i < size && objects[i]) i++;
     first_free =3D i;
     return i;
   }

   size_t insert(const O& o =3D O()) {
     size_t i =3D next_free();
     insert(i, o);
     return i;
   }

   O& operator[](size_t i) {
     insert(i, O());
     return i < size ? *objects[i] : invalid;
   }

   O* find(size_t i) const { return i < size ? objects[i] : nullptr; }

   template <typename T>
   void on_erase(T*, ...) {}
   template <typename T>
   void on_erase(T* o, decltype(&T::on_erase)) {
     o->on_erase();
   }

   bool erase(size_t i) {
     if (i < size && objects[i]) {
       on_erase(objects[i], nullptr);
       delete objects[i];
       objects[i] =3D nullptr;
       if (i < first_free) first_free =3D i;
       return true;
     }
     return false;
   }

   O** begin() const { return objects; }
   O** end() const { return &objects[size]; }
 };

 struct Context {
   int32_t references =3D 1;

   ObjectStore<Query> queries;
   ObjectStore<Buffer> buffers;
   ObjectStore<Texture> textures;
   ObjectStore<VertexArray> vertex_arrays;
   ObjectStore<Framebuffer> framebuffers;
   ObjectStore<Renderbuffer> renderbuffers;
   ObjectStore<Shader> shaders;
   ObjectStore<Program> programs;

   IntRect viewport =3D {0, 0, 0, 0};

   bool blend =3D false;
   GLenum blendfunc_srgb =3D GL_ONE;
   GLenum blendfunc_drgb =3D GL_ZERO;
   GLenum blendfunc_sa =3D GL_ONE;
   GLenum blendfunc_da =3D GL_ZERO;
   GLenum blend_equation =3D GL_FUNC_ADD;
   V8<uint16_t> blendcolor =3D 0;
   BlendKey blend_key =3D BLEND_KEY_NONE;

   bool depthtest =3D false;
   bool depthmask =3D true;
   GLenum depthfunc =3D GL_LESS;

   bool scissortest =3D false;
   IntRect scissor =3D {0, 0, 0, 0};

   uint32_t clearcolor =3D 0;
   GLdouble cleardepth =3D 1;

   int unpack_row_length =3D 0;

   int shaded_rows =3D 0;
   int shaded_pixels =3D 0;

   struct TextureUnit {
     GLuint texture_2d_binding =3D 0;
     GLuint texture_3d_binding =3D 0;
     GLuint texture_2d_array_binding =3D 0;
     GLuint texture_rectangle_binding =3D 0;

     void unlink(GLuint n) {
       ::unlink(texture_2d_binding, n);
       ::unlink(texture_3d_binding, n);
       ::unlink(texture_2d_array_binding, n);
       ::unlink(texture_rectangle_binding, n);
     }
   };
   TextureUnit texture_units[MAX_TEXTURE_UNITS];
   int active_texture_unit =3D 0;

   GLuint current_program =3D 0;

   GLuint current_vertex_array =3D 0;
   bool validate_vertex_array =3D true;

   GLuint pixel_pack_buffer_binding =3D 0;
   GLuint pixel_unpack_buffer_binding =3D 0;
   GLuint array_buffer_binding =3D 0;
   GLuint element_array_buffer_binding =3D 0;
   GLuint time_elapsed_query =3D 0;
   GLuint samples_passed_query =3D 0;
   GLuint renderbuffer_binding =3D 0;
   GLuint draw_framebuffer_binding =3D 0;
   GLuint read_framebuffer_binding =3D 0;
   GLuint unknown_binding =3D 0;

   GLuint& get_binding(GLenum name) {
     switch (name) {
       case GL_PIXEL_PACK_BUFFER:
         return pixel_pack_buffer_binding;
       case GL_PIXEL_UNPACK_BUFFER:
         return pixel_unpack_buffer_binding;
       case GL_ARRAY_BUFFER:
         return array_buffer_binding;
       case GL_ELEMENT_ARRAY_BUFFER:
         return element_array_buffer_binding;
       case GL_TEXTURE_2D:
         return texture_units[active_texture_unit].texture_2d_binding;
       case GL_TEXTURE_2D_ARRAY:
         return texture_units[active_texture_unit].texture_2d_array_binding;
       case GL_TEXTURE_3D:
         return texture_units[active_texture_unit].texture_3d_binding;
       case GL_TEXTURE_RECTANGLE:
         return texture_units[active_texture_unit].texture_rectangle_binding;
       case GL_TIME_ELAPSED:
         return time_elapsed_query;
       case GL_SAMPLES_PASSED:
         return samples_passed_query;
       case GL_RENDERBUFFER:
         return renderbuffer_binding;
       case GL_DRAW_FRAMEBUFFER:
         return draw_framebuffer_binding;
       case GL_READ_FRAMEBUFFER:
         return read_framebuffer_binding;
       default:
         debugf("unknown binding %x\n", name);
         assert(false);
         return unknown_binding;
     }
   }

   Texture& get_texture(sampler2D, int unit) {
     return textures[texture_units[unit].texture_2d_binding];
   }

   Texture& get_texture(isampler2D, int unit) {
     return textures[texture_units[unit].texture_2d_binding];
   }

   Texture& get_texture(sampler2DArray, int unit) {
     return textures[texture_units[unit].texture_2d_array_binding];
   }

   Texture& get_texture(sampler2DRect, int unit) {
     return textures[texture_units[unit].texture_rectangle_binding];
   }

   IntRect apply_scissor(IntRect bb) const {
     return scissortest ? bb.intersect(scissor) : bb;
   }
 };
 static Context* ctx =3D nullptr;
 static VertexShaderImpl* vertex_shader =3D nullptr;
 static FragmentShaderImpl* fragment_shader =3D nullptr;
 static BlendKey blend_key =3D BLEND_KEY_NONE;

 static void prepare_texture(Texture& t, const IntRect* skip =3D nullptr);

 template <typename S>
 static inline void init_depth(S* s, Texture& t) {
   s->depth =3D max(t.depth, 1);
   s->height_stride =3D s->stride * t.height;
 }

 template <typename S>
 static inline void init_filter(S* s, Texture& t) {
   s->filter =3D gl_filter_to_texture_filter(t.mag_filter);
 }

 template <typename S>
 static inline void init_sampler(S* s, Texture& t) {
   prepare_texture(t);
   s->width =3D t.width;
   s->height =3D t.height;
   s->stride =3D t.stride();
   int bpp =3D t.bpp();
   if (bpp >=3D 4)
     s->stride /=3D 4;
   else if (bpp =3D=3D 2)
     s->stride /=3D 2;
   else
     assert(bpp =3D=3D 1);
   // Use uint32_t* for easier sampling, but need to cast to uint8_t* or
   // uint16_t* for formats with bpp < 4.
   s->buf =3D (uint32_t*)t.buf;
   s->format =3D gl_format_to_texture_format(t.internal_format);
 }

 template <typename S>
 static inline void null_sampler(S* s) {
   // For null texture data, just make the sampler provide a 1x1 buffer that=
  is
   // transparent black. Ensure buffer holds at least a SIMD vector of zero =
 data
   // for SIMD padding of unaligned loads.
   static const uint32_t zeroBuf[sizeof(Float) / sizeof(uint32_t)] =3D {0};
   s->width =3D 1;
   s->height =3D 1;
   s->stride =3D s->width;
   s->buf =3D (uint32_t*)zeroBuf;
   s->format =3D TextureFormat::RGBA8;
 }

 template <typename S>
 static inline void null_filter(S* s) {
   s->filter =3D TextureFilter::NEAREST;
 }

 template <typename S>
 static inline void null_depth(S* s) {
   s->depth =3D 1;
   s->height_stride =3D s->stride;
 }

 template <typename S>
 S* lookup_sampler(S* s, int texture) {
   Texture& t =3D ctx->get_texture(s, texture);
   if (!t.buf) {
     null_sampler(s);
     null_filter(s);
   } else {
     init_sampler(s, t);
     init_filter(s, t);
   }
   return s;
 }

 template <typename S>
 S* lookup_isampler(S* s, int texture) {
   Texture& t =3D ctx->get_texture(s, texture);
   if (!t.buf) {
     null_sampler(s);
   } else {
     init_sampler(s, t);
   }
   return s;
 }

 template <typename S>
 S* lookup_sampler_array(S* s, int texture) {
   Texture& t =3D ctx->get_texture(s, texture);
   if (!t.buf) {
     null_sampler(s);
     null_depth(s);
     null_filter(s);
   } else {
     init_sampler(s, t);
     init_depth(s, t);
     init_filter(s, t);
   }
   return s;
 }

 int bytes_per_type(GLenum type) {
   switch (type) {
     case GL_INT:
       return 4;
     case GL_FLOAT:
       return 4;
     case GL_UNSIGNED_SHORT:
       return 2;
     case GL_UNSIGNED_BYTE:
       return 1;
     default:
       assert(0);
       return 0;
   }
 }

 template <typename S, typename C>
 static inline S expand_attrib(const char* buf, size_t size, bool normalized=
 ) {
   typedef typename ElementType<S>::ty elem_type;
   S scalar =3D {0};
   const C* src =3D reinterpret_cast<const C*>(buf);
   if (normalized) {
     const float scale =3D 1.0f / ((1 << (8 * sizeof(C))) - 1);
     for (size_t i =3D 0; i < size / sizeof(C); i++) {
       put_nth_component(scalar, i, elem_type(src[i]) * scale);
     }
   } else {
     for (size_t i =3D 0; i < size / sizeof(C); i++) {
       put_nth_component(scalar, i, elem_type(src[i]));
     }
   }
   return scalar;
 }

 template <typename S>
 static inline S load_attrib_scalar(VertexAttrib& va, const char* src) {
   if (sizeof(S) <=3D va.size) {
     return *reinterpret_cast<const S*>(src);
   }
   if (va.type =3D=3D GL_UNSIGNED_SHORT) {
     return expand_attrib<S, uint16_t>(src, va.size, va.normalized);
   }
   if (va.type =3D=3D GL_UNSIGNED_BYTE) {
     return expand_attrib<S, uint8_t>(src, va.size, va.normalized);
   }
   assert(sizeof(typename ElementType<S>::ty) =3D=3D bytes_per_type(va.type)=
 );
   S scalar =3D {0};
   memcpy(&scalar, src, va.size);
   return scalar;
 }

 template <typename T>
 void load_attrib(T& attrib, VertexAttrib& va, uint32_t start, int instance,
                  int count) {
   typedef decltype(force_scalar(attrib)) scalar_type;
   if (!va.enabled) {
     attrib =3D T(scalar_type{0});
   } else if (va.divisor !=3D 0) {
     char* src =3D (char*)va.buf + va.stride * instance + va.offset;
     assert(src + va.size <=3D va.buf + va.buf_size);
     attrib =3D T(load_attrib_scalar<scalar_type>(va, src));
   } else {
     // Specialized for WR's primitive vertex order/winding.
     // Triangles must be indexed at offsets 0, 1, 2.
     // Quads must be successive triangles indexed at offsets 0, 1, 2, 2, 1,=
  3.
     // Triangle vertexes fill vertex shader SIMD lanes as 0, 1, 2, 2.
     // Quad vertexes fill vertex shader SIMD lanes as 0, 1, 3, 2, so that t=
 he
     // points form a convex path that can be traversed by the rasterizer.
     if (!count) return;
     assert(count =3D=3D 3 || count =3D=3D 4);
     char* src =3D (char*)va.buf + va.stride * start + va.offset;
     attrib =3D (T){load_attrib_scalar<scalar_type>(va, src),
                  load_attrib_scalar<scalar_type>(va, src + va.stride),
                  load_attrib_scalar<scalar_type>(
                      va, src + va.stride * 2 + (count > 3 ? va.stride : 0)),
                  load_attrib_scalar<scalar_type>(va, src + va.stride * 2)};
   }
 }

 template <typename T>
 void load_flat_attrib(T& attrib, VertexAttrib& va, uint32_t start, int inst=
 ance,
                       int count) {
   typedef decltype(force_scalar(attrib)) scalar_type;
   if (!va.enabled) {
     attrib =3D T{0};
     return;
   }
   char* src =3D nullptr;
   if (va.divisor !=3D 0) {
     src =3D (char*)va.buf + va.stride * instance + va.offset;
   } else {
     if (!count) return;
     src =3D (char*)va.buf + va.stride * start + va.offset;
   }
   assert(src + va.size <=3D va.buf + va.buf_size);
   attrib =3D T(load_attrib_scalar<scalar_type>(va, src));
 }

 void setup_program(GLuint program) {
   if (!program) {
     vertex_shader =3D nullptr;
     fragment_shader =3D nullptr;
     return;
   }
   Program& p =3D ctx->programs[program];
   assert(p.impl);
   assert(p.vert_impl);
   assert(p.frag_impl);
   vertex_shader =3D p.vert_impl;
   fragment_shader =3D p.frag_impl;
 }

 extern ProgramLoader load_shader(const char* name);

 extern "C" {

 void UseProgram(GLuint program) {
   if (ctx->current_program && program !=3D ctx->current_program) {
     auto* p =3D ctx->programs.find(ctx->current_program);
     if (p && p->deleted) {
       ctx->programs.erase(ctx->current_program);
     }
   }
   ctx->current_program =3D program;
   setup_program(program);
 }

 void SetViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
   ctx->viewport =3D IntRect{x, y, x + width, y + height};
 }

 void Enable(GLenum cap) {
   switch (cap) {
     case GL_BLEND:
       ctx->blend =3D true;
       blend_key =3D ctx->blend_key;
       break;
     case GL_DEPTH_TEST:
       ctx->depthtest =3D true;
       break;
     case GL_SCISSOR_TEST:
       ctx->scissortest =3D true;
       break;
   }
 }

 void Disable(GLenum cap) {
   switch (cap) {
     case GL_BLEND:
       ctx->blend =3D false;
       blend_key =3D BLEND_KEY_NONE;
       break;
     case GL_DEPTH_TEST:
       ctx->depthtest =3D false;
       break;
     case GL_SCISSOR_TEST:
       ctx->scissortest =3D false;
       break;
   }
 }

 GLenum GetError() { return GL_NO_ERROR; }

 static const char* const extensions[] =3D {
     "GL_ARB_blend_func_extended", "GL_ARB_copy_image",
     "GL_ARB_draw_instanced",      "GL_ARB_explicit_attrib_location",
     "GL_ARB_instanced_arrays",    "GL_ARB_invalidate_subdata",
     "GL_ARB_texture_storage",     "GL_EXT_timer_query",
 };

 void GetIntegerv(GLenum pname, GLint* params) {
   assert(params);
   switch (pname) {
     case GL_MAX_TEXTURE_UNITS:
     case GL_MAX_TEXTURE_IMAGE_UNITS:
       params[0] =3D MAX_TEXTURE_UNITS;
       break;
     case GL_MAX_TEXTURE_SIZE:
       params[0] =3D 1 << 15;
       break;
     case GL_MAX_ARRAY_TEXTURE_LAYERS:
       params[0] =3D 1 << 15;
       break;
     case GL_READ_FRAMEBUFFER_BINDING:
       params[0] =3D ctx->read_framebuffer_binding;
       break;
     case GL_DRAW_FRAMEBUFFER_BINDING:
       params[0] =3D ctx->draw_framebuffer_binding;
       break;
     case GL_PIXEL_PACK_BUFFER_BINDING:
       params[0] =3D ctx->pixel_pack_buffer_binding;
       break;
     case GL_PIXEL_UNPACK_BUFFER_BINDING:
       params[0] =3D ctx->pixel_unpack_buffer_binding;
       break;
     case GL_NUM_EXTENSIONS:
       params[0] =3D sizeof(extensions) / sizeof(extensions[0]);
       break;
     default:
       debugf("unhandled glGetIntegerv parameter %x\n", pname);
       assert(false);
   }
 }

 void GetBooleanv(GLenum pname, GLboolean* params) {
   assert(params);
   switch (pname) {
     case GL_DEPTH_WRITEMASK:
       params[0] =3D ctx->depthmask;
       break;
     default:
       debugf("unhandled glGetBooleanv parameter %x\n", pname);
       assert(false);
   }
 }

 const char* GetString(GLenum name) {
   switch (name) {
     case GL_VENDOR:
       return "Mozilla Gfx";
     case GL_RENDERER:
       return "Software WebRender";
     case GL_VERSION:
       return "3.2";
     default:
       debugf("unhandled glGetString parameter %x\n", name);
       assert(false);
       return nullptr;
   }
 }

 const char* GetStringi(GLenum name, GLuint index) {
   switch (name) {
     case GL_EXTENSIONS:
       if (index >=3D sizeof(extensions) / sizeof(extensions[0])) {
         return nullptr;
       }
       return extensions[index];
     default:
       debugf("unhandled glGetStringi parameter %x\n", name);
       assert(false);
       return nullptr;
   }
 }

 GLenum remap_blendfunc(GLenum rgb, GLenum a) {
   switch (a) {
     case GL_SRC_ALPHA:
       if (rgb =3D=3D GL_SRC_COLOR) a =3D GL_SRC_COLOR;
       break;
     case GL_ONE_MINUS_SRC_ALPHA:
       if (rgb =3D=3D GL_ONE_MINUS_SRC_COLOR) a =3D GL_ONE_MINUS_SRC_COLOR;
       break;
     case GL_DST_ALPHA:
       if (rgb =3D=3D GL_DST_COLOR) a =3D GL_DST_COLOR;
       break;
     case GL_ONE_MINUS_DST_ALPHA:
       if (rgb =3D=3D GL_ONE_MINUS_DST_COLOR) a =3D GL_ONE_MINUS_DST_COLOR;
       break;
     case GL_CONSTANT_ALPHA:
       if (rgb =3D=3D GL_CONSTANT_COLOR) a =3D GL_CONSTANT_COLOR;
       break;
     case GL_ONE_MINUS_CONSTANT_ALPHA:
       if (rgb =3D=3D GL_ONE_MINUS_CONSTANT_COLOR) a =3D GL_ONE_MINUS_CONSTA=
 NT_COLOR;
       break;
     case GL_SRC_COLOR:
       if (rgb =3D=3D GL_SRC_ALPHA) a =3D GL_SRC_ALPHA;
       break;
     case GL_ONE_MINUS_SRC_COLOR:
       if (rgb =3D=3D GL_ONE_MINUS_SRC_ALPHA) a =3D GL_ONE_MINUS_SRC_ALPHA;
       break;
     case GL_DST_COLOR:
       if (rgb =3D=3D GL_DST_ALPHA) a =3D GL_DST_ALPHA;
       break;
     case GL_ONE_MINUS_DST_COLOR:
       if (rgb =3D=3D GL_ONE_MINUS_DST_ALPHA) a =3D GL_ONE_MINUS_DST_ALPHA;
       break;
     case GL_CONSTANT_COLOR:
       if (rgb =3D=3D GL_CONSTANT_ALPHA) a =3D GL_CONSTANT_ALPHA;
       break;
     case GL_ONE_MINUS_CONSTANT_COLOR:
       if (rgb =3D=3D GL_ONE_MINUS_CONSTANT_ALPHA) a =3D GL_ONE_MINUS_CONSTA=
 NT_ALPHA;
       break;
     case GL_SRC1_ALPHA:
       if (rgb =3D=3D GL_SRC1_COLOR) a =3D GL_SRC1_COLOR;
       break;
     case GL_ONE_MINUS_SRC1_ALPHA:
       if (rgb =3D=3D GL_ONE_MINUS_SRC1_COLOR) a =3D GL_ONE_MINUS_SRC1_COLOR;
       break;
     case GL_SRC1_COLOR:
       if (rgb =3D=3D GL_SRC1_ALPHA) a =3D GL_SRC1_ALPHA;
       break;
     case GL_ONE_MINUS_SRC1_COLOR:
       if (rgb =3D=3D GL_ONE_MINUS_SRC1_ALPHA) a =3D GL_ONE_MINUS_SRC1_ALPHA;
       break;
   }
   return a;
 }

 void BlendFunc(GLenum srgb, GLenum drgb, GLenum sa, GLenum da) {
   ctx->blendfunc_srgb =3D srgb;
   ctx->blendfunc_drgb =3D drgb;
   sa =3D remap_blendfunc(srgb, sa);
   da =3D remap_blendfunc(drgb, da);
   ctx->blendfunc_sa =3D sa;
   ctx->blendfunc_da =3D da;

 #define HASH_BLEND_KEY(x, y, z, w) ((x << 4) | (y) | (z << 24) | (w << 20))
   int hash =3D HASH_BLEND_KEY(srgb, drgb, 0, 0);
   if (srgb !=3D sa || drgb !=3D da) hash |=3D HASH_BLEND_KEY(0, 0, sa, da);
   switch (hash) {
 #define MAP_BLEND_KEY(...)                   \
   case HASH_BLEND_KEY(__VA_ARGS__):          \
     ctx->blend_key =3D BLEND_KEY(__VA_ARGS__); \
     break;
     FOR_EACH_BLEND_KEY(MAP_BLEND_KEY)
     default:
       debugf("blendfunc: %x, %x, separate: %x, %x\n", srgb, drgb, sa, da);
       assert(false);
       break;
   }

   if (ctx->blend) {
     blend_key =3D ctx->blend_key;
   }
 }

 void BlendColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
   I32 c =3D round_pixel((Float){b, g, r, a});
   ctx->blendcolor =3D CONVERT(c, U16).xyzwxyzw;
 }

 void BlendEquation(GLenum mode) {
   assert(mode =3D=3D GL_FUNC_ADD);
   ctx->blend_equation =3D mode;
 }

 void DepthMask(GLboolean flag) { ctx->depthmask =3D flag; }

 void DepthFunc(GLenum func) {
   switch (func) {
     case GL_LESS:
     case GL_LEQUAL:
       break;
     default:
       assert(false);
   }
   ctx->depthfunc =3D func;
 }

 void SetScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
   ctx->scissor =3D IntRect{x, y, x + width, y + height};
 }

 void ClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
   I32 c =3D round_pixel((Float){b, g, r, a});
   ctx->clearcolor =3D bit_cast<uint32_t>(CONVERT(c, U8));
 }

 void ClearDepth(GLdouble depth) { ctx->cleardepth =3D depth; }

 void ActiveTexture(GLenum texture) {
   assert(texture >=3D GL_TEXTURE0);
   assert(texture < GL_TEXTURE0 + MAX_TEXTURE_UNITS);
   ctx->active_texture_unit =3D
       clamp(int(texture - GL_TEXTURE0), 0, int(MAX_TEXTURE_UNITS - 1));
 }

 void GenQueries(GLsizei n, GLuint* result) {
   for (int i =3D 0; i < n; i++) {
     Query q;
     result[i] =3D ctx->queries.insert(q);
   }
 }

 void DeleteQuery(GLuint n) {
   if (n && ctx->queries.erase(n)) {
     unlink(ctx->time_elapsed_query, n);
     unlink(ctx->samples_passed_query, n);
   }
 }

 void GenBuffers(int n, GLuint* result) {
   for (int i =3D 0; i < n; i++) {
     Buffer b;
     result[i] =3D ctx->buffers.insert(b);
   }
 }

 void DeleteBuffer(GLuint n) {
   if (n && ctx->buffers.erase(n)) {
     unlink(ctx->pixel_pack_buffer_binding, n);
     unlink(ctx->pixel_unpack_buffer_binding, n);
     unlink(ctx->array_buffer_binding, n);
     unlink(ctx->element_array_buffer_binding, n);
   }
 }

 void GenVertexArrays(int n, GLuint* result) {
   for (int i =3D 0; i < n; i++) {
     VertexArray v;
     result[i] =3D ctx->vertex_arrays.insert(v);
   }
 }

 void DeleteVertexArray(GLuint n) {
   if (n && ctx->vertex_arrays.erase(n)) {
     unlink(ctx->current_vertex_array, n);
   }
 }

 GLuint CreateShader(GLenum type) {
   Shader s;
   s.type =3D type;
   return ctx->shaders.insert(s);
 }

 void ShaderSourceByName(GLuint shader, char* name) {
   Shader& s =3D ctx->shaders[shader];
   s.loader =3D load_shader(name);
   if (!s.loader) {
     debugf("unknown shader %s\n", name);
   }
 }

 void AttachShader(GLuint program, GLuint shader) {
   Program& p =3D ctx->programs[program];
   Shader& s =3D ctx->shaders[shader];
   if (s.type =3D=3D GL_VERTEX_SHADER) {
     if (!p.impl && s.loader) p.impl =3D s.loader();
   } else if (s.type =3D=3D GL_FRAGMENT_SHADER) {
     if (!p.impl && s.loader) p.impl =3D s.loader();
   } else {
     assert(0);
   }
 }

 void DeleteShader(GLuint n) {
   if (n) ctx->shaders.erase(n);
 }

 GLuint CreateProgram() {
   Program p;
   return ctx->programs.insert(p);
 }

 void DeleteProgram(GLuint n) {
   if (!n) return;
   if (ctx->current_program =3D=3D n) {
     if (auto* p =3D ctx->programs.find(n)) {
       p->deleted =3D true;
     }
   } else {
     ctx->programs.erase(n);
   }
 }

 void LinkProgram(GLuint program) {
   Program& p =3D ctx->programs[program];
   assert(p.impl);
   if (!p.impl) {
     return;
   }
   assert(p.impl->interpolants_size() <=3D sizeof(Interpolants));
   if (!p.vert_impl) p.vert_impl =3D p.impl->get_vertex_shader();
   if (!p.frag_impl) p.frag_impl =3D p.impl->get_fragment_shader();
 }

 GLint GetLinkStatus(GLuint program) {
   if (auto* p =3D ctx->programs.find(program)) {
     return p->impl ? 1 : 0;
   }
   return 0;
 }

 void BindAttribLocation(GLuint program, GLuint index, char* name) {
   Program& p =3D ctx->programs[program];
   assert(p.impl);
   if (!p.impl) {
     return;
   }
   p.impl->bind_attrib(name, index);
 }

 GLint GetAttribLocation(GLuint program, char* name) {
   Program& p =3D ctx->programs[program];
   assert(p.impl);
   if (!p.impl) {
     return -1;
   }
   return p.impl->get_attrib(name);
 }

 GLint GetUniformLocation(GLuint program, char* name) {
   Program& p =3D ctx->programs[program];
   assert(p.impl);
   if (!p.impl) {
     return -1;
   }
   GLint loc =3D p.impl->get_uniform(name);
   // debugf("location: %d\n", loc);
   return loc;
 }

 static uint64_t get_time_value() {
 #ifdef __MACH__
   return mach_absolute_time();
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif defined(_WIN32)
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 1248 "src/gl.cc"
   return uint64_t(clock()) * (1000000000ULL / CLOCKS_PER_SEC);
 #else
 # 1250 "src/gl.cc"
   return ({
     struct timespec tp;
     clock_gettime(CLOCK_MONOTONIC, &tp);
     tp.tv_sec * 1000000000ULL + tp.tv_nsec;
   });
 #endif
 # 1256 "src/gl.cc"
 }

 void BeginQuery(GLenum target, GLuint id) {
   ctx->get_binding(target) =3D id;
   Query& q =3D ctx->queries[id];
   switch (target) {
     case GL_SAMPLES_PASSED:
       q.value =3D 0;
       break;
     case GL_TIME_ELAPSED:
       q.value =3D get_time_value();
       break;
     default:
       debugf("unknown query target %x for query %d\n", target, id);
       assert(false);
   }
 }

 void EndQuery(GLenum target) {
   Query& q =3D ctx->queries[ctx->get_binding(target)];
   switch (target) {
     case GL_SAMPLES_PASSED:
       break;
     case GL_TIME_ELAPSED:
       q.value =3D get_time_value() - q.value;
       break;
     default:
       debugf("unknown query target %x\n", target);
       assert(false);
   }
   ctx->get_binding(target) =3D 0;
 }

 void GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params) {
   Query& q =3D ctx->queries[id];
   switch (pname) {
     case GL_QUERY_RESULT:
       assert(params);
       params[0] =3D q.value;
       break;
     default:
       assert(false);
   }
 }

 void BindVertexArray(GLuint vertex_array) {
   if (vertex_array !=3D ctx->current_vertex_array) {
     ctx->validate_vertex_array =3D true;
   }
   ctx->current_vertex_array =3D vertex_array;
 }

 void BindTexture(GLenum target, GLuint texture) {
   ctx->get_binding(target) =3D texture;
 }

 void BindBuffer(GLenum target, GLuint buffer) {
   ctx->get_binding(target) =3D buffer;
 }

 void BindFramebuffer(GLenum target, GLuint fb) {
   if (target =3D=3D GL_FRAMEBUFFER) {
     ctx->read_framebuffer_binding =3D fb;
     ctx->draw_framebuffer_binding =3D fb;
   } else {
     assert(target =3D=3D GL_READ_FRAMEBUFFER || target =3D=3D GL_DRAW_FRAME=
 BUFFER);
     ctx->get_binding(target) =3D fb;
   }
 }

 void BindRenderbuffer(GLenum target, GLuint rb) {
   ctx->get_binding(target) =3D rb;
 }

 void PixelStorei(GLenum name, GLint param) {
   if (name =3D=3D GL_UNPACK_ALIGNMENT) {
     assert(param =3D=3D 1);
   } else if (name =3D=3D GL_UNPACK_ROW_LENGTH) {
     ctx->unpack_row_length =3D param;
   }
 }

 static GLenum remap_internal_format(GLenum format) {
   switch (format) {
     case GL_DEPTH_COMPONENT:
       return GL_DEPTH_COMPONENT16;
     case GL_RGBA:
       return GL_RGBA8;
     case GL_RED:
       return GL_R8;
     case GL_RG:
       return GL_RG8;
     default:
       return format;
   }
 }

 void TexStorage3D(GLenum target, GLint levels, GLenum internal_format,
                   GLsizei width, GLsizei height, GLsizei depth) {
   assert(levels =3D=3D 1);
   Texture& t =3D ctx->textures[ctx->get_binding(target)];
   internal_format =3D remap_internal_format(internal_format);
   bool changed =3D false;
   if (t.width !=3D width || t.height !=3D height || t.depth !=3D depth ||
       t.internal_format !=3D internal_format) {
     changed =3D true;
     t.internal_format =3D internal_format;
     t.width =3D width;
     t.height =3D height;
     t.depth =3D depth;
   }
   t.disable_delayed_clear();
   t.allocate(changed);
 }

 static void set_tex_storage(Texture& t, GLenum internal_format, GLsizei wid=
 th,
                             GLsizei height, void* buf =3D nullptr,
                             GLsizei stride =3D 0, GLsizei min_width =3D 0,
                             GLsizei min_height =3D 0) {
   internal_format =3D remap_internal_format(internal_format);
   bool changed =3D false;
   if (t.width !=3D width || t.height !=3D height || t.depth !=3D 0 ||
       t.internal_format !=3D internal_format) {
     changed =3D true;
     t.internal_format =3D internal_format;
     t.width =3D width;
     t.height =3D height;
     t.depth =3D 0;
   }
   // If we are changed from an internally managed buffer to an externally
   // supplied one or vice versa, ensure that we clean up old buffer state.
   bool should_free =3D buf =3D=3D nullptr;
   if (t.should_free() !=3D should_free) {
     changed =3D true;
     t.cleanup();
     t.set_should_free(should_free);
   }
   // If now an external buffer, explicitly set it...
   if (!should_free) {
     t.set_buffer(buf, stride);
   }
   t.disable_delayed_clear();
   t.allocate(changed, min_width, min_height);
 }

 void TexStorage2D(GLenum target, GLint levels, GLenum internal_format,
                   GLsizei width, GLsizei height) {
   assert(levels =3D=3D 1);
   Texture& t =3D ctx->textures[ctx->get_binding(target)];
   set_tex_storage(t, internal_format, width, height);
 }

 GLenum internal_format_for_data(GLenum format, GLenum ty) {
   if (format =3D=3D GL_RED && ty =3D=3D GL_UNSIGNED_BYTE) {
     return GL_R8;
   } else if ((format =3D=3D GL_RGBA || format =3D=3D GL_BGRA) &&
              (ty =3D=3D GL_UNSIGNED_BYTE || ty =3D=3D GL_UNSIGNED_INT_8_8_8=
 _8_REV)) {
     return GL_RGBA8;
   } else if (format =3D=3D GL_RGBA && ty =3D=3D GL_FLOAT) {
     return GL_RGBA32F;
   } else if (format =3D=3D GL_RGBA_INTEGER && ty =3D=3D GL_INT) {
     return GL_RGBA32I;
   } else if (format =3D=3D GL_RG && ty =3D=3D GL_UNSIGNED_BYTE) {
     return GL_RG8;
   } else {
     debugf("unknown internal format for format %x, type %x\n", format, ty);
     assert(false);
     return 0;
   }
 }

 static inline void copy_bgra8_to_rgba8(uint32_t* dest, uint32_t* src,
                                        int width) {
   for (; width >=3D 4; width -=3D 4, dest +=3D 4, src +=3D 4) {
     U32 p =3D unaligned_load<U32>(src);
     U32 rb =3D p & 0x00FF00FF;
     unaligned_store(dest, (p & 0xFF00FF00) | (rb << 16) | (rb >> 16));
   }
   for (; width > 0; width--, dest++, src++) {
     uint32_t p =3D *src;
     uint32_t rb =3D p & 0x00FF00FF;
     *dest =3D (p & 0xFF00FF00) | (rb << 16) | (rb >> 16);
   }
 }

 static Buffer* get_pixel_pack_buffer() {
   return ctx->pixel_pack_buffer_binding
              ? &ctx->buffers[ctx->pixel_pack_buffer_binding]
              : nullptr;
 }

 static void* get_pixel_pack_buffer_data(void* data) {
   if (Buffer* b =3D get_pixel_pack_buffer()) {
     return b->buf ? b->buf + (size_t)data : nullptr;
   }
   return data;
 }

 static Buffer* get_pixel_unpack_buffer() {
   return ctx->pixel_unpack_buffer_binding
              ? &ctx->buffers[ctx->pixel_unpack_buffer_binding]
              : nullptr;
 }

 static void* get_pixel_unpack_buffer_data(void* data) {
   if (Buffer* b =3D get_pixel_unpack_buffer()) {
     return b->buf ? b->buf + (size_t)data : nullptr;
   }
   return data;
 }

 void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                    GLsizei width, GLsizei height, GLenum format, GLenum ty,
                    void* data) {
   if (level !=3D 0) {
     assert(false);
     return;
   }
   data =3D get_pixel_unpack_buffer_data(data);
   if (!data) return;
   Texture& t =3D ctx->textures[ctx->get_binding(target)];
   IntRect skip =3D {xoffset, yoffset, xoffset + width, yoffset + height};
   prepare_texture(t, &skip);
   assert(xoffset + width <=3D t.width);
   assert(yoffset + height <=3D t.height);
   assert(ctx->unpack_row_length =3D=3D 0 || ctx->unpack_row_length >=3D wid=
 th);
   GLsizei row_length =3D
       ctx->unpack_row_length !=3D 0 ? ctx->unpack_row_length : width;
   assert(t.internal_format =3D=3D internal_format_for_data(format, ty));
   int bpp =3D t.bpp();
   if (!bpp || !t.buf) return;
   size_t dest_stride =3D t.stride();
   char* dest =3D t.sample_ptr(xoffset, yoffset);
   char* src =3D (char*)data;
   for (int y =3D 0; y < height; y++) {
     if (t.internal_format =3D=3D GL_RGBA8 && format !=3D GL_BGRA) {
       copy_bgra8_to_rgba8((uint32_t*)dest, (uint32_t*)src, width);
     } else {
       memcpy(dest, src, width * bpp);
     }
     dest +=3D dest_stride;
     src +=3D row_length * bpp;
   }
 }

 void TexImage2D(GLenum target, GLint level, GLint internal_format,
                 GLsizei width, GLsizei height, GLint border, GLenum format,
                 GLenum ty, void* data) {
   if (level !=3D 0) {
     assert(false);
     return;
   }
   assert(border =3D=3D 0);
   TexStorage2D(target, 1, internal_format, width, height);
   TexSubImage2D(target, 0, 0, 0, width, height, format, ty, data);
 }

 void TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                    GLint zoffset, GLsizei width, GLsizei height, GLsizei de=
 pth,
                    GLenum format, GLenum ty, void* data) {
   if (level !=3D 0) {
     assert(false);
     return;
   }
   data =3D get_pixel_unpack_buffer_data(data);
   if (!data) return;
   Texture& t =3D ctx->textures[ctx->get_binding(target)];
   prepare_texture(t);
   assert(ctx->unpack_row_length =3D=3D 0 || ctx->unpack_row_length >=3D wid=
 th);
   GLsizei row_length =3D
       ctx->unpack_row_length !=3D 0 ? ctx->unpack_row_length : width;
   if (format =3D=3D GL_BGRA) {
     assert(ty =3D=3D GL_UNSIGNED_BYTE || ty =3D=3D GL_UNSIGNED_INT_8_8_8_8_=
 REV);
     assert(t.internal_format =3D=3D GL_RGBA8);
   } else {
     assert(t.internal_format =3D=3D internal_format_for_data(format, ty));
   }
   int bpp =3D t.bpp();
   if (!bpp || !t.buf) return;
   char* src =3D (char*)data;
   assert(xoffset + width <=3D t.width);
   assert(yoffset + height <=3D t.height);
   assert(zoffset + depth <=3D t.depth);
   size_t dest_stride =3D t.stride();
   for (int z =3D 0; z < depth; z++) {
     char* dest =3D t.sample_ptr(xoffset, yoffset, zoffset + z);
     for (int y =3D 0; y < height; y++) {
       if (t.internal_format =3D=3D GL_RGBA8 && format !=3D GL_BGRA) {
         copy_bgra8_to_rgba8((uint32_t*)dest, (uint32_t*)src, width);
       } else {
         memcpy(dest, src, width * bpp);
       }
       dest +=3D dest_stride;
       src +=3D row_length * bpp;
     }
   }
 }

 void TexImage3D(GLenum target, GLint level, GLint internal_format,
                 GLsizei width, GLsizei height, GLsizei depth, GLint border,
                 GLenum format, GLenum ty, void* data) {
   if (level !=3D 0) {
     assert(false);
     return;
   }
   assert(border =3D=3D 0);
   TexStorage3D(target, 1, internal_format, width, height, depth);
   TexSubImage3D(target, 0, 0, 0, 0, width, height, depth, format, ty, data);
 }

 void GenerateMipmap(UNUSED GLenum target) {
   // TODO: support mipmaps
 }

 void SetTextureParameter(GLuint texid, GLenum pname, GLint param) {
   Texture& t =3D ctx->textures[texid];
   switch (pname) {
     case GL_TEXTURE_WRAP_S:
       assert(param =3D=3D GL_CLAMP_TO_EDGE);
       break;
     case GL_TEXTURE_WRAP_T:
       assert(param =3D=3D GL_CLAMP_TO_EDGE);
       break;
     case GL_TEXTURE_MIN_FILTER:
       t.min_filter =3D param;
       break;
     case GL_TEXTURE_MAG_FILTER:
       t.mag_filter =3D param;
       break;
     default:
       break;
   }
 }

 void TexParameteri(GLenum target, GLenum pname, GLint param) {
   SetTextureParameter(ctx->get_binding(target), pname, param);
 }

 void GenTextures(int n, GLuint* result) {
   for (int i =3D 0; i < n; i++) {
     Texture t;
     result[i] =3D ctx->textures.insert(t);
   }
 }

 void DeleteTexture(GLuint n) {
   if (n && ctx->textures.erase(n)) {
     for (size_t i =3D 0; i < MAX_TEXTURE_UNITS; i++) {
       ctx->texture_units[i].unlink(n);
     }
   }
 }

 void GenRenderbuffers(int n, GLuint* result) {
   for (int i =3D 0; i < n; i++) {
     Renderbuffer r;
     result[i] =3D ctx->renderbuffers.insert(r);
   }
 }

 void Renderbuffer::on_erase() {
   for (auto* fb : ctx->framebuffers) {
     if (fb) {
       if (unlink(fb->color_attachment, texture)) {
         fb->layer =3D 0;
       }
       unlink(fb->depth_attachment, texture);
     }
   }
   DeleteTexture(texture);
 }

 void DeleteRenderbuffer(GLuint n) {
   if (n && ctx->renderbuffers.erase(n)) {
     unlink(ctx->renderbuffer_binding, n);
   }
 }

 void GenFramebuffers(int n, GLuint* result) {
   for (int i =3D 0; i < n; i++) {
     Framebuffer f;
     result[i] =3D ctx->framebuffers.insert(f);
   }
 }

 void DeleteFramebuffer(GLuint n) {
   if (n && ctx->framebuffers.erase(n)) {
     unlink(ctx->read_framebuffer_binding, n);
     unlink(ctx->draw_framebuffer_binding, n);
   }
 }

 void RenderbufferStorage(GLenum target, GLenum internal_format, GLsizei wid=
 th,
                          GLsizei height) {
   // Just refer a renderbuffer to a texture to simplify things for now...
   Renderbuffer& r =3D ctx->renderbuffers[ctx->get_binding(target)];
   if (!r.texture) {
     GenTextures(1, &r.texture);
   }
   switch (internal_format) {
     case GL_DEPTH_COMPONENT:
     case GL_DEPTH_COMPONENT24:
     case GL_DEPTH_COMPONENT32:
       // Force depth format to 16 bits...
       internal_format =3D GL_DEPTH_COMPONENT16;
       break;
   }
   set_tex_storage(ctx->textures[r.texture], internal_format, width, height);
 }

 void VertexAttribPointer(GLuint index, GLint size, GLenum type, bool normal=
 ized,
                          GLsizei stride, GLuint offset) {
   // debugf("cva: %d\n", ctx->current_vertex_array);
   VertexArray& v =3D ctx->vertex_arrays[ctx->current_vertex_array];
   if (index >=3D NULL_ATTRIB) {
     assert(0);
     return;
   }
   VertexAttrib& va =3D v.attribs[index];
   va.size =3D size * bytes_per_type(type);
   va.type =3D type;
   va.normalized =3D normalized;
   va.stride =3D stride;
   va.offset =3D offset;
   // Buffer &vertex_buf =3D ctx->buffers[ctx->array_buffer_binding];
   va.vertex_buffer =3D ctx->array_buffer_binding;
   va.vertex_array =3D ctx->current_vertex_array;
   ctx->validate_vertex_array =3D true;
 }

 void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei st=
 ride,
                           GLuint offset) {
   // debugf("cva: %d\n", ctx->current_vertex_array);
   VertexArray& v =3D ctx->vertex_arrays[ctx->current_vertex_array];
   if (index >=3D NULL_ATTRIB) {
     assert(0);
     return;
   }
   VertexAttrib& va =3D v.attribs[index];
   va.size =3D size * bytes_per_type(type);
   va.type =3D type;
   va.normalized =3D false;
   va.stride =3D stride;
   va.offset =3D offset;
   // Buffer &vertex_buf =3D ctx->buffers[ctx->array_buffer_binding];
   va.vertex_buffer =3D ctx->array_buffer_binding;
   va.vertex_array =3D ctx->current_vertex_array;
   ctx->validate_vertex_array =3D true;
 }

 void EnableVertexAttribArray(GLuint index) {
   VertexArray& v =3D ctx->vertex_arrays[ctx->current_vertex_array];
   if (index >=3D NULL_ATTRIB) {
     assert(0);
     return;
   }
   VertexAttrib& va =3D v.attribs[index];
   if (!va.enabled) {
     ctx->validate_vertex_array =3D true;
   }
   va.enabled =3D true;
   v.max_attrib =3D max(v.max_attrib, (int)index);
 }

 void DisableVertexAttribArray(GLuint index) {
   VertexArray& v =3D ctx->vertex_arrays[ctx->current_vertex_array];
   if (index >=3D NULL_ATTRIB) {
     assert(0);
     return;
   }
   VertexAttrib& va =3D v.attribs[index];
   if (va.enabled) {
     ctx->validate_vertex_array =3D true;
   }
   va.enabled =3D false;
 }

 void VertexAttribDivisor(GLuint index, GLuint divisor) {
   VertexArray& v =3D ctx->vertex_arrays[ctx->current_vertex_array];
   // Only support divisor being 0 (per-vertex) or 1 (per-instance).
   if (index >=3D NULL_ATTRIB || divisor > 1) {
     assert(0);
     return;
   }
   VertexAttrib& va =3D v.attribs[index];
   va.divisor =3D divisor;
 }

 void BufferData(GLenum target, GLsizeiptr size, void* data,
                 UNUSED GLenum usage) {
   Buffer& b =3D ctx->buffers[ctx->get_binding(target)];
   if (b.allocate(size)) {
     ctx->validate_vertex_array =3D true;
   }
   if (data && b.buf && size <=3D b.size) {
     memcpy(b.buf, data, size);
   }
 }

 void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
                    void* data) {
   Buffer& b =3D ctx->buffers[ctx->get_binding(target)];
   assert(offset + size <=3D b.size);
   if (data && b.buf && offset + size <=3D b.size) {
     memcpy(&b.buf[offset], data, size);
   }
 }

 void* MapBuffer(GLenum target, UNUSED GLbitfield access) {
   Buffer& b =3D ctx->buffers[ctx->get_binding(target)];
   return b.buf;
 }

 void* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length,
                      UNUSED GLbitfield access) {
   Buffer& b =3D ctx->buffers[ctx->get_binding(target)];
   if (b.buf && offset >=3D 0 && length > 0 && offset + length <=3D b.size) {
     return b.buf + offset;
   }
   return nullptr;
 }

 GLboolean UnmapBuffer(GLenum target) {
   Buffer& b =3D ctx->buffers[ctx->get_binding(target)];
   return b.buf !=3D nullptr;
 }

 void Uniform1i(GLint location, GLint V0) {
   // debugf("tex: %d\n", (int)ctx->textures.size);
   vertex_shader->set_uniform_1i(location, V0);
 }
 void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) {
   assert(count =3D=3D 1);
   vertex_shader->set_uniform_4fv(location, v);
 }
 void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
                       const GLfloat* value) {
   assert(count =3D=3D 1);
   assert(!transpose);
   vertex_shader->set_uniform_matrix4fv(location, value);
 }

 void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarge=
 t,
                           GLuint texture, GLint level) {
   assert(target =3D=3D GL_READ_FRAMEBUFFER || target =3D=3D GL_DRAW_FRAMEBU=
 FFER);
   assert(textarget =3D=3D GL_TEXTURE_2D || textarget =3D=3D GL_TEXTURE_RECT=
 ANGLE);
   assert(level =3D=3D 0);
   Framebuffer& fb =3D ctx->framebuffers[ctx->get_binding(target)];
   if (attachment =3D=3D GL_COLOR_ATTACHMENT0) {
     fb.color_attachment =3D texture;
     fb.layer =3D 0;
   } else if (attachment =3D=3D GL_DEPTH_ATTACHMENT) {
     fb.depth_attachment =3D texture;
   } else {
     assert(0);
   }
 }

 void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint textu=
 re,
                              GLint level, GLint layer) {
   assert(target =3D=3D GL_READ_FRAMEBUFFER || target =3D=3D GL_DRAW_FRAMEBU=
 FFER);
   assert(level =3D=3D 0);
   Framebuffer& fb =3D ctx->framebuffers[ctx->get_binding(target)];
   if (attachment =3D=3D GL_COLOR_ATTACHMENT0) {
     fb.color_attachment =3D texture;
     fb.layer =3D layer;
   } else if (attachment =3D=3D GL_DEPTH_ATTACHMENT) {
     assert(layer =3D=3D 0);
     fb.depth_attachment =3D texture;
   } else {
     assert(0);
   }
 }

 void FramebufferRenderbuffer(GLenum target, GLenum attachment,
                              GLenum renderbuffertarget, GLuint renderbuffer=
 ) {
   assert(target =3D=3D GL_READ_FRAMEBUFFER || target =3D=3D GL_DRAW_FRAMEBU=
 FFER);
   assert(renderbuffertarget =3D=3D GL_RENDERBUFFER);
   Framebuffer& fb =3D ctx->framebuffers[ctx->get_binding(target)];
   Renderbuffer& rb =3D ctx->renderbuffers[renderbuffer];
   if (attachment =3D=3D GL_COLOR_ATTACHMENT0) {
     fb.color_attachment =3D rb.texture;
     fb.layer =3D 0;
   } else if (attachment =3D=3D GL_DEPTH_ATTACHMENT) {
     fb.depth_attachment =3D rb.texture;
   } else {
     assert(0);
   }
 }

 }  // extern "C"

 static inline Framebuffer* get_framebuffer(GLenum target) {
   if (target =3D=3D GL_FRAMEBUFFER) {
     target =3D GL_DRAW_FRAMEBUFFER;
   }
   return ctx->framebuffers.find(ctx->get_binding(target));
 }

 template <typename T>
 static inline void fill_n(T* dst, size_t n, T val) {
   for (T* end =3D &dst[n]; dst < end; dst++) *dst =3D val;
 }

 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 1861 "src/gl.cc"
 template <>
 inline void fill_n<uint32_t>(uint32_t* dst, size_t n, uint32_t val) {
   __asm__ __volatile__("rep stosl\n"
                        : "+D"(dst), "+c"(n)
                        : "a"(val)
                        : "memory", "cc");
 }
 #endif
 # 1869 "src/gl.cc"

 static inline uint32_t clear_chunk(uint8_t value) {
   return uint32_t(value) * 0x01010101U;
 }

 static inline uint32_t clear_chunk(uint16_t value) {
   return uint32_t(value) | (uint32_t(value) << 16);
 }

 static inline uint32_t clear_chunk(uint32_t value) { return value; }

 template <typename T>
 static inline void clear_row(T* buf, size_t len, T value, uint32_t chunk) {
   const size_t N =3D sizeof(uint32_t) / sizeof(T);
   // fill any leading unaligned values
   if (N > 1) {
     size_t align =3D (-(intptr_t)buf & (sizeof(uint32_t) - 1)) / sizeof(T);
     if (align <=3D len) {
       fill_n(buf, align, value);
       len -=3D align;
       buf +=3D align;
     }
   }
   // fill as many aligned chunks as possible
   fill_n((uint32_t*)buf, len / N, chunk);
   // fill any remaining values
   if (N > 1) {
     fill_n(buf + (len & ~(N - 1)), len & (N - 1), value);
   }
 }

 template <typename T>
 static void clear_buffer(Texture& t, T value, int layer, IntRect bb,
                          int skip_start =3D 0, int skip_end =3D 0) {
   if (!t.buf) return;
   skip_start =3D max(skip_start, bb.x0);
   skip_end =3D max(skip_end, skip_start);
   assert(sizeof(T) =3D=3D t.bpp());
   size_t stride =3D t.stride();
   // When clearing multiple full-width rows, collapse them into a single
   // large "row" to avoid redundant setup from clearing each row individual=
 ly.
   if (bb.width() =3D=3D t.width && bb.height() > 1 && skip_start >=3D skip_=
 end) {
     bb.x1 +=3D (stride / sizeof(T)) * (bb.height() - 1);
     bb.y1 =3D bb.y0 + 1;
   }
   T* buf =3D (T*)t.sample_ptr(bb.x0, bb.y0, layer);
   uint32_t chunk =3D clear_chunk(value);
   for (int rows =3D bb.height(); rows > 0; rows--) {
     if (bb.x0 < skip_start) {
       clear_row(buf, skip_start - bb.x0, value, chunk);
     }
     if (skip_end < bb.x1) {
       clear_row(buf + (skip_end - bb.x0), bb.x1 - skip_end, value, chunk);
     }
     buf +=3D stride / sizeof(T);
   }
 }

 template <typename T>
 static inline void clear_buffer(Texture& t, T value, int layer =3D 0) {
   IntRect bb =3D ctx->apply_scissor(t.bounds());
   if (bb.width() > 0) {
     clear_buffer<T>(t, value, layer, bb);
   }
 }

 template <typename T>
 static inline void force_clear_row(Texture& t, int y, int skip_start =3D 0,
                                    int skip_end =3D 0) {
   assert(t.buf !=3D nullptr);
   assert(sizeof(T) =3D=3D t.bpp());
   assert(skip_start <=3D skip_end);
   T* buf =3D (T*)t.sample_ptr(0, y);
   uint32_t chunk =3D clear_chunk((T)t.clear_val);
   if (skip_start > 0) {
     clear_row<T>(buf, skip_start, t.clear_val, chunk);
   }
   if (skip_end < t.width) {
     clear_row<T>(buf + skip_end, t.width - skip_end, t.clear_val, chunk);
   }
 }

 template <typename T>
 static void force_clear(Texture& t, const IntRect* skip =3D nullptr) {
   if (!t.delay_clear || !t.cleared_rows) {
     return;
   }
   int y0 =3D 0;
   int y1 =3D t.height;
   int skip_start =3D 0;
   int skip_end =3D 0;
   if (skip) {
     y0 =3D clamp(skip->y0, 0, t.height);
     y1 =3D clamp(skip->y1, y0, t.height);
     skip_start =3D clamp(skip->x0, 0, t.width);
     skip_end =3D clamp(skip->x1, skip_start, t.width);
     if (skip_start <=3D 0 && skip_end >=3D t.width && y0 <=3D 0 && y1 >=3D =
 t.height) {
       t.disable_delayed_clear();
       return;
     }
   }
   int num_masks =3D (y1 + 31) / 32;
   uint32_t* rows =3D t.cleared_rows;
   for (int i =3D y0 / 32; i < num_masks; i++) {
     uint32_t mask =3D rows[i];
     if (mask !=3D ~0U) {
       rows[i] =3D ~0U;
       int start =3D i * 32;
       while (mask) {
         int count =3D __builtin_ctz(mask);
         if (count > 0) {
           clear_buffer<T>(t, t.clear_val, 0,
                           IntRect{0, start, t.width, start + count}, skip_s=
 tart,
                           skip_end);
           t.delay_clear -=3D count;
           start +=3D count;
           mask >>=3D count;
         }
         count =3D __builtin_ctz(mask + 1);
         start +=3D count;
         mask >>=3D count;
       }
       int count =3D (i + 1) * 32 - start;
       if (count > 0) {
         clear_buffer<T>(t, t.clear_val, 0,
                         IntRect{0, start, t.width, start + count}, skip_sta=
 rt,
                         skip_end);
         t.delay_clear -=3D count;
       }
     }
   }
   if (t.delay_clear <=3D 0) t.disable_delayed_clear();
 }

 static void prepare_texture(Texture& t, const IntRect* skip) {
   if (t.delay_clear) {
     switch (t.internal_format) {
       case GL_RGBA8:
         force_clear<uint32_t>(t, skip);
         break;
       case GL_R8:
         force_clear<uint8_t>(t, skip);
         break;
       case GL_RG8:
         force_clear<uint16_t>(t, skip);
         break;
       case GL_DEPTH_COMPONENT16:
         force_clear<uint16_t>(t, skip);
         break;
       default:
         assert(false);
         break;
     }
   }
 }

 static inline bool clear_requires_scissor(Texture& t) {
   return ctx->scissortest && !ctx->scissor.contains(t.bounds());
 }

 // Setup a clear on a texture. This may either force an immediate clear or
 // potentially punt to a delayed clear, if applicable.
 template <typename T>
 static void request_clear(Texture& t, int layer, T value) {
   // If the clear would require a scissor, force clear anything outside
   // the scissor, and then immediately clear anything inside the scissor.
   if (clear_requires_scissor(t)) {
     force_clear<T>(t, &ctx->scissor);
     clear_buffer<T>(t, value, layer);
   } else if (t.depth > 1) {
     // Delayed clear is not supported on texture arrays.
     t.disable_delayed_clear();
     clear_buffer<T>(t, value, layer);
   } else {
     // Do delayed clear for 2D texture without scissor.
     t.enable_delayed_clear(value);
   }
 }

 extern "C" {

 void InitDefaultFramebuffer(int width, int height, int stride, void* buf) {
   Framebuffer& fb =3D ctx->framebuffers[0];
   if (!fb.color_attachment) {
     GenTextures(1, &fb.color_attachment);
     fb.layer =3D 0;
   }
   // If the dimensions or buffer properties changed, we need to reallocate
   // the underlying storage for the color buffer texture.
   Texture& colortex =3D ctx->textures[fb.color_attachment];
   set_tex_storage(colortex, GL_RGBA8, width, height, buf, stride);
   if (!fb.depth_attachment) {
     GenTextures(1, &fb.depth_attachment);
   }
   // Ensure dimensions of the depth buffer match the color buffer.
   Texture& depthtex =3D ctx->textures[fb.depth_attachment];
   set_tex_storage(depthtex, GL_DEPTH_COMPONENT16, width, height);
 }

 void* GetColorBuffer(GLuint fbo, GLboolean flush, int32_t* width,
                      int32_t* height, int32_t* stride) {
   Framebuffer* fb =3D ctx->framebuffers.find(fbo);
   if (!fb || !fb->color_attachment) {
     return nullptr;
   }
   Texture& colortex =3D ctx->textures[fb->color_attachment];
   if (flush) {
     prepare_texture(colortex);
   }
   *width =3D colortex.width;
   *height =3D colortex.height;
   *stride =3D colortex.stride();
   return colortex.buf ? colortex.sample_ptr(0, 0, fb->layer) : nullptr;
 }

 void SetTextureBuffer(GLuint texid, GLenum internal_format, GLsizei width,
                       GLsizei height, GLsizei stride, void* buf,
                       GLsizei min_width, GLsizei min_height) {
   Texture& t =3D ctx->textures[texid];
   set_tex_storage(t, internal_format, width, height, buf, stride, min_width,
                   min_height);
 }

 GLenum CheckFramebufferStatus(GLenum target) {
   Framebuffer* fb =3D get_framebuffer(target);
   if (!fb || !fb->color_attachment) {
     return GL_FRAMEBUFFER_UNSUPPORTED;
   }
   return GL_FRAMEBUFFER_COMPLETE;
 }

 void Clear(GLbitfield mask) {
   Framebuffer& fb =3D *get_framebuffer(GL_DRAW_FRAMEBUFFER);
   if ((mask & GL_COLOR_BUFFER_BIT) && fb.color_attachment) {
     Texture& t =3D ctx->textures[fb.color_attachment];
     assert(!t.locked);
     if (t.internal_format =3D=3D GL_RGBA8) {
       uint32_t color =3D ctx->clearcolor;
       request_clear<uint32_t>(t, fb.layer, color);
     } else if (t.internal_format =3D=3D GL_R8) {
       uint8_t color =3D uint8_t((ctx->clearcolor >> 16) & 0xFF);
       request_clear<uint8_t>(t, fb.layer, color);
     } else if (t.internal_format =3D=3D GL_RG8) {
       uint16_t color =3D uint16_t((ctx->clearcolor & 0xFF00) |
                                 ((ctx->clearcolor >> 16) & 0xFF));
       request_clear<uint16_t>(t, fb.layer, color);
     } else {
       assert(false);
     }
   }
   if ((mask & GL_DEPTH_BUFFER_BIT) && fb.depth_attachment) {
     Texture& t =3D ctx->textures[fb.depth_attachment];
     assert(t.internal_format =3D=3D GL_DEPTH_COMPONENT16);
     uint16_t depth =3D uint16_t(0xFFFF * ctx->cleardepth) - 0x8000;
     request_clear<uint16_t>(t, 0, depth);
   }
 }

 void InvalidateFramebuffer(GLenum target, GLsizei num_attachments,
                            const GLenum* attachments) {
   Framebuffer* fb =3D get_framebuffer(target);
   if (!fb || num_attachments <=3D 0 || !attachments) {
     return;
   }
   for (GLsizei i =3D 0; i < num_attachments; i++) {
     switch (attachments[i]) {
       case GL_DEPTH_ATTACHMENT: {
         Texture& t =3D ctx->textures[fb->depth_attachment];
         t.disable_delayed_clear();
         break;
       }
       case GL_COLOR_ATTACHMENT0: {
         Texture& t =3D ctx->textures[fb->color_attachment];
         t.disable_delayed_clear();
         break;
       }
     }
   }
 }

 void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum for=
 mat,
                 GLenum type, void* data) {
   data =3D get_pixel_pack_buffer_data(data);
   if (!data) return;
   Framebuffer* fb =3D get_framebuffer(GL_READ_FRAMEBUFFER);
   if (!fb) return;
   assert(format =3D=3D GL_RED || format =3D=3D GL_RGBA || format =3D=3D GL_=
 RGBA_INTEGER ||
          format =3D=3D GL_BGRA || format =3D=3D GL_RG);
   Texture& t =3D ctx->textures[fb->color_attachment];
   if (!t.buf) return;
   prepare_texture(t);
   // debugf("read pixels %d, %d, %d, %d from fb %d with format %x\n", x, y,
   // width, height, ctx->read_framebuffer_binding, t.internal_format);
   assert(x + width <=3D t.width);
   assert(y + height <=3D t.height);
   if (internal_format_for_data(format, type) !=3D t.internal_format) {
     debugf("mismatched format for read pixels: %x vs %x\n", t.internal_form=
 at,
            internal_format_for_data(format, type));
     assert(false);
   }
   int bpp =3D t.bpp();
   char* dest =3D (char*)data;
   size_t src_stride =3D t.stride();
   char* src =3D t.sample_ptr(x, y, fb->layer);
   for (; height > 0; height--) {
     if (t.internal_format =3D=3D GL_RGBA8 && format !=3D GL_BGRA) {
       copy_bgra8_to_rgba8((uint32_t*)dest, (uint32_t*)src, width);
     } else {
       memcpy(dest, src, width * bpp);
     }
     dest +=3D width * bpp;
     src +=3D src_stride;
   }
 }

 void CopyImageSubData(GLuint srcName, GLenum srcTarget, UNUSED GLint srcLev=
 el,
                       GLint srcX, GLint srcY, GLint srcZ, GLuint dstName,
                       GLenum dstTarget, UNUSED GLint dstLevel, GLint dstX,
                       GLint dstY, GLint dstZ, GLsizei srcWidth,
                       GLsizei srcHeight, GLsizei srcDepth) {
   assert(srcLevel =3D=3D 0 && dstLevel =3D=3D 0);
   if (srcTarget =3D=3D GL_RENDERBUFFER) {
     Renderbuffer& rb =3D ctx->renderbuffers[srcName];
     srcName =3D rb.texture;
   }
   if (dstTarget =3D=3D GL_RENDERBUFFER) {
     Renderbuffer& rb =3D ctx->renderbuffers[dstName];
     dstName =3D rb.texture;
   }
   Texture& srctex =3D ctx->textures[srcName];
   if (!srctex.buf) return;
   prepare_texture(srctex);
   Texture& dsttex =3D ctx->textures[dstName];
   if (!dsttex.buf) return;
   assert(!dsttex.locked);
   IntRect skip =3D {dstX, dstY, dstX + srcWidth, dstY + srcHeight};
   prepare_texture(dsttex, &skip);
   assert(srctex.internal_format =3D=3D dsttex.internal_format);
   assert(srcWidth >=3D 0);
   assert(srcHeight >=3D 0);
   assert(srcDepth >=3D 0);
   assert(srcX + srcWidth <=3D srctex.width);
   assert(srcY + srcHeight <=3D srctex.height);
   assert(srcZ + srcDepth <=3D max(srctex.depth, 1));
   assert(dstX + srcWidth <=3D dsttex.width);
   assert(dstY + srcHeight <=3D dsttex.height);
   assert(dstZ + srcDepth <=3D max(dsttex.depth, 1));
   int bpp =3D srctex.bpp();
   int src_stride =3D srctex.stride();
   int dest_stride =3D dsttex.stride();
   for (int z =3D 0; z < srcDepth; z++) {
     char* dest =3D dsttex.sample_ptr(dstX, dstY, dstZ + z);
     char* src =3D srctex.sample_ptr(srcX, srcY, srcZ + z);
     for (int y =3D 0; y < srcHeight; y++) {
       memcpy(dest, src, srcWidth * bpp);
       dest +=3D dest_stride;
       src +=3D src_stride;
     }
   }
 }

 void CopyTexSubImage3D(GLenum target, UNUSED GLint level, GLint xoffset,
                        GLint yoffset, GLint zoffset, GLint x, GLint y,
                        GLsizei width, GLsizei height) {
   assert(level =3D=3D 0);
   Framebuffer* fb =3D get_framebuffer(GL_READ_FRAMEBUFFER);
   if (!fb) return;
   CopyImageSubData(fb->color_attachment, GL_TEXTURE_3D, 0, x, y, fb->layer,
                    ctx->get_binding(target), GL_TEXTURE_3D, 0, xoffset, yof=
 fset,
                    zoffset, width, height, 1);
 }

 void CopyTexSubImage2D(GLenum target, UNUSED GLint level, GLint xoffset,
                        GLint yoffset, GLint x, GLint y, GLsizei width,
                        GLsizei height) {
   assert(level =3D=3D 0);
   Framebuffer* fb =3D get_framebuffer(GL_READ_FRAMEBUFFER);
   if (!fb) return;
   CopyImageSubData(fb->color_attachment, GL_TEXTURE_2D_ARRAY, 0, x, y,
                    fb->layer, ctx->get_binding(target), GL_TEXTURE_2D_ARRAY=
 , 0,
                    xoffset, yoffset, 0, width, height, 1);
 }

 }  // extern "C"

 using PackedRGBA8 =3D V16<uint8_t>;
 using WideRGBA8 =3D V16<uint16_t>;
 using HalfRGBA8 =3D V8<uint16_t>;

 static inline WideRGBA8 unpack(PackedRGBA8 p) { return CONVERT(p, WideRGBA8=
 ); }

 static inline PackedRGBA8 pack(WideRGBA8 p) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2262 "src/gl.cc"
   return _mm_packus_epi16(lowHalf(p), highHalf(p));
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 2264 "src/gl.cc"
   return vcombine_u8(vqmovn_u16(lowHalf(p)), vqmovn_u16(highHalf(p)));
 #else
 # 2266 "src/gl.cc"
   return CONVERT(p, PackedRGBA8);
 #endif
 # 2268 "src/gl.cc"
 }

 static inline HalfRGBA8 packRGBA8(I32 a, I32 b) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2272 "src/gl.cc"
   return _mm_packs_epi32(a, b);
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 2274 "src/gl.cc"
   return vcombine_u16(vqmovun_s32(a), vqmovun_s32(b));
 #else
 # 2276 "src/gl.cc"
   return CONVERT(combine(a, b), HalfRGBA8);
 #endif
 # 2278 "src/gl.cc"
 }

 using PackedR8 =3D V4<uint8_t>;
 using WideR8 =3D V4<uint16_t>;

 static inline WideR8 unpack(PackedR8 p) { return CONVERT(p, WideR8); }

 static inline WideR8 packR8(I32 a) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2287 "src/gl.cc"
   return lowHalf(bit_cast<V8<uint16_t>>(_mm_packs_epi32(a, a)));
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 2289 "src/gl.cc"
   return vqmovun_s32(a);
 #else
 # 2291 "src/gl.cc"
   return CONVERT(a, WideR8);
 #endif
 # 2293 "src/gl.cc"
 }

 static inline PackedR8 pack(WideR8 p) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2297 "src/gl.cc"
   auto m =3D expand(p);
   auto r =3D bit_cast<V16<uint8_t>>(_mm_packus_epi16(m, m));
   return SHUFFLE(r, r, 0, 1, 2, 3);
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 2301 "src/gl.cc"
   return lowHalf(bit_cast<V8<uint8_t>>(vqmovn_u16(expand(p))));
 #else
 # 2303 "src/gl.cc"
   return CONVERT(p, PackedR8);
 #endif
 # 2305 "src/gl.cc"
 }

 using PackedRG8 =3D V8<uint8_t>;
 using WideRG8 =3D V8<uint16_t>;

 static inline PackedRG8 pack(WideRG8 p) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2312 "src/gl.cc"
   return lowHalf(bit_cast<V16<uint8_t>>(_mm_packus_epi16(p, p)));
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 2314 "src/gl.cc"
   return bit_cast<V8<uint8_t>>(vqmovn_u16(p));
 #else
 # 2316 "src/gl.cc"
   return CONVERT(p, PackedRG8);
 #endif
 # 2318 "src/gl.cc"
 }

 using ZMask4 =3D V4<int16_t>;
 using ZMask8 =3D V8<int16_t>;

 static inline PackedRGBA8 unpack(ZMask4 mask, uint32_t*) {
   return bit_cast<PackedRGBA8>(mask.xxyyzzww);
 }

 static inline WideR8 unpack(ZMask4 mask, uint8_t*) {
   return bit_cast<WideR8>(mask);
 }

 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2332 "src/gl.cc"
 #  define ZMASK_NONE_PASSED 0xFFFF
 #  define ZMASK_ALL_PASSED 0
 static inline uint32_t zmask_code(ZMask8 mask) {
   return _mm_movemask_epi8(mask);
 }
 static inline uint32_t zmask_code(ZMask4 mask) {
   return zmask_code(mask.xyzwxyzw);
 }
 #else
 # 2341 "src/gl.cc"
 using ZMask4Code =3D V4<uint8_t>;
 using ZMask8Code =3D V8<uint8_t>;
 #  define ZMASK_NONE_PASSED 0xFFFFFFFFU
 #  define ZMASK_ALL_PASSED 0
 static inline uint32_t zmask_code(ZMask4 mask) {
   return bit_cast<uint32_t>(CONVERT(mask, ZMask4Code));
 }
 static inline uint32_t zmask_code(ZMask8 mask) {
   return zmask_code(
       ZMask4((U16(lowHalf(mask)) >> 12) | (U16(highHalf(mask)) << 4)));
 }
 #endif
 # 2353 "src/gl.cc"

 template <int FUNC, bool MASK>
 static ALWAYS_INLINE int check_depth8(uint16_t z, uint16_t* zbuf,
                                       ZMask8& outmask) {
   ZMask8 dest =3D unaligned_load<ZMask8>(zbuf);
   ZMask8 src =3D int16_t(z);
   // Invert the depth test to check which pixels failed and should be disca=
 rded.
   ZMask8 mask =3D FUNC =3D=3D GL_LEQUAL ?
                                   // GL_LEQUAL: Not(LessEqual) =3D Greater
                     ZMask8(src > dest)
                                   :
                                   // GL_LESS: Not(Less) =3D GreaterEqual
                     ZMask8(src >=3D dest);
   switch (zmask_code(mask)) {
     case ZMASK_NONE_PASSED:
       return 0;
     case ZMASK_ALL_PASSED:
       if (MASK) {
         unaligned_store(zbuf, src);
       }
       return -1;
     default:
       if (MASK) {
         unaligned_store(zbuf, (mask & dest) | (~mask & src));
       }
       outmask =3D mask;
       return 1;
   }
 }

 template <bool FULL_SPANS, bool DISCARD>
 static ALWAYS_INLINE bool check_depth4(ZMask4 src, uint16_t* zbuf,
                                        ZMask4& outmask, int span =3D 0) {
   ZMask4 dest =3D unaligned_load<ZMask4>(zbuf);
   // Invert the depth test to check which pixels failed and should be disca=
 rded.
   ZMask4 mask =3D ctx->depthfunc =3D=3D GL_LEQUAL
                     ?
                     // GL_LEQUAL: Not(LessEqual) =3D Greater
                     ZMask4(src > dest)
                     :
                     // GL_LESS: Not(Less) =3D GreaterEqual
                     ZMask4(src >=3D dest);
   if (!FULL_SPANS) {
     mask |=3D ZMask4(span) < ZMask4{1, 2, 3, 4};
   }
   if (zmask_code(mask) =3D=3D ZMASK_NONE_PASSED) {
     return false;
   }
   if (!DISCARD && ctx->depthmask) {
     unaligned_store(zbuf, (mask & dest) | (~mask & src));
   }
   outmask =3D mask;
   return true;
 }

 template <bool FULL_SPANS, bool DISCARD>
 static ALWAYS_INLINE bool check_depth4(uint16_t z, uint16_t* zbuf,
                                        ZMask4& outmask, int span =3D 0) {
   return check_depth4<FULL_SPANS, DISCARD>(ZMask4(int16_t(z)), zbuf, outmas=
 k,
                                            span);
 }

 template <typename T>
 static inline ZMask4 packZMask4(T a) {
 #if 0 /* disabled by -frewrite-includes */
 #if USE_SSE2
 #endif
 #endif /* disabled by -frewrite-includes */
 #if 0 /* evaluated by -frewrite-includes */
 # 2418 "src/gl.cc"
   return lowHalf(bit_cast<ZMask8>(_mm_packs_epi32(a, a)));
 #if 0 /* disabled by -frewrite-includes */
 #if 0
 #elif USE_NEON
 #endif
 #endif /* disabled by -frewrite-includes */
 #elif 0 /* evaluated by -frewrite-includes */
 # 2420 "src/gl.cc"
   return vqmovn_s32(a);
 #else
 # 2422 "src/gl.cc"
   return CONVERT(a, ZMask4);
 #endif
 # 2424 "src/gl.cc"
 }

 static ALWAYS_INLINE ZMask4 packDepth() {
   return packZMask4(cast(fragment_shader->gl_FragCoord.z * 0xFFFF) - 0x8000=
 );
 }

 static ALWAYS_INLINE void discard_depth(ZMask4 src, uint16_t* zbuf,
                                         ZMask4 mask) {
   if (ctx->depthmask) {
     ZMask4 dest =3D unaligned_load<ZMask4>(zbuf);
     mask |=3D packZMask4(fragment_shader->isPixelDiscarded);
     unaligned_store(zbuf, (mask & dest) | (~mask & src));
   }
 }

 static ALWAYS_INLINE void discard_depth(uint16_t z, uint16_t* zbuf,
                                         ZMask4 mask) {
   discard_depth(ZMask4(int16_t(z)), zbuf, mask);
 }

 static inline WideRGBA8 pack_pixels_RGBA8(const vec4& v) {
   ivec4 i =3D round_pixel(v);
   HalfRGBA8 xz =3D packRGBA8(i.z, i.x);
   HalfRGBA8 yw =3D packRGBA8(i.y, i.w);
   HalfRGBA8 xy =3D zipLow(xz, yw);
   HalfRGBA8 zw =3D zipHigh(xz, yw);
   HalfRGBA8 lo =3D zip2Low(xy, zw);
   HalfRGBA8 hi =3D zip2High(xy, zw);
   return combine(lo, hi);
 }

 static inline WideRGBA8 pack_pixels_RGBA8(const vec4_scalar& v) {
   I32 i =3D round_pixel((Float){v.z, v.y, v.x, v.w});
   HalfRGBA8 c =3D packRGBA8(i, i);
   return combine(c, c);
 }

 static inline WideRGBA8 pack_pixels_RGBA8() {
   return pack_pixels_RGBA8(fragment_shader->gl_FragColor);
 }

 template <typename V>
 static inline PackedRGBA8 pack_span(uint32_t*, const V& v) {
   return pack(pack_pixels_RGBA8(v));
 }

 static inline PackedRGBA8 pack_span(uint32_t*) {
   return pack(pack_pixels_RGBA8());
 }

 // (x*y + x) >> 8, cheap approximation of (x*y) / 255
 template <typename T>
 static inline T muldiv255(T x, T y) {
   return (x * y + x) >> 8;
 }

 // Byte-wise addition for when x or y is a signed 8-bit value stored in the
 // low byte of a larger type T only with zeroed-out high bits, where T is
 // greater than 8 bits, i.e. uint16_t. This can result when muldiv255 is us=
 ed
 // upon signed operands, using up all the precision in a 16 bit integer, and
 // potentially losing the sign bit in the last >> 8 shift. Due to the
 // properties of two's complement arithmetic, even though we've discarded t=
 he
 // sign bit, we can still represent a negative number under addition (witho=
 ut
 // requiring any extra sign bits), just that any negative number will behave
 // like a large unsigned number under addition, generating a single carry b=
 it
 // on overflow that we need to discard. Thus, just doing a byte-wise add wi=
 ll
 // overflow without the troublesome carry, giving us only the remaining 8 l=
 ow
 // bits we actually need while keeping the high bits at zero.
 template <typename T>
 static inline T addlow(T x, T y) {
   typedef VectorType<uint8_t, sizeof(T)> bytes;
   return bit_cast<T>(bit_cast<bytes>(x) + bit_cast<bytes>(y));
 }

 static inline WideRGBA8 alphas(WideRGBA8 c) {
   return SHUFFLE(c, c, 3, 3, 3, 3, 7, 7, 7, 7, 11, 11, 11, 11, 15, 15, 15, =
 15);
 }

 static inline WideRGBA8 blend_pixels_RGBA8(PackedRGBA8 pdst, WideRGBA8 src)=
  {
   WideRGBA8 dst =3D unpack(pdst);
   const WideRGBA8 RGB_MASK =3D {0xFFFF, 0xFFFF, 0xFFFF, 0,      0xFFFF, 0xF=
 FFF,
                               0xFFFF, 0,      0xFFFF, 0xFFFF, 0xFFFF, 0,
                               0xFFFF, 0xFFFF, 0xFFFF, 0};
   const WideRGBA8 ALPHA_MASK =3D {0, 0, 0, 0xFFFF, 0, 0, 0, 0xFFFF,
                                 0, 0, 0, 0xFFFF, 0, 0, 0, 0xFFFF};
   const WideRGBA8 ALPHA_OPAQUE =3D {0, 0, 0, 255, 0, 0, 0, 255,
                                   0, 0, 0, 255, 0, 0, 0, 255};
   switch (blend_key) {
     case BLEND_KEY_NONE:
       return src;
     case BLEND_KEY(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,
                    GL_ONE_MINUS_SRC_ALPHA):
       // dst + src.a*(src.rgb1 - dst)
       // use addlow for signed overflow
       return addlow(dst, muldiv255(alphas(src), (src | ALPHA_OPAQUE) - dst)=
 );
     case BLEND_KEY(GL_ONE, GL_ONE_MINUS_SRC_ALPHA):
       return src + dst - muldiv255(dst, alphas(src));
     case BLEND_KEY(GL_ZERO, GL_ONE_MINUS_SRC_COLOR):
       return dst - muldiv255(dst, src);
     case BLEND_KEY(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, GL_ZERO, GL_ONE):
       return dst - (muldiv255(dst, src) & RGB_MASK);
     case BLEND_KEY(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA):
       return dst - muldiv255(dst, alphas(src));
     case BLEND_KEY(GL_ZERO, GL_SRC_COLOR):
       return muldiv255(src, dst);
     case BLEND_KEY(GL_ONE, GL_ONE):
       return src + dst;
     case BLEND_KEY(GL_ONE, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA):
       return src + dst - (muldiv255(dst, src) & ALPHA_MASK);
     case BLEND_KEY(GL_ONE, GL_ZERO):
       return src;
     case BLEND_KEY(GL_ONE_MINUS_DST_ALPHA, GL_ONE, GL_ZERO, GL_ONE):
       // src*(1-dst.a) + dst*1 =3D src - src*dst.a + dst
       return dst + ((src - muldiv255(src, alphas(dst))) & RGB_MASK);
     case BLEND_KEY(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR):
       // src*k + (1-src)*dst =3D src*k + dst - src*dst =3D dst + src*(k - d=
 st)
       // use addlow for signed overflow
       return addlow(
           dst, muldiv255(src, combine(ctx->blendcolor, ctx->blendcolor) - d=
 st));
     case BLEND_KEY(GL_ONE, GL_ONE_MINUS_SRC1_COLOR): {
       WideRGBA8 secondary =3D
           pack_pixels_RGBA8(fragment_shader->gl_SecondaryFragColor);
       return src + dst - muldiv255(dst, secondary);
     }
     default:
       UNREACHABLE;
       // return src;
   }
 }

 template <bool DISCARD>
 static inline void discard_output(uint32_t* buf, PackedRGBA8 mask) {
   PackedRGBA8 dst =3D unaligned_load<PackedRGBA8>(buf);
   WideRGBA8 r =3D pack_pixels_RGBA8();
   if (blend_key) r =3D blend_pixels_RGBA8(dst, r);
   if (DISCARD) mask |=3D bit_cast<PackedRGBA8>(fragment_shader->isPixelDisc=
 arded);
   unaligned_store(buf, (mask & dst) | (~mask & pack(r)));
 }

 template <bool DISCARD>
 static inline void discard_output(uint32_t* buf) {
   discard_output<DISCARD>(buf, 0);
 }

 template <>
 inline void discard_output<false>(uint32_t* buf) {
   WideRGBA8 r =3D pack_pixels_RGBA8();
   if (blend_key) r =3D blend_pixels_RGBA8(unaligned_load<PackedRGBA8>(buf),=
  r);
   unaligned_store(buf, pack(r));
 }

 static inline PackedRGBA8 span_mask_RGBA8(int span) {
   return bit_cast<PackedRGBA8>(I32(span) < I32{1, 2, 3, 4});
 }

 static inline PackedRGBA8 span_mask(uint32_t*, int span) {
   return span_mask_RGBA8(span);
 }

 static inline WideR8 pack_pixels_R8(Float c) { return packR8(round_pixel(c)=
 ); }

 static inline WideR8 pack_pixels_R8() {
   return pack_pixels_R8(fragment_shader->gl_FragColor.x);
 }

 template <typename C>
 static inline PackedR8 pack_span(uint8_t*, C c) {
   return pack(pack_pixels_R8(c));
 }

 static inline PackedR8 pack_span(uint8_t*) { return pack(pack_pixels_R8());=
  }

 static inline WideR8 blend_pixels_R8(WideR8 dst, WideR8 src) {
   switch (blend_key) {
     case BLEND_KEY_NONE:
       return src;
     case BLEND_KEY(GL_ZERO, GL_SRC_COLOR):
       return muldiv255(src, dst);
     case BLEND_KEY(GL_ONE, GL_ONE):
       return src + dst;
     case BLEND_KEY(GL_ONE, GL_ZERO):
       return src;
     default:
       UNREACHABLE;
       // return src;
   }
 }

 template <bool DISCARD>
 static inline void discard_output(uint8_t* buf, WideR8 mask) {
   WideR8 dst =3D unpack(unaligned_load<PackedR8>(buf));
   WideR8 r =3D pack_pixels_R8();
   if (blend_key) r =3D blend_pixels_R8(dst, r);
   if (DISCARD) mask |=3D packR8(fragment_shader->isPixelDiscarded);
   unaligned_store(buf, pack((mask & dst) | (~mask & r)));
 }

 template <bool DISCARD>
 static inline void discard_output(uint8_t* buf) {
   discard_output<DISCARD>(buf, 0);
 }

 template <>
 inline void discard_output<false>(uint8_t* buf) {
   WideR8 r =3D pack_pixels_R8();
   if (blend_key) r =3D blend_pixels_R8(unpack(unaligned_load<PackedR8>(buf)=
 ), r);
   unaligned_store(buf, pack(r));
 }

 static inline WideR8 span_mask_R8(int span) {
   return bit_cast<WideR8>(WideR8(span) < WideR8{1, 2, 3, 4});
 }

 static inline WideR8 span_mask(uint8_t*, int span) {
   return span_mask_R8(span);
 }

 static inline PackedRG8 span_mask_RG8(int span) {
   return bit_cast<PackedRG8>(I16(span) < I16{1, 2, 3, 4});
 }

 template <bool DISCARD, bool W, typename P, typename M>
 static inline void commit_output(P* buf, M mask) {
   fragment_shader->run<W>();
   discard_output<DISCARD>(buf, mask);
 }

 template <bool DISCARD, bool W, typename P>
 static inline void commit_output(P* buf) {
   fragment_shader->run<W>();
   discard_output<DISCARD>(buf);
 }

 template <bool DISCARD, bool W, typename P>
 static inline void commit_output(P* buf, int span) {
   commit_output<DISCARD, W>(buf, span_mask(buf, span));
 }

 template <bool DISCARD, bool W, typename P, typename Z>
 static inline void commit_output(P* buf, Z z, uint16_t* zbuf) {
   ZMask4 zmask;
   if (check_depth4<true, DISCARD>(z, zbuf, zmask)) {
     commit_output<DISCARD, W>(buf, unpack(zmask, buf));
     if (DISCARD) {
       discard_depth(z, zbuf, zmask);
     }
   } else {
     fragment_shader->skip<W>();
   }
 }

 template <bool DISCARD, bool W, typename P, typename Z>
 static inline void commit_output(P* buf, Z z, uint16_t* zbuf, int span) {
   ZMask4 zmask;
   if (check_depth4<false, DISCARD>(z, zbuf, zmask, span)) {
     commit_output<DISCARD, W>(buf, unpack(zmask, buf));
     if (DISCARD) {
       discard_depth(z, zbuf, zmask);
     }
   }
 }

 static inline void commit_span(uint32_t* buf, PackedRGBA8 r) {
   if (blend_key)
     r =3D pack(blend_pixels_RGBA8(unaligned_load<PackedRGBA8>(buf), unpack(=
 r)));
   unaligned_store(buf, r);
 }

 UNUSED static inline void commit_solid_span(uint32_t* buf, PackedRGBA8 r,
                                             int len) {
   if (blend_key) {
     auto src =3D unpack(r);
     for (uint32_t* end =3D &buf[len]; buf < end; buf +=3D 4) {
       unaligned_store(
           buf, pack(blend_pixels_RGBA8(unaligned_load<PackedRGBA8>(buf), sr=
 c)));
     }
   } else {
     fill_n(buf, len, bit_cast<U32>(r).x);
   }
 }

 UNUSED static inline void commit_texture_span(uint32_t* buf, uint32_t* src,
                                               int len) {
   if (blend_key) {
     for (uint32_t* end =3D &buf[len]; buf < end; buf +=3D 4, src +=3D 4) {
       PackedRGBA8 r =3D unaligned_load<PackedRGBA8>(src);
       unaligned_store(buf, pack(blend_pixels_RGBA8(
                                unaligned_load<PackedRGBA8>(buf), unpack(r))=
 ));
     }
   } else {
     memcpy(buf, src, len * sizeof(uint32_t));
   }
 }

 static inline void commit_span(uint8_t* buf, PackedR8 r) {
   if (blend_key)
     r =3D pack(blend_pixels_R8(unpack(unaligned_load<PackedR8>(buf)), unpac=
 k(r)));
   unaligned_store(buf, r);
 }

 UNUSED static inline void commit_solid_span(uint8_t* buf, PackedR8 r, int l=
 en) {
   if (blend_key) {
     auto src =3D unpack(r);
     for (uint8_t* end =3D &buf[len]; buf < end; buf +=3D 4) {
       unaligned_store(buf, pack(blend_pixels_R8(
                                unpack(unaligned_load<PackedR8>(buf)), src))=
 );
     }
   } else {
     fill_n((uint32_t*)buf, len / 4, bit_cast<uint32_t>(r));
   }
 }

 #define DISPATCH_DRAW_SPAN(self, buf, len)                  \
   do {                                                      \
     int drawn =3D self->draw_span(buf, len);                  \
     if (drawn) self->step_interp_inputs(drawn >> 2);        \
     for (buf +=3D drawn; drawn < len; drawn +=3D 4, buf +=3D 4) { \
       run(self);                                            \
       commit_span(buf, pack_span(buf));                     \
     }                                                       \
   } while (0)

 #if 0 /* expanded by -frewrite-includes */
 #include "texture.h"
 #endif /* expanded by -frewrite-includes */
 # 2746 "src/gl.cc"
 # 1 "src/texture.h" 1
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

 template <typename S>
 static WideRGBA8 textureLinearUnpackedRGBA8(S sampler, ivec2 i, int zoffset=
 ) {
   assert(sampler->format =3D=3D TextureFormat::RGBA8);
   ivec2 frac =3D i & 0x7F;
   i >>=3D 7;

   I32 row0 =3D clampCoord(i.x, sampler->width) +
              clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
   I32 row1 =3D row0 + ((i.y >=3D 0 && i.y < int32_t(sampler->height) - 1) &
                      I32(sampler->stride));
   I16 fracx =3D
       CONVERT(frac.x & (i.x >=3D 0 && i.x < int32_t(sampler->width) - 1), I=
 16);
   I16 fracy =3D CONVERT(frac.y, I16);

   auto a0 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.x]), V8<int16_=
 t>);
   auto a1 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.x]), V8<int16_=
 t>);
   a0 +=3D ((a1 - a0) * fracy.x) >> 7;

   auto b0 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.y]), V8<int16_=
 t>);
   auto b1 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.y]), V8<int16_=
 t>);
   b0 +=3D ((b1 - b0) * fracy.y) >> 7;

   auto abl =3D combine(lowHalf(a0), lowHalf(b0));
   auto abh =3D combine(highHalf(a0), highHalf(b0));
   abl +=3D ((abh - abl) * fracx.xxxxyyyy) >> 7;

   auto c0 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.z]), V8<int16_=
 t>);
   auto c1 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.z]), V8<int16_=
 t>);
   c0 +=3D ((c1 - c0) * fracy.z) >> 7;

   auto d0 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row0.w]), V8<int16_=
 t>);
   auto d1 =3D
       CONVERT(unaligned_load<V8<uint8_t>>(&sampler->buf[row1.w]), V8<int16_=
 t>);
   d0 +=3D ((d1 - d0) * fracy.w) >> 7;

   auto cdl =3D combine(lowHalf(c0), lowHalf(d0));
   auto cdh =3D combine(highHalf(c0), highHalf(d0));
   cdl +=3D ((cdh - cdl) * fracx.zzzzwwww) >> 7;

   return combine(HalfRGBA8(abl), HalfRGBA8(cdl));
 }

 template <typename S>
 static PackedRGBA8 textureLinearPackedRGBA8(S sampler, ivec2 i, int zoffset=
 ) {
   return pack(textureLinearUnpackedRGBA8(sampler, i, zoffset));
 }

 template <typename S>
 static inline void textureLinearCommit4(S sampler, ivec2 i, int zoffset,
                                         uint32_t* buf) {
   commit_span(buf, textureLinearPackedRGBA8(sampler, i, zoffset));
 }

 template <typename S>
 static void textureLinearCommit8(S sampler, ivec2_scalar i, int zoffset,
                                  uint32_t* buf) {
   assert(sampler->format =3D=3D TextureFormat::RGBA8);
   ivec2_scalar frac =3D i & 0x7F;
   i >>=3D 7;

   uint32_t* row0 =3D
       &sampler
            ->buf[clampCoord(i.x, sampler->width) +
                  clampCoord(i.y, sampler->height) * sampler->stride + zoffs=
 et];
   uint32_t* row1 =3D
       row0 +
       ((i.y >=3D 0 && i.y < int32_t(sampler->height) - 1) ? sampler->stride=
  : 0);
   int16_t fracx =3D i.x >=3D 0 && i.x < int32_t(sampler->width) - 1 ? frac.=
 x : 0;
   int16_t fracy =3D frac.y;

   U32 pix0 =3D unaligned_load<U32>(row0);
   U32 pix0n =3D unaligned_load<U32>(row0 + 4);
   uint32_t pix0x =3D row0[8];
   U32 pix1 =3D unaligned_load<U32>(row1);
   U32 pix1n =3D unaligned_load<U32>(row1 + 4);
   uint32_t pix1x =3D row1[8];

   {
     auto ab0 =3D CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0, pix0, 0, 1, 1=
 , 2)),
                        V16<int16_t>);
     auto ab1 =3D CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1, pix1, 0, 1, 1=
 , 2)),
                        V16<int16_t>);
     ab0 +=3D ((ab1 - ab0) * fracy) >> 7;

     auto cd0 =3D CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0, pix0n, 2, 3, =
 3, 4)),
                        V16<int16_t>);
     auto cd1 =3D CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1, pix1n, 2, 3, =
 3, 4)),
                        V16<int16_t>);
     cd0 +=3D ((cd1 - cd0) * fracy) >> 7;

     auto abcdl =3D combine(lowHalf(ab0), lowHalf(cd0));
     auto abcdh =3D combine(highHalf(ab0), highHalf(cd0));
     abcdl +=3D ((abcdh - abcdl) * fracx) >> 7;

     commit_span(buf, pack(WideRGBA8(abcdl)));
   }

   {
     auto ab0 =3D
         CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0n, pix0n, 0, 1, 1, 2)),
                 V16<int16_t>);
     auto ab1 =3D
         CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1n, pix1n, 0, 1, 1, 2)),
                 V16<int16_t>);
     ab0 +=3D ((ab1 - ab0) * fracy) >> 7;

     auto cd0 =3D
         CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix0n, U32(pix0x), 2, 3, 3, =
 4)),
                 V16<int16_t>);
     auto cd1 =3D
         CONVERT(bit_cast<V16<uint8_t>>(SHUFFLE(pix1n, U32(pix1x), 2, 3, 3, =
 4)),
                 V16<int16_t>);
     cd0 +=3D ((cd1 - cd0) * fracy) >> 7;

     auto abcdl =3D combine(lowHalf(ab0), lowHalf(cd0));
     auto abcdh =3D combine(highHalf(ab0), highHalf(cd0));
     abcdl +=3D ((abcdh - abcdl) * fracx) >> 7;

     commit_span(buf + 4, pack(WideRGBA8(abcdl)));
   }
 }

 template <typename S>
 static PackedRG8 textureLinearPackedRG8(S sampler, ivec2 i, int zoffset) {
   assert(sampler->format =3D=3D TextureFormat::RG8);
   ivec2 frac =3D i & 0x7F;
   i >>=3D 7;

   I32 row0 =3D clampCoord(i.x, sampler->width) +
              clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
   I32 row1 =3D row0 + ((i.y >=3D 0 && i.y < int32_t(sampler->height) - 1) &
                      I32(sampler->stride));
   I16 fracx =3D
       CONVERT(frac.x & (i.x >=3D 0 && i.x < int32_t(sampler->width) - 1), I=
 16);
   I16 fracy =3D CONVERT(frac.y, I16);

   uint16_t* buf =3D (uint16_t*)sampler->buf;

   // Load RG bytes for two adjacent pixels - rgRG
   auto a0 =3D unaligned_load<V4<uint8_t>>(&buf[row0.x]);
   auto b0 =3D unaligned_load<V4<uint8_t>>(&buf[row0.y]);
   auto ab0 =3D CONVERT(combine(a0, b0), V8<int16_t>);
   // Load two pixels for next row
   auto a1 =3D unaligned_load<V4<uint8_t>>(&buf[row1.x]);
   auto b1 =3D unaligned_load<V4<uint8_t>>(&buf[row1.y]);
   auto ab1 =3D CONVERT(combine(a1, b1), V8<int16_t>);
   // Blend rows
   ab0 +=3D ((ab1 - ab0) * fracy.xxxxyyyy) >> 7;

   auto c0 =3D unaligned_load<V4<uint8_t>>(&buf[row0.z]);
   auto d0 =3D unaligned_load<V4<uint8_t>>(&buf[row0.w]);
   auto cd0 =3D CONVERT(combine(c0, d0), V8<int16_t>);
   auto c1 =3D unaligned_load<V4<uint8_t>>(&buf[row1.z]);
   auto d1 =3D unaligned_load<V4<uint8_t>>(&buf[row1.w]);
   auto cd1 =3D CONVERT(combine(c1, d1), V8<int16_t>);
   // Blend rows
   cd0 +=3D ((cd1 - cd0) * fracy.zzzzwwww) >> 7;

   // ab =3D a.rgRG,b.rgRG
   // cd =3D c.rgRG,d.rgRG
   // ... ac =3D a.rg,c.rg,a.RG,c.RG
   // ... bd =3D b.rg,d.rg,b.RG,d.RG
   auto ac =3D zip2Low(ab0, cd0);
   auto bd =3D zip2High(ab0, cd0);
   // a.rg,b.rg,c.rg,d.rg
   // a.RG,b.RG,c.RG,d.RG
   auto abcdl =3D zip2Low(ac, bd);
   auto abcdh =3D zip2High(ac, bd);
   // Blend columns
   abcdl +=3D ((abcdh - abcdl) * fracx.xxyyzzww) >> 7;

   return pack(WideRG8(abcdl));
 }
 # 2747 "src/gl.cc" 2

 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wuninitialized"
 #pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-parameter"
 #pragma GCC diagnostic ignored "-Wunused-variable"
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
 #ifdef __clang__
 #  pragma GCC diagnostic ignored "-Wunused-private-field"
 #else
 # 2757 "src/gl.cc"
 #  pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #endif
 # 2759 "src/gl.cc"
 #if 0 /* expanded by -frewrite-includes */
 #include "load_shader.h"
 #endif /* expanded by -frewrite-includes */
 # 2759 "src/gl.cc"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h" 1
 #if 0 /* expanded by -frewrite-includes */
 #include "brush_blend.h"
 #endif /* expanded by -frewrite-includes */
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/brush_blend.h" 1
 struct brush_blend_common {
 struct Samplers {
  sampler2DArray_impl sColor0_impl;
  int sColor0_slot;
  sampler2D_impl sGpuCache_impl;
  int sGpuCache_slot;
  sampler2DArray_impl sPrevPassAlpha_impl;
  int sPrevPassAlpha_slot;
  sampler2D_impl sPrimitiveHeadersF_impl;
  int sPrimitiveHeadersF_slot;
  isampler2D_impl sPrimitiveHeadersI_impl;
  int sPrimitiveHeadersI_slot;
  sampler2D_impl sRenderTasks_impl;
  int sRenderTasks_slot;
  sampler2D_impl sTransformPalette_impl;
  int sTransformPalette_slot;
  bool set_slot(int index, int value) {
   switch (index) {
   case 7:
    sColor0_slot =3D value;
    return true;
   case 2:
    sGpuCache_slot =3D value;
    return true;
   case 8:
    sPrevPassAlpha_slot =3D value;
    return true;
   case 4:
    sPrimitiveHeadersF_slot =3D value;
    return true;
   case 5:
    sPrimitiveHeadersI_slot =3D value;
    return true;
   case 1:
    sRenderTasks_slot =3D value;
    return true;
   case 3:
    sTransformPalette_slot =3D value;
    return true;
   }
   return false;
  }
 } samplers;
 struct AttribLocations {
  int aPosition =3D NULL_ATTRIB;
  int aData =3D NULL_ATTRIB;
  void bind_loc(const char* name, int index) {
   if (strcmp("aPosition", name) =3D=3D 0) { aPosition =3D index; return; }
   if (strcmp("aData", name) =3D=3D 0) { aData =3D index; return; }
  }
  int get_loc(const char* name) const {
   if (strcmp("aPosition", name) =3D=3D 0) { return aPosition !=3D NULL_ATTR=
 IB ? aPosition : -1; }
   if (strcmp("aData", name) =3D=3D 0) { return aData !=3D NULL_ATTRIB ? aDa=
 ta : -1; }
   return -1;
  }
 } attrib_locations;
 vec4_scalar vTransformBounds;
 vec4_scalar vClipMaskUvBounds;
 vec4_scalar flat_varying_vec4_1;
 vec4_scalar flat_varying_vec4_2;
 vec4_scalar flat_varying_vec4_3;
 vec4_scalar flat_varying_vec4_4;
 ivec4_scalar flat_varying_ivec4_0;
 mat4_scalar vColorMat;
 Array<int32_t,4> vFuncs;
 sampler2DArray sColor0;
 sampler2D sGpuCache;
 sampler2DArray sPrevPassAlpha;
 sampler2D sPrimitiveHeadersF;
 isampler2D sPrimitiveHeadersI;
 sampler2D sRenderTasks;
 sampler2D sTransformPalette;
 mat4_scalar uTransform;
 void bind_textures() {
  sColor0 =3D lookup_sampler_array(&samplers.sColor0_impl, samplers.sColor0_=
 slot);
  sGpuCache =3D lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_=
 slot);
  sPrevPassAlpha =3D lookup_sampler_array(&samplers.sPrevPassAlpha_impl, sam=
 plers.sPrevPassAlpha_slot);
  sPrimitiveHeadersF =3D lookup_sampler(&samplers.sPrimitiveHeadersF_impl, s=
 amplers.sPrimitiveHeadersF_slot);
  sPrimitiveHeadersI =3D lookup_isampler(&samplers.sPrimitiveHeadersI_impl, =
 samplers.sPrimitiveHeadersI_slot);
  sRenderTasks =3D lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRen=
 derTasks_slot);
  sTransformPalette =3D lookup_sampler(&samplers.sTransformPalette_impl, sam=
 plers.sTransformPalette_slot);
 }
 };
 struct brush_blend_vert : VertexShaderImpl, brush_blend_common {
 private:
 typedef brush_blend_vert Self;
 // int32_t uMode;
 // mat4_scalar uTransform;
 vec2 aPosition;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sRenderTasks;
 struct RenderTaskCommonData_scalar {
 RectWithSize_scalar task_rect;
 float texture_layer_index;
 RenderTaskCommonData_scalar() =3D default;
 RenderTaskCommonData_scalar(RectWithSize_scalar task_rect, float texture_la=
 yer_index) : task_rect(task_rect), texture_layer_index(texture_layer_index)=
 {}
 };
 struct RenderTaskCommonData {
 RectWithSize task_rect;
 Float texture_layer_index;
 RenderTaskCommonData() =3D default;
 RenderTaskCommonData(RectWithSize task_rect, Float texture_layer_index) : t=
 ask_rect(task_rect), texture_layer_index(texture_layer_index){}
 RenderTaskCommonData(RectWithSize_scalar task_rect, float texture_layer_ind=
 ex):task_rect(task_rect),texture_layer_index(texture_layer_index){
 }
 IMPLICIT RenderTaskCommonData(RenderTaskCommonData_scalar s):task_rect(s.ta=
 sk_rect),texture_layer_index(s.texture_layer_index){
 }
 friend RenderTaskCommonData if_then_else(I32 c, RenderTaskCommonData t, Ren=
 derTaskCommonData e) { return RenderTaskCommonData(
 if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.texture_layer_=
 index, e.texture_layer_index));
 }};
 struct RenderTaskData_scalar {
 RenderTaskCommonData_scalar common_data;
 vec3_scalar user_data;
 RenderTaskData_scalar() =3D default;
 RenderTaskData_scalar(RenderTaskCommonData_scalar common_data, vec3_scalar =
 user_data) : common_data(common_data), user_data(user_data){}
 };
 struct RenderTaskData {
 RenderTaskCommonData common_data;
 vec3 user_data;
 RenderTaskData() =3D default;
 RenderTaskData(RenderTaskCommonData common_data, vec3 user_data) : common_d=
 ata(common_data), user_data(user_data){}
 RenderTaskData(RenderTaskCommonData_scalar common_data, vec3_scalar user_da=
 ta):common_data(common_data),user_data(user_data){
 }
 IMPLICIT RenderTaskData(RenderTaskData_scalar s):common_data(s.common_data)=
 ,user_data(s.user_data){
 }
 friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData =
 e) { return RenderTaskData(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.user_data,=
  e.user_data));
 }};
 struct PictureTask_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar content_origin;
 PictureTask_scalar() =3D default;
 PictureTask_scalar(RenderTaskCommonData_scalar common_data, float device_pi=
 xel_scale, vec2_scalar content_origin) : common_data(common_data), device_p=
 ixel_scale(device_pixel_scale), content_origin(content_origin){}
 };
 struct PictureTask {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 content_origin;
 PictureTask() =3D default;
 PictureTask(RenderTaskCommonData common_data, Float device_pixel_scale, vec=
 2 content_origin) : common_data(common_data), device_pixel_scale(device_pix=
 el_scale), content_origin(content_origin){}
 PictureTask(RenderTaskCommonData_scalar common_data, float device_pixel_sca=
 le, vec2_scalar content_origin):common_data(common_data),device_pixel_scale=
 (device_pixel_scale),content_origin(content_origin){
 }
 IMPLICIT PictureTask(PictureTask_scalar s):common_data(s.common_data),devic=
 e_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
 }
 friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { retu=
 rn PictureTask(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.conten=
 t_origin));
 }};
 struct ClipArea_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar screen_origin;
 ClipArea_scalar() =3D default;
 ClipArea_scalar(RenderTaskCommonData_scalar common_data, float device_pixel=
 _scale, vec2_scalar screen_origin) : common_data(common_data), device_pixel=
 _scale(device_pixel_scale), screen_origin(screen_origin){}
 };
 struct ClipArea {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 screen_origin;
 ClipArea() =3D default;
 ClipArea(RenderTaskCommonData common_data, Float device_pixel_scale, vec2 s=
 creen_origin) : common_data(common_data), device_pixel_scale(device_pixel_s=
 cale), screen_origin(screen_origin){}
 ClipArea(RenderTaskCommonData_scalar common_data, float device_pixel_scale,=
  vec2_scalar screen_origin):common_data(common_data),device_pixel_scale(dev=
 ice_pixel_scale),screen_origin(screen_origin){
 }
 IMPLICIT ClipArea(ClipArea_scalar s):common_data(s.common_data),device_pixe=
 l_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
 }
 friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipAr=
 ea(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_=
 origin));
 }};
 // sampler2D sGpuCache;
 struct ImageResource_scalar {
 RectWithEndpoint_scalar uv_rect;
 float layer;
 vec3_scalar user_data;
 ImageResource_scalar() =3D default;
 ImageResource_scalar(RectWithEndpoint_scalar uv_rect, float layer, vec3_sca=
 lar user_data) : uv_rect(uv_rect), layer(layer), user_data(user_data){}
 };
 struct ImageResource {
 RectWithEndpoint uv_rect;
 Float layer;
 vec3 user_data;
 ImageResource() =3D default;
 ImageResource(RectWithEndpoint uv_rect, Float layer, vec3 user_data) : uv_r=
 ect(uv_rect), layer(layer), user_data(user_data){}
 ImageResource(RectWithEndpoint_scalar uv_rect, float layer, vec3_scalar use=
 r_data):uv_rect(uv_rect),layer(layer),user_data(user_data){
 }
 IMPLICIT ImageResource(ImageResource_scalar s):uv_rect(s.uv_rect),layer(s.l=
 ayer),user_data(s.user_data){
 }
 friend ImageResource if_then_else(I32 c, ImageResource t, ImageResource e) =
 { return ImageResource(
 if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.layer, e.layer), i=
 f_then_else(c, t.user_data, e.user_data));
 }};
 struct ImageResourceExtra_scalar {
 vec4_scalar st_tl;
 vec4_scalar st_tr;
 vec4_scalar st_bl;
 vec4_scalar st_br;
 ImageResourceExtra_scalar() =3D default;
 ImageResourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar=
  st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_b=
 r(st_br){}
 };
 struct ImageResourceExtra {
 vec4 st_tl;
 vec4 st_tr;
 vec4 st_bl;
 vec4 st_br;
 ImageResourceExtra() =3D default;
 ImageResourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(=
 st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
 ImageResourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl,=
  vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
 }
 IMPLICIT ImageResourceExtra(ImageResourceExtra_scalar s):st_tl(s.st_tl),st_=
 tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
 }
 friend ImageResourceExtra if_then_else(I32 c, ImageResourceExtra t, ImageRe=
 sourceExtra e) { return ImageResourceExtra(
 if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_th=
 en_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
 }};
 // vec4_scalar vTransformBounds;
 // sampler2D sTransformPalette;
 struct Transform_scalar {
 mat4_scalar m;
 mat4_scalar inv_m;
 bool is_axis_aligned;
 Transform_scalar() =3D default;
 Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : =
 m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
 };
 struct Transform {
 mat4 m;
 mat4 inv_m;
 Bool is_axis_aligned;
 Transform() =3D default;
 Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), i=
 s_axis_aligned(is_axis_aligned){}
 Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_=
 m(inv_m),is_axis_aligned(is_axis_aligned){
 }
 IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligne=
 d(s.is_axis_aligned){
 }
 friend Transform if_then_else(I32 c, Transform t, Transform e) { return Tra=
 nsform(
 if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(=
 c, t.is_axis_aligned, e.is_axis_aligned));
 }};
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 // sampler2D sPrimitiveHeadersF;
 // isampler2D sPrimitiveHeadersI;
 ivec4_scalar aData;
 struct Instance_scalar {
 int32_t prim_header_address;
 int32_t picture_task_address;
 int32_t clip_address;
 int32_t segment_index;
 int32_t flags;
 int32_t resource_address;
 int32_t brush_kind;
 Instance_scalar() =3D default;
 Instance_scalar(int32_t prim_header_address, int32_t picture_task_address, =
 int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resourc=
 e_address, int32_t brush_kind) : prim_header_address(prim_header_address), =
 picture_task_address(picture_task_address), clip_address(clip_address), seg=
 ment_index(segment_index), flags(flags), resource_address(resource_address)=
 , brush_kind(brush_kind){}
 };
 struct Instance {
 I32 prim_header_address;
 I32 picture_task_address;
 I32 clip_address;
 I32 segment_index;
 I32 flags;
 I32 resource_address;
 I32 brush_kind;
 Instance() =3D default;
 Instance(I32 prim_header_address, I32 picture_task_address, I32 clip_addres=
 s, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : pr=
 im_header_address(prim_header_address), picture_task_address(picture_task_a=
 ddress), clip_address(clip_address), segment_index(segment_index), flags(fl=
 ags), resource_address(resource_address), brush_kind(brush_kind){}
 Instance(int32_t prim_header_address, int32_t picture_task_address, int32_t=
  clip_address, int32_t segment_index, int32_t flags, int32_t resource_addre=
 ss, int32_t brush_kind):prim_header_address(prim_header_address),picture_ta=
 sk_address(picture_task_address),clip_address(clip_address),segment_index(s=
 egment_index),flags(flags),resource_address(resource_address),brush_kind(br=
 ush_kind){
 }
 IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_addr=
 ess),picture_task_address(s.picture_task_address),clip_address(s.clip_addre=
 ss),segment_index(s.segment_index),flags(s.flags),resource_address(s.resour=
 ce_address),brush_kind(s.brush_kind){
 }
 friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instan=
 ce(
 if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else=
 (c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.clip=
 _address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index=
 ), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e=
 =2Eresource_address), if_then_else(c, t.brush_kind, e.brush_kind));
 }};
 struct PrimitiveHeader_scalar {
 RectWithSize_scalar local_rect;
 RectWithSize_scalar local_clip_rect;
 float z;
 int32_t specific_prim_address;
 int32_t transform_id;
 ivec4_scalar user_data;
 PrimitiveHeader_scalar() =3D default;
 PrimitiveHeader_scalar(RectWithSize_scalar local_rect, RectWithSize_scalar =
 local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_=
 id, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local=
 _clip_rect), z(z), specific_prim_address(specific_prim_address), transform_=
 id(transform_id), user_data(user_data){}
 };
 struct PrimitiveHeader {
 RectWithSize local_rect;
 RectWithSize local_clip_rect;
 Float z;
 I32 specific_prim_address;
 I32 transform_id;
 ivec4 user_data;
 PrimitiveHeader() =3D default;
 PrimitiveHeader(RectWithSize local_rect, RectWithSize local_clip_rect, Floa=
 t z, I32 specific_prim_address, I32 transform_id, ivec4 user_data) : local_=
 rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_add=
 ress(specific_prim_address), transform_id(transform_id), user_data(user_dat=
 a){}
 PrimitiveHeader(RectWithSize_scalar local_rect, RectWithSize_scalar local_c=
 lip_rect, float z, int32_t specific_prim_address, int32_t transform_id, ive=
 c4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect=
 ),z(z),specific_prim_address(specific_prim_address),transform_id(transform_=
 id),user_data(user_data){
 }
 IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect)=
 ,local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific=
 _prim_address),transform_id(s.transform_id),user_data(s.user_data){
 }
 friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHead=
 er e) { return PrimitiveHeader(
 if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_r=
 ect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.speci=
 fic_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id,=
  e.transform_id), if_then_else(c, t.user_data, e.user_data));
 }};
 struct VertexInfo_scalar {
 vec2_scalar local_pos;
 vec4_scalar world_pos;
 VertexInfo_scalar() =3D default;
 VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos=
 (local_pos), world_pos(world_pos){}
 };
 struct VertexInfo {
 vec2 local_pos;
 vec4 world_pos;
 VertexInfo() =3D default;
 VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_po=
 s(world_pos){}
 VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_po=
 s),world_pos(world_pos){
 }
 IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s=
 =2Eworld_pos){
 }
 friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return =
 VertexInfo(
 if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.w=
 orld_pos));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 // mat4_scalar vColorMat;
 // Array<int32_t,4> vFuncs;
 Instance_scalar decode_instance_attributes() {
  Instance_scalar instance;
  (instance).prim_header_address =3D (aData).sel(X);
  (instance).picture_task_address =3D ((aData).sel(Y))>>(16);
  (instance).clip_address =3D ((aData).sel(Y))&(65535);
  (instance).segment_index =3D ((aData).sel(Z))&(65535);
  (instance).flags =3D ((aData).sel(Z))>>(16);
  (instance).resource_address =3D ((aData).sel(W))&(16777215);
  (instance).brush_kind =3D ((aData).sel(W))>>(24);
  return instance;
 }
 PrimitiveHeader_scalar fetch_prim_header(int32_t index) {
  PrimitiveHeader_scalar ph;
  ivec2_scalar uv_f =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sPrimitiveHeadersF_uv_f_fetch =3D texelFetchPtr(sPrimitiveHea=
 dersF, uv_f, 0, 1, 0, 0);
  vec4_scalar local_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sPrimit=
 iveHeadersF_uv_f_fetch, 0, 0);
  vec4_scalar local_clip_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sP=
 rimitiveHeadersF_uv_f_fetch, 1, 0);
  (ph).local_rect =3D RectWithSize_scalar((local_rect).sel(X, Y), (local_rec=
 t).sel(Z, W));
  (ph).local_clip_rect =3D RectWithSize_scalar((local_clip_rect).sel(X, Y), =
 (local_clip_rect).sel(Z, W));
  ivec2_scalar uv_i =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  ivec4_scalar* sPrimitiveHeadersI_uv_i_fetch =3D texelFetchPtr(sPrimitiveHe=
 adersI, uv_i, 0, 1, 0, 0);
  ivec4_scalar data0 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 0, 0);
  ivec4_scalar data1 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 1, 0);
  (ph).z =3D make_float((data0).sel(X));
  (ph).specific_prim_address =3D (data0).sel(Y);
  (ph).transform_id =3D (data0).sel(Z);
  (ph).user_data =3D data1;
  return ph;
 }
 Transform_scalar fetch_transform(int32_t id) {
  Transform_scalar transform;
  (transform).is_axis_aligned =3D ((id)>>(24))=3D=3D(0);
  int32_t index =3D (id)&(16777215);
  ivec2_scalar uv =3D make_ivec2(make_int((8u)*((make_uint(index))%((1024u)/=
 (8u)))), make_int((make_uint(index))/((1024u)/(8u))));
  ivec2_scalar uv0 =3D make_ivec2(((uv).sel(X))+(0), (uv).sel(Y));
  vec4_scalar* sTransformPalette_uv0_fetch =3D texelFetchPtr(sTransformPalet=
 te, uv0, 0, 7, 0, 0);
  (transform).m[0] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 0, 0);
  (transform).m[1] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 1, 0);
  (transform).m[2] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 2, 0);
  (transform).m[3] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 3, 0);
  (transform).inv_m[0] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 4, 0);
  (transform).inv_m[1] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 5, 0);
  (transform).inv_m[2] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 6, 0);
  (transform).inv_m[3] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 7, 0);
  return transform;
 }
 RenderTaskData_scalar fetch_render_task_data(int32_t index) {
  ivec2_scalar uv =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/=
 (2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sRenderTasks_uv_fetch =3D texelFetchPtr(sRenderTasks, uv, 0, =
 1, 0, 0);
  vec4_scalar texel0 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 0, 0);
  vec4_scalar texel1 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 1, 0);
  RectWithSize_scalar task_rect =3D RectWithSize_scalar((texel0).sel(X, Y), =
 (texel0).sel(Z, W));
  RenderTaskCommonData_scalar common_data =3D RenderTaskCommonData_scalar(ta=
 sk_rect, (texel1).sel(X));
  RenderTaskData_scalar data =3D RenderTaskData_scalar(common_data, (texel1)=
 =2Esel(Y, Z, W));
  return data;
 }
 PictureTask_scalar fetch_picture_task(int32_t address) {
  RenderTaskData_scalar task_data =3D fetch_render_task_data(address);
  PictureTask_scalar task =3D PictureTask_scalar((task_data).common_data, ((=
 task_data).user_data).sel(X), ((task_data).user_data).sel(Y, Z));
  return task;
 }
 ClipArea_scalar fetch_clip_area(int32_t index) {
  ClipArea_scalar area;
  if ((index)>=3D(32767)) {
   {
    RectWithSize_scalar rect =3D RectWithSize_scalar(make_vec2(0.f), make_ve=
 c2(0.f));
    (area).common_data =3D RenderTaskCommonData_scalar(rect, 0.f);
    (area).device_pixel_scale =3D 0.f;
    (area).screen_origin =3D make_vec2(0.f);
   }
  } else  {
   RenderTaskData_scalar task_data =3D fetch_render_task_data(index);
   (area).common_data =3D (task_data).common_data;
   (area).device_pixel_scale =3D ((task_data).user_data).sel(X);
   (area).screen_origin =3D ((task_data).user_data).sel(Y, Z);
  }
  return area;
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4_scalar,2> fetch_from_gpu_cache_2(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, =
 0);
  return Array<vec4_scalar,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec2 clamp_rect(vec2 pt, RectWithSize_scalar rect) {
  return clamp(pt, (rect).p0, ((rect).p0)+((rect).size));
 }
 VertexInfo write_vertex(vec2 local_pos, RectWithSize_scalar local_clip_rect=
 , float z, Transform_scalar transform, PictureTask_scalar task) {
  vec2 clamped_local_pos =3D clamp_rect(local_pos, local_clip_rect);
  vec4 world_pos =3D ((transform).m)*(make_vec4(clamped_local_pos, 0.f, 1.f)=
 );
  vec2 device_pos =3D ((world_pos).sel(X, Y))*((task).device_pixel_scale);
  vec2_scalar final_offset =3D (-((task).content_origin))+((((task).common_d=
 ata).task_rect).p0);
  gl_Position =3D (uTransform)*(make_vec4((device_pos)+((final_offset)*((wor=
 ld_pos).sel(W))), (z)*((world_pos).sel(W)), (world_pos).sel(W)));
  VertexInfo vi =3D VertexInfo(clamped_local_pos, world_pos);
  return vi;
 }
 RectWithEndpoint_scalar to_rect_with_endpoint(RectWithSize_scalar rect) {
  RectWithEndpoint_scalar result;
  (result).p0 =3D (rect).p0;
  (result).p1 =3D ((rect).p0)+((rect).size);
  return result;
 }
 void init_transform_vs(vec4_scalar local_bounds) {
  vTransformBounds =3D local_bounds;
 }
 VertexInfo write_transform_vertex(RectWithSize_scalar local_segment_rect, R=
 ectWithSize_scalar local_prim_rect, RectWithSize_scalar local_clip_rect, ve=
 c4_scalar clip_edge_mask, float z, Transform_scalar transform, PictureTask_=
 scalar task) {
  RectWithEndpoint_scalar clip_rect =3D to_rect_with_endpoint(local_clip_rec=
 t);
  RectWithEndpoint_scalar segment_rect =3D to_rect_with_endpoint(local_segme=
 nt_rect);
  (segment_rect).p0 =3D clamp((segment_rect).p0, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  (segment_rect).p1 =3D clamp((segment_rect).p1, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  RectWithEndpoint_scalar prim_rect =3D to_rect_with_endpoint(local_prim_rec=
 t);
  (prim_rect).p0 =3D clamp((prim_rect).p0, (clip_rect).p0, (clip_rect).p1);
  (prim_rect).p1 =3D clamp((prim_rect).p1, (clip_rect).p0, (clip_rect).p1);
  float extrude_amount =3D 2.f;
  vec4_scalar extrude_distance =3D (make_vec4(extrude_amount))*(clip_edge_ma=
 sk);
  (local_segment_rect).p0 -=3D (extrude_distance).sel(X, Y);
  (local_segment_rect).size +=3D ((extrude_distance).sel(X, Y))+((extrude_di=
 stance).sel(Z, W));
  vec2 local_pos =3D ((local_segment_rect).p0)+(((local_segment_rect).size)*=
 ((aPosition).sel(X, Y)));
  vec2_scalar task_offset =3D ((((task).common_data).task_rect).p0)-((task).=
 content_origin);
  vec4 world_pos =3D ((transform).m)*(make_vec4(local_pos, 0.f, 1.f));
  vec4 final_pos =3D make_vec4((((world_pos).sel(X, Y))*((task).device_pixel=
 _scale))+((task_offset)*((world_pos).sel(W))), (z)*((world_pos).sel(W)), (w=
 orld_pos).sel(W));
  gl_Position =3D (uTransform)*(final_pos);
  init_transform_vs(mix(make_vec4((prim_rect).p0, (prim_rect).p1), make_vec4=
 ((segment_rect).p0, (segment_rect).p1), clip_edge_mask));
  VertexInfo vi =3D VertexInfo(local_pos, world_pos);
  return vi;
 }
 ImageResource_scalar fetch_image_resource(int32_t address) {
  Array<vec4_scalar,2> data =3D fetch_from_gpu_cache_2(address);
  RectWithEndpoint_scalar uv_rect =3D RectWithEndpoint_scalar((data[0]).sel(=
 X, Y), (data[0]).sel(Z, W));
  return ImageResource_scalar(uv_rect, (data[1]).sel(X), (data[1]).sel(Y, Z,=
  W));
 }
 Array<vec4_scalar,4> fetch_from_gpu_cache_4(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 3, 0, =
 0);
  return Array<vec4_scalar,4>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0), texe=
 lFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 2, 0), texelFetchUnchecked(s=
 GpuCache, sGpuCache_uv_fetch, 3, 0)}};
 }
 ImageResourceExtra_scalar fetch_image_resource_extra(int32_t address) {
  Array<vec4_scalar,4> data =3D fetch_from_gpu_cache_4((address)+(2));
  return ImageResourceExtra_scalar(data[0], data[1], data[2], data[3]);
 }
 vec2 get_image_quad_uv(int32_t address, vec2 f) {
  ImageResourceExtra_scalar extra_data =3D fetch_image_resource_extra(addres=
 s);
  vec4 x =3D mix((extra_data).st_tl, (extra_data).st_tr, (f).sel(X));
  vec4 y =3D mix((extra_data).st_bl, (extra_data).st_br, (f).sel(X));
  vec4 z =3D mix(x, y, (f).sel(Y));
  return ((z).sel(X, Y))/((z).sel(W));
 }
 vec4_scalar fetch_from_gpu_cache_1(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 void blend_brush_vs(VertexInfo vi, int32_t prim_address, RectWithSize_scala=
 r local_rect, RectWithSize_scalar segment_rect, ivec4_scalar prim_user_data=
 , int32_t specific_resource_address, mat4_scalar transform, PictureTask_sca=
 lar pic_task, int32_t brush_flags, vec4_scalar unused) {
  ImageResource_scalar res =3D fetch_image_resource((prim_user_data).sel(X));
  vec2_scalar uv0 =3D ((res).uv_rect).p0;
  vec2_scalar uv1 =3D ((res).uv_rect).p1;
  vec2_scalar texture_size =3D make_vec2((textureSize(sColor0, 0)).sel(X, Y)=
 );
  vec2 f =3D (((vi).local_pos)-((local_rect).p0))/((local_rect).size);
  f =3D get_image_quad_uv((prim_user_data).sel(X), f);
  vec2 uv =3D mix(uv0, uv1, f);
  float perspective_interpolate =3D ((brush_flags)&(1))!=3D(0) ? 1.f : 0.f;
  (varying_vec4_0).lsel(Z, W) =3D ((uv)/(texture_size))*(mix(((vi).world_pos=
 ).sel(W), 1.f, perspective_interpolate));
  (flat_varying_vec4_4).sel(X) =3D (res).layer;
  (flat_varying_vec4_4).sel(Y) =3D perspective_interpolate;
  flat_varying_vec4_2 =3D (make_vec4(uv0, uv1))/((texture_size).sel(X, Y, X,=
  Y));
  (varying_vec4_0).lsel(X, Y) =3D (vi).local_pos;
  float lumR =3D 0.2126f;
  float lumG =3D 0.7152f;
  float lumB =3D 0.0722f;
  float oneMinusLumR =3D (1.f)-(lumR);
  float oneMinusLumG =3D (1.f)-(lumG);
  float oneMinusLumB =3D (1.f)-(lumB);
  float amount =3D (make_float((prim_user_data).sel(Z)))/(65536.f);
  float invAmount =3D (1.f)-(amount);
  (flat_varying_ivec4_0).sel(X) =3D ((prim_user_data).sel(Y))&(65535);
  (flat_varying_vec4_4).sel(Z) =3D amount;
  vFuncs[0] =3D (((prim_user_data).sel(Y))>>(28))&(15);
  vFuncs[1] =3D (((prim_user_data).sel(Y))>>(24))&(15);
  vFuncs[2] =3D (((prim_user_data).sel(Y))>>(20))&(15);
  vFuncs[3] =3D (((prim_user_data).sel(Y))>>(16))&(15);
  if (((flat_varying_ivec4_0).sel(X))=3D=3D(1)) {
   {
    vColorMat =3D make_mat4(make_vec4((lumR)+((oneMinusLumR)*(invAmount)), (=
 lumR)-((lumR)*(invAmount)), (lumR)-((lumR)*(invAmount)), 0.f), make_vec4((l=
 umG)-((lumG)*(invAmount)), (lumG)+((oneMinusLumG)*(invAmount)), (lumG)-((lu=
 mG)*(invAmount)), 0.f), make_vec4((lumB)-((lumB)*(invAmount)), (lumB)-((lum=
 B)*(invAmount)), (lumB)+((oneMinusLumB)*(invAmount)), 0.f), make_vec4(0.f, =
 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(2)) {
   {
    float c =3D cos(amount);
    float s =3D sin(amount);
    vColorMat =3D make_mat4(make_vec4(((lumR)+((oneMinusLumR)*(c)))-((lumR)*=
 (s)), ((lumR)-((lumR)*(c)))+((0.143f)*(s)), ((lumR)-((lumR)*(c)))-((oneMinu=
 sLumR)*(s)), 0.f), make_vec4(((lumG)-((lumG)*(c)))-((lumG)*(s)), ((lumG)+((=
 oneMinusLumG)*(c)))+((0.14f)*(s)), ((lumG)-((lumG)*(c)))+((lumG)*(s)), 0.f)=
 , make_vec4(((lumB)-((lumB)*(c)))+((oneMinusLumB)*(s)), ((lumB)-((lumB)*(c)=
 ))-((0.283f)*(s)), ((lumB)+((oneMinusLumB)*(c)))+((lumB)*(s)), 0.f), make_v=
 ec4(0.f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(4)) {
   {
    vColorMat =3D make_mat4(make_vec4(((invAmount)*(lumR))+(amount), (invAmo=
 unt)*(lumR), (invAmount)*(lumR), 0.f), make_vec4((invAmount)*(lumG), ((invA=
 mount)*(lumG))+(amount), (invAmount)*(lumG), 0.f), make_vec4((invAmount)*(l=
 umB), (invAmount)*(lumB), ((invAmount)*(lumB))+(amount), 0.f), make_vec4(0.=
 f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(5)) {
   {
    vColorMat =3D make_mat4(make_vec4((0.393f)+((0.607f)*(invAmount)), (0.34=
 9f)-((0.349f)*(invAmount)), (0.272f)-((0.272f)*(invAmount)), 0.f), make_vec=
 4((0.769f)-((0.769f)*(invAmount)), (0.686f)+((0.314f)*(invAmount)), (0.534f=
 )-((0.534f)*(invAmount)), 0.f), make_vec4((0.189f)-((0.189f)*(invAmount)), =
 (0.168f)-((0.168f)*(invAmount)), (0.131f)+((0.869f)*(invAmount)), 0.f), mak=
 e_vec4(0.f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(7)) {
   {
    Array<vec4_scalar,4> mat_data =3D fetch_from_gpu_cache_4((prim_user_data=
 ).sel(Z));
    vec4_scalar offset_data =3D fetch_from_gpu_cache_1(((prim_user_data).sel=
 (Z))+(4));
    vColorMat =3D make_mat4(mat_data[0], mat_data[1], mat_data[2], mat_data[=
 3]);
    flat_varying_vec4_3 =3D offset_data;
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(11)) {
   {
    (flat_varying_ivec4_0).sel(Y) =3D (prim_user_data).sel(Z);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(10)) {
   {
    flat_varying_vec4_1 =3D fetch_from_gpu_cache_1((prim_user_data).sel(Z));
   }
  }
 }
 void brush_shader_main_vs(Instance_scalar instance, PrimitiveHeader_scalar =
 ph, Transform_scalar transform, PictureTask_scalar pic_task, ClipArea_scala=
 r clip_area) {
  int32_t edge_flags =3D ((instance).flags)&(255);
  int32_t brush_flags =3D (((instance).flags)>>(8))&(255);
  vec4_scalar segment_data;
  RectWithSize_scalar segment_rect;
  if (((instance).segment_index)=3D=3D(65535)) {
   {
    segment_rect =3D (ph).local_rect;
    segment_data =3D make_vec4(0.f);
   }
  } else  {
   int32_t segment_address =3D (((ph).specific_prim_address)+(3))+(((instanc=
 e).segment_index)*(2));
   Array<vec4_scalar,2> segment_info =3D fetch_from_gpu_cache_2(segment_addr=
 ess);
   segment_rect =3D RectWithSize_scalar((segment_info[0]).sel(X, Y), (segmen=
 t_info[0]).sel(Z, W));
   (segment_rect).p0 +=3D ((ph).local_rect).p0;
   segment_data =3D segment_info[1];
  }
  VertexInfo vi;
  if ((transform).is_axis_aligned) {
   {
    vec2 local_pos =3D ((segment_rect).p0)+(((segment_rect).size)*((aPositio=
 n).sel(X, Y)));
    vi =3D write_vertex(local_pos, (ph).local_clip_rect, (ph).z, transform, =
 pic_task);
   }
  } else  {
   bvec4_scalar edge_mask =3D notEqual((edge_flags)&(make_ivec4(1, 2, 4, 8))=
 , make_ivec4(0));
   vi =3D write_transform_vertex(segment_rect, (ph).local_rect, (ph).local_c=
 lip_rect, mix(make_vec4(0.f), make_vec4(1.f), edge_mask), (ph).z, transform=
 , pic_task);
  }
  blend_brush_vs(vi, (ph).specific_prim_address, (ph).local_rect, segment_re=
 ct, (ph).user_data, (instance).resource_address, (transform).m, pic_task, b=
 rush_flags, segment_data);
 }
 ALWAYS_INLINE void main(void) {
  Instance_scalar instance =3D decode_instance_attributes();
  PrimitiveHeader_scalar ph =3D fetch_prim_header((instance).prim_header_add=
 ress);
  Transform_scalar transform =3D fetch_transform((ph).transform_id);
  PictureTask_scalar task =3D fetch_picture_task((instance).picture_task_add=
 ress);
  ClipArea_scalar clip_area =3D fetch_clip_area((instance).clip_address);
  brush_shader_main_vs(instance, ph, transform, task, clip_area);
 }
 static void set_uniform_1i(Self *self, int index, int value) {
  if (self->samplers.set_slot(index, value)) return;
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_4fv(Self *self, int index, const float *value) {
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_matrix4fv(Self *self, int index, const float *value=
 ) {
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   self->uTransform =3D mat4_scalar::load_from_ptr(value);
   break;
  }
 }
 static void load_attribs(Self *self, VertexAttrib *attribs, uint32_t start,=
  int instance, int count) {
  load_attrib(self->aPosition, attribs[self->attrib_locations.aPosition], st=
 art, instance, count);
  load_flat_attrib(self->aData, attribs[self->attrib_locations.aData], start=
 , instance, count);
 }
 public:
 struct InterpOutputs {
 vec4_scalar vClipMaskUv;
 vec4_scalar varying_vec4_0;
 };
 private:
 ALWAYS_INLINE void store_interp_outputs(char* dest_ptr, size_t stride) {
   for(int n =3D 0; n < 4; n++) {
     auto* dest =3D reinterpret_cast<InterpOutputs*>(dest_ptr);
     dest->vClipMaskUv =3D get_nth(vClipMaskUv, n);
     dest->varying_vec4_0 =3D get_nth(varying_vec4_0, n);
     dest_ptr +=3D stride;
   }
 }
 static void run(Self* self, char* interps, size_t interp_stride) {
  self->main();
  self->store_interp_outputs(interps, interp_stride);
 }
 static void init_batch(Self *self) { self->bind_textures(); }
 public:
 brush_blend_vert() {
  set_uniform_1i_func =3D (SetUniform1iFunc)&set_uniform_1i;
  set_uniform_4fv_func =3D (SetUniform4fvFunc)&set_uniform_4fv;
  set_uniform_matrix4fv_func =3D (SetUniformMatrix4fvFunc)&set_uniform_matri=
 x4fv;
  init_batch_func =3D (InitBatchFunc)&init_batch;
  load_attribs_func =3D (LoadAttribsFunc)&load_attribs;
  run_primitive_func =3D (RunPrimitiveFunc)&run;
 }
 };


 struct brush_blend_frag : FragmentShaderImpl, brush_blend_vert {
 private:
 typedef brush_blend_frag Self;
 #define oFragColor gl_FragColor
 // vec4 oFragColor;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sGpuCache;
 // vec4_scalar vTransformBounds;
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 struct Fragment_scalar {
 vec4_scalar color;
 Fragment_scalar() =3D default;
 explicit Fragment_scalar(vec4_scalar color) : color(color){}
 };
 struct Fragment {
 vec4 color;
 Fragment() =3D default;
 explicit Fragment(vec4 color) : color(color){}
 explicit Fragment(vec4_scalar color):color(color){
 }
 IMPLICIT Fragment(Fragment_scalar s):color(s.color){
 }
 friend Fragment if_then_else(I32 c, Fragment t, Fragment e) { return Fragme=
 nt(
 if_then_else(c, t.color, e.color));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 // mat4_scalar vColorMat;
 // Array<int32_t,4> vFuncs;
 vec3 Contrast(vec3 Cs, float amount) {
  return ((((Cs).sel(R, G, B))*(amount))-((0.5f)*(amount)))+(0.5f);
 }
 vec3 Invert(vec3 Cs, float amount) {
  return mix((Cs).sel(R, G, B), (make_vec3(1.f))-((Cs).sel(R, G, B)), amount=
 );
 }
 vec3 Brightness(vec3 Cs, float amount) {
  return clamp(((Cs).sel(R, G, B))*(amount), make_vec3(0.f), make_vec3(1.f));
 }
 vec3 SrgbToLinear(vec3 color) {
  vec3 c1 =3D (color)/(12.92f);
  vec3 c2 =3D pow(((color)/(1.055f))+(make_vec3((0.055f)/(1.055f))), make_ve=
 c3(2.4f));
  return mix(c2, c1, lessThanEqual(color, make_vec3(0.04045f)));
 }
 vec3 LinearToSrgb(vec3 color) {
  vec3 c1 =3D (color)*(12.92f);
  vec3 c2 =3D ((make_vec3(1.055f))*(pow(color, make_vec3((1.f)/(2.4f)))))-(m=
 ake_vec3(0.055f));
  return mix(c2, c1, lessThanEqual(color, make_vec3(0.0031308f)));
 }
 ivec2 get_gpu_cache_uv(I32 address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 vec4 fetch_from_gpu_cache_1(I32 address) {
  ivec2 uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 vec4_scalar fetch_from_gpu_cache_1(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 vec4 ComponentTransfer(vec4 colora) {
  int32_t offset =3D 0;
  vec4 texel;
  I32 k;
  for ( int32_t i =3D 0;
 (i)<(4); i++)  {
   switch (vFuncs[i]) {
    case 0:
     break;
    case 1:
    case 2:
     {
      k =3D make_int(floor((colora[i])*(255.f)));
      texel =3D fetch_from_gpu_cache_1((((flat_varying_ivec4_0).sel(Y))+(off=
 set))+((k)/(4)));
      colora[i] =3D clamp(texel[(k)%(4)], 0.f, 1.f);
      offset =3D (offset)+(64);
      break;
     }
    case 3:
     {
      texel =3D fetch_from_gpu_cache_1(((flat_varying_ivec4_0).sel(Y))+(offs=
 et));
      colora[i] =3D clamp(((texel[0])*(colora[i]))+(texel[1]), 0.f, 1.f);
      offset =3D (offset)+(1);
      break;
     }
    case 4:
     {
      texel =3D fetch_from_gpu_cache_1(((flat_varying_ivec4_0).sel(Y))+(offs=
 et));
      colora[i] =3D clamp(((texel[0])*(pow(colora[i], texel[1])))+(texel[2])=
 , 0.f, 1.f);
      offset =3D (offset)+(1);
      break;
     }
    default:
     break;
   }
  }
  return colora;
 }
 Float point_inside_rect(vec2 p, vec2_scalar p0, vec2_scalar p1) {
  vec2 s =3D (step(p0, p))-(step(p1, p));
  return ((s).sel(X))*((s).sel(Y));
 }
 Float signed_distance_rect(vec2 pos, vec2_scalar p0, vec2_scalar p1) {
  vec2 d =3D max((p0)-(pos), (pos)-(p1));
  return (length(max(make_vec2(0.f), d)))+(min(0.f, max((d).sel(X), (d).sel(=
 Y))));
 }
 Float compute_aa_range(vec2 position) {
  return (0.35355f)*(length(fwidth(position)));
 }
 Float distance_aa(Float aa_range, Float signed_distance) {
  I32 ret_mask =3D ~0;
  Float ret;
  Float dist =3D ((0.5f)*(signed_distance))/(aa_range);
  auto _c3_ =3D (dist)<=3D((-(0.5f))+(0.0001f));
  ret =3D 1.f;
  ret_mask =3D ~I32(_c3_);
  auto _c4_ =3D (dist)>=3D((0.5f)-(0.0001f));
  ret =3D if_then_else(ret_mask & I32(_c4_), 0.f, ret);
  ret_mask &=3D ~I32(_c4_);
  ret =3D if_then_else(ret_mask, (0.5f)+((dist)*((((0.8431027f)*(dist))*(dis=
 t))-(1.14453603f))), ret);
  return ret;
 }
 Float init_transform_fs(vec2 local_pos) {
  Float d =3D signed_distance_rect(local_pos, (vTransformBounds).sel(X, Y), =
 (vTransformBounds).sel(Z, W));
  Float aa_range =3D compute_aa_range(local_pos);
  return distance_aa(aa_range, d);
 }
 Fragment blend_brush_fs() {
  Float perspective_divisor =3D mix((gl_FragCoord).sel(W), 1.f, (flat_varyin=
 g_vec4_4).sel(Y));
  vec2 uv =3D ((varying_vec4_0).sel(Z, W))*(perspective_divisor);
  vec4 Cs =3D texture(sColor0, make_vec3(uv, (flat_varying_vec4_4).sel(X)));
  Float alpha =3D (Cs).sel(A);
  vec3 color =3D if_then_else((alpha)!=3D(0.f), ((Cs).sel(R, G, B))/(alpha),=
  (Cs).sel(R, G, B));
  switch ((flat_varying_ivec4_0).sel(X)) {
   case 0:
    color =3D Contrast(color, (flat_varying_vec4_4).sel(Z));
    break;
   case 3:
    color =3D Invert(color, (flat_varying_vec4_4).sel(Z));
    break;
   case 6:
    color =3D Brightness(color, (flat_varying_vec4_4).sel(Z));
    break;
   case 8:
    color =3D SrgbToLinear(color);
    break;
   case 9:
    color =3D LinearToSrgb(color);
    break;
   case 11:
    {
     vec4 colora =3D make_vec4(color, alpha);
     colora =3D ComponentTransfer(colora);
     color =3D (colora).sel(R, G, B);
     alpha =3D (colora).sel(A);
     break;
    }
   case 10:
    color =3D (flat_varying_vec4_1).sel(R, G, B);
    alpha =3D (flat_varying_vec4_1).sel(A);
    break;
   default:
    {
     vec4 result =3D ((vColorMat)*(make_vec4(color, alpha)))+(flat_varying_v=
 ec4_3);
     result =3D clamp(result, make_vec4(0.f), make_vec4(1.f));
     color =3D (result).sel(R, G, B);
     alpha =3D (result).sel(A);
     }
  }
  alpha *=3D min(point_inside_rect(uv, (flat_varying_vec4_2).sel(X, Y), (fla=
 t_varying_vec4_2).sel(Z, W)), init_transform_fs((varying_vec4_0).sel(X, Y))=
 );
  return Fragment((alpha)*(make_vec4(color, 1.f)));
 }
 void write_output(vec4 color) {
  oFragColor =3D color;
 }
 ALWAYS_INLINE void main(void) {
  Fragment frag =3D blend_brush_fs();
  write_output((frag).color);
 }
 typedef brush_blend_vert::InterpOutputs InterpInputs;
 InterpInputs interp_step;
 struct InterpPerspective {
 vec4 varying_vec4_0;
 };
 InterpPerspective interp_perspective;
 static void read_interp_inputs(Self *self, const InterpInputs *init, const =
 InterpInputs *step, float step_width) {
   self->varying_vec4_0 =3D init_interp(init->varying_vec4_0, step->varying_=
 vec4_0);
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 static void read_perspective_inputs(Self *self, const InterpInputs *init, c=
 onst InterpInputs *step, float step_width) {
   Float w =3D 1.0f / self->gl_FragCoord.w;
   self->interp_perspective.varying_vec4_0 =3D init_interp(init->varying_vec=
 4_0, step->varying_vec4_0);
   self->varying_vec4_0 =3D self->interp_perspective.varying_vec4_0 * w;
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 ALWAYS_INLINE void step_interp_inputs() {
   varying_vec4_0 +=3D interp_step.varying_vec4_0;
 }
 ALWAYS_INLINE void step_perspective_inputs() {
   step_perspective();
   Float w =3D 1.0f / gl_FragCoord.w;
   interp_perspective.varying_vec4_0 +=3D interp_step.varying_vec4_0;
   varying_vec4_0 =3D w * interp_perspective.varying_vec4_0;
 }
 static void run(Self *self) {
  self->main();
  self->step_interp_inputs();
 }
 static void skip(Self* self, int chunks) {
  self->step_interp_inputs();
  while (--chunks > 0) self->step_interp_inputs();
 }
 static void run_perspective(Self *self) {
  self->main();
  self->step_perspective_inputs();
 }
 static void skip_perspective(Self* self, int chunks) {
  self->step_perspective_inputs();
  while (--chunks > 0) self->step_perspective_inputs();
 }
 public:
 brush_blend_frag() {
  init_span_func =3D (InitSpanFunc)&read_interp_inputs;
  run_func =3D (RunFunc)&run;
  skip_func =3D (SkipFunc)&skip;
  enable_perspective();
  init_span_w_func =3D (InitSpanWFunc)&read_perspective_inputs;
  run_w_func =3D (RunWFunc)&run_perspective;
  skip_w_func =3D (SkipWFunc)&skip_perspective;
 }
 };

 struct brush_blend_program : ProgramImpl, brush_blend_frag {
 int get_uniform(const char *name) const override {
  if (strcmp("sColor0", name) =3D=3D 0) { return 7; }
  if (strcmp("sGpuCache", name) =3D=3D 0) { return 2; }
  if (strcmp("sPrevPassAlpha", name) =3D=3D 0) { return 8; }
  if (strcmp("sPrimitiveHeadersF", name) =3D=3D 0) { return 4; }
  if (strcmp("sPrimitiveHeadersI", name) =3D=3D 0) { return 5; }
  if (strcmp("sRenderTasks", name) =3D=3D 0) { return 1; }
  if (strcmp("sTransformPalette", name) =3D=3D 0) { return 3; }
  if (strcmp("uTransform", name) =3D=3D 0) { return 6; }
  return -1;
 }
 void bind_attrib(const char* name, int index) override {
  attrib_locations.bind_loc(name, index);
 }
 int get_attrib(const char* name) const override {
  return attrib_locations.get_loc(name);
 }
 size_t interpolants_size() const override { return sizeof(InterpOutputs); }
 VertexShaderImpl* get_vertex_shader() override {
  return this;
 }
 FragmentShaderImpl* get_fragment_shader() override {
  return this;
 }
 static ProgramImpl* loader() { return new brush_blend_program; }
 };

 # 2 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "brush_blend_ALPHA_PASS.h"
 #endif /* expanded by -frewrite-includes */
 # 2 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/brush_blend_ALPHA_PASS.h" 1
 struct brush_blend_ALPHA_PASS_common {
 struct Samplers {
  sampler2DArray_impl sColor0_impl;
  int sColor0_slot;
  sampler2D_impl sGpuCache_impl;
  int sGpuCache_slot;
  sampler2DArray_impl sPrevPassAlpha_impl;
  int sPrevPassAlpha_slot;
  sampler2D_impl sPrimitiveHeadersF_impl;
  int sPrimitiveHeadersF_slot;
  isampler2D_impl sPrimitiveHeadersI_impl;
  int sPrimitiveHeadersI_slot;
  sampler2D_impl sRenderTasks_impl;
  int sRenderTasks_slot;
  sampler2D_impl sTransformPalette_impl;
  int sTransformPalette_slot;
  bool set_slot(int index, int value) {
   switch (index) {
   case 7:
    sColor0_slot =3D value;
    return true;
   case 2:
    sGpuCache_slot =3D value;
    return true;
   case 8:
    sPrevPassAlpha_slot =3D value;
    return true;
   case 4:
    sPrimitiveHeadersF_slot =3D value;
    return true;
   case 5:
    sPrimitiveHeadersI_slot =3D value;
    return true;
   case 1:
    sRenderTasks_slot =3D value;
    return true;
   case 3:
    sTransformPalette_slot =3D value;
    return true;
   }
   return false;
  }
 } samplers;
 struct AttribLocations {
  int aPosition =3D NULL_ATTRIB;
  int aData =3D NULL_ATTRIB;
  void bind_loc(const char* name, int index) {
   if (strcmp("aPosition", name) =3D=3D 0) { aPosition =3D index; return; }
   if (strcmp("aData", name) =3D=3D 0) { aData =3D index; return; }
  }
  int get_loc(const char* name) const {
   if (strcmp("aPosition", name) =3D=3D 0) { return aPosition !=3D NULL_ATTR=
 IB ? aPosition : -1; }
   if (strcmp("aData", name) =3D=3D 0) { return aData !=3D NULL_ATTRIB ? aDa=
 ta : -1; }
   return -1;
  }
 } attrib_locations;
 vec4_scalar vTransformBounds;
 vec4_scalar vClipMaskUvBounds;
 vec4_scalar flat_varying_vec4_1;
 vec4_scalar flat_varying_vec4_2;
 vec4_scalar flat_varying_vec4_3;
 vec4_scalar flat_varying_vec4_4;
 ivec4_scalar flat_varying_ivec4_0;
 mat4_scalar vColorMat;
 Array<int32_t,4> vFuncs;
 sampler2DArray sColor0;
 sampler2D sGpuCache;
 sampler2DArray sPrevPassAlpha;
 sampler2D sPrimitiveHeadersF;
 isampler2D sPrimitiveHeadersI;
 sampler2D sRenderTasks;
 sampler2D sTransformPalette;
 mat4_scalar uTransform;
 void bind_textures() {
  sColor0 =3D lookup_sampler_array(&samplers.sColor0_impl, samplers.sColor0_=
 slot);
  sGpuCache =3D lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_=
 slot);
  sPrevPassAlpha =3D lookup_sampler_array(&samplers.sPrevPassAlpha_impl, sam=
 plers.sPrevPassAlpha_slot);
  sPrimitiveHeadersF =3D lookup_sampler(&samplers.sPrimitiveHeadersF_impl, s=
 amplers.sPrimitiveHeadersF_slot);
  sPrimitiveHeadersI =3D lookup_isampler(&samplers.sPrimitiveHeadersI_impl, =
 samplers.sPrimitiveHeadersI_slot);
  sRenderTasks =3D lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRen=
 derTasks_slot);
  sTransformPalette =3D lookup_sampler(&samplers.sTransformPalette_impl, sam=
 plers.sTransformPalette_slot);
 }
 };
 struct brush_blend_ALPHA_PASS_vert : VertexShaderImpl, brush_blend_ALPHA_PA=
 SS_common {
 private:
 typedef brush_blend_ALPHA_PASS_vert Self;
 // int32_t uMode;
 // mat4_scalar uTransform;
 vec2 aPosition;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sRenderTasks;
 struct RenderTaskCommonData_scalar {
 RectWithSize_scalar task_rect;
 float texture_layer_index;
 RenderTaskCommonData_scalar() =3D default;
 RenderTaskCommonData_scalar(RectWithSize_scalar task_rect, float texture_la=
 yer_index) : task_rect(task_rect), texture_layer_index(texture_layer_index)=
 {}
 };
 struct RenderTaskCommonData {
 RectWithSize task_rect;
 Float texture_layer_index;
 RenderTaskCommonData() =3D default;
 RenderTaskCommonData(RectWithSize task_rect, Float texture_layer_index) : t=
 ask_rect(task_rect), texture_layer_index(texture_layer_index){}
 RenderTaskCommonData(RectWithSize_scalar task_rect, float texture_layer_ind=
 ex):task_rect(task_rect),texture_layer_index(texture_layer_index){
 }
 IMPLICIT RenderTaskCommonData(RenderTaskCommonData_scalar s):task_rect(s.ta=
 sk_rect),texture_layer_index(s.texture_layer_index){
 }
 friend RenderTaskCommonData if_then_else(I32 c, RenderTaskCommonData t, Ren=
 derTaskCommonData e) { return RenderTaskCommonData(
 if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.texture_layer_=
 index, e.texture_layer_index));
 }};
 struct RenderTaskData_scalar {
 RenderTaskCommonData_scalar common_data;
 vec3_scalar user_data;
 RenderTaskData_scalar() =3D default;
 RenderTaskData_scalar(RenderTaskCommonData_scalar common_data, vec3_scalar =
 user_data) : common_data(common_data), user_data(user_data){}
 };
 struct RenderTaskData {
 RenderTaskCommonData common_data;
 vec3 user_data;
 RenderTaskData() =3D default;
 RenderTaskData(RenderTaskCommonData common_data, vec3 user_data) : common_d=
 ata(common_data), user_data(user_data){}
 RenderTaskData(RenderTaskCommonData_scalar common_data, vec3_scalar user_da=
 ta):common_data(common_data),user_data(user_data){
 }
 IMPLICIT RenderTaskData(RenderTaskData_scalar s):common_data(s.common_data)=
 ,user_data(s.user_data){
 }
 friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData =
 e) { return RenderTaskData(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.user_data,=
  e.user_data));
 }};
 struct PictureTask_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar content_origin;
 PictureTask_scalar() =3D default;
 PictureTask_scalar(RenderTaskCommonData_scalar common_data, float device_pi=
 xel_scale, vec2_scalar content_origin) : common_data(common_data), device_p=
 ixel_scale(device_pixel_scale), content_origin(content_origin){}
 };
 struct PictureTask {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 content_origin;
 PictureTask() =3D default;
 PictureTask(RenderTaskCommonData common_data, Float device_pixel_scale, vec=
 2 content_origin) : common_data(common_data), device_pixel_scale(device_pix=
 el_scale), content_origin(content_origin){}
 PictureTask(RenderTaskCommonData_scalar common_data, float device_pixel_sca=
 le, vec2_scalar content_origin):common_data(common_data),device_pixel_scale=
 (device_pixel_scale),content_origin(content_origin){
 }
 IMPLICIT PictureTask(PictureTask_scalar s):common_data(s.common_data),devic=
 e_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
 }
 friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { retu=
 rn PictureTask(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.conten=
 t_origin));
 }};
 struct ClipArea_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar screen_origin;
 ClipArea_scalar() =3D default;
 ClipArea_scalar(RenderTaskCommonData_scalar common_data, float device_pixel=
 _scale, vec2_scalar screen_origin) : common_data(common_data), device_pixel=
 _scale(device_pixel_scale), screen_origin(screen_origin){}
 };
 struct ClipArea {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 screen_origin;
 ClipArea() =3D default;
 ClipArea(RenderTaskCommonData common_data, Float device_pixel_scale, vec2 s=
 creen_origin) : common_data(common_data), device_pixel_scale(device_pixel_s=
 cale), screen_origin(screen_origin){}
 ClipArea(RenderTaskCommonData_scalar common_data, float device_pixel_scale,=
  vec2_scalar screen_origin):common_data(common_data),device_pixel_scale(dev=
 ice_pixel_scale),screen_origin(screen_origin){
 }
 IMPLICIT ClipArea(ClipArea_scalar s):common_data(s.common_data),device_pixe=
 l_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
 }
 friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipAr=
 ea(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_=
 origin));
 }};
 // sampler2D sGpuCache;
 struct ImageResource_scalar {
 RectWithEndpoint_scalar uv_rect;
 float layer;
 vec3_scalar user_data;
 ImageResource_scalar() =3D default;
 ImageResource_scalar(RectWithEndpoint_scalar uv_rect, float layer, vec3_sca=
 lar user_data) : uv_rect(uv_rect), layer(layer), user_data(user_data){}
 };
 struct ImageResource {
 RectWithEndpoint uv_rect;
 Float layer;
 vec3 user_data;
 ImageResource() =3D default;
 ImageResource(RectWithEndpoint uv_rect, Float layer, vec3 user_data) : uv_r=
 ect(uv_rect), layer(layer), user_data(user_data){}
 ImageResource(RectWithEndpoint_scalar uv_rect, float layer, vec3_scalar use=
 r_data):uv_rect(uv_rect),layer(layer),user_data(user_data){
 }
 IMPLICIT ImageResource(ImageResource_scalar s):uv_rect(s.uv_rect),layer(s.l=
 ayer),user_data(s.user_data){
 }
 friend ImageResource if_then_else(I32 c, ImageResource t, ImageResource e) =
 { return ImageResource(
 if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.layer, e.layer), i=
 f_then_else(c, t.user_data, e.user_data));
 }};
 struct ImageResourceExtra_scalar {
 vec4_scalar st_tl;
 vec4_scalar st_tr;
 vec4_scalar st_bl;
 vec4_scalar st_br;
 ImageResourceExtra_scalar() =3D default;
 ImageResourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar=
  st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_b=
 r(st_br){}
 };
 struct ImageResourceExtra {
 vec4 st_tl;
 vec4 st_tr;
 vec4 st_bl;
 vec4 st_br;
 ImageResourceExtra() =3D default;
 ImageResourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(=
 st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
 ImageResourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl,=
  vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
 }
 IMPLICIT ImageResourceExtra(ImageResourceExtra_scalar s):st_tl(s.st_tl),st_=
 tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
 }
 friend ImageResourceExtra if_then_else(I32 c, ImageResourceExtra t, ImageRe=
 sourceExtra e) { return ImageResourceExtra(
 if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_th=
 en_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
 }};
 // vec4_scalar vTransformBounds;
 // sampler2D sTransformPalette;
 struct Transform_scalar {
 mat4_scalar m;
 mat4_scalar inv_m;
 bool is_axis_aligned;
 Transform_scalar() =3D default;
 Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : =
 m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
 };
 struct Transform {
 mat4 m;
 mat4 inv_m;
 Bool is_axis_aligned;
 Transform() =3D default;
 Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), i=
 s_axis_aligned(is_axis_aligned){}
 Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_=
 m(inv_m),is_axis_aligned(is_axis_aligned){
 }
 IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligne=
 d(s.is_axis_aligned){
 }
 friend Transform if_then_else(I32 c, Transform t, Transform e) { return Tra=
 nsform(
 if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(=
 c, t.is_axis_aligned, e.is_axis_aligned));
 }};
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 // sampler2D sPrimitiveHeadersF;
 // isampler2D sPrimitiveHeadersI;
 ivec4_scalar aData;
 struct Instance_scalar {
 int32_t prim_header_address;
 int32_t picture_task_address;
 int32_t clip_address;
 int32_t segment_index;
 int32_t flags;
 int32_t resource_address;
 int32_t brush_kind;
 Instance_scalar() =3D default;
 Instance_scalar(int32_t prim_header_address, int32_t picture_task_address, =
 int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resourc=
 e_address, int32_t brush_kind) : prim_header_address(prim_header_address), =
 picture_task_address(picture_task_address), clip_address(clip_address), seg=
 ment_index(segment_index), flags(flags), resource_address(resource_address)=
 , brush_kind(brush_kind){}
 };
 struct Instance {
 I32 prim_header_address;
 I32 picture_task_address;
 I32 clip_address;
 I32 segment_index;
 I32 flags;
 I32 resource_address;
 I32 brush_kind;
 Instance() =3D default;
 Instance(I32 prim_header_address, I32 picture_task_address, I32 clip_addres=
 s, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : pr=
 im_header_address(prim_header_address), picture_task_address(picture_task_a=
 ddress), clip_address(clip_address), segment_index(segment_index), flags(fl=
 ags), resource_address(resource_address), brush_kind(brush_kind){}
 Instance(int32_t prim_header_address, int32_t picture_task_address, int32_t=
  clip_address, int32_t segment_index, int32_t flags, int32_t resource_addre=
 ss, int32_t brush_kind):prim_header_address(prim_header_address),picture_ta=
 sk_address(picture_task_address),clip_address(clip_address),segment_index(s=
 egment_index),flags(flags),resource_address(resource_address),brush_kind(br=
 ush_kind){
 }
 IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_addr=
 ess),picture_task_address(s.picture_task_address),clip_address(s.clip_addre=
 ss),segment_index(s.segment_index),flags(s.flags),resource_address(s.resour=
 ce_address),brush_kind(s.brush_kind){
 }
 friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instan=
 ce(
 if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else=
 (c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.clip=
 _address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index=
 ), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e=
 =2Eresource_address), if_then_else(c, t.brush_kind, e.brush_kind));
 }};
 struct PrimitiveHeader_scalar {
 RectWithSize_scalar local_rect;
 RectWithSize_scalar local_clip_rect;
 float z;
 int32_t specific_prim_address;
 int32_t transform_id;
 ivec4_scalar user_data;
 PrimitiveHeader_scalar() =3D default;
 PrimitiveHeader_scalar(RectWithSize_scalar local_rect, RectWithSize_scalar =
 local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_=
 id, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local=
 _clip_rect), z(z), specific_prim_address(specific_prim_address), transform_=
 id(transform_id), user_data(user_data){}
 };
 struct PrimitiveHeader {
 RectWithSize local_rect;
 RectWithSize local_clip_rect;
 Float z;
 I32 specific_prim_address;
 I32 transform_id;
 ivec4 user_data;
 PrimitiveHeader() =3D default;
 PrimitiveHeader(RectWithSize local_rect, RectWithSize local_clip_rect, Floa=
 t z, I32 specific_prim_address, I32 transform_id, ivec4 user_data) : local_=
 rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_add=
 ress(specific_prim_address), transform_id(transform_id), user_data(user_dat=
 a){}
 PrimitiveHeader(RectWithSize_scalar local_rect, RectWithSize_scalar local_c=
 lip_rect, float z, int32_t specific_prim_address, int32_t transform_id, ive=
 c4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect=
 ),z(z),specific_prim_address(specific_prim_address),transform_id(transform_=
 id),user_data(user_data){
 }
 IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect)=
 ,local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific=
 _prim_address),transform_id(s.transform_id),user_data(s.user_data){
 }
 friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHead=
 er e) { return PrimitiveHeader(
 if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_r=
 ect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.speci=
 fic_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id,=
  e.transform_id), if_then_else(c, t.user_data, e.user_data));
 }};
 struct VertexInfo_scalar {
 vec2_scalar local_pos;
 vec4_scalar world_pos;
 VertexInfo_scalar() =3D default;
 VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos=
 (local_pos), world_pos(world_pos){}
 };
 struct VertexInfo {
 vec2 local_pos;
 vec4 world_pos;
 VertexInfo() =3D default;
 VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_po=
 s(world_pos){}
 VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_po=
 s),world_pos(world_pos){
 }
 IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s=
 =2Eworld_pos){
 }
 friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return =
 VertexInfo(
 if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.w=
 orld_pos));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 // mat4_scalar vColorMat;
 // Array<int32_t,4> vFuncs;
 Instance_scalar decode_instance_attributes() {
  Instance_scalar instance;
  (instance).prim_header_address =3D (aData).sel(X);
  (instance).picture_task_address =3D ((aData).sel(Y))>>(16);
  (instance).clip_address =3D ((aData).sel(Y))&(65535);
  (instance).segment_index =3D ((aData).sel(Z))&(65535);
  (instance).flags =3D ((aData).sel(Z))>>(16);
  (instance).resource_address =3D ((aData).sel(W))&(16777215);
  (instance).brush_kind =3D ((aData).sel(W))>>(24);
  return instance;
 }
 PrimitiveHeader_scalar fetch_prim_header(int32_t index) {
  PrimitiveHeader_scalar ph;
  ivec2_scalar uv_f =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sPrimitiveHeadersF_uv_f_fetch =3D texelFetchPtr(sPrimitiveHea=
 dersF, uv_f, 0, 1, 0, 0);
  vec4_scalar local_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sPrimit=
 iveHeadersF_uv_f_fetch, 0, 0);
  vec4_scalar local_clip_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sP=
 rimitiveHeadersF_uv_f_fetch, 1, 0);
  (ph).local_rect =3D RectWithSize_scalar((local_rect).sel(X, Y), (local_rec=
 t).sel(Z, W));
  (ph).local_clip_rect =3D RectWithSize_scalar((local_clip_rect).sel(X, Y), =
 (local_clip_rect).sel(Z, W));
  ivec2_scalar uv_i =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  ivec4_scalar* sPrimitiveHeadersI_uv_i_fetch =3D texelFetchPtr(sPrimitiveHe=
 adersI, uv_i, 0, 1, 0, 0);
  ivec4_scalar data0 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 0, 0);
  ivec4_scalar data1 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 1, 0);
  (ph).z =3D make_float((data0).sel(X));
  (ph).specific_prim_address =3D (data0).sel(Y);
  (ph).transform_id =3D (data0).sel(Z);
  (ph).user_data =3D data1;
  return ph;
 }
 Transform_scalar fetch_transform(int32_t id) {
  Transform_scalar transform;
  (transform).is_axis_aligned =3D ((id)>>(24))=3D=3D(0);
  int32_t index =3D (id)&(16777215);
  ivec2_scalar uv =3D make_ivec2(make_int((8u)*((make_uint(index))%((1024u)/=
 (8u)))), make_int((make_uint(index))/((1024u)/(8u))));
  ivec2_scalar uv0 =3D make_ivec2(((uv).sel(X))+(0), (uv).sel(Y));
  vec4_scalar* sTransformPalette_uv0_fetch =3D texelFetchPtr(sTransformPalet=
 te, uv0, 0, 7, 0, 0);
  (transform).m[0] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 0, 0);
  (transform).m[1] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 1, 0);
  (transform).m[2] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 2, 0);
  (transform).m[3] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 3, 0);
  (transform).inv_m[0] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 4, 0);
  (transform).inv_m[1] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 5, 0);
  (transform).inv_m[2] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 6, 0);
  (transform).inv_m[3] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 7, 0);
  return transform;
 }
 RenderTaskData_scalar fetch_render_task_data(int32_t index) {
  ivec2_scalar uv =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/=
 (2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sRenderTasks_uv_fetch =3D texelFetchPtr(sRenderTasks, uv, 0, =
 1, 0, 0);
  vec4_scalar texel0 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 0, 0);
  vec4_scalar texel1 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 1, 0);
  RectWithSize_scalar task_rect =3D RectWithSize_scalar((texel0).sel(X, Y), =
 (texel0).sel(Z, W));
  RenderTaskCommonData_scalar common_data =3D RenderTaskCommonData_scalar(ta=
 sk_rect, (texel1).sel(X));
  RenderTaskData_scalar data =3D RenderTaskData_scalar(common_data, (texel1)=
 =2Esel(Y, Z, W));
  return data;
 }
 PictureTask_scalar fetch_picture_task(int32_t address) {
  RenderTaskData_scalar task_data =3D fetch_render_task_data(address);
  PictureTask_scalar task =3D PictureTask_scalar((task_data).common_data, ((=
 task_data).user_data).sel(X), ((task_data).user_data).sel(Y, Z));
  return task;
 }
 ClipArea_scalar fetch_clip_area(int32_t index) {
  ClipArea_scalar area;
  if ((index)>=3D(32767)) {
   {
    RectWithSize_scalar rect =3D RectWithSize_scalar(make_vec2(0.f), make_ve=
 c2(0.f));
    (area).common_data =3D RenderTaskCommonData_scalar(rect, 0.f);
    (area).device_pixel_scale =3D 0.f;
    (area).screen_origin =3D make_vec2(0.f);
   }
  } else  {
   RenderTaskData_scalar task_data =3D fetch_render_task_data(index);
   (area).common_data =3D (task_data).common_data;
   (area).device_pixel_scale =3D ((task_data).user_data).sel(X);
   (area).screen_origin =3D ((task_data).user_data).sel(Y, Z);
  }
  return area;
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4_scalar,2> fetch_from_gpu_cache_2(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, =
 0);
  return Array<vec4_scalar,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec2 clamp_rect(vec2 pt, RectWithSize_scalar rect) {
  return clamp(pt, (rect).p0, ((rect).p0)+((rect).size));
 }
 VertexInfo write_vertex(vec2 local_pos, RectWithSize_scalar local_clip_rect=
 , float z, Transform_scalar transform, PictureTask_scalar task) {
  vec2 clamped_local_pos =3D clamp_rect(local_pos, local_clip_rect);
  vec4 world_pos =3D ((transform).m)*(make_vec4(clamped_local_pos, 0.f, 1.f)=
 );
  vec2 device_pos =3D ((world_pos).sel(X, Y))*((task).device_pixel_scale);
  vec2_scalar final_offset =3D (-((task).content_origin))+((((task).common_d=
 ata).task_rect).p0);
  gl_Position =3D (uTransform)*(make_vec4((device_pos)+((final_offset)*((wor=
 ld_pos).sel(W))), (z)*((world_pos).sel(W)), (world_pos).sel(W)));
  VertexInfo vi =3D VertexInfo(clamped_local_pos, world_pos);
  return vi;
 }
 void init_transform_vs(vec4_scalar local_bounds) {
  vTransformBounds =3D local_bounds;
 }
 RectWithEndpoint_scalar to_rect_with_endpoint(RectWithSize_scalar rect) {
  RectWithEndpoint_scalar result;
  (result).p0 =3D (rect).p0;
  (result).p1 =3D ((rect).p0)+((rect).size);
  return result;
 }
 VertexInfo write_transform_vertex(RectWithSize_scalar local_segment_rect, R=
 ectWithSize_scalar local_prim_rect, RectWithSize_scalar local_clip_rect, ve=
 c4_scalar clip_edge_mask, float z, Transform_scalar transform, PictureTask_=
 scalar task) {
  RectWithEndpoint_scalar clip_rect =3D to_rect_with_endpoint(local_clip_rec=
 t);
  RectWithEndpoint_scalar segment_rect =3D to_rect_with_endpoint(local_segme=
 nt_rect);
  (segment_rect).p0 =3D clamp((segment_rect).p0, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  (segment_rect).p1 =3D clamp((segment_rect).p1, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  RectWithEndpoint_scalar prim_rect =3D to_rect_with_endpoint(local_prim_rec=
 t);
  (prim_rect).p0 =3D clamp((prim_rect).p0, (clip_rect).p0, (clip_rect).p1);
  (prim_rect).p1 =3D clamp((prim_rect).p1, (clip_rect).p0, (clip_rect).p1);
  float extrude_amount =3D 2.f;
  vec4_scalar extrude_distance =3D (make_vec4(extrude_amount))*(clip_edge_ma=
 sk);
  (local_segment_rect).p0 -=3D (extrude_distance).sel(X, Y);
  (local_segment_rect).size +=3D ((extrude_distance).sel(X, Y))+((extrude_di=
 stance).sel(Z, W));
  vec2 local_pos =3D ((local_segment_rect).p0)+(((local_segment_rect).size)*=
 ((aPosition).sel(X, Y)));
  vec2_scalar task_offset =3D ((((task).common_data).task_rect).p0)-((task).=
 content_origin);
  vec4 world_pos =3D ((transform).m)*(make_vec4(local_pos, 0.f, 1.f));
  vec4 final_pos =3D make_vec4((((world_pos).sel(X, Y))*((task).device_pixel=
 _scale))+((task_offset)*((world_pos).sel(W))), (z)*((world_pos).sel(W)), (w=
 orld_pos).sel(W));
  gl_Position =3D (uTransform)*(final_pos);
  init_transform_vs(mix(make_vec4((prim_rect).p0, (prim_rect).p1), make_vec4=
 ((segment_rect).p0, (segment_rect).p1), clip_edge_mask));
  VertexInfo vi =3D VertexInfo(local_pos, world_pos);
  return vi;
 }
 void write_clip(vec4 world_pos, ClipArea_scalar area) {
  vec2 uv =3D (((world_pos).sel(X, Y))*((area).device_pixel_scale))+(((world=
 _pos).sel(W))*(((((area).common_data).task_rect).p0)-((area).screen_origin)=
 ));
  vClipMaskUvBounds =3D make_vec4((((area).common_data).task_rect).p0, ((((a=
 rea).common_data).task_rect).p0)+((((area).common_data).task_rect).size));
  vClipMaskUv =3D make_vec4(uv, ((area).common_data).texture_layer_index, (w=
 orld_pos).sel(W));
 }
 ImageResource_scalar fetch_image_resource(int32_t address) {
  Array<vec4_scalar,2> data =3D fetch_from_gpu_cache_2(address);
  RectWithEndpoint_scalar uv_rect =3D RectWithEndpoint_scalar((data[0]).sel(=
 X, Y), (data[0]).sel(Z, W));
  return ImageResource_scalar(uv_rect, (data[1]).sel(X), (data[1]).sel(Y, Z,=
  W));
 }
 Array<vec4_scalar,4> fetch_from_gpu_cache_4(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 3, 0, =
 0);
  return Array<vec4_scalar,4>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0), texe=
 lFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 2, 0), texelFetchUnchecked(s=
 GpuCache, sGpuCache_uv_fetch, 3, 0)}};
 }
 ImageResourceExtra_scalar fetch_image_resource_extra(int32_t address) {
  Array<vec4_scalar,4> data =3D fetch_from_gpu_cache_4((address)+(2));
  return ImageResourceExtra_scalar(data[0], data[1], data[2], data[3]);
 }
 vec2 get_image_quad_uv(int32_t address, vec2 f) {
  ImageResourceExtra_scalar extra_data =3D fetch_image_resource_extra(addres=
 s);
  vec4 x =3D mix((extra_data).st_tl, (extra_data).st_tr, (f).sel(X));
  vec4 y =3D mix((extra_data).st_bl, (extra_data).st_br, (f).sel(X));
  vec4 z =3D mix(x, y, (f).sel(Y));
  return ((z).sel(X, Y))/((z).sel(W));
 }
 vec4_scalar fetch_from_gpu_cache_1(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 void blend_brush_vs(VertexInfo vi, int32_t prim_address, RectWithSize_scala=
 r local_rect, RectWithSize_scalar segment_rect, ivec4_scalar prim_user_data=
 , int32_t specific_resource_address, mat4_scalar transform, PictureTask_sca=
 lar pic_task, int32_t brush_flags, vec4_scalar unused) {
  ImageResource_scalar res =3D fetch_image_resource((prim_user_data).sel(X));
  vec2_scalar uv0 =3D ((res).uv_rect).p0;
  vec2_scalar uv1 =3D ((res).uv_rect).p1;
  vec2_scalar texture_size =3D make_vec2((textureSize(sColor0, 0)).sel(X, Y)=
 );
  vec2 f =3D (((vi).local_pos)-((local_rect).p0))/((local_rect).size);
  f =3D get_image_quad_uv((prim_user_data).sel(X), f);
  vec2 uv =3D mix(uv0, uv1, f);
  float perspective_interpolate =3D ((brush_flags)&(1))!=3D(0) ? 1.f : 0.f;
  (varying_vec4_0).lsel(Z, W) =3D ((uv)/(texture_size))*(mix(((vi).world_pos=
 ).sel(W), 1.f, perspective_interpolate));
  (flat_varying_vec4_4).sel(X) =3D (res).layer;
  (flat_varying_vec4_4).sel(Y) =3D perspective_interpolate;
  flat_varying_vec4_2 =3D (make_vec4(uv0, uv1))/((texture_size).sel(X, Y, X,=
  Y));
  (varying_vec4_0).lsel(X, Y) =3D (vi).local_pos;
  float lumR =3D 0.2126f;
  float lumG =3D 0.7152f;
  float lumB =3D 0.0722f;
  float oneMinusLumR =3D (1.f)-(lumR);
  float oneMinusLumG =3D (1.f)-(lumG);
  float oneMinusLumB =3D (1.f)-(lumB);
  float amount =3D (make_float((prim_user_data).sel(Z)))/(65536.f);
  float invAmount =3D (1.f)-(amount);
  (flat_varying_ivec4_0).sel(X) =3D ((prim_user_data).sel(Y))&(65535);
  (flat_varying_vec4_4).sel(Z) =3D amount;
  vFuncs[0] =3D (((prim_user_data).sel(Y))>>(28))&(15);
  vFuncs[1] =3D (((prim_user_data).sel(Y))>>(24))&(15);
  vFuncs[2] =3D (((prim_user_data).sel(Y))>>(20))&(15);
  vFuncs[3] =3D (((prim_user_data).sel(Y))>>(16))&(15);
  if (((flat_varying_ivec4_0).sel(X))=3D=3D(1)) {
   {
    vColorMat =3D make_mat4(make_vec4((lumR)+((oneMinusLumR)*(invAmount)), (=
 lumR)-((lumR)*(invAmount)), (lumR)-((lumR)*(invAmount)), 0.f), make_vec4((l=
 umG)-((lumG)*(invAmount)), (lumG)+((oneMinusLumG)*(invAmount)), (lumG)-((lu=
 mG)*(invAmount)), 0.f), make_vec4((lumB)-((lumB)*(invAmount)), (lumB)-((lum=
 B)*(invAmount)), (lumB)+((oneMinusLumB)*(invAmount)), 0.f), make_vec4(0.f, =
 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(2)) {
   {
    float c =3D cos(amount);
    float s =3D sin(amount);
    vColorMat =3D make_mat4(make_vec4(((lumR)+((oneMinusLumR)*(c)))-((lumR)*=
 (s)), ((lumR)-((lumR)*(c)))+((0.143f)*(s)), ((lumR)-((lumR)*(c)))-((oneMinu=
 sLumR)*(s)), 0.f), make_vec4(((lumG)-((lumG)*(c)))-((lumG)*(s)), ((lumG)+((=
 oneMinusLumG)*(c)))+((0.14f)*(s)), ((lumG)-((lumG)*(c)))+((lumG)*(s)), 0.f)=
 , make_vec4(((lumB)-((lumB)*(c)))+((oneMinusLumB)*(s)), ((lumB)-((lumB)*(c)=
 ))-((0.283f)*(s)), ((lumB)+((oneMinusLumB)*(c)))+((lumB)*(s)), 0.f), make_v=
 ec4(0.f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(4)) {
   {
    vColorMat =3D make_mat4(make_vec4(((invAmount)*(lumR))+(amount), (invAmo=
 unt)*(lumR), (invAmount)*(lumR), 0.f), make_vec4((invAmount)*(lumG), ((invA=
 mount)*(lumG))+(amount), (invAmount)*(lumG), 0.f), make_vec4((invAmount)*(l=
 umB), (invAmount)*(lumB), ((invAmount)*(lumB))+(amount), 0.f), make_vec4(0.=
 f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(5)) {
   {
    vColorMat =3D make_mat4(make_vec4((0.393f)+((0.607f)*(invAmount)), (0.34=
 9f)-((0.349f)*(invAmount)), (0.272f)-((0.272f)*(invAmount)), 0.f), make_vec=
 4((0.769f)-((0.769f)*(invAmount)), (0.686f)+((0.314f)*(invAmount)), (0.534f=
 )-((0.534f)*(invAmount)), 0.f), make_vec4((0.189f)-((0.189f)*(invAmount)), =
 (0.168f)-((0.168f)*(invAmount)), (0.131f)+((0.869f)*(invAmount)), 0.f), mak=
 e_vec4(0.f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(7)) {
   {
    Array<vec4_scalar,4> mat_data =3D fetch_from_gpu_cache_4((prim_user_data=
 ).sel(Z));
    vec4_scalar offset_data =3D fetch_from_gpu_cache_1(((prim_user_data).sel=
 (Z))+(4));
    vColorMat =3D make_mat4(mat_data[0], mat_data[1], mat_data[2], mat_data[=
 3]);
    flat_varying_vec4_3 =3D offset_data;
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(11)) {
   {
    (flat_varying_ivec4_0).sel(Y) =3D (prim_user_data).sel(Z);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(10)) {
   {
    flat_varying_vec4_1 =3D fetch_from_gpu_cache_1((prim_user_data).sel(Z));
   }
  }
 }
 void brush_shader_main_vs(Instance_scalar instance, PrimitiveHeader_scalar =
 ph, Transform_scalar transform, PictureTask_scalar pic_task, ClipArea_scala=
 r clip_area) {
  int32_t edge_flags =3D ((instance).flags)&(255);
  int32_t brush_flags =3D (((instance).flags)>>(8))&(255);
  vec4_scalar segment_data;
  RectWithSize_scalar segment_rect;
  if (((instance).segment_index)=3D=3D(65535)) {
   {
    segment_rect =3D (ph).local_rect;
    segment_data =3D make_vec4(0.f);
   }
  } else  {
   int32_t segment_address =3D (((ph).specific_prim_address)+(3))+(((instanc=
 e).segment_index)*(2));
   Array<vec4_scalar,2> segment_info =3D fetch_from_gpu_cache_2(segment_addr=
 ess);
   segment_rect =3D RectWithSize_scalar((segment_info[0]).sel(X, Y), (segmen=
 t_info[0]).sel(Z, W));
   (segment_rect).p0 +=3D ((ph).local_rect).p0;
   segment_data =3D segment_info[1];
  }
  VertexInfo vi;
  if ((transform).is_axis_aligned) {
   {
    vec2 local_pos =3D ((segment_rect).p0)+(((segment_rect).size)*((aPositio=
 n).sel(X, Y)));
    vi =3D write_vertex(local_pos, (ph).local_clip_rect, (ph).z, transform, =
 pic_task);
    init_transform_vs(make_vec4(make_vec2(-(10000000000000000.f)), make_vec2=
 (10000000000000000.f)));
   }
  } else  {
   bvec4_scalar edge_mask =3D notEqual((edge_flags)&(make_ivec4(1, 2, 4, 8))=
 , make_ivec4(0));
   vi =3D write_transform_vertex(segment_rect, (ph).local_rect, (ph).local_c=
 lip_rect, mix(make_vec4(0.f), make_vec4(1.f), edge_mask), (ph).z, transform=
 , pic_task);
  }
  write_clip((vi).world_pos, clip_area);
  blend_brush_vs(vi, (ph).specific_prim_address, (ph).local_rect, segment_re=
 ct, (ph).user_data, (instance).resource_address, (transform).m, pic_task, b=
 rush_flags, segment_data);
 }
 ALWAYS_INLINE void main(void) {
  Instance_scalar instance =3D decode_instance_attributes();
  PrimitiveHeader_scalar ph =3D fetch_prim_header((instance).prim_header_add=
 ress);
  Transform_scalar transform =3D fetch_transform((ph).transform_id);
  PictureTask_scalar task =3D fetch_picture_task((instance).picture_task_add=
 ress);
  ClipArea_scalar clip_area =3D fetch_clip_area((instance).clip_address);
  brush_shader_main_vs(instance, ph, transform, task, clip_area);
 }
 static void set_uniform_1i(Self *self, int index, int value) {
  if (self->samplers.set_slot(index, value)) return;
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_4fv(Self *self, int index, const float *value) {
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_matrix4fv(Self *self, int index, const float *value=
 ) {
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   self->uTransform =3D mat4_scalar::load_from_ptr(value);
   break;
  }
 }
 static void load_attribs(Self *self, VertexAttrib *attribs, uint32_t start,=
  int instance, int count) {
  load_attrib(self->aPosition, attribs[self->attrib_locations.aPosition], st=
 art, instance, count);
  load_flat_attrib(self->aData, attribs[self->attrib_locations.aData], start=
 , instance, count);
 }
 public:
 struct InterpOutputs {
 vec4_scalar vClipMaskUv;
 vec4_scalar varying_vec4_0;
 };
 private:
 ALWAYS_INLINE void store_interp_outputs(char* dest_ptr, size_t stride) {
   for(int n =3D 0; n < 4; n++) {
     auto* dest =3D reinterpret_cast<InterpOutputs*>(dest_ptr);
     dest->vClipMaskUv =3D get_nth(vClipMaskUv, n);
     dest->varying_vec4_0 =3D get_nth(varying_vec4_0, n);
     dest_ptr +=3D stride;
   }
 }
 static void run(Self* self, char* interps, size_t interp_stride) {
  self->main();
  self->store_interp_outputs(interps, interp_stride);
 }
 static void init_batch(Self *self) { self->bind_textures(); }
 public:
 brush_blend_ALPHA_PASS_vert() {
  set_uniform_1i_func =3D (SetUniform1iFunc)&set_uniform_1i;
  set_uniform_4fv_func =3D (SetUniform4fvFunc)&set_uniform_4fv;
  set_uniform_matrix4fv_func =3D (SetUniformMatrix4fvFunc)&set_uniform_matri=
 x4fv;
  init_batch_func =3D (InitBatchFunc)&init_batch;
  load_attribs_func =3D (LoadAttribsFunc)&load_attribs;
  run_primitive_func =3D (RunPrimitiveFunc)&run;
 }
 };


 struct brush_blend_ALPHA_PASS_frag : FragmentShaderImpl, brush_blend_ALPHA_=
 PASS_vert {
 private:
 typedef brush_blend_ALPHA_PASS_frag Self;
 #define oFragColor gl_FragColor
 // vec4 oFragColor;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sGpuCache;
 // vec4_scalar vTransformBounds;
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 struct Fragment_scalar {
 vec4_scalar color;
 Fragment_scalar() =3D default;
 explicit Fragment_scalar(vec4_scalar color) : color(color){}
 };
 struct Fragment {
 vec4 color;
 Fragment() =3D default;
 explicit Fragment(vec4 color) : color(color){}
 explicit Fragment(vec4_scalar color):color(color){
 }
 IMPLICIT Fragment(Fragment_scalar s):color(s.color){
 }
 friend Fragment if_then_else(I32 c, Fragment t, Fragment e) { return Fragme=
 nt(
 if_then_else(c, t.color, e.color));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 // mat4_scalar vColorMat;
 // Array<int32_t,4> vFuncs;
 vec3 Contrast(vec3 Cs, float amount) {
  return ((((Cs).sel(R, G, B))*(amount))-((0.5f)*(amount)))+(0.5f);
 }
 vec3 Invert(vec3 Cs, float amount) {
  return mix((Cs).sel(R, G, B), (make_vec3(1.f))-((Cs).sel(R, G, B)), amount=
 );
 }
 vec3 Brightness(vec3 Cs, float amount) {
  return clamp(((Cs).sel(R, G, B))*(amount), make_vec3(0.f), make_vec3(1.f));
 }
 vec3 SrgbToLinear(vec3 color) {
  vec3 c1 =3D (color)/(12.92f);
  vec3 c2 =3D pow(((color)/(1.055f))+(make_vec3((0.055f)/(1.055f))), make_ve=
 c3(2.4f));
  return mix(c2, c1, lessThanEqual(color, make_vec3(0.04045f)));
 }
 vec3 LinearToSrgb(vec3 color) {
  vec3 c1 =3D (color)*(12.92f);
  vec3 c2 =3D ((make_vec3(1.055f))*(pow(color, make_vec3((1.f)/(2.4f)))))-(m=
 ake_vec3(0.055f));
  return mix(c2, c1, lessThanEqual(color, make_vec3(0.0031308f)));
 }
 ivec2 get_gpu_cache_uv(I32 address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 vec4 fetch_from_gpu_cache_1(I32 address) {
  ivec2 uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 vec4_scalar fetch_from_gpu_cache_1(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 vec4 ComponentTransfer(vec4 colora) {
  int32_t offset =3D 0;
  vec4 texel;
  I32 k;
  for ( int32_t i =3D 0;
 (i)<(4); i++)  {
   switch (vFuncs[i]) {
    case 0:
     break;
    case 1:
    case 2:
     {
      k =3D make_int(floor((colora[i])*(255.f)));
      texel =3D fetch_from_gpu_cache_1((((flat_varying_ivec4_0).sel(Y))+(off=
 set))+((k)/(4)));
      colora[i] =3D clamp(texel[(k)%(4)], 0.f, 1.f);
      offset =3D (offset)+(64);
      break;
     }
    case 3:
     {
      texel =3D fetch_from_gpu_cache_1(((flat_varying_ivec4_0).sel(Y))+(offs=
 et));
      colora[i] =3D clamp(((texel[0])*(colora[i]))+(texel[1]), 0.f, 1.f);
      offset =3D (offset)+(1);
      break;
     }
    case 4:
     {
      texel =3D fetch_from_gpu_cache_1(((flat_varying_ivec4_0).sel(Y))+(offs=
 et));
      colora[i] =3D clamp(((texel[0])*(pow(colora[i], texel[1])))+(texel[2])=
 , 0.f, 1.f);
      offset =3D (offset)+(1);
      break;
     }
    default:
     break;
   }
  }
  return colora;
 }
 Float point_inside_rect(vec2 p, vec2_scalar p0, vec2_scalar p1) {
  vec2 s =3D (step(p0, p))-(step(p1, p));
  return ((s).sel(X))*((s).sel(Y));
 }
 Float signed_distance_rect(vec2 pos, vec2_scalar p0, vec2_scalar p1) {
  vec2 d =3D max((p0)-(pos), (pos)-(p1));
  return (length(max(make_vec2(0.f), d)))+(min(0.f, max((d).sel(X), (d).sel(=
 Y))));
 }
 Float compute_aa_range(vec2 position) {
  return (0.35355f)*(length(fwidth(position)));
 }
 Float distance_aa(Float aa_range, Float signed_distance) {
  I32 ret_mask =3D ~0;
  Float ret;
  Float dist =3D ((0.5f)*(signed_distance))/(aa_range);
  auto _c3_ =3D (dist)<=3D((-(0.5f))+(0.0001f));
  ret =3D 1.f;
  ret_mask =3D ~I32(_c3_);
  auto _c4_ =3D (dist)>=3D((0.5f)-(0.0001f));
  ret =3D if_then_else(ret_mask & I32(_c4_), 0.f, ret);
  ret_mask &=3D ~I32(_c4_);
  ret =3D if_then_else(ret_mask, (0.5f)+((dist)*((((0.8431027f)*(dist))*(dis=
 t))-(1.14453603f))), ret);
  return ret;
 }
 Float init_transform_fs(vec2 local_pos) {
  Float d =3D signed_distance_rect(local_pos, (vTransformBounds).sel(X, Y), =
 (vTransformBounds).sel(Z, W));
  Float aa_range =3D compute_aa_range(local_pos);
  return distance_aa(aa_range, d);
 }
 Fragment blend_brush_fs() {
  Float perspective_divisor =3D mix((gl_FragCoord).sel(W), 1.f, (flat_varyin=
 g_vec4_4).sel(Y));
  vec2 uv =3D ((varying_vec4_0).sel(Z, W))*(perspective_divisor);
  vec4 Cs =3D texture(sColor0, make_vec3(uv, (flat_varying_vec4_4).sel(X)));
  Float alpha =3D (Cs).sel(A);
  vec3 color =3D if_then_else((alpha)!=3D(0.f), ((Cs).sel(R, G, B))/(alpha),=
  (Cs).sel(R, G, B));
  switch ((flat_varying_ivec4_0).sel(X)) {
   case 0:
    color =3D Contrast(color, (flat_varying_vec4_4).sel(Z));
    break;
   case 3:
    color =3D Invert(color, (flat_varying_vec4_4).sel(Z));
    break;
   case 6:
    color =3D Brightness(color, (flat_varying_vec4_4).sel(Z));
    break;
   case 8:
    color =3D SrgbToLinear(color);
    break;
   case 9:
    color =3D LinearToSrgb(color);
    break;
   case 11:
    {
     vec4 colora =3D make_vec4(color, alpha);
     colora =3D ComponentTransfer(colora);
     color =3D (colora).sel(R, G, B);
     alpha =3D (colora).sel(A);
     break;
    }
   case 10:
    color =3D (flat_varying_vec4_1).sel(R, G, B);
    alpha =3D (flat_varying_vec4_1).sel(A);
    break;
   default:
    {
     vec4 result =3D ((vColorMat)*(make_vec4(color, alpha)))+(flat_varying_v=
 ec4_3);
     result =3D clamp(result, make_vec4(0.f), make_vec4(1.f));
     color =3D (result).sel(R, G, B);
     alpha =3D (result).sel(A);
     }
  }
  alpha *=3D min(point_inside_rect(uv, (flat_varying_vec4_2).sel(X, Y), (fla=
 t_varying_vec4_2).sel(Z, W)), init_transform_fs((varying_vec4_0).sel(X, Y))=
 );
  return Fragment((alpha)*(make_vec4(color, 1.f)));
 }
 Float do_clip() {
  I32 ret_mask =3D ~0;
  Float ret;
  if (((vClipMaskUvBounds).sel(X, Y))=3D=3D((vClipMaskUvBounds).sel(Z, W))) {
   {
    return 1.f;
   }
  }
  vec2 mask_uv =3D ((vClipMaskUv).sel(X, Y))*((gl_FragCoord).sel(W));
  bvec2 left =3D lessThanEqual((vClipMaskUvBounds).sel(X, Y), mask_uv);
  bvec2 right =3D greaterThan((vClipMaskUvBounds).sel(Z, W), mask_uv);
  auto _c6_ =3D !(all(make_bvec4(left, right)));
  {
   ret =3D 0.f;
   ret_mask =3D ~I32(_c6_);
  }
  ivec3 tc =3D make_ivec3(mask_uv, ((vClipMaskUv).sel(Z))+(0.5f));
  ret =3D if_then_else(ret_mask, (texelFetch(sPrevPassAlpha, tc, 0)).sel(R),=
  ret);
  return ret;
 }
 void write_output(vec4 color) {
  oFragColor =3D color;
 }
 ALWAYS_INLINE void main(void) {
  Fragment frag =3D blend_brush_fs();
  Float clip_alpha =3D do_clip();
  (frag).color *=3D clip_alpha;
  write_output((frag).color);
 }
 typedef brush_blend_ALPHA_PASS_vert::InterpOutputs InterpInputs;
 InterpInputs interp_step;
 struct InterpPerspective {
 vec4 vClipMaskUv;
 vec4 varying_vec4_0;
 };
 InterpPerspective interp_perspective;
 static void read_interp_inputs(Self *self, const InterpInputs *init, const =
 InterpInputs *step, float step_width) {
   self->vClipMaskUv =3D init_interp(init->vClipMaskUv, step->vClipMaskUv);
   self->interp_step.vClipMaskUv =3D step->vClipMaskUv * step_width;
   self->varying_vec4_0 =3D init_interp(init->varying_vec4_0, step->varying_=
 vec4_0);
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 static void read_perspective_inputs(Self *self, const InterpInputs *init, c=
 onst InterpInputs *step, float step_width) {
   Float w =3D 1.0f / self->gl_FragCoord.w;
   self->interp_perspective.vClipMaskUv =3D init_interp(init->vClipMaskUv, s=
 tep->vClipMaskUv);
   self->vClipMaskUv =3D self->interp_perspective.vClipMaskUv * w;
   self->interp_step.vClipMaskUv =3D step->vClipMaskUv * step_width;
   self->interp_perspective.varying_vec4_0 =3D init_interp(init->varying_vec=
 4_0, step->varying_vec4_0);
   self->varying_vec4_0 =3D self->interp_perspective.varying_vec4_0 * w;
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 ALWAYS_INLINE void step_interp_inputs() {
   vClipMaskUv +=3D interp_step.vClipMaskUv;
   varying_vec4_0 +=3D interp_step.varying_vec4_0;
 }
 ALWAYS_INLINE void step_perspective_inputs() {
   step_perspective();
   Float w =3D 1.0f / gl_FragCoord.w;
   interp_perspective.vClipMaskUv +=3D interp_step.vClipMaskUv;
   vClipMaskUv =3D w * interp_perspective.vClipMaskUv;
   interp_perspective.varying_vec4_0 +=3D interp_step.varying_vec4_0;
   varying_vec4_0 =3D w * interp_perspective.varying_vec4_0;
 }
 static void run(Self *self) {
  self->main();
  self->step_interp_inputs();
 }
 static void skip(Self* self, int chunks) {
  self->step_interp_inputs();
  while (--chunks > 0) self->step_interp_inputs();
 }
 static void run_perspective(Self *self) {
  self->main();
  self->step_perspective_inputs();
 }
 static void skip_perspective(Self* self, int chunks) {
  self->step_perspective_inputs();
  while (--chunks > 0) self->step_perspective_inputs();
 }
 public:
 brush_blend_ALPHA_PASS_frag() {
  init_span_func =3D (InitSpanFunc)&read_interp_inputs;
  run_func =3D (RunFunc)&run;
  skip_func =3D (SkipFunc)&skip;
  enable_perspective();
  init_span_w_func =3D (InitSpanWFunc)&read_perspective_inputs;
  run_w_func =3D (RunWFunc)&run_perspective;
  skip_w_func =3D (SkipWFunc)&skip_perspective;
 }
 };

 struct brush_blend_ALPHA_PASS_program : ProgramImpl, brush_blend_ALPHA_PASS=
 _frag {
 int get_uniform(const char *name) const override {
  if (strcmp("sColor0", name) =3D=3D 0) { return 7; }
  if (strcmp("sGpuCache", name) =3D=3D 0) { return 2; }
  if (strcmp("sPrevPassAlpha", name) =3D=3D 0) { return 8; }
  if (strcmp("sPrimitiveHeadersF", name) =3D=3D 0) { return 4; }
  if (strcmp("sPrimitiveHeadersI", name) =3D=3D 0) { return 5; }
  if (strcmp("sRenderTasks", name) =3D=3D 0) { return 1; }
  if (strcmp("sTransformPalette", name) =3D=3D 0) { return 3; }
  if (strcmp("uTransform", name) =3D=3D 0) { return 6; }
  return -1;
 }
 void bind_attrib(const char* name, int index) override {
  attrib_locations.bind_loc(name, index);
 }
 int get_attrib(const char* name) const override {
  return attrib_locations.get_loc(name);
 }
 size_t interpolants_size() const override { return sizeof(InterpOutputs); }
 VertexShaderImpl* get_vertex_shader() override {
  return this;
 }
 FragmentShaderImpl* get_fragment_shader() override {
  return this;
 }
 static ProgramImpl* loader() { return new brush_blend_ALPHA_PASS_program; }
 };

 # 3 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "brush_blend_DEBUG_OVERDRAW.h"
 #endif /* expanded by -frewrite-includes */
 # 3 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/brush_blend_DEBUG_OVERDRAW.h" 1
 struct brush_blend_DEBUG_OVERDRAW_common {
 struct Samplers {
  sampler2DArray_impl sColor0_impl;
  int sColor0_slot;
  sampler2D_impl sGpuCache_impl;
  int sGpuCache_slot;
  sampler2DArray_impl sPrevPassAlpha_impl;
  int sPrevPassAlpha_slot;
  sampler2D_impl sPrimitiveHeadersF_impl;
  int sPrimitiveHeadersF_slot;
  isampler2D_impl sPrimitiveHeadersI_impl;
  int sPrimitiveHeadersI_slot;
  sampler2D_impl sRenderTasks_impl;
  int sRenderTasks_slot;
  sampler2D_impl sTransformPalette_impl;
  int sTransformPalette_slot;
  bool set_slot(int index, int value) {
   switch (index) {
   case 7:
    sColor0_slot =3D value;
    return true;
   case 2:
    sGpuCache_slot =3D value;
    return true;
   case 8:
    sPrevPassAlpha_slot =3D value;
    return true;
   case 4:
    sPrimitiveHeadersF_slot =3D value;
    return true;
   case 5:
    sPrimitiveHeadersI_slot =3D value;
    return true;
   case 1:
    sRenderTasks_slot =3D value;
    return true;
   case 3:
    sTransformPalette_slot =3D value;
    return true;
   }
   return false;
  }
 } samplers;
 struct AttribLocations {
  int aPosition =3D NULL_ATTRIB;
  int aData =3D NULL_ATTRIB;
  void bind_loc(const char* name, int index) {
   if (strcmp("aPosition", name) =3D=3D 0) { aPosition =3D index; return; }
   if (strcmp("aData", name) =3D=3D 0) { aData =3D index; return; }
  }
  int get_loc(const char* name) const {
   if (strcmp("aPosition", name) =3D=3D 0) { return aPosition !=3D NULL_ATTR=
 IB ? aPosition : -1; }
   if (strcmp("aData", name) =3D=3D 0) { return aData !=3D NULL_ATTRIB ? aDa=
 ta : -1; }
   return -1;
  }
 } attrib_locations;
 vec4_scalar vTransformBounds;
 vec4_scalar vClipMaskUvBounds;
 vec4_scalar flat_varying_vec4_1;
 vec4_scalar flat_varying_vec4_2;
 vec4_scalar flat_varying_vec4_3;
 vec4_scalar flat_varying_vec4_4;
 ivec4_scalar flat_varying_ivec4_0;
 mat4_scalar vColorMat;
 Array<int32_t,4> vFuncs;
 sampler2DArray sColor0;
 sampler2D sGpuCache;
 sampler2DArray sPrevPassAlpha;
 sampler2D sPrimitiveHeadersF;
 isampler2D sPrimitiveHeadersI;
 sampler2D sRenderTasks;
 sampler2D sTransformPalette;
 mat4_scalar uTransform;
 void bind_textures() {
  sColor0 =3D lookup_sampler_array(&samplers.sColor0_impl, samplers.sColor0_=
 slot);
  sGpuCache =3D lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_=
 slot);
  sPrevPassAlpha =3D lookup_sampler_array(&samplers.sPrevPassAlpha_impl, sam=
 plers.sPrevPassAlpha_slot);
  sPrimitiveHeadersF =3D lookup_sampler(&samplers.sPrimitiveHeadersF_impl, s=
 amplers.sPrimitiveHeadersF_slot);
  sPrimitiveHeadersI =3D lookup_isampler(&samplers.sPrimitiveHeadersI_impl, =
 samplers.sPrimitiveHeadersI_slot);
  sRenderTasks =3D lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRen=
 derTasks_slot);
  sTransformPalette =3D lookup_sampler(&samplers.sTransformPalette_impl, sam=
 plers.sTransformPalette_slot);
 }
 };
 struct brush_blend_DEBUG_OVERDRAW_vert : VertexShaderImpl, brush_blend_DEBU=
 G_OVERDRAW_common {
 private:
 typedef brush_blend_DEBUG_OVERDRAW_vert Self;
 // int32_t uMode;
 // mat4_scalar uTransform;
 vec2 aPosition;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sRenderTasks;
 struct RenderTaskCommonData_scalar {
 RectWithSize_scalar task_rect;
 float texture_layer_index;
 RenderTaskCommonData_scalar() =3D default;
 RenderTaskCommonData_scalar(RectWithSize_scalar task_rect, float texture_la=
 yer_index) : task_rect(task_rect), texture_layer_index(texture_layer_index)=
 {}
 };
 struct RenderTaskCommonData {
 RectWithSize task_rect;
 Float texture_layer_index;
 RenderTaskCommonData() =3D default;
 RenderTaskCommonData(RectWithSize task_rect, Float texture_layer_index) : t=
 ask_rect(task_rect), texture_layer_index(texture_layer_index){}
 RenderTaskCommonData(RectWithSize_scalar task_rect, float texture_layer_ind=
 ex):task_rect(task_rect),texture_layer_index(texture_layer_index){
 }
 IMPLICIT RenderTaskCommonData(RenderTaskCommonData_scalar s):task_rect(s.ta=
 sk_rect),texture_layer_index(s.texture_layer_index){
 }
 friend RenderTaskCommonData if_then_else(I32 c, RenderTaskCommonData t, Ren=
 derTaskCommonData e) { return RenderTaskCommonData(
 if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.texture_layer_=
 index, e.texture_layer_index));
 }};
 struct RenderTaskData_scalar {
 RenderTaskCommonData_scalar common_data;
 vec3_scalar user_data;
 RenderTaskData_scalar() =3D default;
 RenderTaskData_scalar(RenderTaskCommonData_scalar common_data, vec3_scalar =
 user_data) : common_data(common_data), user_data(user_data){}
 };
 struct RenderTaskData {
 RenderTaskCommonData common_data;
 vec3 user_data;
 RenderTaskData() =3D default;
 RenderTaskData(RenderTaskCommonData common_data, vec3 user_data) : common_d=
 ata(common_data), user_data(user_data){}
 RenderTaskData(RenderTaskCommonData_scalar common_data, vec3_scalar user_da=
 ta):common_data(common_data),user_data(user_data){
 }
 IMPLICIT RenderTaskData(RenderTaskData_scalar s):common_data(s.common_data)=
 ,user_data(s.user_data){
 }
 friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData =
 e) { return RenderTaskData(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.user_data,=
  e.user_data));
 }};
 struct PictureTask_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar content_origin;
 PictureTask_scalar() =3D default;
 PictureTask_scalar(RenderTaskCommonData_scalar common_data, float device_pi=
 xel_scale, vec2_scalar content_origin) : common_data(common_data), device_p=
 ixel_scale(device_pixel_scale), content_origin(content_origin){}
 };
 struct PictureTask {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 content_origin;
 PictureTask() =3D default;
 PictureTask(RenderTaskCommonData common_data, Float device_pixel_scale, vec=
 2 content_origin) : common_data(common_data), device_pixel_scale(device_pix=
 el_scale), content_origin(content_origin){}
 PictureTask(RenderTaskCommonData_scalar common_data, float device_pixel_sca=
 le, vec2_scalar content_origin):common_data(common_data),device_pixel_scale=
 (device_pixel_scale),content_origin(content_origin){
 }
 IMPLICIT PictureTask(PictureTask_scalar s):common_data(s.common_data),devic=
 e_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
 }
 friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { retu=
 rn PictureTask(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.conten=
 t_origin));
 }};
 struct ClipArea_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar screen_origin;
 ClipArea_scalar() =3D default;
 ClipArea_scalar(RenderTaskCommonData_scalar common_data, float device_pixel=
 _scale, vec2_scalar screen_origin) : common_data(common_data), device_pixel=
 _scale(device_pixel_scale), screen_origin(screen_origin){}
 };
 struct ClipArea {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 screen_origin;
 ClipArea() =3D default;
 ClipArea(RenderTaskCommonData common_data, Float device_pixel_scale, vec2 s=
 creen_origin) : common_data(common_data), device_pixel_scale(device_pixel_s=
 cale), screen_origin(screen_origin){}
 ClipArea(RenderTaskCommonData_scalar common_data, float device_pixel_scale,=
  vec2_scalar screen_origin):common_data(common_data),device_pixel_scale(dev=
 ice_pixel_scale),screen_origin(screen_origin){
 }
 IMPLICIT ClipArea(ClipArea_scalar s):common_data(s.common_data),device_pixe=
 l_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
 }
 friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipAr=
 ea(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_=
 origin));
 }};
 // sampler2D sGpuCache;
 struct ImageResource_scalar {
 RectWithEndpoint_scalar uv_rect;
 float layer;
 vec3_scalar user_data;
 ImageResource_scalar() =3D default;
 ImageResource_scalar(RectWithEndpoint_scalar uv_rect, float layer, vec3_sca=
 lar user_data) : uv_rect(uv_rect), layer(layer), user_data(user_data){}
 };
 struct ImageResource {
 RectWithEndpoint uv_rect;
 Float layer;
 vec3 user_data;
 ImageResource() =3D default;
 ImageResource(RectWithEndpoint uv_rect, Float layer, vec3 user_data) : uv_r=
 ect(uv_rect), layer(layer), user_data(user_data){}
 ImageResource(RectWithEndpoint_scalar uv_rect, float layer, vec3_scalar use=
 r_data):uv_rect(uv_rect),layer(layer),user_data(user_data){
 }
 IMPLICIT ImageResource(ImageResource_scalar s):uv_rect(s.uv_rect),layer(s.l=
 ayer),user_data(s.user_data){
 }
 friend ImageResource if_then_else(I32 c, ImageResource t, ImageResource e) =
 { return ImageResource(
 if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.layer, e.layer), i=
 f_then_else(c, t.user_data, e.user_data));
 }};
 struct ImageResourceExtra_scalar {
 vec4_scalar st_tl;
 vec4_scalar st_tr;
 vec4_scalar st_bl;
 vec4_scalar st_br;
 ImageResourceExtra_scalar() =3D default;
 ImageResourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar=
  st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_b=
 r(st_br){}
 };
 struct ImageResourceExtra {
 vec4 st_tl;
 vec4 st_tr;
 vec4 st_bl;
 vec4 st_br;
 ImageResourceExtra() =3D default;
 ImageResourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(=
 st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
 ImageResourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl,=
  vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
 }
 IMPLICIT ImageResourceExtra(ImageResourceExtra_scalar s):st_tl(s.st_tl),st_=
 tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
 }
 friend ImageResourceExtra if_then_else(I32 c, ImageResourceExtra t, ImageRe=
 sourceExtra e) { return ImageResourceExtra(
 if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_th=
 en_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
 }};
 // vec4_scalar vTransformBounds;
 // sampler2D sTransformPalette;
 struct Transform_scalar {
 mat4_scalar m;
 mat4_scalar inv_m;
 bool is_axis_aligned;
 Transform_scalar() =3D default;
 Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : =
 m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
 };
 struct Transform {
 mat4 m;
 mat4 inv_m;
 Bool is_axis_aligned;
 Transform() =3D default;
 Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), i=
 s_axis_aligned(is_axis_aligned){}
 Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_=
 m(inv_m),is_axis_aligned(is_axis_aligned){
 }
 IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligne=
 d(s.is_axis_aligned){
 }
 friend Transform if_then_else(I32 c, Transform t, Transform e) { return Tra=
 nsform(
 if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(=
 c, t.is_axis_aligned, e.is_axis_aligned));
 }};
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 // sampler2D sPrimitiveHeadersF;
 // isampler2D sPrimitiveHeadersI;
 ivec4_scalar aData;
 struct Instance_scalar {
 int32_t prim_header_address;
 int32_t picture_task_address;
 int32_t clip_address;
 int32_t segment_index;
 int32_t flags;
 int32_t resource_address;
 int32_t brush_kind;
 Instance_scalar() =3D default;
 Instance_scalar(int32_t prim_header_address, int32_t picture_task_address, =
 int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resourc=
 e_address, int32_t brush_kind) : prim_header_address(prim_header_address), =
 picture_task_address(picture_task_address), clip_address(clip_address), seg=
 ment_index(segment_index), flags(flags), resource_address(resource_address)=
 , brush_kind(brush_kind){}
 };
 struct Instance {
 I32 prim_header_address;
 I32 picture_task_address;
 I32 clip_address;
 I32 segment_index;
 I32 flags;
 I32 resource_address;
 I32 brush_kind;
 Instance() =3D default;
 Instance(I32 prim_header_address, I32 picture_task_address, I32 clip_addres=
 s, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : pr=
 im_header_address(prim_header_address), picture_task_address(picture_task_a=
 ddress), clip_address(clip_address), segment_index(segment_index), flags(fl=
 ags), resource_address(resource_address), brush_kind(brush_kind){}
 Instance(int32_t prim_header_address, int32_t picture_task_address, int32_t=
  clip_address, int32_t segment_index, int32_t flags, int32_t resource_addre=
 ss, int32_t brush_kind):prim_header_address(prim_header_address),picture_ta=
 sk_address(picture_task_address),clip_address(clip_address),segment_index(s=
 egment_index),flags(flags),resource_address(resource_address),brush_kind(br=
 ush_kind){
 }
 IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_addr=
 ess),picture_task_address(s.picture_task_address),clip_address(s.clip_addre=
 ss),segment_index(s.segment_index),flags(s.flags),resource_address(s.resour=
 ce_address),brush_kind(s.brush_kind){
 }
 friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instan=
 ce(
 if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else=
 (c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.clip=
 _address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index=
 ), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e=
 =2Eresource_address), if_then_else(c, t.brush_kind, e.brush_kind));
 }};
 struct PrimitiveHeader_scalar {
 RectWithSize_scalar local_rect;
 RectWithSize_scalar local_clip_rect;
 float z;
 int32_t specific_prim_address;
 int32_t transform_id;
 ivec4_scalar user_data;
 PrimitiveHeader_scalar() =3D default;
 PrimitiveHeader_scalar(RectWithSize_scalar local_rect, RectWithSize_scalar =
 local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_=
 id, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local=
 _clip_rect), z(z), specific_prim_address(specific_prim_address), transform_=
 id(transform_id), user_data(user_data){}
 };
 struct PrimitiveHeader {
 RectWithSize local_rect;
 RectWithSize local_clip_rect;
 Float z;
 I32 specific_prim_address;
 I32 transform_id;
 ivec4 user_data;
 PrimitiveHeader() =3D default;
 PrimitiveHeader(RectWithSize local_rect, RectWithSize local_clip_rect, Floa=
 t z, I32 specific_prim_address, I32 transform_id, ivec4 user_data) : local_=
 rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_add=
 ress(specific_prim_address), transform_id(transform_id), user_data(user_dat=
 a){}
 PrimitiveHeader(RectWithSize_scalar local_rect, RectWithSize_scalar local_c=
 lip_rect, float z, int32_t specific_prim_address, int32_t transform_id, ive=
 c4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect=
 ),z(z),specific_prim_address(specific_prim_address),transform_id(transform_=
 id),user_data(user_data){
 }
 IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect)=
 ,local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific=
 _prim_address),transform_id(s.transform_id),user_data(s.user_data){
 }
 friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHead=
 er e) { return PrimitiveHeader(
 if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_r=
 ect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.speci=
 fic_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id,=
  e.transform_id), if_then_else(c, t.user_data, e.user_data));
 }};
 struct VertexInfo_scalar {
 vec2_scalar local_pos;
 vec4_scalar world_pos;
 VertexInfo_scalar() =3D default;
 VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos=
 (local_pos), world_pos(world_pos){}
 };
 struct VertexInfo {
 vec2 local_pos;
 vec4 world_pos;
 VertexInfo() =3D default;
 VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_po=
 s(world_pos){}
 VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_po=
 s),world_pos(world_pos){
 }
 IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s=
 =2Eworld_pos){
 }
 friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return =
 VertexInfo(
 if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.w=
 orld_pos));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 // mat4_scalar vColorMat;
 // Array<int32_t,4> vFuncs;
 Instance_scalar decode_instance_attributes() {
  Instance_scalar instance;
  (instance).prim_header_address =3D (aData).sel(X);
  (instance).picture_task_address =3D ((aData).sel(Y))>>(16);
  (instance).clip_address =3D ((aData).sel(Y))&(65535);
  (instance).segment_index =3D ((aData).sel(Z))&(65535);
  (instance).flags =3D ((aData).sel(Z))>>(16);
  (instance).resource_address =3D ((aData).sel(W))&(16777215);
  (instance).brush_kind =3D ((aData).sel(W))>>(24);
  return instance;
 }
 PrimitiveHeader_scalar fetch_prim_header(int32_t index) {
  PrimitiveHeader_scalar ph;
  ivec2_scalar uv_f =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sPrimitiveHeadersF_uv_f_fetch =3D texelFetchPtr(sPrimitiveHea=
 dersF, uv_f, 0, 1, 0, 0);
  vec4_scalar local_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sPrimit=
 iveHeadersF_uv_f_fetch, 0, 0);
  vec4_scalar local_clip_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sP=
 rimitiveHeadersF_uv_f_fetch, 1, 0);
  (ph).local_rect =3D RectWithSize_scalar((local_rect).sel(X, Y), (local_rec=
 t).sel(Z, W));
  (ph).local_clip_rect =3D RectWithSize_scalar((local_clip_rect).sel(X, Y), =
 (local_clip_rect).sel(Z, W));
  ivec2_scalar uv_i =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  ivec4_scalar* sPrimitiveHeadersI_uv_i_fetch =3D texelFetchPtr(sPrimitiveHe=
 adersI, uv_i, 0, 1, 0, 0);
  ivec4_scalar data0 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 0, 0);
  ivec4_scalar data1 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 1, 0);
  (ph).z =3D make_float((data0).sel(X));
  (ph).specific_prim_address =3D (data0).sel(Y);
  (ph).transform_id =3D (data0).sel(Z);
  (ph).user_data =3D data1;
  return ph;
 }
 Transform_scalar fetch_transform(int32_t id) {
  Transform_scalar transform;
  (transform).is_axis_aligned =3D ((id)>>(24))=3D=3D(0);
  int32_t index =3D (id)&(16777215);
  ivec2_scalar uv =3D make_ivec2(make_int((8u)*((make_uint(index))%((1024u)/=
 (8u)))), make_int((make_uint(index))/((1024u)/(8u))));
  ivec2_scalar uv0 =3D make_ivec2(((uv).sel(X))+(0), (uv).sel(Y));
  vec4_scalar* sTransformPalette_uv0_fetch =3D texelFetchPtr(sTransformPalet=
 te, uv0, 0, 7, 0, 0);
  (transform).m[0] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 0, 0);
  (transform).m[1] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 1, 0);
  (transform).m[2] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 2, 0);
  (transform).m[3] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 3, 0);
  (transform).inv_m[0] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 4, 0);
  (transform).inv_m[1] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 5, 0);
  (transform).inv_m[2] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 6, 0);
  (transform).inv_m[3] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 7, 0);
  return transform;
 }
 RenderTaskData_scalar fetch_render_task_data(int32_t index) {
  ivec2_scalar uv =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/=
 (2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sRenderTasks_uv_fetch =3D texelFetchPtr(sRenderTasks, uv, 0, =
 1, 0, 0);
  vec4_scalar texel0 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 0, 0);
  vec4_scalar texel1 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 1, 0);
  RectWithSize_scalar task_rect =3D RectWithSize_scalar((texel0).sel(X, Y), =
 (texel0).sel(Z, W));
  RenderTaskCommonData_scalar common_data =3D RenderTaskCommonData_scalar(ta=
 sk_rect, (texel1).sel(X));
  RenderTaskData_scalar data =3D RenderTaskData_scalar(common_data, (texel1)=
 =2Esel(Y, Z, W));
  return data;
 }
 PictureTask_scalar fetch_picture_task(int32_t address) {
  RenderTaskData_scalar task_data =3D fetch_render_task_data(address);
  PictureTask_scalar task =3D PictureTask_scalar((task_data).common_data, ((=
 task_data).user_data).sel(X), ((task_data).user_data).sel(Y, Z));
  return task;
 }
 ClipArea_scalar fetch_clip_area(int32_t index) {
  ClipArea_scalar area;
  if ((index)>=3D(32767)) {
   {
    RectWithSize_scalar rect =3D RectWithSize_scalar(make_vec2(0.f), make_ve=
 c2(0.f));
    (area).common_data =3D RenderTaskCommonData_scalar(rect, 0.f);
    (area).device_pixel_scale =3D 0.f;
    (area).screen_origin =3D make_vec2(0.f);
   }
  } else  {
   RenderTaskData_scalar task_data =3D fetch_render_task_data(index);
   (area).common_data =3D (task_data).common_data;
   (area).device_pixel_scale =3D ((task_data).user_data).sel(X);
   (area).screen_origin =3D ((task_data).user_data).sel(Y, Z);
  }
  return area;
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4_scalar,2> fetch_from_gpu_cache_2(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, =
 0);
  return Array<vec4_scalar,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec2 clamp_rect(vec2 pt, RectWithSize_scalar rect) {
  return clamp(pt, (rect).p0, ((rect).p0)+((rect).size));
 }
 VertexInfo write_vertex(vec2 local_pos, RectWithSize_scalar local_clip_rect=
 , float z, Transform_scalar transform, PictureTask_scalar task) {
  vec2 clamped_local_pos =3D clamp_rect(local_pos, local_clip_rect);
  vec4 world_pos =3D ((transform).m)*(make_vec4(clamped_local_pos, 0.f, 1.f)=
 );
  vec2 device_pos =3D ((world_pos).sel(X, Y))*((task).device_pixel_scale);
  vec2_scalar final_offset =3D (-((task).content_origin))+((((task).common_d=
 ata).task_rect).p0);
  gl_Position =3D (uTransform)*(make_vec4((device_pos)+((final_offset)*((wor=
 ld_pos).sel(W))), (z)*((world_pos).sel(W)), (world_pos).sel(W)));
  VertexInfo vi =3D VertexInfo(clamped_local_pos, world_pos);
  return vi;
 }
 RectWithEndpoint_scalar to_rect_with_endpoint(RectWithSize_scalar rect) {
  RectWithEndpoint_scalar result;
  (result).p0 =3D (rect).p0;
  (result).p1 =3D ((rect).p0)+((rect).size);
  return result;
 }
 void init_transform_vs(vec4_scalar local_bounds) {
  vTransformBounds =3D local_bounds;
 }
 VertexInfo write_transform_vertex(RectWithSize_scalar local_segment_rect, R=
 ectWithSize_scalar local_prim_rect, RectWithSize_scalar local_clip_rect, ve=
 c4_scalar clip_edge_mask, float z, Transform_scalar transform, PictureTask_=
 scalar task) {
  RectWithEndpoint_scalar clip_rect =3D to_rect_with_endpoint(local_clip_rec=
 t);
  RectWithEndpoint_scalar segment_rect =3D to_rect_with_endpoint(local_segme=
 nt_rect);
  (segment_rect).p0 =3D clamp((segment_rect).p0, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  (segment_rect).p1 =3D clamp((segment_rect).p1, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  RectWithEndpoint_scalar prim_rect =3D to_rect_with_endpoint(local_prim_rec=
 t);
  (prim_rect).p0 =3D clamp((prim_rect).p0, (clip_rect).p0, (clip_rect).p1);
  (prim_rect).p1 =3D clamp((prim_rect).p1, (clip_rect).p0, (clip_rect).p1);
  float extrude_amount =3D 2.f;
  vec4_scalar extrude_distance =3D (make_vec4(extrude_amount))*(clip_edge_ma=
 sk);
  (local_segment_rect).p0 -=3D (extrude_distance).sel(X, Y);
  (local_segment_rect).size +=3D ((extrude_distance).sel(X, Y))+((extrude_di=
 stance).sel(Z, W));
  vec2 local_pos =3D ((local_segment_rect).p0)+(((local_segment_rect).size)*=
 ((aPosition).sel(X, Y)));
  vec2_scalar task_offset =3D ((((task).common_data).task_rect).p0)-((task).=
 content_origin);
  vec4 world_pos =3D ((transform).m)*(make_vec4(local_pos, 0.f, 1.f));
  vec4 final_pos =3D make_vec4((((world_pos).sel(X, Y))*((task).device_pixel=
 _scale))+((task_offset)*((world_pos).sel(W))), (z)*((world_pos).sel(W)), (w=
 orld_pos).sel(W));
  gl_Position =3D (uTransform)*(final_pos);
  init_transform_vs(mix(make_vec4((prim_rect).p0, (prim_rect).p1), make_vec4=
 ((segment_rect).p0, (segment_rect).p1), clip_edge_mask));
  VertexInfo vi =3D VertexInfo(local_pos, world_pos);
  return vi;
 }
 ImageResource_scalar fetch_image_resource(int32_t address) {
  Array<vec4_scalar,2> data =3D fetch_from_gpu_cache_2(address);
  RectWithEndpoint_scalar uv_rect =3D RectWithEndpoint_scalar((data[0]).sel(=
 X, Y), (data[0]).sel(Z, W));
  return ImageResource_scalar(uv_rect, (data[1]).sel(X), (data[1]).sel(Y, Z,=
  W));
 }
 Array<vec4_scalar,4> fetch_from_gpu_cache_4(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 3, 0, =
 0);
  return Array<vec4_scalar,4>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0), texe=
 lFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 2, 0), texelFetchUnchecked(s=
 GpuCache, sGpuCache_uv_fetch, 3, 0)}};
 }
 ImageResourceExtra_scalar fetch_image_resource_extra(int32_t address) {
  Array<vec4_scalar,4> data =3D fetch_from_gpu_cache_4((address)+(2));
  return ImageResourceExtra_scalar(data[0], data[1], data[2], data[3]);
 }
 vec2 get_image_quad_uv(int32_t address, vec2 f) {
  ImageResourceExtra_scalar extra_data =3D fetch_image_resource_extra(addres=
 s);
  vec4 x =3D mix((extra_data).st_tl, (extra_data).st_tr, (f).sel(X));
  vec4 y =3D mix((extra_data).st_bl, (extra_data).st_br, (f).sel(X));
  vec4 z =3D mix(x, y, (f).sel(Y));
  return ((z).sel(X, Y))/((z).sel(W));
 }
 vec4_scalar fetch_from_gpu_cache_1(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  return texelFetch(sGpuCache, uv, 0);
 }
 void blend_brush_vs(VertexInfo vi, int32_t prim_address, RectWithSize_scala=
 r local_rect, RectWithSize_scalar segment_rect, ivec4_scalar prim_user_data=
 , int32_t specific_resource_address, mat4_scalar transform, PictureTask_sca=
 lar pic_task, int32_t brush_flags, vec4_scalar unused) {
  ImageResource_scalar res =3D fetch_image_resource((prim_user_data).sel(X));
  vec2_scalar uv0 =3D ((res).uv_rect).p0;
  vec2_scalar uv1 =3D ((res).uv_rect).p1;
  vec2_scalar texture_size =3D make_vec2((textureSize(sColor0, 0)).sel(X, Y)=
 );
  vec2 f =3D (((vi).local_pos)-((local_rect).p0))/((local_rect).size);
  f =3D get_image_quad_uv((prim_user_data).sel(X), f);
  vec2 uv =3D mix(uv0, uv1, f);
  float perspective_interpolate =3D ((brush_flags)&(1))!=3D(0) ? 1.f : 0.f;
  (varying_vec4_0).lsel(Z, W) =3D ((uv)/(texture_size))*(mix(((vi).world_pos=
 ).sel(W), 1.f, perspective_interpolate));
  (flat_varying_vec4_4).sel(X) =3D (res).layer;
  (flat_varying_vec4_4).sel(Y) =3D perspective_interpolate;
  flat_varying_vec4_2 =3D (make_vec4(uv0, uv1))/((texture_size).sel(X, Y, X,=
  Y));
  (varying_vec4_0).lsel(X, Y) =3D (vi).local_pos;
  float lumR =3D 0.2126f;
  float lumG =3D 0.7152f;
  float lumB =3D 0.0722f;
  float oneMinusLumR =3D (1.f)-(lumR);
  float oneMinusLumG =3D (1.f)-(lumG);
  float oneMinusLumB =3D (1.f)-(lumB);
  float amount =3D (make_float((prim_user_data).sel(Z)))/(65536.f);
  float invAmount =3D (1.f)-(amount);
  (flat_varying_ivec4_0).sel(X) =3D ((prim_user_data).sel(Y))&(65535);
  (flat_varying_vec4_4).sel(Z) =3D amount;
  vFuncs[0] =3D (((prim_user_data).sel(Y))>>(28))&(15);
  vFuncs[1] =3D (((prim_user_data).sel(Y))>>(24))&(15);
  vFuncs[2] =3D (((prim_user_data).sel(Y))>>(20))&(15);
  vFuncs[3] =3D (((prim_user_data).sel(Y))>>(16))&(15);
  if (((flat_varying_ivec4_0).sel(X))=3D=3D(1)) {
   {
    vColorMat =3D make_mat4(make_vec4((lumR)+((oneMinusLumR)*(invAmount)), (=
 lumR)-((lumR)*(invAmount)), (lumR)-((lumR)*(invAmount)), 0.f), make_vec4((l=
 umG)-((lumG)*(invAmount)), (lumG)+((oneMinusLumG)*(invAmount)), (lumG)-((lu=
 mG)*(invAmount)), 0.f), make_vec4((lumB)-((lumB)*(invAmount)), (lumB)-((lum=
 B)*(invAmount)), (lumB)+((oneMinusLumB)*(invAmount)), 0.f), make_vec4(0.f, =
 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(2)) {
   {
    float c =3D cos(amount);
    float s =3D sin(amount);
    vColorMat =3D make_mat4(make_vec4(((lumR)+((oneMinusLumR)*(c)))-((lumR)*=
 (s)), ((lumR)-((lumR)*(c)))+((0.143f)*(s)), ((lumR)-((lumR)*(c)))-((oneMinu=
 sLumR)*(s)), 0.f), make_vec4(((lumG)-((lumG)*(c)))-((lumG)*(s)), ((lumG)+((=
 oneMinusLumG)*(c)))+((0.14f)*(s)), ((lumG)-((lumG)*(c)))+((lumG)*(s)), 0.f)=
 , make_vec4(((lumB)-((lumB)*(c)))+((oneMinusLumB)*(s)), ((lumB)-((lumB)*(c)=
 ))-((0.283f)*(s)), ((lumB)+((oneMinusLumB)*(c)))+((lumB)*(s)), 0.f), make_v=
 ec4(0.f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(4)) {
   {
    vColorMat =3D make_mat4(make_vec4(((invAmount)*(lumR))+(amount), (invAmo=
 unt)*(lumR), (invAmount)*(lumR), 0.f), make_vec4((invAmount)*(lumG), ((invA=
 mount)*(lumG))+(amount), (invAmount)*(lumG), 0.f), make_vec4((invAmount)*(l=
 umB), (invAmount)*(lumB), ((invAmount)*(lumB))+(amount), 0.f), make_vec4(0.=
 f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(5)) {
   {
    vColorMat =3D make_mat4(make_vec4((0.393f)+((0.607f)*(invAmount)), (0.34=
 9f)-((0.349f)*(invAmount)), (0.272f)-((0.272f)*(invAmount)), 0.f), make_vec=
 4((0.769f)-((0.769f)*(invAmount)), (0.686f)+((0.314f)*(invAmount)), (0.534f=
 )-((0.534f)*(invAmount)), 0.f), make_vec4((0.189f)-((0.189f)*(invAmount)), =
 (0.168f)-((0.168f)*(invAmount)), (0.131f)+((0.869f)*(invAmount)), 0.f), mak=
 e_vec4(0.f, 0.f, 0.f, 1.f));
    flat_varying_vec4_3 =3D make_vec4(0.f);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(7)) {
   {
    Array<vec4_scalar,4> mat_data =3D fetch_from_gpu_cache_4((prim_user_data=
 ).sel(Z));
    vec4_scalar offset_data =3D fetch_from_gpu_cache_1(((prim_user_data).sel=
 (Z))+(4));
    vColorMat =3D make_mat4(mat_data[0], mat_data[1], mat_data[2], mat_data[=
 3]);
    flat_varying_vec4_3 =3D offset_data;
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(11)) {
   {
    (flat_varying_ivec4_0).sel(Y) =3D (prim_user_data).sel(Z);
   }
  } else  if (((flat_varying_ivec4_0).sel(X))=3D=3D(10)) {
   {
    flat_varying_vec4_1 =3D fetch_from_gpu_cache_1((prim_user_data).sel(Z));
   }
  }
 }
 void brush_shader_main_vs(Instance_scalar instance, PrimitiveHeader_scalar =
 ph, Transform_scalar transform, PictureTask_scalar pic_task, ClipArea_scala=
 r clip_area) {
  int32_t edge_flags =3D ((instance).flags)&(255);
  int32_t brush_flags =3D (((instance).flags)>>(8))&(255);
  vec4_scalar segment_data;
  RectWithSize_scalar segment_rect;
  if (((instance).segment_index)=3D=3D(65535)) {
   {
    segment_rect =3D (ph).local_rect;
    segment_data =3D make_vec4(0.f);
   }
  } else  {
   int32_t segment_address =3D (((ph).specific_prim_address)+(3))+(((instanc=
 e).segment_index)*(2));
   Array<vec4_scalar,2> segment_info =3D fetch_from_gpu_cache_2(segment_addr=
 ess);
   segment_rect =3D RectWithSize_scalar((segment_info[0]).sel(X, Y), (segmen=
 t_info[0]).sel(Z, W));
   (segment_rect).p0 +=3D ((ph).local_rect).p0;
   segment_data =3D segment_info[1];
  }
  VertexInfo vi;
  if ((transform).is_axis_aligned) {
   {
    vec2 local_pos =3D ((segment_rect).p0)+(((segment_rect).size)*((aPositio=
 n).sel(X, Y)));
    vi =3D write_vertex(local_pos, (ph).local_clip_rect, (ph).z, transform, =
 pic_task);
   }
  } else  {
   bvec4_scalar edge_mask =3D notEqual((edge_flags)&(make_ivec4(1, 2, 4, 8))=
 , make_ivec4(0));
   vi =3D write_transform_vertex(segment_rect, (ph).local_rect, (ph).local_c=
 lip_rect, mix(make_vec4(0.f), make_vec4(1.f), edge_mask), (ph).z, transform=
 , pic_task);
  }
  blend_brush_vs(vi, (ph).specific_prim_address, (ph).local_rect, segment_re=
 ct, (ph).user_data, (instance).resource_address, (transform).m, pic_task, b=
 rush_flags, segment_data);
 }
 ALWAYS_INLINE void main(void) {
  Instance_scalar instance =3D decode_instance_attributes();
  PrimitiveHeader_scalar ph =3D fetch_prim_header((instance).prim_header_add=
 ress);
  Transform_scalar transform =3D fetch_transform((ph).transform_id);
  PictureTask_scalar task =3D fetch_picture_task((instance).picture_task_add=
 ress);
  ClipArea_scalar clip_area =3D fetch_clip_area((instance).clip_address);
  brush_shader_main_vs(instance, ph, transform, task, clip_area);
 }
 static void set_uniform_1i(Self *self, int index, int value) {
  if (self->samplers.set_slot(index, value)) return;
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_4fv(Self *self, int index, const float *value) {
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_matrix4fv(Self *self, int index, const float *value=
 ) {
  switch (index) {
  case 7:
   assert(0); // sColor0
   break;
  case 2:
   assert(0); // sGpuCache
   break;
  case 8:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   self->uTransform =3D mat4_scalar::load_from_ptr(value);
   break;
  }
 }
 static void load_attribs(Self *self, VertexAttrib *attribs, uint32_t start,=
  int instance, int count) {
  load_attrib(self->aPosition, attribs[self->attrib_locations.aPosition], st=
 art, instance, count);
  load_flat_attrib(self->aData, attribs[self->attrib_locations.aData], start=
 , instance, count);
 }
 public:
 struct InterpOutputs {
 vec4_scalar vClipMaskUv;
 vec4_scalar varying_vec4_0;
 };
 private:
 ALWAYS_INLINE void store_interp_outputs(char* dest_ptr, size_t stride) {
   for(int n =3D 0; n < 4; n++) {
     auto* dest =3D reinterpret_cast<InterpOutputs*>(dest_ptr);
     dest->vClipMaskUv =3D get_nth(vClipMaskUv, n);
     dest->varying_vec4_0 =3D get_nth(varying_vec4_0, n);
     dest_ptr +=3D stride;
   }
 }
 static void run(Self* self, char* interps, size_t interp_stride) {
  self->main();
  self->store_interp_outputs(interps, interp_stride);
 }
 static void init_batch(Self *self) { self->bind_textures(); }
 public:
 brush_blend_DEBUG_OVERDRAW_vert() {
  set_uniform_1i_func =3D (SetUniform1iFunc)&set_uniform_1i;
  set_uniform_4fv_func =3D (SetUniform4fvFunc)&set_uniform_4fv;
  set_uniform_matrix4fv_func =3D (SetUniformMatrix4fvFunc)&set_uniform_matri=
 x4fv;
  init_batch_func =3D (InitBatchFunc)&init_batch;
  load_attribs_func =3D (LoadAttribsFunc)&load_attribs;
  run_primitive_func =3D (RunPrimitiveFunc)&run;
 }
 };


 struct brush_blend_DEBUG_OVERDRAW_frag : FragmentShaderImpl, brush_blend_DE=
 BUG_OVERDRAW_vert {
 private:
 typedef brush_blend_DEBUG_OVERDRAW_frag Self;
 #define oFragColor gl_FragColor
 // vec4 oFragColor;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sGpuCache;
 // vec4_scalar vTransformBounds;
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 struct Fragment_scalar {
 vec4_scalar color;
 Fragment_scalar() =3D default;
 explicit Fragment_scalar(vec4_scalar color) : color(color){}
 };
 struct Fragment {
 vec4 color;
 Fragment() =3D default;
 explicit Fragment(vec4 color) : color(color){}
 explicit Fragment(vec4_scalar color):color(color){
 }
 IMPLICIT Fragment(Fragment_scalar s):color(s.color){
 }
 friend Fragment if_then_else(I32 c, Fragment t, Fragment e) { return Fragme=
 nt(
 if_then_else(c, t.color, e.color));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 // mat4_scalar vColorMat;
 // Array<int32_t,4> vFuncs;
 ALWAYS_INLINE void main(void) {
  oFragColor =3D make_vec4(0.11f, 0.077f, 0.027f, 0.125f);
 }
 typedef brush_blend_DEBUG_OVERDRAW_vert::InterpOutputs InterpInputs;
 InterpInputs interp_step;
 static void read_interp_inputs(Self *self, const InterpInputs *init, const =
 InterpInputs *step, float step_width) {
 }
 ALWAYS_INLINE void step_interp_inputs() {
 }
 static void run(Self *self) {
  self->main();
  self->step_interp_inputs();
 }
 static void skip(Self* self, int chunks) {
  self->step_interp_inputs();
  while (--chunks > 0) self->step_interp_inputs();
 }
 public:
 brush_blend_DEBUG_OVERDRAW_frag() {
  init_span_func =3D (InitSpanFunc)&read_interp_inputs;
  run_func =3D (RunFunc)&run;
  skip_func =3D (SkipFunc)&skip;
  init_span_w_func =3D (InitSpanWFunc)&read_interp_inputs;
  run_w_func =3D (RunWFunc)&run;
  skip_w_func =3D (SkipWFunc)&skip;
 }
 };

 struct brush_blend_DEBUG_OVERDRAW_program : ProgramImpl, brush_blend_DEBUG_=
 OVERDRAW_frag {
 int get_uniform(const char *name) const override {
  if (strcmp("sColor0", name) =3D=3D 0) { return 7; }
  if (strcmp("sGpuCache", name) =3D=3D 0) { return 2; }
  if (strcmp("sPrevPassAlpha", name) =3D=3D 0) { return 8; }
  if (strcmp("sPrimitiveHeadersF", name) =3D=3D 0) { return 4; }
  if (strcmp("sPrimitiveHeadersI", name) =3D=3D 0) { return 5; }
  if (strcmp("sRenderTasks", name) =3D=3D 0) { return 1; }
  if (strcmp("sTransformPalette", name) =3D=3D 0) { return 3; }
  if (strcmp("uTransform", name) =3D=3D 0) { return 6; }
  return -1;
 }
 void bind_attrib(const char* name, int index) override {
  attrib_locations.bind_loc(name, index);
 }
 int get_attrib(const char* name) const override {
  return attrib_locations.get_loc(name);
 }
 size_t interpolants_size() const override { return sizeof(InterpOutputs); }
 VertexShaderImpl* get_vertex_shader() override {
  return this;
 }
 FragmentShaderImpl* get_fragment_shader() override {
  return this;
 }
 static ProgramImpl* loader() { return new brush_blend_DEBUG_OVERDRAW_progra=
 m; }
 };

 # 4 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "brush_conic_gradient.h"
 #endif /* expanded by -frewrite-includes */
 # 4 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/brush_conic_gradient.h" 1
 struct brush_conic_gradient_common {
 struct Samplers {
  sampler2D_impl sGpuCache_impl;
  int sGpuCache_slot;
  sampler2DArray_impl sPrevPassAlpha_impl;
  int sPrevPassAlpha_slot;
  sampler2D_impl sPrimitiveHeadersF_impl;
  int sPrimitiveHeadersF_slot;
  isampler2D_impl sPrimitiveHeadersI_impl;
  int sPrimitiveHeadersI_slot;
  sampler2D_impl sRenderTasks_impl;
  int sRenderTasks_slot;
  sampler2D_impl sTransformPalette_impl;
  int sTransformPalette_slot;
  bool set_slot(int index, int value) {
   switch (index) {
   case 2:
    sGpuCache_slot =3D value;
    return true;
   case 7:
    sPrevPassAlpha_slot =3D value;
    return true;
   case 4:
    sPrimitiveHeadersF_slot =3D value;
    return true;
   case 5:
    sPrimitiveHeadersI_slot =3D value;
    return true;
   case 1:
    sRenderTasks_slot =3D value;
    return true;
   case 3:
    sTransformPalette_slot =3D value;
    return true;
   }
   return false;
  }
 } samplers;
 struct AttribLocations {
  int aPosition =3D NULL_ATTRIB;
  int aData =3D NULL_ATTRIB;
  void bind_loc(const char* name, int index) {
   if (strcmp("aPosition", name) =3D=3D 0) { aPosition =3D index; return; }
   if (strcmp("aData", name) =3D=3D 0) { aData =3D index; return; }
  }
  int get_loc(const char* name) const {
   if (strcmp("aPosition", name) =3D=3D 0) { return aPosition !=3D NULL_ATTR=
 IB ? aPosition : -1; }
   if (strcmp("aData", name) =3D=3D 0) { return aData !=3D NULL_ATTRIB ? aDa=
 ta : -1; }
   return -1;
  }
 } attrib_locations;
 vec4_scalar vTransformBounds;
 vec4_scalar vClipMaskUvBounds;
 vec4_scalar flat_varying_vec4_0;
 vec4_scalar flat_varying_vec4_1;
 int32_t flat_varying_highp_int_address_0;
 sampler2D sGpuCache;
 sampler2DArray sPrevPassAlpha;
 sampler2D sPrimitiveHeadersF;
 isampler2D sPrimitiveHeadersI;
 sampler2D sRenderTasks;
 sampler2D sTransformPalette;
 mat4_scalar uTransform;
 void bind_textures() {
  sGpuCache =3D lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_=
 slot);
  sPrevPassAlpha =3D lookup_sampler_array(&samplers.sPrevPassAlpha_impl, sam=
 plers.sPrevPassAlpha_slot);
  sPrimitiveHeadersF =3D lookup_sampler(&samplers.sPrimitiveHeadersF_impl, s=
 amplers.sPrimitiveHeadersF_slot);
  sPrimitiveHeadersI =3D lookup_isampler(&samplers.sPrimitiveHeadersI_impl, =
 samplers.sPrimitiveHeadersI_slot);
  sRenderTasks =3D lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRen=
 derTasks_slot);
  sTransformPalette =3D lookup_sampler(&samplers.sTransformPalette_impl, sam=
 plers.sTransformPalette_slot);
 }
 };
 struct brush_conic_gradient_vert : VertexShaderImpl, brush_conic_gradient_c=
 ommon {
 private:
 typedef brush_conic_gradient_vert Self;
 // int32_t uMode;
 // mat4_scalar uTransform;
 vec2 aPosition;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sRenderTasks;
 struct RenderTaskCommonData_scalar {
 RectWithSize_scalar task_rect;
 float texture_layer_index;
 RenderTaskCommonData_scalar() =3D default;
 RenderTaskCommonData_scalar(RectWithSize_scalar task_rect, float texture_la=
 yer_index) : task_rect(task_rect), texture_layer_index(texture_layer_index)=
 {}
 };
 struct RenderTaskCommonData {
 RectWithSize task_rect;
 Float texture_layer_index;
 RenderTaskCommonData() =3D default;
 RenderTaskCommonData(RectWithSize task_rect, Float texture_layer_index) : t=
 ask_rect(task_rect), texture_layer_index(texture_layer_index){}
 RenderTaskCommonData(RectWithSize_scalar task_rect, float texture_layer_ind=
 ex):task_rect(task_rect),texture_layer_index(texture_layer_index){
 }
 IMPLICIT RenderTaskCommonData(RenderTaskCommonData_scalar s):task_rect(s.ta=
 sk_rect),texture_layer_index(s.texture_layer_index){
 }
 friend RenderTaskCommonData if_then_else(I32 c, RenderTaskCommonData t, Ren=
 derTaskCommonData e) { return RenderTaskCommonData(
 if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.texture_layer_=
 index, e.texture_layer_index));
 }};
 struct RenderTaskData_scalar {
 RenderTaskCommonData_scalar common_data;
 vec3_scalar user_data;
 RenderTaskData_scalar() =3D default;
 RenderTaskData_scalar(RenderTaskCommonData_scalar common_data, vec3_scalar =
 user_data) : common_data(common_data), user_data(user_data){}
 };
 struct RenderTaskData {
 RenderTaskCommonData common_data;
 vec3 user_data;
 RenderTaskData() =3D default;
 RenderTaskData(RenderTaskCommonData common_data, vec3 user_data) : common_d=
 ata(common_data), user_data(user_data){}
 RenderTaskData(RenderTaskCommonData_scalar common_data, vec3_scalar user_da=
 ta):common_data(common_data),user_data(user_data){
 }
 IMPLICIT RenderTaskData(RenderTaskData_scalar s):common_data(s.common_data)=
 ,user_data(s.user_data){
 }
 friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData =
 e) { return RenderTaskData(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.user_data,=
  e.user_data));
 }};
 struct PictureTask_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar content_origin;
 PictureTask_scalar() =3D default;
 PictureTask_scalar(RenderTaskCommonData_scalar common_data, float device_pi=
 xel_scale, vec2_scalar content_origin) : common_data(common_data), device_p=
 ixel_scale(device_pixel_scale), content_origin(content_origin){}
 };
 struct PictureTask {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 content_origin;
 PictureTask() =3D default;
 PictureTask(RenderTaskCommonData common_data, Float device_pixel_scale, vec=
 2 content_origin) : common_data(common_data), device_pixel_scale(device_pix=
 el_scale), content_origin(content_origin){}
 PictureTask(RenderTaskCommonData_scalar common_data, float device_pixel_sca=
 le, vec2_scalar content_origin):common_data(common_data),device_pixel_scale=
 (device_pixel_scale),content_origin(content_origin){
 }
 IMPLICIT PictureTask(PictureTask_scalar s):common_data(s.common_data),devic=
 e_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
 }
 friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { retu=
 rn PictureTask(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.conten=
 t_origin));
 }};
 struct ClipArea_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar screen_origin;
 ClipArea_scalar() =3D default;
 ClipArea_scalar(RenderTaskCommonData_scalar common_data, float device_pixel=
 _scale, vec2_scalar screen_origin) : common_data(common_data), device_pixel=
 _scale(device_pixel_scale), screen_origin(screen_origin){}
 };
 struct ClipArea {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 screen_origin;
 ClipArea() =3D default;
 ClipArea(RenderTaskCommonData common_data, Float device_pixel_scale, vec2 s=
 creen_origin) : common_data(common_data), device_pixel_scale(device_pixel_s=
 cale), screen_origin(screen_origin){}
 ClipArea(RenderTaskCommonData_scalar common_data, float device_pixel_scale,=
  vec2_scalar screen_origin):common_data(common_data),device_pixel_scale(dev=
 ice_pixel_scale),screen_origin(screen_origin){
 }
 IMPLICIT ClipArea(ClipArea_scalar s):common_data(s.common_data),device_pixe=
 l_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
 }
 friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipAr=
 ea(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_=
 origin));
 }};
 // sampler2D sGpuCache;
 struct ImageResource_scalar {
 RectWithEndpoint_scalar uv_rect;
 float layer;
 vec3_scalar user_data;
 ImageResource_scalar() =3D default;
 ImageResource_scalar(RectWithEndpoint_scalar uv_rect, float layer, vec3_sca=
 lar user_data) : uv_rect(uv_rect), layer(layer), user_data(user_data){}
 };
 struct ImageResource {
 RectWithEndpoint uv_rect;
 Float layer;
 vec3 user_data;
 ImageResource() =3D default;
 ImageResource(RectWithEndpoint uv_rect, Float layer, vec3 user_data) : uv_r=
 ect(uv_rect), layer(layer), user_data(user_data){}
 ImageResource(RectWithEndpoint_scalar uv_rect, float layer, vec3_scalar use=
 r_data):uv_rect(uv_rect),layer(layer),user_data(user_data){
 }
 IMPLICIT ImageResource(ImageResource_scalar s):uv_rect(s.uv_rect),layer(s.l=
 ayer),user_data(s.user_data){
 }
 friend ImageResource if_then_else(I32 c, ImageResource t, ImageResource e) =
 { return ImageResource(
 if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.layer, e.layer), i=
 f_then_else(c, t.user_data, e.user_data));
 }};
 struct ImageResourceExtra_scalar {
 vec4_scalar st_tl;
 vec4_scalar st_tr;
 vec4_scalar st_bl;
 vec4_scalar st_br;
 ImageResourceExtra_scalar() =3D default;
 ImageResourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar=
  st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_b=
 r(st_br){}
 };
 struct ImageResourceExtra {
 vec4 st_tl;
 vec4 st_tr;
 vec4 st_bl;
 vec4 st_br;
 ImageResourceExtra() =3D default;
 ImageResourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(=
 st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
 ImageResourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl,=
  vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
 }
 IMPLICIT ImageResourceExtra(ImageResourceExtra_scalar s):st_tl(s.st_tl),st_=
 tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
 }
 friend ImageResourceExtra if_then_else(I32 c, ImageResourceExtra t, ImageRe=
 sourceExtra e) { return ImageResourceExtra(
 if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_th=
 en_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
 }};
 // vec4_scalar vTransformBounds;
 // sampler2D sTransformPalette;
 struct Transform_scalar {
 mat4_scalar m;
 mat4_scalar inv_m;
 bool is_axis_aligned;
 Transform_scalar() =3D default;
 Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : =
 m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
 };
 struct Transform {
 mat4 m;
 mat4 inv_m;
 Bool is_axis_aligned;
 Transform() =3D default;
 Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), i=
 s_axis_aligned(is_axis_aligned){}
 Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_=
 m(inv_m),is_axis_aligned(is_axis_aligned){
 }
 IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligne=
 d(s.is_axis_aligned){
 }
 friend Transform if_then_else(I32 c, Transform t, Transform e) { return Tra=
 nsform(
 if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(=
 c, t.is_axis_aligned, e.is_axis_aligned));
 }};
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 // sampler2D sPrimitiveHeadersF;
 // isampler2D sPrimitiveHeadersI;
 ivec4_scalar aData;
 struct Instance_scalar {
 int32_t prim_header_address;
 int32_t picture_task_address;
 int32_t clip_address;
 int32_t segment_index;
 int32_t flags;
 int32_t resource_address;
 int32_t brush_kind;
 Instance_scalar() =3D default;
 Instance_scalar(int32_t prim_header_address, int32_t picture_task_address, =
 int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resourc=
 e_address, int32_t brush_kind) : prim_header_address(prim_header_address), =
 picture_task_address(picture_task_address), clip_address(clip_address), seg=
 ment_index(segment_index), flags(flags), resource_address(resource_address)=
 , brush_kind(brush_kind){}
 };
 struct Instance {
 I32 prim_header_address;
 I32 picture_task_address;
 I32 clip_address;
 I32 segment_index;
 I32 flags;
 I32 resource_address;
 I32 brush_kind;
 Instance() =3D default;
 Instance(I32 prim_header_address, I32 picture_task_address, I32 clip_addres=
 s, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : pr=
 im_header_address(prim_header_address), picture_task_address(picture_task_a=
 ddress), clip_address(clip_address), segment_index(segment_index), flags(fl=
 ags), resource_address(resource_address), brush_kind(brush_kind){}
 Instance(int32_t prim_header_address, int32_t picture_task_address, int32_t=
  clip_address, int32_t segment_index, int32_t flags, int32_t resource_addre=
 ss, int32_t brush_kind):prim_header_address(prim_header_address),picture_ta=
 sk_address(picture_task_address),clip_address(clip_address),segment_index(s=
 egment_index),flags(flags),resource_address(resource_address),brush_kind(br=
 ush_kind){
 }
 IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_addr=
 ess),picture_task_address(s.picture_task_address),clip_address(s.clip_addre=
 ss),segment_index(s.segment_index),flags(s.flags),resource_address(s.resour=
 ce_address),brush_kind(s.brush_kind){
 }
 friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instan=
 ce(
 if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else=
 (c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.clip=
 _address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index=
 ), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e=
 =2Eresource_address), if_then_else(c, t.brush_kind, e.brush_kind));
 }};
 struct PrimitiveHeader_scalar {
 RectWithSize_scalar local_rect;
 RectWithSize_scalar local_clip_rect;
 float z;
 int32_t specific_prim_address;
 int32_t transform_id;
 ivec4_scalar user_data;
 PrimitiveHeader_scalar() =3D default;
 PrimitiveHeader_scalar(RectWithSize_scalar local_rect, RectWithSize_scalar =
 local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_=
 id, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local=
 _clip_rect), z(z), specific_prim_address(specific_prim_address), transform_=
 id(transform_id), user_data(user_data){}
 };
 struct PrimitiveHeader {
 RectWithSize local_rect;
 RectWithSize local_clip_rect;
 Float z;
 I32 specific_prim_address;
 I32 transform_id;
 ivec4 user_data;
 PrimitiveHeader() =3D default;
 PrimitiveHeader(RectWithSize local_rect, RectWithSize local_clip_rect, Floa=
 t z, I32 specific_prim_address, I32 transform_id, ivec4 user_data) : local_=
 rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_add=
 ress(specific_prim_address), transform_id(transform_id), user_data(user_dat=
 a){}
 PrimitiveHeader(RectWithSize_scalar local_rect, RectWithSize_scalar local_c=
 lip_rect, float z, int32_t specific_prim_address, int32_t transform_id, ive=
 c4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect=
 ),z(z),specific_prim_address(specific_prim_address),transform_id(transform_=
 id),user_data(user_data){
 }
 IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect)=
 ,local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific=
 _prim_address),transform_id(s.transform_id),user_data(s.user_data){
 }
 friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHead=
 er e) { return PrimitiveHeader(
 if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_r=
 ect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.speci=
 fic_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id,=
  e.transform_id), if_then_else(c, t.user_data, e.user_data));
 }};
 struct VertexInfo_scalar {
 vec2_scalar local_pos;
 vec4_scalar world_pos;
 VertexInfo_scalar() =3D default;
 VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos=
 (local_pos), world_pos(world_pos){}
 };
 struct VertexInfo {
 vec2 local_pos;
 vec4 world_pos;
 VertexInfo() =3D default;
 VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_po=
 s(world_pos){}
 VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_po=
 s),world_pos(world_pos){
 }
 IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s=
 =2Eworld_pos){
 }
 friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return =
 VertexInfo(
 if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.w=
 orld_pos));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 struct ConicGradient_scalar {
 vec2_scalar center_point;
 vec2_scalar start_end_offset;
 float angle;
 int32_t extend_mode;
 vec2_scalar stretch_size;
 ConicGradient_scalar() =3D default;
 ConicGradient_scalar(vec2_scalar center_point, vec2_scalar start_end_offset=
 , float angle, int32_t extend_mode, vec2_scalar stretch_size) : center_poin=
 t(center_point), start_end_offset(start_end_offset), angle(angle), extend_m=
 ode(extend_mode), stretch_size(stretch_size){}
 };
 struct ConicGradient {
 vec2 center_point;
 vec2 start_end_offset;
 Float angle;
 I32 extend_mode;
 vec2 stretch_size;
 ConicGradient() =3D default;
 ConicGradient(vec2 center_point, vec2 start_end_offset, Float angle, I32 ex=
 tend_mode, vec2 stretch_size) : center_point(center_point), start_end_offse=
 t(start_end_offset), angle(angle), extend_mode(extend_mode), stretch_size(s=
 tretch_size){}
 ConicGradient(vec2_scalar center_point, vec2_scalar start_end_offset, float=
  angle, int32_t extend_mode, vec2_scalar stretch_size):center_point(center_=
 point),start_end_offset(start_end_offset),angle(angle),extend_mode(extend_m=
 ode),stretch_size(stretch_size){
 }
 IMPLICIT ConicGradient(ConicGradient_scalar s):center_point(s.center_point)=
 ,start_end_offset(s.start_end_offset),angle(s.angle),extend_mode(s.extend_m=
 ode),stretch_size(s.stretch_size){
 }
 friend ConicGradient if_then_else(I32 c, ConicGradient t, ConicGradient e) =
 { return ConicGradient(
 if_then_else(c, t.center_point, e.center_point), if_then_else(c, t.start_en=
 d_offset, e.start_end_offset), if_then_else(c, t.angle, e.angle), if_then_e=
 lse(c, t.extend_mode, e.extend_mode), if_then_else(c, t.stretch_size, e.str=
 etch_size));
 }};
 Instance_scalar decode_instance_attributes() {
  Instance_scalar instance;
  (instance).prim_header_address =3D (aData).sel(X);
  (instance).picture_task_address =3D ((aData).sel(Y))>>(16);
  (instance).clip_address =3D ((aData).sel(Y))&(65535);
  (instance).segment_index =3D ((aData).sel(Z))&(65535);
  (instance).flags =3D ((aData).sel(Z))>>(16);
  (instance).resource_address =3D ((aData).sel(W))&(16777215);
  (instance).brush_kind =3D ((aData).sel(W))>>(24);
  return instance;
 }
 PrimitiveHeader_scalar fetch_prim_header(int32_t index) {
  PrimitiveHeader_scalar ph;
  ivec2_scalar uv_f =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sPrimitiveHeadersF_uv_f_fetch =3D texelFetchPtr(sPrimitiveHea=
 dersF, uv_f, 0, 1, 0, 0);
  vec4_scalar local_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sPrimit=
 iveHeadersF_uv_f_fetch, 0, 0);
  vec4_scalar local_clip_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sP=
 rimitiveHeadersF_uv_f_fetch, 1, 0);
  (ph).local_rect =3D RectWithSize_scalar((local_rect).sel(X, Y), (local_rec=
 t).sel(Z, W));
  (ph).local_clip_rect =3D RectWithSize_scalar((local_clip_rect).sel(X, Y), =
 (local_clip_rect).sel(Z, W));
  ivec2_scalar uv_i =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  ivec4_scalar* sPrimitiveHeadersI_uv_i_fetch =3D texelFetchPtr(sPrimitiveHe=
 adersI, uv_i, 0, 1, 0, 0);
  ivec4_scalar data0 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 0, 0);
  ivec4_scalar data1 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 1, 0);
  (ph).z =3D make_float((data0).sel(X));
  (ph).specific_prim_address =3D (data0).sel(Y);
  (ph).transform_id =3D (data0).sel(Z);
  (ph).user_data =3D data1;
  return ph;
 }
 Transform_scalar fetch_transform(int32_t id) {
  Transform_scalar transform;
  (transform).is_axis_aligned =3D ((id)>>(24))=3D=3D(0);
  int32_t index =3D (id)&(16777215);
  ivec2_scalar uv =3D make_ivec2(make_int((8u)*((make_uint(index))%((1024u)/=
 (8u)))), make_int((make_uint(index))/((1024u)/(8u))));
  ivec2_scalar uv0 =3D make_ivec2(((uv).sel(X))+(0), (uv).sel(Y));
  vec4_scalar* sTransformPalette_uv0_fetch =3D texelFetchPtr(sTransformPalet=
 te, uv0, 0, 7, 0, 0);
  (transform).m[0] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 0, 0);
  (transform).m[1] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 1, 0);
  (transform).m[2] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 2, 0);
  (transform).m[3] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 3, 0);
  (transform).inv_m[0] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 4, 0);
  (transform).inv_m[1] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 5, 0);
  (transform).inv_m[2] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 6, 0);
  (transform).inv_m[3] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 7, 0);
  return transform;
 }
 RenderTaskData_scalar fetch_render_task_data(int32_t index) {
  ivec2_scalar uv =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/=
 (2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sRenderTasks_uv_fetch =3D texelFetchPtr(sRenderTasks, uv, 0, =
 1, 0, 0);
  vec4_scalar texel0 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 0, 0);
  vec4_scalar texel1 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 1, 0);
  RectWithSize_scalar task_rect =3D RectWithSize_scalar((texel0).sel(X, Y), =
 (texel0).sel(Z, W));
  RenderTaskCommonData_scalar common_data =3D RenderTaskCommonData_scalar(ta=
 sk_rect, (texel1).sel(X));
  RenderTaskData_scalar data =3D RenderTaskData_scalar(common_data, (texel1)=
 =2Esel(Y, Z, W));
  return data;
 }
 PictureTask_scalar fetch_picture_task(int32_t address) {
  RenderTaskData_scalar task_data =3D fetch_render_task_data(address);
  PictureTask_scalar task =3D PictureTask_scalar((task_data).common_data, ((=
 task_data).user_data).sel(X), ((task_data).user_data).sel(Y, Z));
  return task;
 }
 ClipArea_scalar fetch_clip_area(int32_t index) {
  ClipArea_scalar area;
  if ((index)>=3D(32767)) {
   {
    RectWithSize_scalar rect =3D RectWithSize_scalar(make_vec2(0.f), make_ve=
 c2(0.f));
    (area).common_data =3D RenderTaskCommonData_scalar(rect, 0.f);
    (area).device_pixel_scale =3D 0.f;
    (area).screen_origin =3D make_vec2(0.f);
   }
  } else  {
   RenderTaskData_scalar task_data =3D fetch_render_task_data(index);
   (area).common_data =3D (task_data).common_data;
   (area).device_pixel_scale =3D ((task_data).user_data).sel(X);
   (area).screen_origin =3D ((task_data).user_data).sel(Y, Z);
  }
  return area;
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4_scalar,2> fetch_from_gpu_cache_2(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, =
 0);
  return Array<vec4_scalar,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec2 clamp_rect(vec2 pt, RectWithSize_scalar rect) {
  return clamp(pt, (rect).p0, ((rect).p0)+((rect).size));
 }
 VertexInfo write_vertex(vec2 local_pos, RectWithSize_scalar local_clip_rect=
 , float z, Transform_scalar transform, PictureTask_scalar task) {
  vec2 clamped_local_pos =3D clamp_rect(local_pos, local_clip_rect);
  vec4 world_pos =3D ((transform).m)*(make_vec4(clamped_local_pos, 0.f, 1.f)=
 );
  vec2 device_pos =3D ((world_pos).sel(X, Y))*((task).device_pixel_scale);
  vec2_scalar final_offset =3D (-((task).content_origin))+((((task).common_d=
 ata).task_rect).p0);
  gl_Position =3D (uTransform)*(make_vec4((device_pos)+((final_offset)*((wor=
 ld_pos).sel(W))), (z)*((world_pos).sel(W)), (world_pos).sel(W)));
  VertexInfo vi =3D VertexInfo(clamped_local_pos, world_pos);
  return vi;
 }
 RectWithEndpoint_scalar to_rect_with_endpoint(RectWithSize_scalar rect) {
  RectWithEndpoint_scalar result;
  (result).p0 =3D (rect).p0;
  (result).p1 =3D ((rect).p0)+((rect).size);
  return result;
 }
 void init_transform_vs(vec4_scalar local_bounds) {
  vTransformBounds =3D local_bounds;
 }
 VertexInfo write_transform_vertex(RectWithSize_scalar local_segment_rect, R=
 ectWithSize_scalar local_prim_rect, RectWithSize_scalar local_clip_rect, ve=
 c4_scalar clip_edge_mask, float z, Transform_scalar transform, PictureTask_=
 scalar task) {
  RectWithEndpoint_scalar clip_rect =3D to_rect_with_endpoint(local_clip_rec=
 t);
  RectWithEndpoint_scalar segment_rect =3D to_rect_with_endpoint(local_segme=
 nt_rect);
  (segment_rect).p0 =3D clamp((segment_rect).p0, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  (segment_rect).p1 =3D clamp((segment_rect).p1, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  RectWithEndpoint_scalar prim_rect =3D to_rect_with_endpoint(local_prim_rec=
 t);
  (prim_rect).p0 =3D clamp((prim_rect).p0, (clip_rect).p0, (clip_rect).p1);
  (prim_rect).p1 =3D clamp((prim_rect).p1, (clip_rect).p0, (clip_rect).p1);
  float extrude_amount =3D 2.f;
  vec4_scalar extrude_distance =3D (make_vec4(extrude_amount))*(clip_edge_ma=
 sk);
  (local_segment_rect).p0 -=3D (extrude_distance).sel(X, Y);
  (local_segment_rect).size +=3D ((extrude_distance).sel(X, Y))+((extrude_di=
 stance).sel(Z, W));
  vec2 local_pos =3D ((local_segment_rect).p0)+(((local_segment_rect).size)*=
 ((aPosition).sel(X, Y)));
  vec2_scalar task_offset =3D ((((task).common_data).task_rect).p0)-((task).=
 content_origin);
  vec4 world_pos =3D ((transform).m)*(make_vec4(local_pos, 0.f, 1.f));
  vec4 final_pos =3D make_vec4((((world_pos).sel(X, Y))*((task).device_pixel=
 _scale))+((task_offset)*((world_pos).sel(W))), (z)*((world_pos).sel(W)), (w=
 orld_pos).sel(W));
  gl_Position =3D (uTransform)*(final_pos);
  init_transform_vs(mix(make_vec4((prim_rect).p0, (prim_rect).p1), make_vec4=
 ((segment_rect).p0, (segment_rect).p1), clip_edge_mask));
  VertexInfo vi =3D VertexInfo(local_pos, world_pos);
  return vi;
 }
 ConicGradient_scalar fetch_gradient(int32_t address) {
  Array<vec4_scalar,2> data =3D fetch_from_gpu_cache_2(address);
  return ConicGradient_scalar((data[0]).sel(X, Y), (data[0]).sel(Z, W), make=
 _float((data[1]).sel(X)), make_int((data[1]).sel(Y)), (data[1]).sel(Z, W));
 }
 void conic_gradient_brush_vs(VertexInfo vi, int32_t prim_address, RectWithS=
 ize_scalar local_rect, RectWithSize_scalar segment_rect, ivec4_scalar prim_=
 user_data, int32_t specific_resource_address, mat4_scalar transform, Pictur=
 eTask_scalar pic_task, int32_t brush_flags, vec4_scalar texel_rect) {
  ConicGradient_scalar gradient =3D fetch_gradient(prim_address);
  if (((brush_flags)&(2))!=3D(0)) {
   {
    (varying_vec4_0).lsel(Z, W) =3D (((vi).local_pos)-((segment_rect).p0))/(=
 (segment_rect).size);
    (varying_vec4_0).lsel(Z, W) =3D (((varying_vec4_0).sel(Z, W))*(((texel_r=
 ect).sel(Z, W))-((texel_rect).sel(X, Y))))+((texel_rect).sel(X, Y));
    (varying_vec4_0).lsel(Z, W) =3D ((varying_vec4_0).sel(Z, W))*((local_rec=
 t).size);
   }
  } else  {
   (varying_vec4_0).lsel(Z, W) =3D ((vi).local_pos)-((local_rect).p0);
  }
  (flat_varying_vec4_0).lsel(X, Y) =3D (gradient).center_point;
  (flat_varying_vec4_1).sel(W) =3D (gradient).angle;
  (flat_varying_vec4_0).sel(Z) =3D ((gradient).start_end_offset).sel(X);
  (flat_varying_vec4_0).sel(W) =3D ((gradient).start_end_offset).sel(Y);
  vec2_scalar tile_repeat =3D ((local_rect).size)/((gradient).stretch_size);
  (flat_varying_vec4_1).lsel(X, Y) =3D (gradient).stretch_size;
  flat_varying_highp_int_address_0 =3D (prim_user_data).sel(X);
  (flat_varying_vec4_1).sel(Z) =3D make_float(((gradient).extend_mode)!=3D(0=
 ));
 }
 void brush_shader_main_vs(Instance_scalar instance, PrimitiveHeader_scalar =
 ph, Transform_scalar transform, PictureTask_scalar pic_task, ClipArea_scala=
 r clip_area) {
  int32_t edge_flags =3D ((instance).flags)&(255);
  int32_t brush_flags =3D (((instance).flags)>>(8))&(255);
  vec4_scalar segment_data;
  RectWithSize_scalar segment_rect;
  if (((instance).segment_index)=3D=3D(65535)) {
   {
    segment_rect =3D (ph).local_rect;
    segment_data =3D make_vec4(0.f);
   }
  } else  {
   int32_t segment_address =3D (((ph).specific_prim_address)+(2))+(((instanc=
 e).segment_index)*(2));
   Array<vec4_scalar,2> segment_info =3D fetch_from_gpu_cache_2(segment_addr=
 ess);
   segment_rect =3D RectWithSize_scalar((segment_info[0]).sel(X, Y), (segmen=
 t_info[0]).sel(Z, W));
   (segment_rect).p0 +=3D ((ph).local_rect).p0;
   segment_data =3D segment_info[1];
  }
  VertexInfo vi;
  if ((transform).is_axis_aligned) {
   {
    vec2 local_pos =3D ((segment_rect).p0)+(((segment_rect).size)*((aPositio=
 n).sel(X, Y)));
    vi =3D write_vertex(local_pos, (ph).local_clip_rect, (ph).z, transform, =
 pic_task);
   }
  } else  {
   bvec4_scalar edge_mask =3D notEqual((edge_flags)&(make_ivec4(1, 2, 4, 8))=
 , make_ivec4(0));
   vi =3D write_transform_vertex(segment_rect, (ph).local_rect, (ph).local_c=
 lip_rect, mix(make_vec4(0.f), make_vec4(1.f), edge_mask), (ph).z, transform=
 , pic_task);
  }
  conic_gradient_brush_vs(vi, (ph).specific_prim_address, (ph).local_rect, s=
 egment_rect, (ph).user_data, (instance).resource_address, (transform).m, pi=
 c_task, brush_flags, segment_data);
 }
 ALWAYS_INLINE void main(void) {
  Instance_scalar instance =3D decode_instance_attributes();
  PrimitiveHeader_scalar ph =3D fetch_prim_header((instance).prim_header_add=
 ress);
  Transform_scalar transform =3D fetch_transform((ph).transform_id);
  PictureTask_scalar task =3D fetch_picture_task((instance).picture_task_add=
 ress);
  ClipArea_scalar clip_area =3D fetch_clip_area((instance).clip_address);
  brush_shader_main_vs(instance, ph, transform, task, clip_area);
 }
 static void set_uniform_1i(Self *self, int index, int value) {
  if (self->samplers.set_slot(index, value)) return;
  switch (index) {
  case 2:
   assert(0); // sGpuCache
   break;
  case 7:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_4fv(Self *self, int index, const float *value) {
  switch (index) {
  case 2:
   assert(0); // sGpuCache
   break;
  case 7:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_matrix4fv(Self *self, int index, const float *value=
 ) {
  switch (index) {
  case 2:
   assert(0); // sGpuCache
   break;
  case 7:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   self->uTransform =3D mat4_scalar::load_from_ptr(value);
   break;
  }
 }
 static void load_attribs(Self *self, VertexAttrib *attribs, uint32_t start,=
  int instance, int count) {
  load_attrib(self->aPosition, attribs[self->attrib_locations.aPosition], st=
 art, instance, count);
  load_flat_attrib(self->aData, attribs[self->attrib_locations.aData], start=
 , instance, count);
 }
 public:
 struct InterpOutputs {
 vec4_scalar vClipMaskUv;
 vec4_scalar varying_vec4_0;
 };
 private:
 ALWAYS_INLINE void store_interp_outputs(char* dest_ptr, size_t stride) {
   for(int n =3D 0; n < 4; n++) {
     auto* dest =3D reinterpret_cast<InterpOutputs*>(dest_ptr);
     dest->vClipMaskUv =3D get_nth(vClipMaskUv, n);
     dest->varying_vec4_0 =3D get_nth(varying_vec4_0, n);
     dest_ptr +=3D stride;
   }
 }
 static void run(Self* self, char* interps, size_t interp_stride) {
  self->main();
  self->store_interp_outputs(interps, interp_stride);
 }
 static void init_batch(Self *self) { self->bind_textures(); }
 public:
 brush_conic_gradient_vert() {
  set_uniform_1i_func =3D (SetUniform1iFunc)&set_uniform_1i;
  set_uniform_4fv_func =3D (SetUniform4fvFunc)&set_uniform_4fv;
  set_uniform_matrix4fv_func =3D (SetUniformMatrix4fvFunc)&set_uniform_matri=
 x4fv;
  init_batch_func =3D (InitBatchFunc)&init_batch;
  load_attribs_func =3D (LoadAttribsFunc)&load_attribs;
  run_primitive_func =3D (RunPrimitiveFunc)&run;
 }
 };


 struct brush_conic_gradient_frag : FragmentShaderImpl, brush_conic_gradient=
 _vert {
 private:
 typedef brush_conic_gradient_frag Self;
 #define oFragColor gl_FragColor
 // vec4 oFragColor;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sGpuCache;
 // vec4_scalar vTransformBounds;
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 struct Fragment_scalar {
 vec4_scalar color;
 Fragment_scalar() =3D default;
 explicit Fragment_scalar(vec4_scalar color) : color(color){}
 };
 struct Fragment {
 vec4 color;
 Fragment() =3D default;
 explicit Fragment(vec4 color) : color(color){}
 explicit Fragment(vec4_scalar color):color(color){
 }
 IMPLICIT Fragment(Fragment_scalar s):color(s.color){
 }
 friend Fragment if_then_else(I32 c, Fragment t, Fragment e) { return Fragme=
 nt(
 if_then_else(c, t.color, e.color));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 ivec2 get_gpu_cache_uv(I32 address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4,2> fetch_from_gpu_cache_2(I32 address) {
  ivec2 uv =3D get_gpu_cache_uv(address);
  I32 sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, 0);
  return Array<vec4,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 0=
 , 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec4 dither(vec4 color) {
  return color;
 }
 vec4 sample_gradient(int32_t address, Float offset, float gradient_repeat) {
  Float x =3D (offset)-((floor(offset))*(gradient_repeat));
  float const GRADIENT_ENTRIES =3D 128.f;
  x =3D clamp((1.f)+((x)*(GRADIENT_ENTRIES)), 0.f, (1.f)+(GRADIENT_ENTRIES));
  Float entry_index =3D floor(x);
  Float entry_fract =3D (x)-(entry_index);
  Array<vec4,2> texels =3D fetch_from_gpu_cache_2((address)+((2)*(make_int(e=
 ntry_index))));
  return dither(mix(texels[0], texels[1], entry_fract));
 }
 Fragment conic_gradient_brush_fs() {
  vec2 pos =3D mod((varying_vec4_0).sel(Z, W), (flat_varying_vec4_1).sel(X, =
 Y));
  vec2 current_dir =3D (pos)-((flat_varying_vec4_0).sel(X, Y));
  Float current_angle =3D (atan((current_dir).sel(Y), (current_dir).sel(X)))=
 +(((3.141592653589793f)/(2.f))-((flat_varying_vec4_1).sel(W)));
  Float offset =3D (mod((current_angle)/((2.f)*(3.141592653589793f)), 1.f))-=
 ((flat_varying_vec4_0).sel(Z));
  offset =3D (offset)/(((flat_varying_vec4_0).sel(W))-((flat_varying_vec4_0)=
 =2Esel(Z)));
  vec4 color =3D sample_gradient(flat_varying_highp_int_address_0, offset, (=
 flat_varying_vec4_1).sel(Z));
  return Fragment(color);
 }
 void write_output(vec4 color) {
  oFragColor =3D color;
 }
 ALWAYS_INLINE void main(void) {
  Fragment frag =3D conic_gradient_brush_fs();
  write_output((frag).color);
 }
 typedef brush_conic_gradient_vert::InterpOutputs InterpInputs;
 InterpInputs interp_step;
 struct InterpPerspective {
 vec4 varying_vec4_0;
 };
 InterpPerspective interp_perspective;
 static void read_interp_inputs(Self *self, const InterpInputs *init, const =
 InterpInputs *step, float step_width) {
   self->varying_vec4_0 =3D init_interp(init->varying_vec4_0, step->varying_=
 vec4_0);
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 static void read_perspective_inputs(Self *self, const InterpInputs *init, c=
 onst InterpInputs *step, float step_width) {
   Float w =3D 1.0f / self->gl_FragCoord.w;
   self->interp_perspective.varying_vec4_0 =3D init_interp(init->varying_vec=
 4_0, step->varying_vec4_0);
   self->varying_vec4_0 =3D self->interp_perspective.varying_vec4_0 * w;
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 ALWAYS_INLINE void step_interp_inputs() {
   varying_vec4_0 +=3D interp_step.varying_vec4_0;
 }
 ALWAYS_INLINE void step_perspective_inputs() {
   step_perspective();
   Float w =3D 1.0f / gl_FragCoord.w;
   interp_perspective.varying_vec4_0 +=3D interp_step.varying_vec4_0;
   varying_vec4_0 =3D w * interp_perspective.varying_vec4_0;
 }
 static void run(Self *self) {
  self->main();
  self->step_interp_inputs();
 }
 static void skip(Self* self, int chunks) {
  self->step_interp_inputs();
  while (--chunks > 0) self->step_interp_inputs();
 }
 static void run_perspective(Self *self) {
  self->main();
  self->step_perspective_inputs();
 }
 static void skip_perspective(Self* self, int chunks) {
  self->step_perspective_inputs();
  while (--chunks > 0) self->step_perspective_inputs();
 }
 public:
 brush_conic_gradient_frag() {
  init_span_func =3D (InitSpanFunc)&read_interp_inputs;
  run_func =3D (RunFunc)&run;
  skip_func =3D (SkipFunc)&skip;
  enable_perspective();
  init_span_w_func =3D (InitSpanWFunc)&read_perspective_inputs;
  run_w_func =3D (RunWFunc)&run_perspective;
  skip_w_func =3D (SkipWFunc)&skip_perspective;
 }
 };

 struct brush_conic_gradient_program : ProgramImpl, brush_conic_gradient_fra=
 g {
 int get_uniform(const char *name) const override {
  if (strcmp("sGpuCache", name) =3D=3D 0) { return 2; }
  if (strcmp("sPrevPassAlpha", name) =3D=3D 0) { return 7; }
  if (strcmp("sPrimitiveHeadersF", name) =3D=3D 0) { return 4; }
  if (strcmp("sPrimitiveHeadersI", name) =3D=3D 0) { return 5; }
  if (strcmp("sRenderTasks", name) =3D=3D 0) { return 1; }
  if (strcmp("sTransformPalette", name) =3D=3D 0) { return 3; }
  if (strcmp("uTransform", name) =3D=3D 0) { return 6; }
  return -1;
 }
 void bind_attrib(const char* name, int index) override {
  attrib_locations.bind_loc(name, index);
 }
 int get_attrib(const char* name) const override {
  return attrib_locations.get_loc(name);
 }
 size_t interpolants_size() const override { return sizeof(InterpOutputs); }
 VertexShaderImpl* get_vertex_shader() override {
  return this;
 }
 FragmentShaderImpl* get_fragment_shader() override {
  return this;
 }
 static ProgramImpl* loader() { return new brush_conic_gradient_program; }
 };

 # 5 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "brush_conic_gradient_ALPHA_PASS.h"
 #endif /* expanded by -frewrite-includes */
 # 5 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/brush_conic_gradient_ALPHA_PASS.h" 1
 struct brush_conic_gradient_ALPHA_PASS_common {
 struct Samplers {
  sampler2D_impl sGpuCache_impl;
  int sGpuCache_slot;
  sampler2DArray_impl sPrevPassAlpha_impl;
  int sPrevPassAlpha_slot;
  sampler2D_impl sPrimitiveHeadersF_impl;
  int sPrimitiveHeadersF_slot;
  isampler2D_impl sPrimitiveHeadersI_impl;
  int sPrimitiveHeadersI_slot;
  sampler2D_impl sRenderTasks_impl;
  int sRenderTasks_slot;
  sampler2D_impl sTransformPalette_impl;
  int sTransformPalette_slot;
  bool set_slot(int index, int value) {
   switch (index) {
   case 2:
    sGpuCache_slot =3D value;
    return true;
   case 7:
    sPrevPassAlpha_slot =3D value;
    return true;
   case 4:
    sPrimitiveHeadersF_slot =3D value;
    return true;
   case 5:
    sPrimitiveHeadersI_slot =3D value;
    return true;
   case 1:
    sRenderTasks_slot =3D value;
    return true;
   case 3:
    sTransformPalette_slot =3D value;
    return true;
   }
   return false;
  }
 } samplers;
 struct AttribLocations {
  int aPosition =3D NULL_ATTRIB;
  int aData =3D NULL_ATTRIB;
  void bind_loc(const char* name, int index) {
   if (strcmp("aPosition", name) =3D=3D 0) { aPosition =3D index; return; }
   if (strcmp("aData", name) =3D=3D 0) { aData =3D index; return; }
  }
  int get_loc(const char* name) const {
   if (strcmp("aPosition", name) =3D=3D 0) { return aPosition !=3D NULL_ATTR=
 IB ? aPosition : -1; }
   if (strcmp("aData", name) =3D=3D 0) { return aData !=3D NULL_ATTRIB ? aDa=
 ta : -1; }
   return -1;
  }
 } attrib_locations;
 vec4_scalar vTransformBounds;
 vec4_scalar vClipMaskUvBounds;
 vec4_scalar flat_varying_vec4_0;
 vec4_scalar flat_varying_vec4_1;
 vec4_scalar flat_varying_vec4_2;
 int32_t flat_varying_highp_int_address_0;
 sampler2D sGpuCache;
 sampler2DArray sPrevPassAlpha;
 sampler2D sPrimitiveHeadersF;
 isampler2D sPrimitiveHeadersI;
 sampler2D sRenderTasks;
 sampler2D sTransformPalette;
 mat4_scalar uTransform;
 void bind_textures() {
  sGpuCache =3D lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_=
 slot);
  sPrevPassAlpha =3D lookup_sampler_array(&samplers.sPrevPassAlpha_impl, sam=
 plers.sPrevPassAlpha_slot);
  sPrimitiveHeadersF =3D lookup_sampler(&samplers.sPrimitiveHeadersF_impl, s=
 amplers.sPrimitiveHeadersF_slot);
  sPrimitiveHeadersI =3D lookup_isampler(&samplers.sPrimitiveHeadersI_impl, =
 samplers.sPrimitiveHeadersI_slot);
  sRenderTasks =3D lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRen=
 derTasks_slot);
  sTransformPalette =3D lookup_sampler(&samplers.sTransformPalette_impl, sam=
 plers.sTransformPalette_slot);
 }
 };
 struct brush_conic_gradient_ALPHA_PASS_vert : VertexShaderImpl, brush_conic=
 _gradient_ALPHA_PASS_common {
 private:
 typedef brush_conic_gradient_ALPHA_PASS_vert Self;
 // int32_t uMode;
 // mat4_scalar uTransform;
 vec2 aPosition;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sRenderTasks;
 struct RenderTaskCommonData_scalar {
 RectWithSize_scalar task_rect;
 float texture_layer_index;
 RenderTaskCommonData_scalar() =3D default;
 RenderTaskCommonData_scalar(RectWithSize_scalar task_rect, float texture_la=
 yer_index) : task_rect(task_rect), texture_layer_index(texture_layer_index)=
 {}
 };
 struct RenderTaskCommonData {
 RectWithSize task_rect;
 Float texture_layer_index;
 RenderTaskCommonData() =3D default;
 RenderTaskCommonData(RectWithSize task_rect, Float texture_layer_index) : t=
 ask_rect(task_rect), texture_layer_index(texture_layer_index){}
 RenderTaskCommonData(RectWithSize_scalar task_rect, float texture_layer_ind=
 ex):task_rect(task_rect),texture_layer_index(texture_layer_index){
 }
 IMPLICIT RenderTaskCommonData(RenderTaskCommonData_scalar s):task_rect(s.ta=
 sk_rect),texture_layer_index(s.texture_layer_index){
 }
 friend RenderTaskCommonData if_then_else(I32 c, RenderTaskCommonData t, Ren=
 derTaskCommonData e) { return RenderTaskCommonData(
 if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.texture_layer_=
 index, e.texture_layer_index));
 }};
 struct RenderTaskData_scalar {
 RenderTaskCommonData_scalar common_data;
 vec3_scalar user_data;
 RenderTaskData_scalar() =3D default;
 RenderTaskData_scalar(RenderTaskCommonData_scalar common_data, vec3_scalar =
 user_data) : common_data(common_data), user_data(user_data){}
 };
 struct RenderTaskData {
 RenderTaskCommonData common_data;
 vec3 user_data;
 RenderTaskData() =3D default;
 RenderTaskData(RenderTaskCommonData common_data, vec3 user_data) : common_d=
 ata(common_data), user_data(user_data){}
 RenderTaskData(RenderTaskCommonData_scalar common_data, vec3_scalar user_da=
 ta):common_data(common_data),user_data(user_data){
 }
 IMPLICIT RenderTaskData(RenderTaskData_scalar s):common_data(s.common_data)=
 ,user_data(s.user_data){
 }
 friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData =
 e) { return RenderTaskData(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.user_data,=
  e.user_data));
 }};
 struct PictureTask_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar content_origin;
 PictureTask_scalar() =3D default;
 PictureTask_scalar(RenderTaskCommonData_scalar common_data, float device_pi=
 xel_scale, vec2_scalar content_origin) : common_data(common_data), device_p=
 ixel_scale(device_pixel_scale), content_origin(content_origin){}
 };
 struct PictureTask {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 content_origin;
 PictureTask() =3D default;
 PictureTask(RenderTaskCommonData common_data, Float device_pixel_scale, vec=
 2 content_origin) : common_data(common_data), device_pixel_scale(device_pix=
 el_scale), content_origin(content_origin){}
 PictureTask(RenderTaskCommonData_scalar common_data, float device_pixel_sca=
 le, vec2_scalar content_origin):common_data(common_data),device_pixel_scale=
 (device_pixel_scale),content_origin(content_origin){
 }
 IMPLICIT PictureTask(PictureTask_scalar s):common_data(s.common_data),devic=
 e_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
 }
 friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { retu=
 rn PictureTask(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.conten=
 t_origin));
 }};
 struct ClipArea_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar screen_origin;
 ClipArea_scalar() =3D default;
 ClipArea_scalar(RenderTaskCommonData_scalar common_data, float device_pixel=
 _scale, vec2_scalar screen_origin) : common_data(common_data), device_pixel=
 _scale(device_pixel_scale), screen_origin(screen_origin){}
 };
 struct ClipArea {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 screen_origin;
 ClipArea() =3D default;
 ClipArea(RenderTaskCommonData common_data, Float device_pixel_scale, vec2 s=
 creen_origin) : common_data(common_data), device_pixel_scale(device_pixel_s=
 cale), screen_origin(screen_origin){}
 ClipArea(RenderTaskCommonData_scalar common_data, float device_pixel_scale,=
  vec2_scalar screen_origin):common_data(common_data),device_pixel_scale(dev=
 ice_pixel_scale),screen_origin(screen_origin){
 }
 IMPLICIT ClipArea(ClipArea_scalar s):common_data(s.common_data),device_pixe=
 l_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
 }
 friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipAr=
 ea(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_=
 origin));
 }};
 // sampler2D sGpuCache;
 struct ImageResource_scalar {
 RectWithEndpoint_scalar uv_rect;
 float layer;
 vec3_scalar user_data;
 ImageResource_scalar() =3D default;
 ImageResource_scalar(RectWithEndpoint_scalar uv_rect, float layer, vec3_sca=
 lar user_data) : uv_rect(uv_rect), layer(layer), user_data(user_data){}
 };
 struct ImageResource {
 RectWithEndpoint uv_rect;
 Float layer;
 vec3 user_data;
 ImageResource() =3D default;
 ImageResource(RectWithEndpoint uv_rect, Float layer, vec3 user_data) : uv_r=
 ect(uv_rect), layer(layer), user_data(user_data){}
 ImageResource(RectWithEndpoint_scalar uv_rect, float layer, vec3_scalar use=
 r_data):uv_rect(uv_rect),layer(layer),user_data(user_data){
 }
 IMPLICIT ImageResource(ImageResource_scalar s):uv_rect(s.uv_rect),layer(s.l=
 ayer),user_data(s.user_data){
 }
 friend ImageResource if_then_else(I32 c, ImageResource t, ImageResource e) =
 { return ImageResource(
 if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.layer, e.layer), i=
 f_then_else(c, t.user_data, e.user_data));
 }};
 struct ImageResourceExtra_scalar {
 vec4_scalar st_tl;
 vec4_scalar st_tr;
 vec4_scalar st_bl;
 vec4_scalar st_br;
 ImageResourceExtra_scalar() =3D default;
 ImageResourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar=
  st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_b=
 r(st_br){}
 };
 struct ImageResourceExtra {
 vec4 st_tl;
 vec4 st_tr;
 vec4 st_bl;
 vec4 st_br;
 ImageResourceExtra() =3D default;
 ImageResourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(=
 st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
 ImageResourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl,=
  vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
 }
 IMPLICIT ImageResourceExtra(ImageResourceExtra_scalar s):st_tl(s.st_tl),st_=
 tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
 }
 friend ImageResourceExtra if_then_else(I32 c, ImageResourceExtra t, ImageRe=
 sourceExtra e) { return ImageResourceExtra(
 if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_th=
 en_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
 }};
 // vec4_scalar vTransformBounds;
 // sampler2D sTransformPalette;
 struct Transform_scalar {
 mat4_scalar m;
 mat4_scalar inv_m;
 bool is_axis_aligned;
 Transform_scalar() =3D default;
 Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : =
 m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
 };
 struct Transform {
 mat4 m;
 mat4 inv_m;
 Bool is_axis_aligned;
 Transform() =3D default;
 Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), i=
 s_axis_aligned(is_axis_aligned){}
 Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_=
 m(inv_m),is_axis_aligned(is_axis_aligned){
 }
 IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligne=
 d(s.is_axis_aligned){
 }
 friend Transform if_then_else(I32 c, Transform t, Transform e) { return Tra=
 nsform(
 if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(=
 c, t.is_axis_aligned, e.is_axis_aligned));
 }};
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 // sampler2D sPrimitiveHeadersF;
 // isampler2D sPrimitiveHeadersI;
 ivec4_scalar aData;
 struct Instance_scalar {
 int32_t prim_header_address;
 int32_t picture_task_address;
 int32_t clip_address;
 int32_t segment_index;
 int32_t flags;
 int32_t resource_address;
 int32_t brush_kind;
 Instance_scalar() =3D default;
 Instance_scalar(int32_t prim_header_address, int32_t picture_task_address, =
 int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resourc=
 e_address, int32_t brush_kind) : prim_header_address(prim_header_address), =
 picture_task_address(picture_task_address), clip_address(clip_address), seg=
 ment_index(segment_index), flags(flags), resource_address(resource_address)=
 , brush_kind(brush_kind){}
 };
 struct Instance {
 I32 prim_header_address;
 I32 picture_task_address;
 I32 clip_address;
 I32 segment_index;
 I32 flags;
 I32 resource_address;
 I32 brush_kind;
 Instance() =3D default;
 Instance(I32 prim_header_address, I32 picture_task_address, I32 clip_addres=
 s, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : pr=
 im_header_address(prim_header_address), picture_task_address(picture_task_a=
 ddress), clip_address(clip_address), segment_index(segment_index), flags(fl=
 ags), resource_address(resource_address), brush_kind(brush_kind){}
 Instance(int32_t prim_header_address, int32_t picture_task_address, int32_t=
  clip_address, int32_t segment_index, int32_t flags, int32_t resource_addre=
 ss, int32_t brush_kind):prim_header_address(prim_header_address),picture_ta=
 sk_address(picture_task_address),clip_address(clip_address),segment_index(s=
 egment_index),flags(flags),resource_address(resource_address),brush_kind(br=
 ush_kind){
 }
 IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_addr=
 ess),picture_task_address(s.picture_task_address),clip_address(s.clip_addre=
 ss),segment_index(s.segment_index),flags(s.flags),resource_address(s.resour=
 ce_address),brush_kind(s.brush_kind){
 }
 friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instan=
 ce(
 if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else=
 (c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.clip=
 _address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index=
 ), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e=
 =2Eresource_address), if_then_else(c, t.brush_kind, e.brush_kind));
 }};
 struct PrimitiveHeader_scalar {
 RectWithSize_scalar local_rect;
 RectWithSize_scalar local_clip_rect;
 float z;
 int32_t specific_prim_address;
 int32_t transform_id;
 ivec4_scalar user_data;
 PrimitiveHeader_scalar() =3D default;
 PrimitiveHeader_scalar(RectWithSize_scalar local_rect, RectWithSize_scalar =
 local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_=
 id, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local=
 _clip_rect), z(z), specific_prim_address(specific_prim_address), transform_=
 id(transform_id), user_data(user_data){}
 };
 struct PrimitiveHeader {
 RectWithSize local_rect;
 RectWithSize local_clip_rect;
 Float z;
 I32 specific_prim_address;
 I32 transform_id;
 ivec4 user_data;
 PrimitiveHeader() =3D default;
 PrimitiveHeader(RectWithSize local_rect, RectWithSize local_clip_rect, Floa=
 t z, I32 specific_prim_address, I32 transform_id, ivec4 user_data) : local_=
 rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_add=
 ress(specific_prim_address), transform_id(transform_id), user_data(user_dat=
 a){}
 PrimitiveHeader(RectWithSize_scalar local_rect, RectWithSize_scalar local_c=
 lip_rect, float z, int32_t specific_prim_address, int32_t transform_id, ive=
 c4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect=
 ),z(z),specific_prim_address(specific_prim_address),transform_id(transform_=
 id),user_data(user_data){
 }
 IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect)=
 ,local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific=
 _prim_address),transform_id(s.transform_id),user_data(s.user_data){
 }
 friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHead=
 er e) { return PrimitiveHeader(
 if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_r=
 ect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.speci=
 fic_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id,=
  e.transform_id), if_then_else(c, t.user_data, e.user_data));
 }};
 struct VertexInfo_scalar {
 vec2_scalar local_pos;
 vec4_scalar world_pos;
 VertexInfo_scalar() =3D default;
 VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos=
 (local_pos), world_pos(world_pos){}
 };
 struct VertexInfo {
 vec2 local_pos;
 vec4 world_pos;
 VertexInfo() =3D default;
 VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_po=
 s(world_pos){}
 VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_po=
 s),world_pos(world_pos){
 }
 IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s=
 =2Eworld_pos){
 }
 friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return =
 VertexInfo(
 if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.w=
 orld_pos));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 struct ConicGradient_scalar {
 vec2_scalar center_point;
 vec2_scalar start_end_offset;
 float angle;
 int32_t extend_mode;
 vec2_scalar stretch_size;
 ConicGradient_scalar() =3D default;
 ConicGradient_scalar(vec2_scalar center_point, vec2_scalar start_end_offset=
 , float angle, int32_t extend_mode, vec2_scalar stretch_size) : center_poin=
 t(center_point), start_end_offset(start_end_offset), angle(angle), extend_m=
 ode(extend_mode), stretch_size(stretch_size){}
 };
 struct ConicGradient {
 vec2 center_point;
 vec2 start_end_offset;
 Float angle;
 I32 extend_mode;
 vec2 stretch_size;
 ConicGradient() =3D default;
 ConicGradient(vec2 center_point, vec2 start_end_offset, Float angle, I32 ex=
 tend_mode, vec2 stretch_size) : center_point(center_point), start_end_offse=
 t(start_end_offset), angle(angle), extend_mode(extend_mode), stretch_size(s=
 tretch_size){}
 ConicGradient(vec2_scalar center_point, vec2_scalar start_end_offset, float=
  angle, int32_t extend_mode, vec2_scalar stretch_size):center_point(center_=
 point),start_end_offset(start_end_offset),angle(angle),extend_mode(extend_m=
 ode),stretch_size(stretch_size){
 }
 IMPLICIT ConicGradient(ConicGradient_scalar s):center_point(s.center_point)=
 ,start_end_offset(s.start_end_offset),angle(s.angle),extend_mode(s.extend_m=
 ode),stretch_size(s.stretch_size){
 }
 friend ConicGradient if_then_else(I32 c, ConicGradient t, ConicGradient e) =
 { return ConicGradient(
 if_then_else(c, t.center_point, e.center_point), if_then_else(c, t.start_en=
 d_offset, e.start_end_offset), if_then_else(c, t.angle, e.angle), if_then_e=
 lse(c, t.extend_mode, e.extend_mode), if_then_else(c, t.stretch_size, e.str=
 etch_size));
 }};
 Instance_scalar decode_instance_attributes() {
  Instance_scalar instance;
  (instance).prim_header_address =3D (aData).sel(X);
  (instance).picture_task_address =3D ((aData).sel(Y))>>(16);
  (instance).clip_address =3D ((aData).sel(Y))&(65535);
  (instance).segment_index =3D ((aData).sel(Z))&(65535);
  (instance).flags =3D ((aData).sel(Z))>>(16);
  (instance).resource_address =3D ((aData).sel(W))&(16777215);
  (instance).brush_kind =3D ((aData).sel(W))>>(24);
  return instance;
 }
 PrimitiveHeader_scalar fetch_prim_header(int32_t index) {
  PrimitiveHeader_scalar ph;
  ivec2_scalar uv_f =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sPrimitiveHeadersF_uv_f_fetch =3D texelFetchPtr(sPrimitiveHea=
 dersF, uv_f, 0, 1, 0, 0);
  vec4_scalar local_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sPrimit=
 iveHeadersF_uv_f_fetch, 0, 0);
  vec4_scalar local_clip_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sP=
 rimitiveHeadersF_uv_f_fetch, 1, 0);
  (ph).local_rect =3D RectWithSize_scalar((local_rect).sel(X, Y), (local_rec=
 t).sel(Z, W));
  (ph).local_clip_rect =3D RectWithSize_scalar((local_clip_rect).sel(X, Y), =
 (local_clip_rect).sel(Z, W));
  ivec2_scalar uv_i =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  ivec4_scalar* sPrimitiveHeadersI_uv_i_fetch =3D texelFetchPtr(sPrimitiveHe=
 adersI, uv_i, 0, 1, 0, 0);
  ivec4_scalar data0 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 0, 0);
  ivec4_scalar data1 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 1, 0);
  (ph).z =3D make_float((data0).sel(X));
  (ph).specific_prim_address =3D (data0).sel(Y);
  (ph).transform_id =3D (data0).sel(Z);
  (ph).user_data =3D data1;
  return ph;
 }
 Transform_scalar fetch_transform(int32_t id) {
  Transform_scalar transform;
  (transform).is_axis_aligned =3D ((id)>>(24))=3D=3D(0);
  int32_t index =3D (id)&(16777215);
  ivec2_scalar uv =3D make_ivec2(make_int((8u)*((make_uint(index))%((1024u)/=
 (8u)))), make_int((make_uint(index))/((1024u)/(8u))));
  ivec2_scalar uv0 =3D make_ivec2(((uv).sel(X))+(0), (uv).sel(Y));
  vec4_scalar* sTransformPalette_uv0_fetch =3D texelFetchPtr(sTransformPalet=
 te, uv0, 0, 7, 0, 0);
  (transform).m[0] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 0, 0);
  (transform).m[1] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 1, 0);
  (transform).m[2] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 2, 0);
  (transform).m[3] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 3, 0);
  (transform).inv_m[0] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 4, 0);
  (transform).inv_m[1] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 5, 0);
  (transform).inv_m[2] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 6, 0);
  (transform).inv_m[3] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 7, 0);
  return transform;
 }
 RenderTaskData_scalar fetch_render_task_data(int32_t index) {
  ivec2_scalar uv =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/=
 (2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sRenderTasks_uv_fetch =3D texelFetchPtr(sRenderTasks, uv, 0, =
 1, 0, 0);
  vec4_scalar texel0 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 0, 0);
  vec4_scalar texel1 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 1, 0);
  RectWithSize_scalar task_rect =3D RectWithSize_scalar((texel0).sel(X, Y), =
 (texel0).sel(Z, W));
  RenderTaskCommonData_scalar common_data =3D RenderTaskCommonData_scalar(ta=
 sk_rect, (texel1).sel(X));
  RenderTaskData_scalar data =3D RenderTaskData_scalar(common_data, (texel1)=
 =2Esel(Y, Z, W));
  return data;
 }
 PictureTask_scalar fetch_picture_task(int32_t address) {
  RenderTaskData_scalar task_data =3D fetch_render_task_data(address);
  PictureTask_scalar task =3D PictureTask_scalar((task_data).common_data, ((=
 task_data).user_data).sel(X), ((task_data).user_data).sel(Y, Z));
  return task;
 }
 ClipArea_scalar fetch_clip_area(int32_t index) {
  ClipArea_scalar area;
  if ((index)>=3D(32767)) {
   {
    RectWithSize_scalar rect =3D RectWithSize_scalar(make_vec2(0.f), make_ve=
 c2(0.f));
    (area).common_data =3D RenderTaskCommonData_scalar(rect, 0.f);
    (area).device_pixel_scale =3D 0.f;
    (area).screen_origin =3D make_vec2(0.f);
   }
  } else  {
   RenderTaskData_scalar task_data =3D fetch_render_task_data(index);
   (area).common_data =3D (task_data).common_data;
   (area).device_pixel_scale =3D ((task_data).user_data).sel(X);
   (area).screen_origin =3D ((task_data).user_data).sel(Y, Z);
  }
  return area;
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4_scalar,2> fetch_from_gpu_cache_2(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, =
 0);
  return Array<vec4_scalar,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec2 clamp_rect(vec2 pt, RectWithSize_scalar rect) {
  return clamp(pt, (rect).p0, ((rect).p0)+((rect).size));
 }
 VertexInfo write_vertex(vec2 local_pos, RectWithSize_scalar local_clip_rect=
 , float z, Transform_scalar transform, PictureTask_scalar task) {
  vec2 clamped_local_pos =3D clamp_rect(local_pos, local_clip_rect);
  vec4 world_pos =3D ((transform).m)*(make_vec4(clamped_local_pos, 0.f, 1.f)=
 );
  vec2 device_pos =3D ((world_pos).sel(X, Y))*((task).device_pixel_scale);
  vec2_scalar final_offset =3D (-((task).content_origin))+((((task).common_d=
 ata).task_rect).p0);
  gl_Position =3D (uTransform)*(make_vec4((device_pos)+((final_offset)*((wor=
 ld_pos).sel(W))), (z)*((world_pos).sel(W)), (world_pos).sel(W)));
  VertexInfo vi =3D VertexInfo(clamped_local_pos, world_pos);
  return vi;
 }
 void init_transform_vs(vec4_scalar local_bounds) {
  vTransformBounds =3D local_bounds;
 }
 RectWithEndpoint_scalar to_rect_with_endpoint(RectWithSize_scalar rect) {
  RectWithEndpoint_scalar result;
  (result).p0 =3D (rect).p0;
  (result).p1 =3D ((rect).p0)+((rect).size);
  return result;
 }
 VertexInfo write_transform_vertex(RectWithSize_scalar local_segment_rect, R=
 ectWithSize_scalar local_prim_rect, RectWithSize_scalar local_clip_rect, ve=
 c4_scalar clip_edge_mask, float z, Transform_scalar transform, PictureTask_=
 scalar task) {
  RectWithEndpoint_scalar clip_rect =3D to_rect_with_endpoint(local_clip_rec=
 t);
  RectWithEndpoint_scalar segment_rect =3D to_rect_with_endpoint(local_segme=
 nt_rect);
  (segment_rect).p0 =3D clamp((segment_rect).p0, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  (segment_rect).p1 =3D clamp((segment_rect).p1, (clip_rect).p0, (clip_rect)=
 =2Ep1);
  RectWithEndpoint_scalar prim_rect =3D to_rect_with_endpoint(local_prim_rec=
 t);
  (prim_rect).p0 =3D clamp((prim_rect).p0, (clip_rect).p0, (clip_rect).p1);
  (prim_rect).p1 =3D clamp((prim_rect).p1, (clip_rect).p0, (clip_rect).p1);
  float extrude_amount =3D 2.f;
  vec4_scalar extrude_distance =3D (make_vec4(extrude_amount))*(clip_edge_ma=
 sk);
  (local_segment_rect).p0 -=3D (extrude_distance).sel(X, Y);
  (local_segment_rect).size +=3D ((extrude_distance).sel(X, Y))+((extrude_di=
 stance).sel(Z, W));
  vec2 local_pos =3D ((local_segment_rect).p0)+(((local_segment_rect).size)*=
 ((aPosition).sel(X, Y)));
  vec2_scalar task_offset =3D ((((task).common_data).task_rect).p0)-((task).=
 content_origin);
  vec4 world_pos =3D ((transform).m)*(make_vec4(local_pos, 0.f, 1.f));
  vec4 final_pos =3D make_vec4((((world_pos).sel(X, Y))*((task).device_pixel=
 _scale))+((task_offset)*((world_pos).sel(W))), (z)*((world_pos).sel(W)), (w=
 orld_pos).sel(W));
  gl_Position =3D (uTransform)*(final_pos);
  init_transform_vs(mix(make_vec4((prim_rect).p0, (prim_rect).p1), make_vec4=
 ((segment_rect).p0, (segment_rect).p1), clip_edge_mask));
  VertexInfo vi =3D VertexInfo(local_pos, world_pos);
  return vi;
 }
 void write_clip(vec4 world_pos, ClipArea_scalar area) {
  vec2 uv =3D (((world_pos).sel(X, Y))*((area).device_pixel_scale))+(((world=
 _pos).sel(W))*(((((area).common_data).task_rect).p0)-((area).screen_origin)=
 ));
  vClipMaskUvBounds =3D make_vec4((((area).common_data).task_rect).p0, ((((a=
 rea).common_data).task_rect).p0)+((((area).common_data).task_rect).size));
  vClipMaskUv =3D make_vec4(uv, ((area).common_data).texture_layer_index, (w=
 orld_pos).sel(W));
 }
 ConicGradient_scalar fetch_gradient(int32_t address) {
  Array<vec4_scalar,2> data =3D fetch_from_gpu_cache_2(address);
  return ConicGradient_scalar((data[0]).sel(X, Y), (data[0]).sel(Z, W), make=
 _float((data[1]).sel(X)), make_int((data[1]).sel(Y)), (data[1]).sel(Z, W));
 }
 void conic_gradient_brush_vs(VertexInfo vi, int32_t prim_address, RectWithS=
 ize_scalar local_rect, RectWithSize_scalar segment_rect, ivec4_scalar prim_=
 user_data, int32_t specific_resource_address, mat4_scalar transform, Pictur=
 eTask_scalar pic_task, int32_t brush_flags, vec4_scalar texel_rect) {
  ConicGradient_scalar gradient =3D fetch_gradient(prim_address);
  if (((brush_flags)&(2))!=3D(0)) {
   {
    (varying_vec4_0).lsel(Z, W) =3D (((vi).local_pos)-((segment_rect).p0))/(=
 (segment_rect).size);
    (varying_vec4_0).lsel(Z, W) =3D (((varying_vec4_0).sel(Z, W))*(((texel_r=
 ect).sel(Z, W))-((texel_rect).sel(X, Y))))+((texel_rect).sel(X, Y));
    (varying_vec4_0).lsel(Z, W) =3D ((varying_vec4_0).sel(Z, W))*((local_rec=
 t).size);
   }
  } else  {
   (varying_vec4_0).lsel(Z, W) =3D ((vi).local_pos)-((local_rect).p0);
  }
  (flat_varying_vec4_0).lsel(X, Y) =3D (gradient).center_point;
  (flat_varying_vec4_1).sel(W) =3D (gradient).angle;
  (flat_varying_vec4_0).sel(Z) =3D ((gradient).start_end_offset).sel(X);
  (flat_varying_vec4_0).sel(W) =3D ((gradient).start_end_offset).sel(Y);
  vec2_scalar tile_repeat =3D ((local_rect).size)/((gradient).stretch_size);
  (flat_varying_vec4_1).lsel(X, Y) =3D (gradient).stretch_size;
  flat_varying_highp_int_address_0 =3D (prim_user_data).sel(X);
  (flat_varying_vec4_1).sel(Z) =3D make_float(((gradient).extend_mode)!=3D(0=
 ));
  (flat_varying_vec4_2).lsel(X, Y) =3D tile_repeat;
  (varying_vec4_0).lsel(X, Y) =3D (vi).local_pos;
 }
 void brush_shader_main_vs(Instance_scalar instance, PrimitiveHeader_scalar =
 ph, Transform_scalar transform, PictureTask_scalar pic_task, ClipArea_scala=
 r clip_area) {
  int32_t edge_flags =3D ((instance).flags)&(255);
  int32_t brush_flags =3D (((instance).flags)>>(8))&(255);
  vec4_scalar segment_data;
  RectWithSize_scalar segment_rect;
  if (((instance).segment_index)=3D=3D(65535)) {
   {
    segment_rect =3D (ph).local_rect;
    segment_data =3D make_vec4(0.f);
   }
  } else  {
   int32_t segment_address =3D (((ph).specific_prim_address)+(2))+(((instanc=
 e).segment_index)*(2));
   Array<vec4_scalar,2> segment_info =3D fetch_from_gpu_cache_2(segment_addr=
 ess);
   segment_rect =3D RectWithSize_scalar((segment_info[0]).sel(X, Y), (segmen=
 t_info[0]).sel(Z, W));
   (segment_rect).p0 +=3D ((ph).local_rect).p0;
   segment_data =3D segment_info[1];
  }
  VertexInfo vi;
  if ((transform).is_axis_aligned) {
   {
    vec2 local_pos =3D ((segment_rect).p0)+(((segment_rect).size)*((aPositio=
 n).sel(X, Y)));
    vi =3D write_vertex(local_pos, (ph).local_clip_rect, (ph).z, transform, =
 pic_task);
    init_transform_vs(make_vec4(make_vec2(-(10000000000000000.f)), make_vec2=
 (10000000000000000.f)));
   }
  } else  {
   bvec4_scalar edge_mask =3D notEqual((edge_flags)&(make_ivec4(1, 2, 4, 8))=
 , make_ivec4(0));
   vi =3D write_transform_vertex(segment_rect, (ph).local_rect, (ph).local_c=
 lip_rect, mix(make_vec4(0.f), make_vec4(1.f), edge_mask), (ph).z, transform=
 , pic_task);
  }
  write_clip((vi).world_pos, clip_area);
  conic_gradient_brush_vs(vi, (ph).specific_prim_address, (ph).local_rect, s=
 egment_rect, (ph).user_data, (instance).resource_address, (transform).m, pi=
 c_task, brush_flags, segment_data);
 }
 ALWAYS_INLINE void main(void) {
  Instance_scalar instance =3D decode_instance_attributes();
  PrimitiveHeader_scalar ph =3D fetch_prim_header((instance).prim_header_add=
 ress);
  Transform_scalar transform =3D fetch_transform((ph).transform_id);
  PictureTask_scalar task =3D fetch_picture_task((instance).picture_task_add=
 ress);
  ClipArea_scalar clip_area =3D fetch_clip_area((instance).clip_address);
  brush_shader_main_vs(instance, ph, transform, task, clip_area);
 }
 static void set_uniform_1i(Self *self, int index, int value) {
  if (self->samplers.set_slot(index, value)) return;
  switch (index) {
  case 2:
   assert(0); // sGpuCache
   break;
  case 7:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_4fv(Self *self, int index, const float *value) {
  switch (index) {
  case 2:
   assert(0); // sGpuCache
   break;
  case 7:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   assert(0); // uTransform
   break;
  }
 }
 static void set_uniform_matrix4fv(Self *self, int index, const float *value=
 ) {
  switch (index) {
  case 2:
   assert(0); // sGpuCache
   break;
  case 7:
   assert(0); // sPrevPassAlpha
   break;
  case 4:
   assert(0); // sPrimitiveHeadersF
   break;
  case 5:
   assert(0); // sPrimitiveHeadersI
   break;
  case 1:
   assert(0); // sRenderTasks
   break;
  case 3:
   assert(0); // sTransformPalette
   break;
  case 6:
   self->uTransform =3D mat4_scalar::load_from_ptr(value);
   break;
  }
 }
 static void load_attribs(Self *self, VertexAttrib *attribs, uint32_t start,=
  int instance, int count) {
  load_attrib(self->aPosition, attribs[self->attrib_locations.aPosition], st=
 art, instance, count);
  load_flat_attrib(self->aData, attribs[self->attrib_locations.aData], start=
 , instance, count);
 }
 public:
 struct InterpOutputs {
 vec4_scalar vClipMaskUv;
 vec4_scalar varying_vec4_0;
 };
 private:
 ALWAYS_INLINE void store_interp_outputs(char* dest_ptr, size_t stride) {
   for(int n =3D 0; n < 4; n++) {
     auto* dest =3D reinterpret_cast<InterpOutputs*>(dest_ptr);
     dest->vClipMaskUv =3D get_nth(vClipMaskUv, n);
     dest->varying_vec4_0 =3D get_nth(varying_vec4_0, n);
     dest_ptr +=3D stride;
   }
 }
 static void run(Self* self, char* interps, size_t interp_stride) {
  self->main();
  self->store_interp_outputs(interps, interp_stride);
 }
 static void init_batch(Self *self) { self->bind_textures(); }
 public:
 brush_conic_gradient_ALPHA_PASS_vert() {
  set_uniform_1i_func =3D (SetUniform1iFunc)&set_uniform_1i;
  set_uniform_4fv_func =3D (SetUniform4fvFunc)&set_uniform_4fv;
  set_uniform_matrix4fv_func =3D (SetUniformMatrix4fvFunc)&set_uniform_matri=
 x4fv;
  init_batch_func =3D (InitBatchFunc)&init_batch;
  load_attribs_func =3D (LoadAttribsFunc)&load_attribs;
  run_primitive_func =3D (RunPrimitiveFunc)&run;
 }
 };


 struct brush_conic_gradient_ALPHA_PASS_frag : FragmentShaderImpl, brush_con=
 ic_gradient_ALPHA_PASS_vert {
 private:
 typedef brush_conic_gradient_ALPHA_PASS_frag Self;
 #define oFragColor gl_FragColor
 // vec4 oFragColor;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sGpuCache;
 // vec4_scalar vTransformBounds;
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 struct Fragment_scalar {
 vec4_scalar color;
 Fragment_scalar() =3D default;
 explicit Fragment_scalar(vec4_scalar color) : color(color){}
 };
 struct Fragment {
 vec4 color;
 Fragment() =3D default;
 explicit Fragment(vec4 color) : color(color){}
 explicit Fragment(vec4_scalar color):color(color){
 }
 IMPLICIT Fragment(Fragment_scalar s):color(s.color){
 }
 friend Fragment if_then_else(I32 c, Fragment t, Fragment e) { return Fragme=
 nt(
 if_then_else(c, t.color, e.color));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 ivec2 get_gpu_cache_uv(I32 address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4,2> fetch_from_gpu_cache_2(I32 address) {
  ivec2 uv =3D get_gpu_cache_uv(address);
  I32 sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, 0);
  return Array<vec4,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 0=
 , 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec4 dither(vec4 color) {
  return color;
 }
 vec4 sample_gradient(int32_t address, Float offset, float gradient_repeat) {
  Float x =3D (offset)-((floor(offset))*(gradient_repeat));
  float const GRADIENT_ENTRIES =3D 128.f;
  x =3D clamp((1.f)+((x)*(GRADIENT_ENTRIES)), 0.f, (1.f)+(GRADIENT_ENTRIES));
  Float entry_index =3D floor(x);
  Float entry_fract =3D (x)-(entry_index);
  Array<vec4,2> texels =3D fetch_from_gpu_cache_2((address)+((2)*(make_int(e=
 ntry_index))));
  return dither(mix(texels[0], texels[1], entry_fract));
 }
 Float signed_distance_rect(vec2 pos, vec2_scalar p0, vec2_scalar p1) {
  vec2 d =3D max((p0)-(pos), (pos)-(p1));
  return (length(max(make_vec2(0.f), d)))+(min(0.f, max((d).sel(X), (d).sel(=
 Y))));
 }
 Float compute_aa_range(vec2 position) {
  return (0.35355f)*(length(fwidth(position)));
 }
 Float distance_aa(Float aa_range, Float signed_distance) {
  I32 ret_mask =3D ~0;
  Float ret;
  Float dist =3D ((0.5f)*(signed_distance))/(aa_range);
  auto _c7_ =3D (dist)<=3D((-(0.5f))+(0.0001f));
  ret =3D 1.f;
  ret_mask =3D ~I32(_c7_);
  auto _c8_ =3D (dist)>=3D((0.5f)-(0.0001f));
  ret =3D if_then_else(ret_mask & I32(_c8_), 0.f, ret);
  ret_mask &=3D ~I32(_c8_);
  ret =3D if_then_else(ret_mask, (0.5f)+((dist)*((((0.8431027f)*(dist))*(dis=
 t))-(1.14453603f))), ret);
  return ret;
 }
 Float init_transform_fs(vec2 local_pos) {
  Float d =3D signed_distance_rect(local_pos, (vTransformBounds).sel(X, Y), =
 (vTransformBounds).sel(Z, W));
  Float aa_range =3D compute_aa_range(local_pos);
  return distance_aa(aa_range, d);
 }
 Fragment conic_gradient_brush_fs() {
  vec2 local_pos =3D max((varying_vec4_0).sel(Z, W), make_vec2(0.f));
  vec2 pos =3D mod(local_pos, (flat_varying_vec4_1).sel(X, Y));
  vec2_scalar prim_size =3D ((flat_varying_vec4_1).sel(X, Y))*((flat_varying=
 _vec4_2).sel(X, Y));
  auto _c3_ =3D ((local_pos).sel(X))>=3D((prim_size).sel(X));
  {
   (pos).sel(X) =3D if_then_else(_c3_,((flat_varying_vec4_1).sel(X, Y)).sel(=
 X),(pos).sel(X));
  }
  auto _c4_ =3D ((local_pos).sel(Y))>=3D((prim_size).sel(Y));
  {
   (pos).sel(Y) =3D if_then_else(_c4_,((flat_varying_vec4_1).sel(X, Y)).sel(=
 Y),(pos).sel(Y));
  }
  vec2 current_dir =3D (pos)-((flat_varying_vec4_0).sel(X, Y));
  Float current_angle =3D (atan((current_dir).sel(Y), (current_dir).sel(X)))=
 +(((3.141592653589793f)/(2.f))-((flat_varying_vec4_1).sel(W)));
  Float offset =3D (mod((current_angle)/((2.f)*(3.141592653589793f)), 1.f))-=
 ((flat_varying_vec4_0).sel(Z));
  offset =3D (offset)/(((flat_varying_vec4_0).sel(W))-((flat_varying_vec4_0)=
 =2Esel(Z)));
  vec4 color =3D sample_gradient(flat_varying_highp_int_address_0, offset, (=
 flat_varying_vec4_1).sel(Z));
  color *=3D init_transform_fs((varying_vec4_0).sel(X, Y));
  return Fragment(color);
 }
 Float do_clip() {
  I32 ret_mask =3D ~0;
  Float ret;
  if (((vClipMaskUvBounds).sel(X, Y))=3D=3D((vClipMaskUvBounds).sel(Z, W))) {
   {
    return 1.f;
   }
  }
  vec2 mask_uv =3D ((vClipMaskUv).sel(X, Y))*((gl_FragCoord).sel(W));
  bvec2 left =3D lessThanEqual((vClipMaskUvBounds).sel(X, Y), mask_uv);
  bvec2 right =3D greaterThan((vClipMaskUvBounds).sel(Z, W), mask_uv);
  auto _c10_ =3D !(all(make_bvec4(left, right)));
  {
   ret =3D 0.f;
   ret_mask =3D ~I32(_c10_);
  }
  ivec3 tc =3D make_ivec3(mask_uv, ((vClipMaskUv).sel(Z))+(0.5f));
  ret =3D if_then_else(ret_mask, (texelFetch(sPrevPassAlpha, tc, 0)).sel(R),=
  ret);
  return ret;
 }
 void write_output(vec4 color) {
  oFragColor =3D color;
 }
 ALWAYS_INLINE void main(void) {
  Fragment frag =3D conic_gradient_brush_fs();
  Float clip_alpha =3D do_clip();
  (frag).color *=3D clip_alpha;
  write_output((frag).color);
 }
 typedef brush_conic_gradient_ALPHA_PASS_vert::InterpOutputs InterpInputs;
 InterpInputs interp_step;
 struct InterpPerspective {
 vec4 vClipMaskUv;
 vec4 varying_vec4_0;
 };
 InterpPerspective interp_perspective;
 static void read_interp_inputs(Self *self, const InterpInputs *init, const =
 InterpInputs *step, float step_width) {
   self->vClipMaskUv =3D init_interp(init->vClipMaskUv, step->vClipMaskUv);
   self->interp_step.vClipMaskUv =3D step->vClipMaskUv * step_width;
   self->varying_vec4_0 =3D init_interp(init->varying_vec4_0, step->varying_=
 vec4_0);
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 static void read_perspective_inputs(Self *self, const InterpInputs *init, c=
 onst InterpInputs *step, float step_width) {
   Float w =3D 1.0f / self->gl_FragCoord.w;
   self->interp_perspective.vClipMaskUv =3D init_interp(init->vClipMaskUv, s=
 tep->vClipMaskUv);
   self->vClipMaskUv =3D self->interp_perspective.vClipMaskUv * w;
   self->interp_step.vClipMaskUv =3D step->vClipMaskUv * step_width;
   self->interp_perspective.varying_vec4_0 =3D init_interp(init->varying_vec=
 4_0, step->varying_vec4_0);
   self->varying_vec4_0 =3D self->interp_perspective.varying_vec4_0 * w;
   self->interp_step.varying_vec4_0 =3D step->varying_vec4_0 * step_width;
 }
 ALWAYS_INLINE void step_interp_inputs() {
   vClipMaskUv +=3D interp_step.vClipMaskUv;
   varying_vec4_0 +=3D interp_step.varying_vec4_0;
 }
 ALWAYS_INLINE void step_perspective_inputs() {
   step_perspective();
   Float w =3D 1.0f / gl_FragCoord.w;
   interp_perspective.vClipMaskUv +=3D interp_step.vClipMaskUv;
   vClipMaskUv =3D w * interp_perspective.vClipMaskUv;
   interp_perspective.varying_vec4_0 +=3D interp_step.varying_vec4_0;
   varying_vec4_0 =3D w * interp_perspective.varying_vec4_0;
 }
 static void run(Self *self) {
  self->main();
  self->step_interp_inputs();
 }
 static void skip(Self* self, int chunks) {
  self->step_interp_inputs();
  while (--chunks > 0) self->step_interp_inputs();
 }
 static void run_perspective(Self *self) {
  self->main();
  self->step_perspective_inputs();
 }
 static void skip_perspective(Self* self, int chunks) {
  self->step_perspective_inputs();
  while (--chunks > 0) self->step_perspective_inputs();
 }
 public:
 brush_conic_gradient_ALPHA_PASS_frag() {
  init_span_func =3D (InitSpanFunc)&read_interp_inputs;
  run_func =3D (RunFunc)&run;
  skip_func =3D (SkipFunc)&skip;
  enable_perspective();
  init_span_w_func =3D (InitSpanWFunc)&read_perspective_inputs;
  run_w_func =3D (RunWFunc)&run_perspective;
  skip_w_func =3D (SkipWFunc)&skip_perspective;
 }
 };

 struct brush_conic_gradient_ALPHA_PASS_program : ProgramImpl, brush_conic_g=
 radient_ALPHA_PASS_frag {
 int get_uniform(const char *name) const override {
  if (strcmp("sGpuCache", name) =3D=3D 0) { return 2; }
  if (strcmp("sPrevPassAlpha", name) =3D=3D 0) { return 7; }
  if (strcmp("sPrimitiveHeadersF", name) =3D=3D 0) { return 4; }
  if (strcmp("sPrimitiveHeadersI", name) =3D=3D 0) { return 5; }
  if (strcmp("sRenderTasks", name) =3D=3D 0) { return 1; }
  if (strcmp("sTransformPalette", name) =3D=3D 0) { return 3; }
  if (strcmp("uTransform", name) =3D=3D 0) { return 6; }
  return -1;
 }
 void bind_attrib(const char* name, int index) override {
  attrib_locations.bind_loc(name, index);
 }
 int get_attrib(const char* name) const override {
  return attrib_locations.get_loc(name);
 }
 size_t interpolants_size() const override { return sizeof(InterpOutputs); }
 VertexShaderImpl* get_vertex_shader() override {
  return this;
 }
 FragmentShaderImpl* get_fragment_shader() override {
  return this;
 }
 static ProgramImpl* loader() { return new brush_conic_gradient_ALPHA_PASS_p=
 rogram; }
 };

 # 6 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h" 2
 #if 0 /* expanded by -frewrite-includes */
 #include "brush_conic_gradient_DEBUG_OVERDRAW.h"
 #endif /* expanded by -frewrite-includes */
 # 6 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/load_shader.h"
 # 1 "/usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/buil=
 d/swgl-2a769e3b252065cb/out/brush_conic_gradient_DEBUG_OVERDRAW.h" 1
 struct brush_conic_gradient_DEBUG_OVERDRAW_common {
 struct Samplers {
  sampler2D_impl sGpuCache_impl;
  int sGpuCache_slot;
  sampler2DArray_impl sPrevPassAlpha_impl;
  int sPrevPassAlpha_slot;
  sampler2D_impl sPrimitiveHeadersF_impl;
  int sPrimitiveHeadersF_slot;
  isampler2D_impl sPrimitiveHeadersI_impl;
  int sPrimitiveHeadersI_slot;
  sampler2D_impl sRenderTasks_impl;
  int sRenderTasks_slot;
  sampler2D_impl sTransformPalette_impl;
  int sTransformPalette_slot;
  bool set_slot(int index, int value) {
   switch (index) {
   case 2:
    sGpuCache_slot =3D value;
    return true;
   case 7:
    sPrevPassAlpha_slot =3D value;
    return true;
   case 4:
    sPrimitiveHeadersF_slot =3D value;
    return true;
   case 5:
    sPrimitiveHeadersI_slot =3D value;
    return true;
   case 1:
    sRenderTasks_slot =3D value;
    return true;
   case 3:
    sTransformPalette_slot =3D value;
    return true;
   }
   return false;
  }
 } samplers;
 struct AttribLocations {
  int aPosition =3D NULL_ATTRIB;
  int aData =3D NULL_ATTRIB;
  void bind_loc(const char* name, int index) {
   if (strcmp("aPosition", name) =3D=3D 0) { aPosition =3D index; return; }
   if (strcmp("aData", name) =3D=3D 0) { aData =3D index; return; }
  }
  int get_loc(const char* name) const {
   if (strcmp("aPosition", name) =3D=3D 0) { return aPosition !=3D NULL_ATTR=
 IB ? aPosition : -1; }
   if (strcmp("aData", name) =3D=3D 0) { return aData !=3D NULL_ATTRIB ? aDa=
 ta : -1; }
   return -1;
  }
 } attrib_locations;
 vec4_scalar vTransformBounds;
 vec4_scalar vClipMaskUvBounds;
 vec4_scalar flat_varying_vec4_0;
 vec4_scalar flat_varying_vec4_1;
 int32_t flat_varying_highp_int_address_0;
 sampler2D sGpuCache;
 sampler2DArray sPrevPassAlpha;
 sampler2D sPrimitiveHeadersF;
 isampler2D sPrimitiveHeadersI;
 sampler2D sRenderTasks;
 sampler2D sTransformPalette;
 mat4_scalar uTransform;
 void bind_textures() {
  sGpuCache =3D lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_=
 slot);
  sPrevPassAlpha =3D lookup_sampler_array(&samplers.sPrevPassAlpha_impl, sam=
 plers.sPrevPassAlpha_slot);
  sPrimitiveHeadersF =3D lookup_sampler(&samplers.sPrimitiveHeadersF_impl, s=
 amplers.sPrimitiveHeadersF_slot);
  sPrimitiveHeadersI =3D lookup_isampler(&samplers.sPrimitiveHeadersI_impl, =
 samplers.sPrimitiveHeadersI_slot);
  sRenderTasks =3D lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRen=
 derTasks_slot);
  sTransformPalette =3D lookup_sampler(&samplers.sTransformPalette_impl, sam=
 plers.sTransformPalette_slot);
 }
 };
 struct brush_conic_gradient_DEBUG_OVERDRAW_vert : VertexShaderImpl, brush_c=
 onic_gradient_DEBUG_OVERDRAW_common {
 private:
 typedef brush_conic_gradient_DEBUG_OVERDRAW_vert Self;
 // int32_t uMode;
 // mat4_scalar uTransform;
 vec2 aPosition;
 // sampler2DArray sColor0;
 // sampler2DArray sColor1;
 // sampler2DArray sColor2;
 struct RectWithSize_scalar {
 vec2_scalar p0;
 vec2_scalar size;
 RectWithSize_scalar() =3D default;
 RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
 };
 struct RectWithSize {
 vec2 p0;
 vec2 size;
 RectWithSize() =3D default;
 RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
 RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
 }
 IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
 }
 friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { r=
 eturn RectWithSize(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
 }};
 struct RectWithEndpoint_scalar {
 vec2_scalar p0;
 vec2_scalar p1;
 RectWithEndpoint_scalar() =3D default;
 RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
 };
 struct RectWithEndpoint {
 vec2 p0;
 vec2 p1;
 RectWithEndpoint() =3D default;
 RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
 RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
 }
 IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
 }
 friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEnd=
 point e) { return RectWithEndpoint(
 if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
 }};
 // sampler2D sRenderTasks;
 struct RenderTaskCommonData_scalar {
 RectWithSize_scalar task_rect;
 float texture_layer_index;
 RenderTaskCommonData_scalar() =3D default;
 RenderTaskCommonData_scalar(RectWithSize_scalar task_rect, float texture_la=
 yer_index) : task_rect(task_rect), texture_layer_index(texture_layer_index)=
 {}
 };
 struct RenderTaskCommonData {
 RectWithSize task_rect;
 Float texture_layer_index;
 RenderTaskCommonData() =3D default;
 RenderTaskCommonData(RectWithSize task_rect, Float texture_layer_index) : t=
 ask_rect(task_rect), texture_layer_index(texture_layer_index){}
 RenderTaskCommonData(RectWithSize_scalar task_rect, float texture_layer_ind=
 ex):task_rect(task_rect),texture_layer_index(texture_layer_index){
 }
 IMPLICIT RenderTaskCommonData(RenderTaskCommonData_scalar s):task_rect(s.ta=
 sk_rect),texture_layer_index(s.texture_layer_index){
 }
 friend RenderTaskCommonData if_then_else(I32 c, RenderTaskCommonData t, Ren=
 derTaskCommonData e) { return RenderTaskCommonData(
 if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.texture_layer_=
 index, e.texture_layer_index));
 }};
 struct RenderTaskData_scalar {
 RenderTaskCommonData_scalar common_data;
 vec3_scalar user_data;
 RenderTaskData_scalar() =3D default;
 RenderTaskData_scalar(RenderTaskCommonData_scalar common_data, vec3_scalar =
 user_data) : common_data(common_data), user_data(user_data){}
 };
 struct RenderTaskData {
 RenderTaskCommonData common_data;
 vec3 user_data;
 RenderTaskData() =3D default;
 RenderTaskData(RenderTaskCommonData common_data, vec3 user_data) : common_d=
 ata(common_data), user_data(user_data){}
 RenderTaskData(RenderTaskCommonData_scalar common_data, vec3_scalar user_da=
 ta):common_data(common_data),user_data(user_data){
 }
 IMPLICIT RenderTaskData(RenderTaskData_scalar s):common_data(s.common_data)=
 ,user_data(s.user_data){
 }
 friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData =
 e) { return RenderTaskData(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.user_data,=
  e.user_data));
 }};
 struct PictureTask_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar content_origin;
 PictureTask_scalar() =3D default;
 PictureTask_scalar(RenderTaskCommonData_scalar common_data, float device_pi=
 xel_scale, vec2_scalar content_origin) : common_data(common_data), device_p=
 ixel_scale(device_pixel_scale), content_origin(content_origin){}
 };
 struct PictureTask {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 content_origin;
 PictureTask() =3D default;
 PictureTask(RenderTaskCommonData common_data, Float device_pixel_scale, vec=
 2 content_origin) : common_data(common_data), device_pixel_scale(device_pix=
 el_scale), content_origin(content_origin){}
 PictureTask(RenderTaskCommonData_scalar common_data, float device_pixel_sca=
 le, vec2_scalar content_origin):common_data(common_data),device_pixel_scale=
 (device_pixel_scale),content_origin(content_origin){
 }
 IMPLICIT PictureTask(PictureTask_scalar s):common_data(s.common_data),devic=
 e_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
 }
 friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { retu=
 rn PictureTask(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.conten=
 t_origin));
 }};
 struct ClipArea_scalar {
 RenderTaskCommonData_scalar common_data;
 float device_pixel_scale;
 vec2_scalar screen_origin;
 ClipArea_scalar() =3D default;
 ClipArea_scalar(RenderTaskCommonData_scalar common_data, float device_pixel=
 _scale, vec2_scalar screen_origin) : common_data(common_data), device_pixel=
 _scale(device_pixel_scale), screen_origin(screen_origin){}
 };
 struct ClipArea {
 RenderTaskCommonData common_data;
 Float device_pixel_scale;
 vec2 screen_origin;
 ClipArea() =3D default;
 ClipArea(RenderTaskCommonData common_data, Float device_pixel_scale, vec2 s=
 creen_origin) : common_data(common_data), device_pixel_scale(device_pixel_s=
 cale), screen_origin(screen_origin){}
 ClipArea(RenderTaskCommonData_scalar common_data, float device_pixel_scale,=
  vec2_scalar screen_origin):common_data(common_data),device_pixel_scale(dev=
 ice_pixel_scale),screen_origin(screen_origin){
 }
 IMPLICIT ClipArea(ClipArea_scalar s):common_data(s.common_data),device_pixe=
 l_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
 }
 friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipAr=
 ea(
 if_then_else(c, t.common_data, e.common_data), if_then_else(c, t.device_pix=
 el_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_=
 origin));
 }};
 // sampler2D sGpuCache;
 struct ImageResource_scalar {
 RectWithEndpoint_scalar uv_rect;
 float layer;
 vec3_scalar user_data;
 ImageResource_scalar() =3D default;
 ImageResource_scalar(RectWithEndpoint_scalar uv_rect, float layer, vec3_sca=
 lar user_data) : uv_rect(uv_rect), layer(layer), user_data(user_data){}
 };
 struct ImageResource {
 RectWithEndpoint uv_rect;
 Float layer;
 vec3 user_data;
 ImageResource() =3D default;
 ImageResource(RectWithEndpoint uv_rect, Float layer, vec3 user_data) : uv_r=
 ect(uv_rect), layer(layer), user_data(user_data){}
 ImageResource(RectWithEndpoint_scalar uv_rect, float layer, vec3_scalar use=
 r_data):uv_rect(uv_rect),layer(layer),user_data(user_data){
 }
 IMPLICIT ImageResource(ImageResource_scalar s):uv_rect(s.uv_rect),layer(s.l=
 ayer),user_data(s.user_data){
 }
 friend ImageResource if_then_else(I32 c, ImageResource t, ImageResource e) =
 { return ImageResource(
 if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.layer, e.layer), i=
 f_then_else(c, t.user_data, e.user_data));
 }};
 struct ImageResourceExtra_scalar {
 vec4_scalar st_tl;
 vec4_scalar st_tr;
 vec4_scalar st_bl;
 vec4_scalar st_br;
 ImageResourceExtra_scalar() =3D default;
 ImageResourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar=
  st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_b=
 r(st_br){}
 };
 struct ImageResourceExtra {
 vec4 st_tl;
 vec4 st_tr;
 vec4 st_bl;
 vec4 st_br;
 ImageResourceExtra() =3D default;
 ImageResourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(=
 st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
 ImageResourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl,=
  vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
 }
 IMPLICIT ImageResourceExtra(ImageResourceExtra_scalar s):st_tl(s.st_tl),st_=
 tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
 }
 friend ImageResourceExtra if_then_else(I32 c, ImageResourceExtra t, ImageRe=
 sourceExtra e) { return ImageResourceExtra(
 if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_th=
 en_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
 }};
 // vec4_scalar vTransformBounds;
 // sampler2D sTransformPalette;
 struct Transform_scalar {
 mat4_scalar m;
 mat4_scalar inv_m;
 bool is_axis_aligned;
 Transform_scalar() =3D default;
 Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : =
 m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
 };
 struct Transform {
 mat4 m;
 mat4 inv_m;
 Bool is_axis_aligned;
 Transform() =3D default;
 Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), i=
 s_axis_aligned(is_axis_aligned){}
 Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_=
 m(inv_m),is_axis_aligned(is_axis_aligned){
 }
 IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligne=
 d(s.is_axis_aligned){
 }
 friend Transform if_then_else(I32 c, Transform t, Transform e) { return Tra=
 nsform(
 if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(=
 c, t.is_axis_aligned, e.is_axis_aligned));
 }};
 // sampler2DArray sPrevPassAlpha;
 // sampler2DArray sPrevPassColor;
 // vec4_scalar vClipMaskUvBounds;
 vec4 vClipMaskUv;
 // sampler2D sPrimitiveHeadersF;
 // isampler2D sPrimitiveHeadersI;
 ivec4_scalar aData;
 struct Instance_scalar {
 int32_t prim_header_address;
 int32_t picture_task_address;
 int32_t clip_address;
 int32_t segment_index;
 int32_t flags;
 int32_t resource_address;
 int32_t brush_kind;
 Instance_scalar() =3D default;
 Instance_scalar(int32_t prim_header_address, int32_t picture_task_address, =
 int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resourc=
 e_address, int32_t brush_kind) : prim_header_address(prim_header_address), =
 picture_task_address(picture_task_address), clip_address(clip_address), seg=
 ment_index(segment_index), flags(flags), resource_address(resource_address)=
 , brush_kind(brush_kind){}
 };
 struct Instance {
 I32 prim_header_address;
 I32 picture_task_address;
 I32 clip_address;
 I32 segment_index;
 I32 flags;
 I32 resource_address;
 I32 brush_kind;
 Instance() =3D default;
 Instance(I32 prim_header_address, I32 picture_task_address, I32 clip_addres=
 s, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : pr=
 im_header_address(prim_header_address), picture_task_address(picture_task_a=
 ddress), clip_address(clip_address), segment_index(segment_index), flags(fl=
 ags), resource_address(resource_address), brush_kind(brush_kind){}
 Instance(int32_t prim_header_address, int32_t picture_task_address, int32_t=
  clip_address, int32_t segment_index, int32_t flags, int32_t resource_addre=
 ss, int32_t brush_kind):prim_header_address(prim_header_address),picture_ta=
 sk_address(picture_task_address),clip_address(clip_address),segment_index(s=
 egment_index),flags(flags),resource_address(resource_address),brush_kind(br=
 ush_kind){
 }
 IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_addr=
 ess),picture_task_address(s.picture_task_address),clip_address(s.clip_addre=
 ss),segment_index(s.segment_index),flags(s.flags),resource_address(s.resour=
 ce_address),brush_kind(s.brush_kind){
 }
 friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instan=
 ce(
 if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else=
 (c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.clip=
 _address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index=
 ), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e=
 =2Eresource_address), if_then_else(c, t.brush_kind, e.brush_kind));
 }};
 struct PrimitiveHeader_scalar {
 RectWithSize_scalar local_rect;
 RectWithSize_scalar local_clip_rect;
 float z;
 int32_t specific_prim_address;
 int32_t transform_id;
 ivec4_scalar user_data;
 PrimitiveHeader_scalar() =3D default;
 PrimitiveHeader_scalar(RectWithSize_scalar local_rect, RectWithSize_scalar =
 local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_=
 id, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local=
 _clip_rect), z(z), specific_prim_address(specific_prim_address), transform_=
 id(transform_id), user_data(user_data){}
 };
 struct PrimitiveHeader {
 RectWithSize local_rect;
 RectWithSize local_clip_rect;
 Float z;
 I32 specific_prim_address;
 I32 transform_id;
 ivec4 user_data;
 PrimitiveHeader() =3D default;
 PrimitiveHeader(RectWithSize local_rect, RectWithSize local_clip_rect, Floa=
 t z, I32 specific_prim_address, I32 transform_id, ivec4 user_data) : local_=
 rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_add=
 ress(specific_prim_address), transform_id(transform_id), user_data(user_dat=
 a){}
 PrimitiveHeader(RectWithSize_scalar local_rect, RectWithSize_scalar local_c=
 lip_rect, float z, int32_t specific_prim_address, int32_t transform_id, ive=
 c4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect=
 ),z(z),specific_prim_address(specific_prim_address),transform_id(transform_=
 id),user_data(user_data){
 }
 IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect)=
 ,local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific=
 _prim_address),transform_id(s.transform_id),user_data(s.user_data){
 }
 friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHead=
 er e) { return PrimitiveHeader(
 if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_r=
 ect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.speci=
 fic_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id,=
  e.transform_id), if_then_else(c, t.user_data, e.user_data));
 }};
 struct VertexInfo_scalar {
 vec2_scalar local_pos;
 vec4_scalar world_pos;
 VertexInfo_scalar() =3D default;
 VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos=
 (local_pos), world_pos(world_pos){}
 };
 struct VertexInfo {
 vec2 local_pos;
 vec4 world_pos;
 VertexInfo() =3D default;
 VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_po=
 s(world_pos){}
 VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_po=
 s),world_pos(world_pos){
 }
 IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s=
 =2Eworld_pos){
 }
 friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return =
 VertexInfo(
 if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.w=
 orld_pos));
 }};
 // vec4_scalar flat_varying_vec4_0;
 // vec4_scalar flat_varying_vec4_1;
 // vec4_scalar flat_varying_vec4_2;
 // vec4_scalar flat_varying_vec4_3;
 // vec4_scalar flat_varying_vec4_4;
 // ivec4_scalar flat_varying_ivec4_0;
 vec4 varying_vec4_0;
 vec4 varying_vec4_1;
 // int32_t flat_varying_highp_int_address_0;
 struct ConicGradient_scalar {
 vec2_scalar center_point;
 vec2_scalar start_end_offset;
 float angle;
 int32_t extend_mode;
 vec2_scalar stretch_size;
 ConicGradient_scalar() =3D default;
 ConicGradient_scalar(vec2_scalar center_point, vec2_scalar start_end_offset=
 , float angle, int32_t extend_mode, vec2_scalar stretch_size) : center_poin=
 t(center_point), start_end_offset(start_end_offset), angle(angle), extend_m=
 ode(extend_mode), stretch_size(stretch_size){}
 };
 struct ConicGradient {
 vec2 center_point;
 vec2 start_end_offset;
 Float angle;
 I32 extend_mode;
 vec2 stretch_size;
 ConicGradient() =3D default;
 ConicGradient(vec2 center_point, vec2 start_end_offset, Float angle, I32 ex=
 tend_mode, vec2 stretch_size) : center_point(center_point), start_end_offse=
 t(start_end_offset), angle(angle), extend_mode(extend_mode), stretch_size(s=
 tretch_size){}
 ConicGradient(vec2_scalar center_point, vec2_scalar start_end_offset, float=
  angle, int32_t extend_mode, vec2_scalar stretch_size):center_point(center_=
 point),start_end_offset(start_end_offset),angle(angle),extend_mode(extend_m=
 ode),stretch_size(stretch_size){
 }
 IMPLICIT ConicGradient(ConicGradient_scalar s):center_point(s.center_point)=
 ,start_end_offset(s.start_end_offset),angle(s.angle),extend_mode(s.extend_m=
 ode),stretch_size(s.stretch_size){
 }
 friend ConicGradient if_then_else(I32 c, ConicGradient t, ConicGradient e) =
 { return ConicGradient(
 if_then_else(c, t.center_point, e.center_point), if_then_else(c, t.start_en=
 d_offset, e.start_end_offset), if_then_else(c, t.angle, e.angle), if_then_e=
 lse(c, t.extend_mode, e.extend_mode), if_then_else(c, t.stretch_size, e.str=
 etch_size));
 }};
 Instance_scalar decode_instance_attributes() {
  Instance_scalar instance;
  (instance).prim_header_address =3D (aData).sel(X);
  (instance).picture_task_address =3D ((aData).sel(Y))>>(16);
  (instance).clip_address =3D ((aData).sel(Y))&(65535);
  (instance).segment_index =3D ((aData).sel(Z))&(65535);
  (instance).flags =3D ((aData).sel(Z))>>(16);
  (instance).resource_address =3D ((aData).sel(W))&(16777215);
  (instance).brush_kind =3D ((aData).sel(W))>>(24);
  return instance;
 }
 PrimitiveHeader_scalar fetch_prim_header(int32_t index) {
  PrimitiveHeader_scalar ph;
  ivec2_scalar uv_f =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sPrimitiveHeadersF_uv_f_fetch =3D texelFetchPtr(sPrimitiveHea=
 dersF, uv_f, 0, 1, 0, 0);
  vec4_scalar local_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sPrimit=
 iveHeadersF_uv_f_fetch, 0, 0);
  vec4_scalar local_clip_rect =3D texelFetchUnchecked(sPrimitiveHeadersF, sP=
 rimitiveHeadersF_uv_f_fetch, 1, 0);
  (ph).local_rect =3D RectWithSize_scalar((local_rect).sel(X, Y), (local_rec=
 t).sel(Z, W));
  (ph).local_clip_rect =3D RectWithSize_scalar((local_clip_rect).sel(X, Y), =
 (local_clip_rect).sel(Z, W));
  ivec2_scalar uv_i =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u=
 )/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  ivec4_scalar* sPrimitiveHeadersI_uv_i_fetch =3D texelFetchPtr(sPrimitiveHe=
 adersI, uv_i, 0, 1, 0, 0);
  ivec4_scalar data0 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 0, 0);
  ivec4_scalar data1 =3D texelFetchUnchecked(sPrimitiveHeadersI, sPrimitiveH=
 eadersI_uv_i_fetch, 1, 0);
  (ph).z =3D make_float((data0).sel(X));
  (ph).specific_prim_address =3D (data0).sel(Y);
  (ph).transform_id =3D (data0).sel(Z);
  (ph).user_data =3D data1;
  return ph;
 }
 Transform_scalar fetch_transform(int32_t id) {
  Transform_scalar transform;
  (transform).is_axis_aligned =3D ((id)>>(24))=3D=3D(0);
  int32_t index =3D (id)&(16777215);
  ivec2_scalar uv =3D make_ivec2(make_int((8u)*((make_uint(index))%((1024u)/=
 (8u)))), make_int((make_uint(index))/((1024u)/(8u))));
  ivec2_scalar uv0 =3D make_ivec2(((uv).sel(X))+(0), (uv).sel(Y));
  vec4_scalar* sTransformPalette_uv0_fetch =3D texelFetchPtr(sTransformPalet=
 te, uv0, 0, 7, 0, 0);
  (transform).m[0] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 0, 0);
  (transform).m[1] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 1, 0);
  (transform).m[2] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 2, 0);
  (transform).m[3] =3D texelFetchUnchecked(sTransformPalette, sTransformPale=
 tte_uv0_fetch, 3, 0);
  (transform).inv_m[0] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 4, 0);
  (transform).inv_m[1] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 5, 0);
  (transform).inv_m[2] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 6, 0);
  (transform).inv_m[3] =3D texelFetchUnchecked(sTransformPalette, sTransform=
 Palette_uv0_fetch, 7, 0);
  return transform;
 }
 RenderTaskData_scalar fetch_render_task_data(int32_t index) {
  ivec2_scalar uv =3D make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/=
 (2u)))), make_int((make_uint(index))/((1024u)/(2u))));
  vec4_scalar* sRenderTasks_uv_fetch =3D texelFetchPtr(sRenderTasks, uv, 0, =
 1, 0, 0);
  vec4_scalar texel0 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 0, 0);
  vec4_scalar texel1 =3D texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_f=
 etch, 1, 0);
  RectWithSize_scalar task_rect =3D RectWithSize_scalar((texel0).sel(X, Y), =
 (texel0).sel(Z, W));
  RenderTaskCommonData_scalar common_data =3D RenderTaskCommonData_scalar(ta=
 sk_rect, (texel1).sel(X));
  RenderTaskData_scalar data =3D RenderTaskData_scalar(common_data, (texel1)=
 =2Esel(Y, Z, W));
  return data;
 }
 PictureTask_scalar fetch_picture_task(int32_t address) {
  RenderTaskData_scalar task_data =3D fetch_render_task_data(address);
  PictureTask_scalar task =3D PictureTask_scalar((task_data).common_data, ((=
 task_data).user_data).sel(X), ((task_data).user_data).sel(Y, Z));
  return task;
 }
 ClipArea_scalar fetch_clip_area(int32_t index) {
  ClipArea_scalar area;
  if ((index)>=3D(32767)) {
   {
    RectWithSize_scalar rect =3D RectWithSize_scalar(make_vec2(0.f), make_ve=
 c2(0.f));
    (area).common_data =3D RenderTaskCommonData_scalar(rect, 0.f);
    (area).device_pixel_scale =3D 0.f;
    (area).screen_origin =3D make_vec2(0.f);
   }
  } else  {
   RenderTaskData_scalar task_data =3D fetch_render_task_data(index);
   (area).common_data =3D (task_data).common_data;
   (area).device_pixel_scale =3D ((task_data).user_data).sel(X);
   (area).screen_origin =3D ((task_data).user_data).sel(Y, Z);
  }
  return area;
 }
 ivec2_scalar get_gpu_cache_uv(int32_t address) {
  return make_ivec2((make_uint(address))%(1024u), (make_uint(address))/(1024=
 u));
 }
 Array<vec4_scalar,2> fetch_from_gpu_cache_2(int32_t address) {
  ivec2_scalar uv =3D get_gpu_cache_uv(address);
  vec4_scalar* sGpuCache_uv_fetch =3D texelFetchPtr(sGpuCache, uv, 0, 1, 0, =
 0);
  return Array<vec4_scalar,2>{{texelFetchUnchecked(sGpuCache, sGpuCache_uv_f=
 etch, 0, 0), texelFetchUnchecked(sGpuCache, sGpuCache_uv_fetch, 1, 0)}};
 }
 vec2 clamp_rect(vec2 pt, RectWithSize_scalar rect) {
  return clamp(pt, (rect).p0, ((rect).p0)+((rect).size));
 }
 VertexInfo write_vertex(vec2 local_pos, RectWithSize_scalar local_clip_rect=
 , float z, Transform_scalar transform, PictureTask_scalar task) {
  vec2 clamped_local_pos =3D clamp_rect(loc