Explorar o código

SVI Исправления, обновление вендоринга

SVI hai 5 meses
pai
achega
f0f9e02a00
Modificáronse 100 ficheiros con 7488 adicións e 2211 borrados
  1. 21 16
      v4/go.mod
  2. 52 39
      v4/go.sum
  3. 9 4
      v4/vendor/github.com/andybalholm/brotli/README.md
  4. 87 191
      v4/vendor/github.com/andybalholm/brotli/brotli_bit_stream.go
  5. 2 2
      v4/vendor/github.com/andybalholm/brotli/encoder.go
  6. 197 0
      v4/vendor/github.com/andybalholm/brotli/encoder_fast.go
  7. 4 4
      v4/vendor/github.com/andybalholm/brotli/flate/LICENSE
  8. 2 0
      v4/vendor/github.com/andybalholm/brotli/flate/README.md
  9. 65 0
      v4/vendor/github.com/andybalholm/brotli/flate/gzip.go
  10. 517 0
      v4/vendor/github.com/andybalholm/brotli/flate/huffman_bit_writer.go
  11. 346 0
      v4/vendor/github.com/andybalholm/brotli/flate/huffman_code.go
  12. 80 0
      v4/vendor/github.com/andybalholm/brotli/flate/token.go
  13. 66 0
      v4/vendor/github.com/andybalholm/brotli/flate/writer.go
  14. 8 3
      v4/vendor/github.com/andybalholm/brotli/http.go
  15. 212 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/bargain1.go
  16. 248 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/bargain2.go
  17. 278 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/bargain3.go
  18. 12 6
      v4/vendor/github.com/andybalholm/brotli/matchfinder/m0.go
  19. 1 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/m4.go
  20. 326 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/trio.go
  21. 258 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/zdfast.go
  22. 206 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/zfast.go
  23. 301 0
      v4/vendor/github.com/andybalholm/brotli/matchfinder/zm.go
  24. 1 1
      v4/vendor/github.com/andybalholm/brotli/metablock_command.go
  25. 1 1
      v4/vendor/github.com/andybalholm/brotli/metablock_distance.go
  26. 1 1
      v4/vendor/github.com/andybalholm/brotli/metablock_literal.go
  27. 27 39
      v4/vendor/github.com/andybalholm/brotli/writer.go
  28. 0 2
      v4/vendor/github.com/clipperhouse/stringish/.gitignore
  29. 0 64
      v4/vendor/github.com/clipperhouse/stringish/README.md
  30. 0 5
      v4/vendor/github.com/clipperhouse/stringish/interface.go
  31. 0 94
      v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/README.md
  32. 0 31
      v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/iterator.go
  33. 0 25
      v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/reader.go
  34. 0 174
      v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/splitfunc.go
  35. 0 1409
      v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/trie.go
  36. 0 100
      v4/vendor/github.com/clipperhouse/uax29/v2/internal/iterators/iterator.go
  37. 1 0
      v4/vendor/github.com/ebitengine/purego/.gitignore
  38. 201 0
      v4/vendor/github.com/ebitengine/purego/LICENSE
  39. 119 0
      v4/vendor/github.com/ebitengine/purego/README.md
  40. 99 0
      v4/vendor/github.com/ebitengine/purego/abi_amd64.h
  41. 39 0
      v4/vendor/github.com/ebitengine/purego/abi_arm64.h
  42. 60 0
      v4/vendor/github.com/ebitengine/purego/abi_loong64.h
  43. 19 0
      v4/vendor/github.com/ebitengine/purego/cgo.go
  44. 17 0
      v4/vendor/github.com/ebitengine/purego/dlerror.go
  45. 99 0
      v4/vendor/github.com/ebitengine/purego/dlfcn.go
  46. 34 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_android.go
  47. 20 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_darwin.go
  48. 14 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go
  49. 16 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_linux.go
  50. 15 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_netbsd.go
  51. 11 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_nocgo_freebsd.go
  52. 19 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_nocgo_linux.go
  53. 9 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_nocgo_netbsd.go
  54. 24 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_playground.go
  55. 22 0
      v4/vendor/github.com/ebitengine/purego/dlfcn_stubs.s
  56. 571 0
      v4/vendor/github.com/ebitengine/purego/func.go
  57. 6 0
      v4/vendor/github.com/ebitengine/purego/gen.go
  58. 13 0
      v4/vendor/github.com/ebitengine/purego/go_runtime.go
  59. 56 0
      v4/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go
  60. 6 0
      v4/vendor/github.com/ebitengine/purego/internal/cgo/empty.go
  61. 55 0
      v4/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go
  62. 99 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h
  63. 39 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h
  64. 60 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_loong64.h
  65. 195 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_ppc64x.h
  66. 29 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_386.s
  67. 39 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s
  68. 52 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm.s
  69. 36 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s
  70. 40 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_loong64.s
  71. 82 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_ppc64le.s
  72. 78 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_riscv64.s
  73. 55 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_s390x.s
  74. 93 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go
  75. 32 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go
  76. 14 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/fakecgo.go
  77. 27 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go
  78. 88 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin.go
  79. 100 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd.go
  80. 72 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go
  81. 100 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux.go
  82. 106 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_netbsd.go
  83. 18 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go
  84. 38 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go
  85. 19 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go
  86. 39 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go
  87. 26 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go
  88. 20 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go
  89. 20 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go
  90. 26 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_netbsd.go
  91. 23 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/netbsd.go
  92. 19 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go
  93. 107 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_386.s
  94. 107 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s
  95. 81 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm.s
  96. 84 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s
  97. 88 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_loong64.s
  98. 227 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_ppc64le.s
  99. 72 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_riscv64.s
  100. 165 0
      v4/vendor/github.com/ebitengine/purego/internal/fakecgo/zsymbols.go

+ 21 - 16
v4/go.mod

@@ -5,38 +5,43 @@ go 1.26.3
 require (
 require (
 	github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b
 	github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b
 	github.com/dgraph-io/badger/v4 v4.8.0
 	github.com/dgraph-io/badger/v4 v4.8.0
-	github.com/gofiber/fiber/v2 v2.52.9
-	github.com/gofiber/fiber/v3 v3.1.0
+	github.com/gofiber/contrib/v3/monitor v1.0.6
+	github.com/gofiber/fiber/v3 v3.2.0
 	github.com/google/uuid v1.6.0
 	github.com/google/uuid v1.6.0
 )
 )
 
 
 require (
 require (
-	github.com/andybalholm/brotli v1.2.0 // indirect
+	github.com/andybalholm/brotli v1.2.1 // indirect
 	github.com/cespare/xxhash/v2 v2.3.0 // indirect
 	github.com/cespare/xxhash/v2 v2.3.0 // indirect
-	github.com/clipperhouse/stringish v0.1.1 // indirect
-	github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
 	github.com/dgraph-io/ristretto/v2 v2.3.0 // indirect
 	github.com/dgraph-io/ristretto/v2 v2.3.0 // indirect
 	github.com/dustin/go-humanize v1.0.1 // indirect
 	github.com/dustin/go-humanize v1.0.1 // indirect
+	github.com/ebitengine/purego v0.10.0 // indirect
 	github.com/go-logr/logr v1.4.3 // indirect
 	github.com/go-logr/logr v1.4.3 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
-	github.com/gofiber/schema v1.7.0 // indirect
-	github.com/gofiber/utils/v2 v2.0.2 // indirect
+	github.com/go-ole/go-ole v1.3.0 // indirect
+	github.com/gofiber/schema v1.7.1 // indirect
+	github.com/gofiber/utils/v2 v2.0.5 // indirect
 	github.com/google/flatbuffers v25.9.23+incompatible // indirect
 	github.com/google/flatbuffers v25.9.23+incompatible // indirect
-	github.com/klauspost/compress v1.18.4 // indirect
+	github.com/klauspost/compress v1.18.6 // indirect
+	github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect
 	github.com/mattn/go-colorable v0.1.14 // indirect
 	github.com/mattn/go-colorable v0.1.14 // indirect
-	github.com/mattn/go-isatty v0.0.20 // indirect
-	github.com/mattn/go-runewidth v0.0.19 // indirect
+	github.com/mattn/go-isatty v0.0.22 // indirect
 	github.com/philhofer/fwd v1.2.0 // indirect
 	github.com/philhofer/fwd v1.2.0 // indirect
-	github.com/tinylib/msgp v1.6.3 // indirect
+	github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
+	github.com/shirou/gopsutil/v4 v4.26.4 // indirect
+	github.com/tinylib/msgp v1.6.4 // indirect
+	github.com/tklauser/go-sysconf v0.4.0 // indirect
+	github.com/tklauser/numcpus v0.12.0 // indirect
 	github.com/valyala/bytebufferpool v1.0.0 // indirect
 	github.com/valyala/bytebufferpool v1.0.0 // indirect
-	github.com/valyala/fasthttp v1.69.0 // indirect
+	github.com/valyala/fasthttp v1.71.0 // indirect
+	github.com/yusufpapurcu/wmi v1.2.4 // indirect
 	go.opentelemetry.io/auto/sdk v1.2.1 // indirect
 	go.opentelemetry.io/auto/sdk v1.2.1 // indirect
 	go.opentelemetry.io/otel v1.38.0 // indirect
 	go.opentelemetry.io/otel v1.38.0 // indirect
 	go.opentelemetry.io/otel/metric v1.38.0 // indirect
 	go.opentelemetry.io/otel/metric v1.38.0 // indirect
 	go.opentelemetry.io/otel/trace v1.38.0 // indirect
 	go.opentelemetry.io/otel/trace v1.38.0 // indirect
-	golang.org/x/crypto v0.48.0 // indirect
-	golang.org/x/net v0.50.0 // indirect
-	golang.org/x/sys v0.41.0 // indirect
-	golang.org/x/text v0.34.0 // indirect
+	golang.org/x/crypto v0.51.0 // indirect
+	golang.org/x/net v0.54.0 // indirect
+	golang.org/x/sys v0.44.0 // indirect
+	golang.org/x/text v0.37.0 // indirect
 	google.golang.org/protobuf v1.36.10 // indirect
 	google.golang.org/protobuf v1.36.10 // indirect
 )
 )

+ 52 - 39
v4/go.sum

@@ -3,16 +3,12 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm
 github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
 github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
 github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw=
 github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw=
 github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM=
 github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM=
-github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
-github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
+github.com/andybalholm/brotli v1.2.1 h1:R+f5xP285VArJDRgowrfb9DqL18yVK0gKAW/F+eTWro=
+github.com/andybalholm/brotli v1.2.1/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
 github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
 github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
 github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs=
-github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA=
-github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4=
-github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/dgraph-io/badger/v4 v4.8.0 h1:JYph1ChBijCw8SLeybvPINizbDKWZ5n/GYbz2yhN/bs=
 github.com/dgraph-io/badger/v4 v4.8.0 h1:JYph1ChBijCw8SLeybvPINizbDKWZ5n/GYbz2yhN/bs=
 github.com/dgraph-io/badger/v4 v4.8.0/go.mod h1:U6on6e8k/RTbUWxqKR0MvugJuVmkxSNc79ap4917h4w=
 github.com/dgraph-io/badger/v4 v4.8.0/go.mod h1:U6on6e8k/RTbUWxqKR0MvugJuVmkxSNc79ap4917h4w=
 github.com/dgraph-io/ristretto/v2 v2.3.0 h1:qTQ38m7oIyd4GAed/QkUZyPFNMnvVWyazGXRwvOt5zk=
 github.com/dgraph-io/ristretto/v2 v2.3.0 h1:qTQ38m7oIyd4GAed/QkUZyPFNMnvVWyazGXRwvOt5zk=
@@ -21,21 +17,26 @@ github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa5
 github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
 github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
 github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
 github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
 github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
 github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
-github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
-github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
+github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/ISU=
+github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
+github.com/fxamacker/cbor/v2 v2.9.2 h1:X4Ksno9+x3cz0TZv69ec1hxP/+tymuR8PXQJyDwfh78=
+github.com/fxamacker/cbor/v2 v2.9.2/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
 github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
 github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
 github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
 github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
 github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
 github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
-github.com/gofiber/fiber/v2 v2.52.9 h1:YjKl5DOiyP3j0mO61u3NTmK7or8GzzWzCFzkboyP5cw=
-github.com/gofiber/fiber/v2 v2.52.9/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
-github.com/gofiber/fiber/v3 v3.1.0 h1:1p4I820pIa+FGxfwWuQZ5rAyX0WlGZbGT6Hnuxt6hKY=
-github.com/gofiber/fiber/v3 v3.1.0/go.mod h1:n2nYQovvL9z3Too/FGOfgtERjW3GQcAUqgfoezGBZdU=
-github.com/gofiber/schema v1.7.0 h1:yNM+FNRZjyYEli9Ey0AXRBrAY9jTnb+kmGs3lJGPvKg=
-github.com/gofiber/schema v1.7.0/go.mod h1:A/X5Ffyru4p9eBdp99qu+nzviHzQiZ7odLT+TwxWhbk=
-github.com/gofiber/utils/v2 v2.0.2 h1:ShRRssz0F3AhTlAQcuEj54OEDtWF7+HJDwEi/aa6QLI=
-github.com/gofiber/utils/v2 v2.0.2/go.mod h1:+9Ub4NqQ+IaJoTliq5LfdmOJAA/Hzwf4pXOxOa3RrJ0=
+github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
+github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
+github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
+github.com/gofiber/contrib/v3/monitor v1.0.6 h1:uJ8h6vu6wURQD2USa7llBz5XPNNk+3MpQ9sni6ub5ds=
+github.com/gofiber/contrib/v3/monitor v1.0.6/go.mod h1:dOijhTCUoziOf4d2jmLDeQGU2naoZVlrY0Fnm/Ni6iw=
+github.com/gofiber/fiber/v3 v3.2.0 h1:g9+09D320foINPpCnR3ibQ5oBEFHjAWRRfDG1te54u8=
+github.com/gofiber/fiber/v3 v3.2.0/go.mod h1:FHOsc2Db7HhHpsE62QAaJlXVV1pNkbZEptZ4jtti7m4=
+github.com/gofiber/schema v1.7.1 h1:oSJBKdgP8JeIME4TQSAqlNKTU2iBB+2RNmKi8Nsc+TI=
+github.com/gofiber/schema v1.7.1/go.mod h1:A/X5Ffyru4p9eBdp99qu+nzviHzQiZ7odLT+TwxWhbk=
+github.com/gofiber/utils/v2 v2.0.5 h1:IMXoI2A5Dao/aMMBURTNxnhbtQO4kUwUFOgcwFSIjLU=
+github.com/gofiber/utils/v2 v2.0.5/go.mod h1:FwwopfzwAQsoXLCHhOT24eH2jQfBgrrra9S5p0+luxg=
 github.com/google/flatbuffers v25.9.23+incompatible h1:rGZKv+wOb6QPzIdkM2KxhBZCDrA0DeN6DNmRDrqIsQU=
 github.com/google/flatbuffers v25.9.23+incompatible h1:rGZKv+wOb6QPzIdkM2KxhBZCDrA0DeN6DNmRDrqIsQU=
 github.com/google/flatbuffers v25.9.23+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
 github.com/google/flatbuffers v25.9.23+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
 github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
 github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -43,33 +44,43 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
 github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
-github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
+github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao=
+github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
+github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 h1:PwQumkgq4/acIiZhtifTV5OUqqiP82UAl0h87xj/l9k=
+github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg=
 github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
 github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
 github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
 github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
-github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
-github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
-github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
+github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=
+github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
 github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
 github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
 github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
 github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
+github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
 github.com/shamaton/msgpack/v3 v3.1.0 h1:jsk0vEAqVvvS9+fTZ5/EcQ9tz860c9pWxJ4Iwecz8gU=
 github.com/shamaton/msgpack/v3 v3.1.0 h1:jsk0vEAqVvvS9+fTZ5/EcQ9tz860c9pWxJ4Iwecz8gU=
 github.com/shamaton/msgpack/v3 v3.1.0/go.mod h1:DcQG8jrdrQCIxr3HlMYkiXdMhK+KfN2CitkyzsQV4uc=
 github.com/shamaton/msgpack/v3 v3.1.0/go.mod h1:DcQG8jrdrQCIxr3HlMYkiXdMhK+KfN2CitkyzsQV4uc=
+github.com/shirou/gopsutil/v4 v4.26.4 h1:B4SXVbcwTyrocPHEmWBC4uCYr4Xcu3MK1TXqbprAOWY=
+github.com/shirou/gopsutil/v4 v4.26.4/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ=
 github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
 github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
 github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
 github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
-github.com/tinylib/msgp v1.6.3 h1:bCSxiTz386UTgyT1i0MSCvdbWjVW+8sG3PjkGsZQt4s=
-github.com/tinylib/msgp v1.6.3/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
+github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ=
+github.com/tinylib/msgp v1.6.4/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
+github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRUgPQU=
+github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI=
+github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4=
+github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg=
 github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
 github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
 github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
 github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.69.0 h1:fNLLESD2SooWeh2cidsuFtOcrEi4uB4m1mPrkJMZyVI=
-github.com/valyala/fasthttp v1.69.0/go.mod h1:4wA4PfAraPlAsJ5jMSqCE2ug5tqUPwKXxVj8oNECGcw=
+github.com/valyala/fasthttp v1.71.0 h1:tepR7H+Guh9VUqxxcPggYi8R3lGUu2Rsdh+z7/FCY3k=
+github.com/valyala/fasthttp v1.71.0/go.mod h1:z1sDUvOShhXq/C9mwH/fSm1Vb71tUJwmQdgkBrBNwnA=
 github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
 github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
 github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
 github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
 github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
 github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
 github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
 github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
 github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
+github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
 go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
 go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
 go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
 go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
 go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
 go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
@@ -81,27 +92,29 @@ go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42s
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
-golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=
+golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI=
+golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60=
-golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=
+golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=
+golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
-golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
+golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
+golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
-golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
+golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
+golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
 golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=

+ 9 - 4
v4/vendor/github.com/andybalholm/brotli/README.md

@@ -2,13 +2,18 @@ This package is a brotli compressor and decompressor implemented in Go.
 It was translated from the reference implementation (https://github.com/google/brotli)
 It was translated from the reference implementation (https://github.com/google/brotli)
 with the `c2go` tool at https://github.com/andybalholm/c2go.
 with the `c2go` tool at https://github.com/andybalholm/c2go.
 
 
+I am using it in production with https://github.com/andybalholm/redwood.
+
+API documentation is found at https://pkg.go.dev/github.com/andybalholm/brotli?tab=doc.
+
+## Roadmap
+
 I have been working on new compression algorithms (not translated from C)
 I have been working on new compression algorithms (not translated from C)
 in the matchfinder package.
 in the matchfinder package.
 You can use them with the NewWriterV2 function.
 You can use them with the NewWriterV2 function.
 Currently they give better results than the old implementation
 Currently they give better results than the old implementation
 (at least for compressing my test file, Newton’s *Opticks*) 
 (at least for compressing my test file, Newton’s *Opticks*) 
-on levels 2 to 6.
-
-I am using it in production with https://github.com/andybalholm/redwood.
+on levels 0 to 9.
 
 
-API documentation is found at https://pkg.go.dev/github.com/andybalholm/brotli?tab=doc.
+The new APIs are currently considered experimental,
+and are not covered by any SemVer compatibility guarantees.

+ 87 - 191
v4/vendor/github.com/andybalholm/brotli/brotli_bit_stream.go

@@ -1,7 +1,7 @@
 package brotli
 package brotli
 
 
 import (
 import (
-	"math"
+	"slices"
 	"sync"
 	"sync"
 )
 )
 
 
@@ -438,12 +438,6 @@ func buildAndStoreHuffmanTree(histogram []uint32, histogram_length uint, alphabe
 	}
 	}
 }
 }
 
 
-func sortHuffmanTree1(v0 huffmanTree, v1 huffmanTree) bool {
-	return v0.total_count_ < v1.total_count_
-}
-
-var huffmanTreePool sync.Pool
-
 func buildAndStoreHuffmanTreeFast(histogram []uint32, histogram_total uint, max_bits uint, depth []byte, bits []uint16, storage_ix *uint, storage []byte) {
 func buildAndStoreHuffmanTreeFast(histogram []uint32, histogram_total uint, max_bits uint, depth []byte, bits []uint16, storage_ix *uint, storage []byte) {
 	var count uint = 0
 	var count uint = 0
 	var symbols = [4]uint{0}
 	var symbols = [4]uint{0}
@@ -470,98 +464,7 @@ func buildAndStoreHuffmanTreeFast(histogram []uint32, histogram_total uint, max_
 		return
 		return
 	}
 	}
 
 
-	for i := 0; i < int(length); i++ {
-		depth[i] = 0
-	}
-	{
-		var max_tree_size uint = 2*length + 1
-		tree, _ := huffmanTreePool.Get().(*[]huffmanTree)
-		if tree == nil || cap(*tree) < int(max_tree_size) {
-			tmp := make([]huffmanTree, max_tree_size)
-			tree = &tmp
-		} else {
-			*tree = (*tree)[:max_tree_size]
-		}
-		var count_limit uint32
-		for count_limit = 1; ; count_limit *= 2 {
-			var node int = 0
-			var l uint
-			for l = length; l != 0; {
-				l--
-				if histogram[l] != 0 {
-					if histogram[l] >= count_limit {
-						initHuffmanTree(&(*tree)[node:][0], histogram[l], -1, int16(l))
-					} else {
-						initHuffmanTree(&(*tree)[node:][0], count_limit, -1, int16(l))
-					}
-
-					node++
-				}
-			}
-			{
-				var n int = node
-				/* Points to the next leaf node. */ /* Points to the next non-leaf node. */
-				var sentinel huffmanTree
-				var i int = 0
-				var j int = n + 1
-				var k int
-
-				sortHuffmanTreeItems(*tree, uint(n), huffmanTreeComparator(sortHuffmanTree1))
-
-				/* The nodes are:
-				   [0, n): the sorted leaf nodes that we start with.
-				   [n]: we add a sentinel here.
-				   [n + 1, 2n): new parent nodes are added here, starting from
-				                (n+1). These are naturally in ascending order.
-				   [2n]: we add a sentinel at the end as well.
-				   There will be (2n+1) elements at the end. */
-				initHuffmanTree(&sentinel, math.MaxUint32, -1, -1)
-
-				(*tree)[node] = sentinel
-				node++
-				(*tree)[node] = sentinel
-				node++
-
-				for k = n - 1; k > 0; k-- {
-					var left int
-					var right int
-					if (*tree)[i].total_count_ <= (*tree)[j].total_count_ {
-						left = i
-						i++
-					} else {
-						left = j
-						j++
-					}
-
-					if (*tree)[i].total_count_ <= (*tree)[j].total_count_ {
-						right = i
-						i++
-					} else {
-						right = j
-						j++
-					}
-
-					/* The sentinel node becomes the parent node. */
-					(*tree)[node-1].total_count_ = (*tree)[left].total_count_ + (*tree)[right].total_count_
-
-					(*tree)[node-1].index_left_ = int16(left)
-					(*tree)[node-1].index_right_or_value_ = int16(right)
-
-					/* Add back the last sentinel node. */
-					(*tree)[node] = sentinel
-					node++
-				}
-
-				if setDepth(2*n-1, *tree, depth, 14) {
-					/* We need to pack the Huffman tree in 14 bits. If this was not
-					   successful, add fake entities to the lowest values and retry. */
-					break
-				}
-			}
-		}
-
-		huffmanTreePool.Put(tree)
-	}
+	chooseBitDepths(histogram[:length], depth[:length], 14)
 
 
 	convertBitDepthsToSymbols(depth, length, bits)
 	convertBitDepthsToSymbols(depth, length, bits)
 	if count <= 4 {
 	if count <= 4 {
@@ -647,6 +550,90 @@ func buildAndStoreHuffmanTreeFast(histogram []uint32, histogram_total uint, max_
 	}
 	}
 }
 }
 
 
+type symbolAndCount struct {
+	symbol uint32
+	count  uint32
+}
+
+func chooseBitDepths(histogram []uint32, depth []byte, maxBits int) {
+	totalCodeSpace := 1 << maxBits
+	symbols := make([]symbolAndCount, 0, 704 /* static capacity so that it will be stack allocated */)
+	var totalCount uint32 = 0
+	for i, n := range histogram {
+		if n != 0 {
+			symbols = append(symbols, symbolAndCount{
+				symbol: uint32(i),
+				count:  n,
+			})
+			totalCount += n
+		}
+	}
+	slices.SortFunc(symbols, func(a, b symbolAndCount) int {
+		return int(b.count) - int(a.count)
+	})
+
+	// boundaries contains indexes into symbols such that (for example)
+	// boundaries[8] is the index of the first 8-bit symbol.
+	boundaries := make([]int, maxBits+1, 20 /* static capacity for stack allocation */)
+
+	codeSpaceUsed := 0
+
+	// Assign initial boundaries conservatively, making sure no symbol uses more
+	// than its share of code space.
+	totalRatio := float64(totalCount) / float64(totalCodeSpace)
+	currentDepth := 1
+	for i, symbol := range symbols {
+		for currentDepth < maxBits && float64(symbol.count)/float64(int(1)<<(maxBits-currentDepth)) < totalRatio {
+			currentDepth++
+			boundaries[currentDepth] = i
+		}
+		codeSpaceUsed += 1 << (maxBits - currentDepth)
+	}
+	for i := currentDepth + 1; i <= maxBits; i++ {
+		boundaries[i] = len(symbols)
+	}
+
+	// Move the boundaries till the code space is filled.
+	for codeSpaceUsed < totalCodeSpace {
+		available := totalCodeSpace - codeSpaceUsed
+		// Find the most efficient boundary to move, based on the ratio of how
+		// many times the symbol was used to how much code space will be consumed.
+		bestRatio := 0.0
+		bestBoundary := 0
+		for i := 2; i <= maxBits; i++ {
+			cost := 1 << (maxBits - i) // code space that would be used by moving this boundary
+			if cost > available {
+				continue
+			}
+			if boundaries[i] == len(symbols) {
+				continue
+			}
+			if i < maxBits && boundaries[i] == boundaries[i+1] {
+				continue
+			}
+			ratio := float64(symbols[boundaries[i]].count) / float64(cost)
+			if ratio > bestRatio {
+				bestRatio = ratio
+				bestBoundary = i
+			}
+		}
+		boundaries[bestBoundary]++
+		codeSpaceUsed += 1 << (maxBits - bestBoundary)
+	}
+
+	for i := range depth {
+		depth[i] = 0
+	}
+	for i := 1; i < maxBits; i++ {
+		for j := boundaries[i]; j < boundaries[i+1]; j++ {
+			depth[symbols[j].symbol] = byte(i)
+		}
+	}
+	for j := boundaries[maxBits]; j < len(symbols); j++ {
+		depth[symbols[j].symbol] = byte(maxBits)
+	}
+}
+
 func buildAndStoreHuffmanTreeFastBW(histogram []uint32, histogram_total uint, max_bits uint, depth []byte, bits []uint16, bw *bitWriter) {
 func buildAndStoreHuffmanTreeFastBW(histogram []uint32, histogram_total uint, max_bits uint, depth []byte, bits []uint16, bw *bitWriter) {
 	var count uint = 0
 	var count uint = 0
 	var symbols = [4]uint{0}
 	var symbols = [4]uint{0}
@@ -673,98 +660,7 @@ func buildAndStoreHuffmanTreeFastBW(histogram []uint32, histogram_total uint, ma
 		return
 		return
 	}
 	}
 
 
-	for i := 0; i < int(length); i++ {
-		depth[i] = 0
-	}
-	{
-		var max_tree_size uint = 2*length + 1
-		tree, _ := huffmanTreePool.Get().(*[]huffmanTree)
-		if tree == nil || cap(*tree) < int(max_tree_size) {
-			tmp := make([]huffmanTree, max_tree_size)
-			tree = &tmp
-		} else {
-			*tree = (*tree)[:max_tree_size]
-		}
-		var count_limit uint32
-		for count_limit = 1; ; count_limit *= 2 {
-			var node int = 0
-			var l uint
-			for l = length; l != 0; {
-				l--
-				if histogram[l] != 0 {
-					if histogram[l] >= count_limit {
-						initHuffmanTree(&(*tree)[node:][0], histogram[l], -1, int16(l))
-					} else {
-						initHuffmanTree(&(*tree)[node:][0], count_limit, -1, int16(l))
-					}
-
-					node++
-				}
-			}
-			{
-				var n int = node
-				/* Points to the next leaf node. */ /* Points to the next non-leaf node. */
-				var sentinel huffmanTree
-				var i int = 0
-				var j int = n + 1
-				var k int
-
-				sortHuffmanTreeItems(*tree, uint(n), huffmanTreeComparator(sortHuffmanTree1))
-
-				/* The nodes are:
-				   [0, n): the sorted leaf nodes that we start with.
-				   [n]: we add a sentinel here.
-				   [n + 1, 2n): new parent nodes are added here, starting from
-				                (n+1). These are naturally in ascending order.
-				   [2n]: we add a sentinel at the end as well.
-				   There will be (2n+1) elements at the end. */
-				initHuffmanTree(&sentinel, math.MaxUint32, -1, -1)
-
-				(*tree)[node] = sentinel
-				node++
-				(*tree)[node] = sentinel
-				node++
-
-				for k = n - 1; k > 0; k-- {
-					var left int
-					var right int
-					if (*tree)[i].total_count_ <= (*tree)[j].total_count_ {
-						left = i
-						i++
-					} else {
-						left = j
-						j++
-					}
-
-					if (*tree)[i].total_count_ <= (*tree)[j].total_count_ {
-						right = i
-						i++
-					} else {
-						right = j
-						j++
-					}
-
-					/* The sentinel node becomes the parent node. */
-					(*tree)[node-1].total_count_ = (*tree)[left].total_count_ + (*tree)[right].total_count_
-
-					(*tree)[node-1].index_left_ = int16(left)
-					(*tree)[node-1].index_right_or_value_ = int16(right)
-
-					/* Add back the last sentinel node. */
-					(*tree)[node] = sentinel
-					node++
-				}
-
-				if setDepth(2*n-1, *tree, depth, 14) {
-					/* We need to pack the Huffman tree in 14 bits. If this was not
-					   successful, add fake entities to the lowest values and retry. */
-					break
-				}
-			}
-		}
-
-		huffmanTreePool.Put(tree)
-	}
+	chooseBitDepths(histogram[:length], depth[:length], 14)
 
 
 	convertBitDepthsToSymbols(depth, length, bits)
 	convertBitDepthsToSymbols(depth, length, bits)
 	if count <= 4 {
 	if count <= 4 {

+ 2 - 2
v4/vendor/github.com/andybalholm/brotli/encoder.go

@@ -60,7 +60,7 @@ func (e *Encoder) Encode(dst []byte, src []byte, matches []matchfinder.Match, la
 			// If the stream ends with unmatched bytes, we need a dummy copy length.
 			// If the stream ends with unmatched bytes, we need a dummy copy length.
 			copyCode = 2
 			copyCode = 2
 		}
 		}
-		command := combineLengthCodes(insertCode, copyCode, false)
+		command := combineLengthCodes(insertCode, copyCode, i > 0 && m.Distance == matches[i-1].Distance)
 		commandHisto[command]++
 		commandHisto[command]++
 		commandCount++
 		commandCount++
 
 
@@ -127,7 +127,7 @@ func (e *Encoder) Encode(dst []byte, src []byte, matches []matchfinder.Match, la
 			// If the stream ends with unmatched bytes, we need a dummy copy length.
 			// If the stream ends with unmatched bytes, we need a dummy copy length.
 			copyCode = 2
 			copyCode = 2
 		}
 		}
-		command := combineLengthCodes(insertCode, copyCode, false)
+		command := combineLengthCodes(insertCode, copyCode, i > 0 && m.Distance == matches[i-1].Distance)
 		e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
 		e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
 		if kInsExtra[insertCode] > 0 {
 		if kInsExtra[insertCode] > 0 {
 			e.bw.writeBits(uint(kInsExtra[insertCode]), uint64(m.Unmatched)-uint64(kInsBase[insertCode]))
 			e.bw.writeBits(uint(kInsExtra[insertCode]), uint64(m.Unmatched)-uint64(kInsBase[insertCode]))

+ 197 - 0
v4/vendor/github.com/andybalholm/brotli/encoder_fast.go

@@ -0,0 +1,197 @@
+package brotli
+
+import (
+	"math"
+
+	"github.com/andybalholm/brotli/matchfinder"
+)
+
+func gaussianProbability(x, mean, stdDev float64) float64 {
+	return math.Exp(-(x-mean)*(x-mean)/(2*stdDev*stdDev)) / math.Sqrt(2*math.Pi*stdDev*stdDev)
+}
+
+// A FastEncoder implements the matchfinder.Encoder interface, writing in Brotli
+// format. It uses a simplified encoding (like level 0 in the reference
+// implementation) to save time.
+type FastEncoder struct {
+	wroteHeader   bool
+	bw            bitWriter
+	commandHisto  [704]uint32
+	distanceHisto [64]uint32
+}
+
+func (e *FastEncoder) Reset() {
+	e.wroteHeader = false
+	e.bw = bitWriter{}
+}
+
+func (e *FastEncoder) Encode(dst []byte, src []byte, matches []matchfinder.Match, lastBlock bool) []byte {
+	e.bw.dst = dst
+	if !e.wroteHeader {
+		e.bw.writeBits(4, 15)
+		e.wroteHeader = true
+
+		// Fill the histograms with default statistics.
+
+		// For the command codes we're using for insert lengths (insert + 2-byte copy),
+		// fill the histogram with a Zipf-squared distribution.
+		for i := range 24 {
+			e.commandHisto[combineLengthCodes(uint16(i), 0, false)] = uint32(2000 / (i + 1) / (i + 1))
+		}
+
+		// For the command codes we're using for copy lengths (0 insert + copy
+		// (length - 2), with repeat distance),
+		// fill the histogram with Zipf distribution starting at code 1 (match length 5),
+		// but a smaller frequency for code 0.
+		e.commandHisto[combineLengthCodes(0, 0, true)] = 50
+		for i := 1; i < 24; i++ {
+			e.commandHisto[combineLengthCodes(0, uint16(i), i < 16)] = uint32(800 / i)
+		}
+
+		// Fill in the combined codes for short insert and copy lengths.
+		for insertCode := range 6 {
+			copyCode := 2
+			e.commandHisto[128+insertCode<<3+copyCode] = uint32(100 / (insertCode + 1) / (insertCode + 1) / copyCode)
+			for copyCode := 3; copyCode < 8; copyCode++ {
+				e.commandHisto[128+insertCode<<3+copyCode] = uint32(343 / (insertCode + 1) / (insertCode + 1) / copyCode)
+			}
+		}
+
+		// Fill e.distanceHisto with a normal distribution.
+		e.distanceHisto[0] = 100
+		for i := 16; i < 64; i++ {
+			e.distanceHisto[i] = max(uint32(gaussianProbability(float64(i), 32, 8)*10000), 1)
+		}
+	}
+
+	if len(src) == 0 {
+		if lastBlock {
+			e.bw.writeBits(2, 3) // islast + isempty
+			e.bw.jumpToByteBoundary()
+			return e.bw.dst
+		}
+		return dst
+	}
+
+	var literalHisto [256]uint32
+	for _, c := range src {
+		literalHisto[c]++
+	}
+
+	storeMetaBlockHeaderBW(uint(len(src)), false, &e.bw)
+	e.bw.writeBits(13, 0)
+
+	var literalDepths [256]byte
+	var literalBits [256]uint16
+	buildAndStoreHuffmanTreeFastBW(literalHisto[:], uint(len(src)), 8, literalDepths[:], literalBits[:], &e.bw)
+
+	var commandDepths [704]byte
+	var commandBits [704]uint16
+	commandCount := 0
+	for _, n := range e.commandHisto {
+		commandCount += int(n)
+	}
+	buildAndStoreHuffmanTreeFastBW(e.commandHisto[:], uint(commandCount), 10, commandDepths[:], commandBits[:], &e.bw)
+
+	var distanceDepths [64]byte
+	var distanceBits [64]uint16
+	distanceCount := 0
+	for _, n := range e.distanceHisto {
+		distanceCount += int(n)
+	}
+	buildAndStoreHuffmanTreeFastBW(e.distanceHisto[:], uint(distanceCount), 6, distanceDepths[:], distanceBits[:], &e.bw)
+
+	// Reset the statistics, starting with a count of 1 for each symbol we might use.
+	for i := range 24 {
+		e.commandHisto[combineLengthCodes(uint16(i), 0, false)] = 1
+	}
+	for i := range 24 {
+		e.commandHisto[combineLengthCodes(0, uint16(i), i < 16)] = 1
+	}
+	for insertCode := range 6 {
+		for copyCode := 2; copyCode < 8; copyCode++ {
+			e.commandHisto[128+insertCode<<3+copyCode] = 1
+		}
+	}
+	e.distanceHisto[0] = 1
+	for i := 16; i < 64; i++ {
+		e.distanceHisto[i] = 1
+	}
+
+	pos := 0
+	for i, m := range matches {
+		lengthFinished := false
+		// Write a command with the appropriate insert length, and a copy length of 2.
+		if m.Unmatched < 6 {
+			var command int
+			if m.Length < 10 && m.Length != 0 {
+				// We can use a combined insert/copy code with no extra bits.
+				command = m.Unmatched<<3 + m.Length - 2 + 128
+				lengthFinished = true
+			} else {
+				command = m.Unmatched<<3 + 128
+			}
+			e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
+			e.commandHisto[command]++
+		} else {
+			insertCode := getInsertLengthCode(uint(m.Unmatched))
+			command := combineLengthCodes(insertCode, 0, false)
+			e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
+			e.bw.writeBits(uint(kInsExtra[insertCode]), uint64(m.Unmatched)-uint64(kInsBase[insertCode]))
+			e.commandHisto[command]++
+		}
+
+		// Write the literals, if any.
+		if m.Unmatched > 0 {
+			for _, c := range src[pos : pos+m.Unmatched] {
+				e.bw.writeBits(uint(literalDepths[c]), uint64(literalBits[c]))
+			}
+		}
+
+		if m.Length != 0 {
+			// Write the distance code.
+			var distCode distanceCode
+			if i == 0 || m.Distance != matches[i-1].Distance {
+				distCode = getDistanceCode(m.Distance)
+			}
+			e.bw.writeBits(uint(distanceDepths[distCode.code]), uint64(distanceBits[distCode.code]))
+			if distCode.nExtra > 0 {
+				e.bw.writeBits(distCode.nExtra, distCode.extraBits)
+			}
+			e.distanceHisto[distCode.code]++
+
+			// Write a command for the remainder of the match (after the first two bytes
+			// from before), using the previous distance.
+			switch {
+			case lengthFinished:
+				// We don't need to finish the length.
+			case m.Length < 12:
+				command := m.Length - 4
+				e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
+				e.commandHisto[command]++
+			case m.Length < 72:
+				copyCode := getCopyLengthCode(uint(m.Length - 2))
+				command := combineLengthCodes(0, copyCode, true)
+				e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
+				e.bw.writeBits(uint(kCopyExtra[copyCode]), uint64(m.Length-2)-uint64(kCopyBase[copyCode]))
+				e.commandHisto[command]++
+			default:
+				copyCode := getCopyLengthCode(uint(m.Length - 2))
+				command := combineLengthCodes(0, copyCode, false)
+				e.bw.writeBits(uint(commandDepths[command]), uint64(commandBits[command]))
+				e.bw.writeBits(uint(kCopyExtra[copyCode]), uint64(m.Length-2)-uint64(kCopyBase[copyCode]))
+				e.bw.writeBits(uint(distanceDepths[0]), uint64(distanceBits[0]))
+				e.commandHisto[command]++
+				e.distanceHisto[0]++
+			}
+		}
+
+		pos += m.Unmatched + m.Length
+	}
+
+	if lastBlock {
+		e.bw.writeBits(2, 3) // islast + isempty
+		e.bw.jumpToByteBoundary()
+	}
+	return e.bw.dst
+}

+ 4 - 4
v4/vendor/github.com/gofiber/fiber/v2/internal/schema/LICENSE → v4/vendor/github.com/andybalholm/brotli/flate/LICENSE

@@ -1,16 +1,16 @@
-Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
+Copyright (c) 2009 The Go Authors. All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 modification, are permitted provided that the following conditions are
 met:
 met:
 
 
-	 * Redistributions of source code must retain the above copyright
+   * Redistributions of source code must retain the above copyright
 notice, this list of conditions and the following disclaimer.
 notice, this list of conditions and the following disclaimer.
-	 * Redistributions in binary form must reproduce the above
+   * Redistributions in binary form must reproduce the above
 copyright notice, this list of conditions and the following disclaimer
 copyright notice, this list of conditions and the following disclaimer
 in the documentation and/or other materials provided with the
 in the documentation and/or other materials provided with the
 distribution.
 distribution.
-	 * Neither the name of Google Inc. nor the names of its
+   * Neither the name of Google Inc. nor the names of its
 contributors may be used to endorse or promote products derived from
 contributors may be used to endorse or promote products derived from
 this software without specific prior written permission.
 this software without specific prior written permission.
 
 

+ 2 - 0
v4/vendor/github.com/andybalholm/brotli/flate/README.md

@@ -0,0 +1,2 @@
+This package is a flate/gzip compressor that reuses the matchfinder package that I’ve been developing for brotli.
+It is copied and adapted from the standard library compress/flate package.

+ 65 - 0
v4/vendor/github.com/andybalholm/brotli/flate/gzip.go

@@ -0,0 +1,65 @@
+package flate
+
+import (
+	"hash/crc32"
+	"time"
+
+	"github.com/andybalholm/brotli/matchfinder"
+)
+
+func NewGZIPEncoder() matchfinder.Encoder {
+	return &gzipEncoder{
+		f: NewEncoder(),
+	}
+}
+
+type gzipEncoder struct {
+	f           matchfinder.Encoder
+	length      uint32
+	crc         uint32
+	wroteHeader bool
+}
+
+func (g *gzipEncoder) Reset() {
+	g.f.Reset()
+	g.length = 0
+	g.crc = 0
+	g.wroteHeader = false
+}
+
+func appendUint32(dst []byte, n uint32) []byte {
+	return append(dst,
+		byte(n),
+		byte(n>>8),
+		byte(n>>16),
+		byte(n>>24),
+	)
+}
+
+func (g *gzipEncoder) Encode(dst []byte, src []byte, matches []matchfinder.Match, lastBlock bool) []byte {
+	if !g.wroteHeader {
+		dst = append(dst,
+			0x1f, 0x8b, // magic number
+			8, // CM = flate
+			0, // FLG
+		)
+		dst = appendUint32(dst, uint32(time.Now().Unix()))
+		dst = append(dst,
+			0,   // XFL
+			255, // OS (unspecified)
+		)
+		g.wroteHeader = true
+	}
+
+	dst = g.f.Encode(dst, src, matches, lastBlock)
+
+	g.length += uint32(len(src))
+	g.crc = crc32.Update(g.crc, crc32.IEEETable, src)
+
+	if lastBlock {
+		dst = appendUint32(dst, g.crc)
+		dst = appendUint32(dst, g.length)
+	}
+
+	return dst
+}

+ 517 - 0
v4/vendor/github.com/andybalholm/brotli/flate/huffman_bit_writer.go

@@ -0,0 +1,517 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package flate
+
+import (
+	"github.com/andybalholm/brotli/matchfinder"
+)
+
+const (
+	// The largest offset code.
+	offsetCodeCount = 30
+
+	// The special code used to mark the end of a block.
+	endBlockMarker = 256
+
+	// The first length code.
+	lengthCodesStart = 257
+
+	// The number of codegen codes.
+	codegenCodeCount = 19
+	badCode          = 255
+
+	maxNumLit         = 286
+	maxStoreBlockSize = 65535
+	baseMatchLength   = 3 // The smallest match length per the RFC section 3.2.5
+	baseMatchOffset   = 1 // The smallest match offset
+)
+
+// The number of extra bits needed by length code X - LENGTH_CODES_START.
+var lengthExtraBits = []int8{
+	/* 257 */ 0, 0, 0,
+	/* 260 */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 2,
+	/* 270 */ 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,
+	/* 280 */ 4, 5, 5, 5, 5, 0,
+}
+
+// The length indicated by length code X - LENGTH_CODES_START.
+var lengthBase = []int{
+	0, 1, 2, 3, 4, 5, 6, 7, 8, 10,
+	12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
+	64, 80, 96, 112, 128, 160, 192, 224, 255,
+}
+
+// offset code word extra bits.
+var offsetExtraBits = []int8{
+	0, 0, 0, 0, 1, 1, 2, 2, 3, 3,
+	4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
+	9, 9, 10, 10, 11, 11, 12, 12, 13, 13,
+}
+
+var offsetBase = []int{
+	0x000000, 0x000001, 0x000002, 0x000003, 0x000004,
+	0x000006, 0x000008, 0x00000c, 0x000010, 0x000018,
+	0x000020, 0x000030, 0x000040, 0x000060, 0x000080,
+	0x0000c0, 0x000100, 0x000180, 0x000200, 0x000300,
+	0x000400, 0x000600, 0x000800, 0x000c00, 0x001000,
+	0x001800, 0x002000, 0x003000, 0x004000, 0x006000,
+}
+
+// The odd order in which the codegen code sizes are written.
+var codegenOrder = []uint32{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
+
+type huffmanBitWriter struct {
+	dst []byte
+
+	// Data waiting to be written is the low nbits of bits.
+	bits            uint64
+	nbits           uint
+	codegenFreq     [codegenCodeCount]int32
+	literalFreq     []int32
+	offsetFreq      []int32
+	codegen         []uint8
+	literalEncoding *huffmanEncoder
+	offsetEncoding  *huffmanEncoder
+	codegenEncoding *huffmanEncoder
+}
+
+func NewEncoder() matchfinder.Encoder {
+	return &huffmanBitWriter{
+		literalFreq:     make([]int32, maxNumLit),
+		offsetFreq:      make([]int32, offsetCodeCount),
+		codegen:         make([]uint8, maxNumLit+offsetCodeCount+1),
+		literalEncoding: newHuffmanEncoder(maxNumLit),
+		codegenEncoding: newHuffmanEncoder(codegenCodeCount),
+		offsetEncoding:  newHuffmanEncoder(offsetCodeCount),
+	}
+}
+
+func (w *huffmanBitWriter) Reset() {
+	w.bits, w.nbits = 0, 0
+}
+
+func (w *huffmanBitWriter) flush() {
+	dst := w.dst
+	for w.nbits != 0 {
+		dst = append(dst, byte(w.bits))
+		w.bits >>= 8
+		if w.nbits > 8 { // Avoid underflow
+			w.nbits -= 8
+		} else {
+			w.nbits = 0
+		}
+	}
+	w.bits = 0
+	w.dst = dst
+}
+
+func (w *huffmanBitWriter) writeBits(b int32, nb uint) {
+	w.bits |= uint64(b) << w.nbits
+	w.nbits += nb
+	if w.nbits >= 48 {
+		bits := w.bits
+		w.bits >>= 48
+		w.nbits -= 48
+		w.dst = append(w.dst,
+			byte(bits),
+			byte(bits>>8),
+			byte(bits>>16),
+			byte(bits>>24),
+			byte(bits>>32),
+			byte(bits>>40),
+		)
+	}
+}
+
+func (w *huffmanBitWriter) writeBytes(bytes []byte) {
+	if w.nbits&7 != 0 {
+		panic("writeBytes with unfinished bits")
+	}
+	for w.nbits != 0 {
+		w.dst = append(w.dst, byte(w.bits))
+		w.bits >>= 8
+		w.nbits -= 8
+	}
+	w.dst = append(w.dst, bytes...)
+}
+
+// RFC 1951 3.2.7 specifies a special run-length encoding for specifying
+// the literal and offset lengths arrays (which are concatenated into a single
+// array).  This method generates that run-length encoding.
+//
+// The result is written into the codegen array, and the frequencies
+// of each code is written into the codegenFreq array.
+// Codes 0-15 are single byte codes. Codes 16-18 are followed by additional
+// information. Code badCode is an end marker
+//
+//	numLiterals      The number of literals in literalEncoding
+//	numOffsets       The number of offsets in offsetEncoding
+//	litenc, offenc   The literal and offset encoder to use
+func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litEnc, offEnc *huffmanEncoder) {
+	for i := range w.codegenFreq {
+		w.codegenFreq[i] = 0
+	}
+	// Note that we are using codegen both as a temporary variable for holding
+	// a copy of the frequencies, and as the place where we put the result.
+	// This is fine because the output is always shorter than the input used
+	// so far.
+	codegen := w.codegen // cache
+	// Copy the concatenated code sizes to codegen. Put a marker at the end.
+	cgnl := codegen[:numLiterals]
+	for i := range cgnl {
+		cgnl[i] = uint8(litEnc.codes[i].len)
+	}
+
+	cgnl = codegen[numLiterals : numLiterals+numOffsets]
+	for i := range cgnl {
+		cgnl[i] = uint8(offEnc.codes[i].len)
+	}
+	codegen[numLiterals+numOffsets] = badCode
+
+	size := codegen[0]
+	count := 1
+	outIndex := 0
+	for inIndex := 1; size != badCode; inIndex++ {
+		// INVARIANT: We have seen "count" copies of size that have not yet
+		// had output generated for them.
+		nextSize := codegen[inIndex]
+		if nextSize == size {
+			count++
+			continue
+		}
+		// We need to generate codegen indicating "count" of size.
+		if size != 0 {
+			codegen[outIndex] = size
+			outIndex++
+			w.codegenFreq[size]++
+			count--
+			for count >= 3 {
+				n := 6
+				if n > count {
+					n = count
+				}
+				codegen[outIndex] = 16
+				outIndex++
+				codegen[outIndex] = uint8(n - 3)
+				outIndex++
+				w.codegenFreq[16]++
+				count -= n
+			}
+		} else {
+			for count >= 11 {
+				n := 138
+				if n > count {
+					n = count
+				}
+				codegen[outIndex] = 18
+				outIndex++
+				codegen[outIndex] = uint8(n - 11)
+				outIndex++
+				w.codegenFreq[18]++
+				count -= n
+			}
+			if count >= 3 {
+				// count >= 3 && count <= 10
+				codegen[outIndex] = 17
+				outIndex++
+				codegen[outIndex] = uint8(count - 3)
+				outIndex++
+				w.codegenFreq[17]++
+				count = 0
+			}
+		}
+		count--
+		for ; count >= 0; count-- {
+			codegen[outIndex] = size
+			outIndex++
+			w.codegenFreq[size]++
+		}
+		// Set up invariant for next time through the loop.
+		size = nextSize
+		count = 1
+	}
+	// Marker indicating the end of the codegen.
+	codegen[outIndex] = badCode
+}
+
+// dynamicSize returns the size of dynamically encoded data in bits.
+func (w *huffmanBitWriter) dynamicSize(litEnc, offEnc *huffmanEncoder, extraBits int) (size, numCodegens int) {
+	numCodegens = len(w.codegenFreq)
+	for numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {
+		numCodegens--
+	}
+	header := 3 + 5 + 5 + 4 + (3 * numCodegens) +
+		w.codegenEncoding.bitLength(w.codegenFreq[:]) +
+		int(w.codegenFreq[16])*2 +
+		int(w.codegenFreq[17])*3 +
+		int(w.codegenFreq[18])*7
+	size = header +
+		litEnc.bitLength(w.literalFreq) +
+		offEnc.bitLength(w.offsetFreq) +
+		extraBits
+
+	return size, numCodegens
+}
+
+// fixedSize returns the size of dynamically encoded data in bits.
+func (w *huffmanBitWriter) fixedSize(extraBits int) int {
+	return 3 +
+		fixedLiteralEncoding.bitLength(w.literalFreq) +
+		fixedOffsetEncoding.bitLength(w.offsetFreq) +
+		extraBits
+}
+
+// storedSize calculates the stored size, including header.
+// The function returns the size in bits and whether the block
+// fits inside a single block.
+func (w *huffmanBitWriter) storedSize(in []byte) (int, bool) {
+	if in == nil {
+		return 0, false
+	}
+	if len(in) <= maxStoreBlockSize {
+		return (len(in) + 5) * 8, true
+	}
+	return 0, false
+}
+
+func (w *huffmanBitWriter) writeCode(c hcode) {
+	w.bits |= uint64(c.code) << w.nbits
+	w.nbits += uint(c.len)
+	if w.nbits >= 48 {
+		bits := w.bits
+		w.bits >>= 48
+		w.nbits -= 48
+		w.dst = append(w.dst,
+			byte(bits),
+			byte(bits>>8),
+			byte(bits>>16),
+			byte(bits>>24),
+			byte(bits>>32),
+			byte(bits>>40),
+		)
+	}
+}
+
+// Write the header of a dynamic Huffman block to the output stream.
+//
+//	numLiterals  The number of literals specified in codegen
+//	numOffsets   The number of offsets specified in codegen
+//	numCodegens  The number of codegens used in codegen
+func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, numCodegens int, isEof bool) {
+	var firstBits int32 = 4
+	if isEof {
+		firstBits = 5
+	}
+	w.writeBits(firstBits, 3)
+	w.writeBits(int32(numLiterals-257), 5)
+	w.writeBits(int32(numOffsets-1), 5)
+	w.writeBits(int32(numCodegens-4), 4)
+
+	for i := 0; i < numCodegens; i++ {
+		value := uint(w.codegenEncoding.codes[codegenOrder[i]].len)
+		w.writeBits(int32(value), 3)
+	}
+
+	i := 0
+	for {
+		var codeWord int = int(w.codegen[i])
+		i++
+		if codeWord == badCode {
+			break
+		}
+		w.writeCode(w.codegenEncoding.codes[uint32(codeWord)])
+
+		switch codeWord {
+		case 16:
+			w.writeBits(int32(w.codegen[i]), 2)
+			i++
+		case 17:
+			w.writeBits(int32(w.codegen[i]), 3)
+			i++
+		case 18:
+			w.writeBits(int32(w.codegen[i]), 7)
+			i++
+		}
+	}
+}
+
+func (w *huffmanBitWriter) writeStoredHeader(length int, isEof bool) {
+	var flag int32
+	if isEof {
+		flag = 1
+	}
+	w.writeBits(flag, 3)
+	w.flush()
+	w.writeBits(int32(length), 16)
+	w.writeBits(int32(^uint16(length)), 16)
+}
+
+func (w *huffmanBitWriter) writeFixedHeader(isEof bool) {
+	// Indicate that we are a fixed Huffman block
+	var value int32 = 2
+	if isEof {
+		value = 3
+	}
+	w.writeBits(value, 3)
+}
+
+// writeBlock will write a block of tokens with the smallest encoding.
+func (w *huffmanBitWriter) writeBlock(matches []matchfinder.Match, eof bool, input []byte) {
+	numLiterals, numOffsets := w.makeStatistics(matches, input)
+
+	var extraBits int
+	storedSize, storable := w.storedSize(input)
+	if storable {
+		// We only bother calculating the costs of the extra bits required by
+		// the length of offset fields (which will be the same for both fixed
+		// and dynamic encoding), if we need to compare those two encodings
+		// against stored encoding.
+		for lengthCode := lengthCodesStart + 8; lengthCode < numLiterals; lengthCode++ {
+			// First eight length codes have extra size = 0.
+			extraBits += int(w.literalFreq[lengthCode]) * int(lengthExtraBits[lengthCode-lengthCodesStart])
+		}
+		for offsetCode := 4; offsetCode < numOffsets; offsetCode++ {
+			// First four offset codes have extra size = 0.
+			extraBits += int(w.offsetFreq[offsetCode]) * int(offsetExtraBits[offsetCode])
+		}
+	}
+
+	// Figure out smallest code.
+	// Fixed Huffman baseline.
+	var literalEncoding = fixedLiteralEncoding
+	var offsetEncoding = fixedOffsetEncoding
+	var size = w.fixedSize(extraBits)
+
+	// Dynamic Huffman?
+	var numCodegens int
+
+	// Generate codegen and codegenFrequencies, which indicates how to encode
+	// the literalEncoding and the offsetEncoding.
+	w.generateCodegen(numLiterals, numOffsets, w.literalEncoding, w.offsetEncoding)
+	w.codegenEncoding.generate(w.codegenFreq[:], 7)
+	dynamicSize, numCodegens := w.dynamicSize(w.literalEncoding, w.offsetEncoding, extraBits)
+
+	if dynamicSize < size {
+		size = dynamicSize
+		literalEncoding = w.literalEncoding
+		offsetEncoding = w.offsetEncoding
+	}
+
+	// Stored bytes?
+	if storable && storedSize < size {
+		w.writeStoredHeader(len(input), eof)
+		w.writeBytes(input)
+		return
+	}
+
+	// Huffman.
+	if literalEncoding == fixedLiteralEncoding {
+		w.writeFixedHeader(eof)
+	} else {
+		w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
+	}
+
+	// Write the tokens.
+	w.writeTokens(matches, input, literalEncoding.codes, offsetEncoding.codes)
+	w.writeCode(literalEncoding.codes[endBlockMarker])
+}
+
+// makeStatistics indexes a slice of tokens, and updates
+// literalFreq and offsetFreq, and generates literalEncoding
+// and offsetEncoding.
+// The number of literal and offset tokens is returned.
+func (w *huffmanBitWriter) makeStatistics(matches []matchfinder.Match, input []byte) (numLiterals, numOffsets int) {
+	for i := range w.literalFreq {
+		w.literalFreq[i] = 0
+	}
+	for i := range w.offsetFreq {
+		w.offsetFreq[i] = 0
+	}
+
+	pos := 0
+	for _, m := range matches {
+		for _, c := range input[pos : pos+m.Unmatched] {
+			w.literalFreq[c]++
+		}
+		pos += m.Unmatched
+
+		if m.Length == 0 {
+			continue
+		}
+		w.literalFreq[lengthCodesStart+lengthCode(m.Length)]++
+		w.offsetFreq[offsetCode(m.Distance)]++
+		pos += m.Length
+	}
+	w.literalFreq[endBlockMarker]++
+
+	// get the number of literals
+	numLiterals = len(w.literalFreq)
+	for w.literalFreq[numLiterals-1] == 0 {
+		numLiterals--
+	}
+	// get the number of offsets
+	numOffsets = len(w.offsetFreq)
+	for numOffsets > 0 && w.offsetFreq[numOffsets-1] == 0 {
+		numOffsets--
+	}
+	if numOffsets == 0 {
+		// We haven't found a single match. If we want to go with the dynamic encoding,
+		// we should count at least one offset to be sure that the offset huffman tree could be encoded.
+		w.offsetFreq[0] = 1
+		numOffsets = 1
+	}
+	w.literalEncoding.generate(w.literalFreq, 15)
+	w.offsetEncoding.generate(w.offsetFreq, 15)
+	return
+}
+
+// writeTokens writes a slice of tokens to the output.
+// codes for literal and offset encoding must be supplied.
+func (w *huffmanBitWriter) writeTokens(matches []matchfinder.Match, input []byte, leCodes, oeCodes []hcode) {
+	pos := 0
+	for _, m := range matches {
+		for _, c := range input[pos : pos+m.Unmatched] {
+			w.writeCode(leCodes[c])
+		}
+		pos += m.Unmatched
+
+		// Write the length
+		length := m.Length
+		if length == 0 {
+			continue
+		}
+		lengthCode := lengthCode(length)
+		w.writeCode(leCodes[lengthCode+lengthCodesStart])
+		extraLengthBits := uint(lengthExtraBits[lengthCode])
+		if extraLengthBits > 0 {
+			extraLength := int32(length - baseMatchLength - lengthBase[lengthCode])
+			w.writeBits(extraLength, extraLengthBits)
+		}
+
+		// Write the offset
+		offset := m.Distance
+		offsetCode := offsetCode(offset)
+		w.writeCode(oeCodes[offsetCode])
+		extraOffsetBits := uint(offsetExtraBits[offsetCode])
+		if extraOffsetBits > 0 {
+			extraOffset := int32(offset - baseMatchOffset - offsetBase[offsetCode])
+			w.writeBits(extraOffset, extraOffsetBits)
+		}
+		pos += m.Length
+	}
+}
+
+func (w *huffmanBitWriter) Encode(dst []byte, src []byte, matches []matchfinder.Match, lastBlock bool) []byte {
+	w.dst = dst
+
+	w.writeBlock(matches, lastBlock, src)
+	if lastBlock {
+		w.flush()
+	}
+
+	dst = w.dst
+	w.dst = nil
+	return dst
+}

+ 346 - 0
v4/vendor/github.com/andybalholm/brotli/flate/huffman_code.go

@@ -0,0 +1,346 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package flate
+
+import (
+	"math"
+	"math/bits"
+	"sort"
+)
+
+// hcode is a huffman code with a bit code and bit length.
+type hcode struct {
+	code, len uint16
+}
+
+type huffmanEncoder struct {
+	codes     []hcode
+	freqcache []literalNode
+	bitCount  [17]int32
+	lns       byLiteral // stored to avoid repeated allocation in generate
+	lfs       byFreq    // stored to avoid repeated allocation in generate
+}
+
+type literalNode struct {
+	literal uint16
+	freq    int32
+}
+
+// A levelInfo describes the state of the constructed tree for a given depth.
+type levelInfo struct {
+	// Our level.  for better printing
+	level int32
+
+	// The frequency of the last node at this level
+	lastFreq int32
+
+	// The frequency of the next character to add to this level
+	nextCharFreq int32
+
+	// The frequency of the next pair (from level below) to add to this level.
+	// Only valid if the "needed" value of the next lower level is 0.
+	nextPairFreq int32
+
+	// The number of chains remaining to generate for this level before moving
+	// up to the next level
+	needed int32
+}
+
+// set sets the code and length of an hcode.
+func (h *hcode) set(code uint16, length uint16) {
+	h.len = length
+	h.code = code
+}
+
+func maxNode() literalNode { return literalNode{math.MaxUint16, math.MaxInt32} }
+
+func newHuffmanEncoder(size int) *huffmanEncoder {
+	return &huffmanEncoder{codes: make([]hcode, size)}
+}
+
+// Generates a HuffmanCode corresponding to the fixed literal table
+func generateFixedLiteralEncoding() *huffmanEncoder {
+	h := newHuffmanEncoder(maxNumLit)
+	codes := h.codes
+	var ch uint16
+	for ch = 0; ch < maxNumLit; ch++ {
+		var bits uint16
+		var size uint16
+		switch {
+		case ch < 144:
+			// size 8, 000110000  .. 10111111
+			bits = ch + 48
+			size = 8
+		case ch < 256:
+			// size 9, 110010000 .. 111111111
+			bits = ch + 400 - 144
+			size = 9
+		case ch < 280:
+			// size 7, 0000000 .. 0010111
+			bits = ch - 256
+			size = 7
+		default:
+			// size 8, 11000000 .. 11000111
+			bits = ch + 192 - 280
+			size = 8
+		}
+		codes[ch] = hcode{code: reverseBits(bits, byte(size)), len: size}
+	}
+	return h
+}
+
+func generateFixedOffsetEncoding() *huffmanEncoder {
+	h := newHuffmanEncoder(30)
+	codes := h.codes
+	for ch := range codes {
+		codes[ch] = hcode{code: reverseBits(uint16(ch), 5), len: 5}
+	}
+	return h
+}
+
+var fixedLiteralEncoding *huffmanEncoder = generateFixedLiteralEncoding()
+var fixedOffsetEncoding *huffmanEncoder = generateFixedOffsetEncoding()
+
+func (h *huffmanEncoder) bitLength(freq []int32) int {
+	var total int
+	for i, f := range freq {
+		if f != 0 {
+			total += int(f) * int(h.codes[i].len)
+		}
+	}
+	return total
+}
+
+const maxBitsLimit = 16
+
+// Return the number of literals assigned to each bit size in the Huffman encoding
+//
+// This method is only called when list.length >= 3
+// The cases of 0, 1, and 2 literals are handled by special case code.
+//
+// list  An array of the literals with non-zero frequencies
+//             and their associated frequencies. The array is in order of increasing
+//             frequency, and has as its last element a special element with frequency
+//             MaxInt32
+// maxBits     The maximum number of bits that should be used to encode any literal.
+//             Must be less than 16.
+// return      An integer array in which array[i] indicates the number of literals
+//             that should be encoded in i bits.
+func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
+	if maxBits >= maxBitsLimit {
+		panic("flate: maxBits too large")
+	}
+	n := int32(len(list))
+	list = list[0 : n+1]
+	list[n] = maxNode()
+
+	// The tree can't have greater depth than n - 1, no matter what. This
+	// saves a little bit of work in some small cases
+	if maxBits > n-1 {
+		maxBits = n - 1
+	}
+
+	// Create information about each of the levels.
+	// A bogus "Level 0" whose sole purpose is so that
+	// level1.prev.needed==0.  This makes level1.nextPairFreq
+	// be a legitimate value that never gets chosen.
+	var levels [maxBitsLimit]levelInfo
+	// leafCounts[i] counts the number of literals at the left
+	// of ancestors of the rightmost node at level i.
+	// leafCounts[i][j] is the number of literals at the left
+	// of the level j ancestor.
+	var leafCounts [maxBitsLimit][maxBitsLimit]int32
+
+	for level := int32(1); level <= maxBits; level++ {
+		// For every level, the first two items are the first two characters.
+		// We initialize the levels as if we had already figured this out.
+		levels[level] = levelInfo{
+			level:        level,
+			lastFreq:     list[1].freq,
+			nextCharFreq: list[2].freq,
+			nextPairFreq: list[0].freq + list[1].freq,
+		}
+		leafCounts[level][level] = 2
+		if level == 1 {
+			levels[level].nextPairFreq = math.MaxInt32
+		}
+	}
+
+	// We need a total of 2*n - 2 items at top level and have already generated 2.
+	levels[maxBits].needed = 2*n - 4
+
+	level := maxBits
+	for {
+		l := &levels[level]
+		if l.nextPairFreq == math.MaxInt32 && l.nextCharFreq == math.MaxInt32 {
+			// We've run out of both leafs and pairs.
+			// End all calculations for this level.
+			// To make sure we never come back to this level or any lower level,
+			// set nextPairFreq impossibly large.
+			l.needed = 0
+			levels[level+1].nextPairFreq = math.MaxInt32
+			level++
+			continue
+		}
+
+		prevFreq := l.lastFreq
+		if l.nextCharFreq < l.nextPairFreq {
+			// The next item on this row is a leaf node.
+			n := leafCounts[level][level] + 1
+			l.lastFreq = l.nextCharFreq
+			// Lower leafCounts are the same of the previous node.
+			leafCounts[level][level] = n
+			l.nextCharFreq = list[n].freq
+		} else {
+			// The next item on this row is a pair from the previous row.
+			// nextPairFreq isn't valid until we generate two
+			// more values in the level below
+			l.lastFreq = l.nextPairFreq
+			// Take leaf counts from the lower level, except counts[level] remains the same.
+			copy(leafCounts[level][:level], leafCounts[level-1][:level])
+			levels[l.level-1].needed = 2
+		}
+
+		if l.needed--; l.needed == 0 {
+			// We've done everything we need to do for this level.
+			// Continue calculating one level up. Fill in nextPairFreq
+			// of that level with the sum of the two nodes we've just calculated on
+			// this level.
+			if l.level == maxBits {
+				// All done!
+				break
+			}
+			levels[l.level+1].nextPairFreq = prevFreq + l.lastFreq
+			level++
+		} else {
+			// If we stole from below, move down temporarily to replenish it.
+			for levels[level-1].needed > 0 {
+				level--
+			}
+		}
+	}
+
+	// Somethings is wrong if at the end, the top level is null or hasn't used
+	// all of the leaves.
+	if leafCounts[maxBits][maxBits] != n {
+		panic("leafCounts[maxBits][maxBits] != n")
+	}
+
+	bitCount := h.bitCount[:maxBits+1]
+	bits := 1
+	counts := &leafCounts[maxBits]
+	for level := maxBits; level > 0; level-- {
+		// chain.leafCount gives the number of literals requiring at least "bits"
+		// bits to encode.
+		bitCount[bits] = counts[level] - counts[level-1]
+		bits++
+	}
+	return bitCount
+}
+
+// Look at the leaves and assign them a bit count and an encoding as specified
+// in RFC 1951 3.2.2
+func (h *huffmanEncoder) assignEncodingAndSize(bitCount []int32, list []literalNode) {
+	code := uint16(0)
+	for n, bits := range bitCount {
+		code <<= 1
+		if n == 0 || bits == 0 {
+			continue
+		}
+		// The literals list[len(list)-bits] .. list[len(list)-bits]
+		// are encoded using "bits" bits, and get the values
+		// code, code + 1, ....  The code values are
+		// assigned in literal order (not frequency order).
+		chunk := list[len(list)-int(bits):]
+
+		h.lns.sort(chunk)
+		for _, node := range chunk {
+			h.codes[node.literal] = hcode{code: reverseBits(code, uint8(n)), len: uint16(n)}
+			code++
+		}
+		list = list[0 : len(list)-int(bits)]
+	}
+}
+
+// Update this Huffman Code object to be the minimum code for the specified frequency count.
+//
+// freq  An array of frequencies, in which frequency[i] gives the frequency of literal i.
+// maxBits  The maximum number of bits to use for any literal.
+func (h *huffmanEncoder) generate(freq []int32, maxBits int32) {
+	if h.freqcache == nil {
+		// Allocate a reusable buffer with the longest possible frequency table.
+		// Possible lengths are codegenCodeCount, offsetCodeCount and maxNumLit.
+		// The largest of these is maxNumLit, so we allocate for that case.
+		h.freqcache = make([]literalNode, maxNumLit+1)
+	}
+	list := h.freqcache[:len(freq)+1]
+	// Number of non-zero literals
+	count := 0
+	// Set list to be the set of all non-zero literals and their frequencies
+	for i, f := range freq {
+		if f != 0 {
+			list[count] = literalNode{uint16(i), f}
+			count++
+		} else {
+			list[count] = literalNode{}
+			h.codes[i].len = 0
+		}
+	}
+	list[len(freq)] = literalNode{}
+
+	list = list[:count]
+	if count <= 2 {
+		// Handle the small cases here, because they are awkward for the general case code. With
+		// two or fewer literals, everything has bit length 1.
+		for i, node := range list {
+			// "list" is in order of increasing literal value.
+			h.codes[node.literal].set(uint16(i), 1)
+		}
+		return
+	}
+	h.lfs.sort(list)
+
+	// Get the number of literals for each bit count
+	bitCount := h.bitCounts(list, maxBits)
+	// And do the assignment
+	h.assignEncodingAndSize(bitCount, list)
+}
+
+type byLiteral []literalNode
+
+func (s *byLiteral) sort(a []literalNode) {
+	*s = byLiteral(a)
+	sort.Sort(s)
+}
+
+func (s byLiteral) Len() int { return len(s) }
+
+func (s byLiteral) Less(i, j int) bool {
+	return s[i].literal < s[j].literal
+}
+
+func (s byLiteral) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+type byFreq []literalNode
+
+func (s *byFreq) sort(a []literalNode) {
+	*s = byFreq(a)
+	sort.Sort(s)
+}
+
+func (s byFreq) Len() int { return len(s) }
+
+func (s byFreq) Less(i, j int) bool {
+	if s[i].freq == s[j].freq {
+		return s[i].literal < s[j].literal
+	}
+	return s[i].freq < s[j].freq
+}
+
+func (s byFreq) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+func reverseBits(number uint16, bitLength byte) uint16 {
+	return bits.Reverse16(number << (16 - bitLength))
+}

+ 80 - 0
v4/vendor/github.com/andybalholm/brotli/flate/token.go

@@ -0,0 +1,80 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package flate
+
+import "log"
+
+// The length code for length X (MIN_MATCH_LENGTH <= X <= MAX_MATCH_LENGTH)
+// is lengthCodes[length - MIN_MATCH_LENGTH]
+var lengthCodes = [...]uint32{
+	0, 1, 2, 3, 4, 5, 6, 7, 8, 8,
+	9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
+	13, 13, 13, 13, 14, 14, 14, 14, 15, 15,
+	15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
+	17, 17, 17, 17, 17, 17, 17, 17, 18, 18,
+	18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
+	19, 19, 19, 19, 20, 20, 20, 20, 20, 20,
+	20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+	21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+	21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
+	22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+	22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
+	23, 23, 23, 23, 23, 23, 23, 23, 24, 24,
+	24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+	24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+	24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+	25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+	25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+	25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+	25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
+	26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+	26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+	26, 26, 26, 26, 27, 27, 27, 27, 27, 27,
+	27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+	27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+	27, 27, 27, 27, 27, 28,
+}
+
+var offsetCodes = [...]uint32{
+	0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
+	8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+	10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+	11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+	12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+	12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+	13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+	13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+	14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+	14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+	14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+	14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+	15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+	15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+	15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+	15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+}
+
+func lengthCode(len int) uint32 {
+	if len > 258 {
+		panic("match too long")
+	}
+	return lengthCodes[len-baseMatchLength]
+}
+
+// Returns the offset code corresponding to a specific offset
+func offsetCode(off int) uint32 {
+	if off > 32768 {
+		log.Println(off)
+		panic("match distance too high")
+	}
+	off -= baseMatchOffset
+	if off < len(offsetCodes) {
+		return offsetCodes[off]
+	}
+	if off>>7 < len(offsetCodes) {
+		return offsetCodes[off>>7] + 14
+	}
+	return offsetCodes[off>>14] + 28
+}

+ 66 - 0
v4/vendor/github.com/andybalholm/brotli/flate/writer.go

@@ -0,0 +1,66 @@
+package flate
+
+import (
+	"io"
+
+	"github.com/andybalholm/brotli/matchfinder"
+)
+
+// NewWriter returns a new matchfinder.Writer that compresses data at the given level,
+// in flate encoding. Levels 1–9 are available; levels outside this range will
+// be replaced with the closest level available.
+func NewWriter(w io.Writer, level int) *matchfinder.Writer {
+	return newWriter(w, level, NewEncoder())
+}
+
+// NewGZIPWriter returns a new matchfinder.Writer that compresses data at the given
+// level, in gzip encoding. Levels 1–9 are available; levels outside this range
+// will be replaced by the closest level available.
+func NewGZIPWriter(w io.Writer, level int) *matchfinder.Writer {
+	return newWriter(w, level, NewGZIPEncoder())
+}
+
+func newWriter(w io.Writer, level int, e matchfinder.Encoder) *matchfinder.Writer {
+	var mf matchfinder.MatchFinder
+	if level < 2 {
+		mf = &matchfinder.ZFast{MaxDistance: 1 << 15}
+	} else if level == 2 {
+		mf = &matchfinder.ZDFast{MaxDistance: 1 << 15}
+	} else if level == 3 {
+		mf = &matchfinder.ZM{MaxDistance: 1 << 15}
+	} else if level == 4 {
+		mf = &matchfinder.Trio{MaxDistance: 1 << 15}
+	} else if level < 8 {
+		chainLen := 32
+		switch level {
+		case 5:
+			chainLen = 8
+		case 6:
+			chainLen = 16
+		}
+		mf = &matchfinder.M4{
+			MaxDistance:     1 << 15,
+			ChainLength:     chainLen,
+			HashLen:         5,
+			DistanceBitCost: 66,
+		}
+	} else {
+		chainLen := 32
+		hashLen := 5
+		if level == 8 {
+			chainLen = 4
+		}
+		mf = &matchfinder.Pathfinder{
+			MaxDistance: 1 << 15,
+			ChainLength: chainLen,
+			HashLen:     hashLen,
+		}
+	}
+
+	return &matchfinder.Writer{
+		Dest:        w,
+		MatchFinder: mf,
+		Encoder:     e,
+		BlockSize:   1 << 16,
+	}
+}

+ 8 - 3
v4/vendor/github.com/andybalholm/brotli/http.go

@@ -1,10 +1,11 @@
 package brotli
 package brotli
 
 
 import (
 import (
-	"compress/gzip"
 	"io"
 	"io"
 	"net/http"
 	"net/http"
 	"strings"
 	"strings"
+
+	"github.com/andybalholm/brotli/flate"
 )
 )
 
 
 // HTTPCompressor chooses a compression method (brotli, gzip, or none) based on
 // HTTPCompressor chooses a compression method (brotli, gzip, or none) based on
@@ -12,6 +13,10 @@ import (
 // WriteCloser that implements that compression. The Close method must be called
 // WriteCloser that implements that compression. The Close method must be called
 // before the current HTTP handler returns.
 // before the current HTTP handler returns.
 func HTTPCompressor(w http.ResponseWriter, r *http.Request) io.WriteCloser {
 func HTTPCompressor(w http.ResponseWriter, r *http.Request) io.WriteCloser {
+	return HTTPCompressorWithLevel(w, r, 4)
+}
+
+func HTTPCompressorWithLevel(w http.ResponseWriter, r *http.Request, level int) io.WriteCloser {
 	if w.Header().Get("Vary") == "" {
 	if w.Header().Get("Vary") == "" {
 		w.Header().Set("Vary", "Accept-Encoding")
 		w.Header().Set("Vary", "Accept-Encoding")
 	}
 	}
@@ -20,10 +25,10 @@ func HTTPCompressor(w http.ResponseWriter, r *http.Request) io.WriteCloser {
 	switch encoding {
 	switch encoding {
 	case "br":
 	case "br":
 		w.Header().Set("Content-Encoding", "br")
 		w.Header().Set("Content-Encoding", "br")
-		return NewWriterV2(w, DefaultCompression)
+		return NewWriterV2(w, level)
 	case "gzip":
 	case "gzip":
 		w.Header().Set("Content-Encoding", "gzip")
 		w.Header().Set("Content-Encoding", "gzip")
-		return gzip.NewWriter(w)
+		return flate.NewGZIPWriter(w, level)
 	}
 	}
 	return nopCloser{w}
 	return nopCloser{w}
 }
 }

+ 212 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/bargain1.go

@@ -0,0 +1,212 @@
+package matchfinder
+
+import (
+	"encoding/binary"
+	"math"
+	"math/bits"
+	"slices"
+)
+
+const (
+	bargain1TableBits = 18
+	bargain1TableSize = 1 << bargain1TableBits
+)
+
+// Bargain1 is a MatchFinder that attempts to find the encoding with the lowest
+// "bit cost", using 1 hash length (6).
+type Bargain1 struct {
+	MaxDistance int
+
+	// Skip is whether to look for matches at every other byte instead of every
+	// byte (to increase speed but decrease compression).
+	Skip bool
+
+	history []byte
+	table6  [bargain1TableSize]tableEntry
+
+	// holding onto buffers to reduce allocations:
+
+	arrivals []arrival
+	matches  []Match
+}
+
+func (z *Bargain1) Reset() {
+	z.table6 = [bargain1TableSize]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *Bargain1) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	var histogram [256]uint32
+	for _, b := range src {
+		histogram[b]++
+	}
+	var byteCost [256]float32
+	for b, n := range histogram {
+		cost := max(math.Log2(float64(len(src))/float64(n)), 1)
+		byteCost[b] = float32(cost)
+	}
+
+	// Each element in arrivals corresponds to the position just after
+	// the corresponding byte in src.
+	arrivals := z.arrivals
+	if len(arrivals) < len(src) {
+		arrivals = make([]arrival, len(src))
+		z.arrivals = arrivals
+	} else {
+		arrivals = arrivals[:len(src)]
+		for i := range arrivals {
+			arrivals[i] = arrival{}
+		}
+	}
+
+	if len(z.history) > z.MaxDistance*2 {
+		delta := len(z.history) - z.MaxDistance
+		copy(z.history, z.history[delta:])
+		z.history = z.history[:z.MaxDistance]
+
+		for i := range z.table6 {
+			v := z.table6[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table6[i] = tableEntry{}
+			} else {
+				z.table6[i].offset = v
+			}
+		}
+	}
+
+	historyLen := len(z.history)
+	z.history = append(z.history, src...)
+	src = z.history
+
+	addMatch := func(m absoluteMatch, unmatched int, repeat bool) {
+		var startCost float32
+		if m.Start > historyLen {
+			startCost = arrivals[m.Start-historyLen-1].cost
+		}
+		insertCost := float32(bits.Len(uint(unmatched)))
+		var distanceCost float32
+		if !repeat {
+			distanceCost = float32(bits.Len(uint(m.Start - m.Match)))
+		}
+		cost := startCost + baseMatchCost + insertCost + distanceCost
+		for j := m.End; j >= m.Start+3; j-- {
+			a := &arrivals[j-historyLen-1]
+			if a.cost > 0 && a.cost <= cost {
+				break
+			}
+			*a = arrival{
+				length:   uint32(j - m.Start),
+				distance: uint32(m.Start - m.Match),
+				cost:     cost,
+			}
+		}
+	}
+
+	var nextOverlapSearch int
+
+	for i := historyLen; i < len(src); i++ {
+		var arrivedHere arrival
+		if i > historyLen {
+			arrivedHere = arrivals[i-historyLen-1]
+		}
+
+		unmatched := 0
+		if arrivedHere.distance == 0 {
+			unmatched = int(arrivedHere.length)
+		}
+		prevDistance := 0
+		if unmatched != 0 && i-unmatched > historyLen {
+			prevDistance = int(arrivals[i-historyLen-1-unmatched].distance)
+		}
+
+		literalCost := byteCost[src[i]]
+		nextArrival := &arrivals[i-historyLen]
+		if nextArrival.cost == 0 || arrivedHere.cost+literalCost < nextArrival.cost {
+			*nextArrival = arrival{
+				cost:   arrivedHere.cost + literalCost,
+				length: uint32(unmatched + 1),
+			}
+		}
+
+		if i > len(src)-8 {
+			// There's no room to check hashes.
+			continue
+		}
+
+		cv := binary.LittleEndian.Uint64(src[i:])
+		nextHash6 := z.hash6(cv)
+		candidate6 := z.table6[nextHash6]
+
+		entry := tableEntry{offset: int32(i), val: uint32(cv)}
+		z.table6[nextHash6] = entry
+
+		// Look for a repeat match, unless there is no previous distance, or a match at
+		// that distance has already been found.
+		if prevDistance != 0 && prevDistance != int(arrivals[i-historyLen-1+4].distance) {
+			repIndex := i - prevDistance
+			if repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv) {
+				// We have a repeat of the previous match distance.
+				m := extendMatch2(src, i, repIndex, i)
+				addMatch(m, unmatched, true)
+			}
+		}
+
+		if z.Skip && i%2 != 0 {
+			continue
+		}
+
+		nextByteIsUnmatched := arrivals[i-historyLen-1+1].distance == 0
+
+		if unmatched > 0 || i >= nextOverlapSearch || nextByteIsUnmatched {
+			if int(candidate6.offset) < i && i-int(candidate6.offset) < z.MaxDistance && uint32(cv) == candidate6.val &&
+				binary.LittleEndian.Uint32(src[candidate6.offset:]) == uint32(cv) {
+				m := extendMatch2(src, i, int(candidate6.offset), historyLen)
+				delta := i - m.Start
+				if delta == 0 {
+					addMatch(m, unmatched, false)
+				} else {
+					// The match was extended backwards. Add it with and without the extra.
+					addMatch(m, max(unmatched-delta, 0), false)
+					m.Start += delta
+					m.Match += delta
+					addMatch(m, unmatched, false)
+				}
+				nextOverlapSearch = max(nextOverlapSearch, m.Start+1, m.End-4)
+			}
+		}
+	}
+
+	// We've found the shortest path; now walk it backward and store the matches.
+	matches := z.matches[:0]
+	i := len(arrivals) - 1
+	for i >= 0 {
+		a := arrivals[i]
+		if a.distance > 0 {
+			matches = append(matches, Match{
+				Length:   int(a.length),
+				Distance: int(a.distance),
+			})
+			i -= int(a.length)
+		} else {
+			if len(matches) == 0 {
+				matches = append(matches, Match{})
+			}
+			matches[len(matches)-1].Unmatched = int(a.length)
+			i -= int(a.length)
+		}
+	}
+	z.matches = matches
+
+	slices.Reverse(matches)
+
+	return append(dst, matches...)
+}
+
+func (z *Bargain1) hash6(u uint64) uint32 {
+	return uint32(((u << 16) * 227718039650203) >> (64 - bargain1TableBits))
+}

+ 248 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/bargain2.go

@@ -0,0 +1,248 @@
+package matchfinder
+
+import (
+	"encoding/binary"
+	"math"
+	"math/bits"
+	"slices"
+)
+
+const (
+	bargain2TableBits = 18
+	bargain2TableSize = 1 << bargain2TableBits
+)
+
+// Bargain2 is a MatchFinder that attempts to find the encoding with the lowest
+// "bit cost", using 2 hash lengths (5 and 8).
+type Bargain2 struct {
+	MaxDistance int
+
+	// Skip is whether to look for matches at every other byte instead of every
+	// byte (to increase speed but decrease compression).
+	Skip bool
+
+	history []byte
+	table5  [bargain2TableSize]tableEntry
+	table8  [bargain2TableSize]tableEntry
+
+	// holding onto buffers to reduce allocations:
+
+	arrivals []arrival
+	matches  []Match
+}
+
+func (z *Bargain2) Reset() {
+	z.table5 = [bargain2TableSize]tableEntry{}
+	z.table8 = [bargain2TableSize]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *Bargain2) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	var histogram [256]uint32
+	for _, b := range src {
+		histogram[b]++
+	}
+	var byteCost [256]float32
+	for b, n := range histogram {
+		cost := max(math.Log2(float64(len(src))/float64(n)), 1)
+		byteCost[b] = float32(cost)
+	}
+
+	// Each element in arrivals corresponds to the position just after
+	// the corresponding byte in src.
+	arrivals := z.arrivals
+	if len(arrivals) < len(src) {
+		arrivals = make([]arrival, len(src))
+		z.arrivals = arrivals
+	} else {
+		arrivals = arrivals[:len(src)]
+		for i := range arrivals {
+			arrivals[i] = arrival{}
+		}
+	}
+
+	if len(z.history) > z.MaxDistance*2 {
+		delta := len(z.history) - z.MaxDistance
+		copy(z.history, z.history[delta:])
+		z.history = z.history[:z.MaxDistance]
+
+		for i := range z.table5 {
+			v := z.table5[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table5[i] = tableEntry{}
+			} else {
+				z.table5[i].offset = v
+			}
+		}
+		for i := range z.table8 {
+			v := z.table8[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table8[i] = tableEntry{}
+			} else {
+				z.table8[i].offset = v
+			}
+		}
+	}
+
+	historyLen := len(z.history)
+	z.history = append(z.history, src...)
+	src = z.history
+
+	addMatch := func(m absoluteMatch, unmatched int, repeat bool) {
+		var startCost float32
+		if m.Start > historyLen {
+			startCost = arrivals[m.Start-historyLen-1].cost
+		}
+		insertCost := float32(bits.Len(uint(unmatched)))
+		var distanceCost float32
+		if !repeat {
+			distanceCost = float32(bits.Len(uint(m.Start - m.Match)))
+		}
+		cost := startCost + baseMatchCost + insertCost + distanceCost
+		for j := m.End; j >= m.Start+3; j-- {
+			a := &arrivals[j-historyLen-1]
+			if a.cost > 0 && a.cost <= cost {
+				break
+			}
+			*a = arrival{
+				length:   uint32(j - m.Start),
+				distance: uint32(m.Start - m.Match),
+				cost:     cost,
+			}
+		}
+	}
+
+	var nextOverlapSearch int
+
+	for i := historyLen; i < len(src); i++ {
+		var arrivedHere arrival
+		if i > historyLen {
+			arrivedHere = arrivals[i-historyLen-1]
+		}
+
+		unmatched := 0
+		if arrivedHere.distance == 0 {
+			unmatched = int(arrivedHere.length)
+		}
+		prevDistance := 0
+		if unmatched != 0 && i-unmatched > historyLen {
+			prevDistance = int(arrivals[i-historyLen-1-unmatched].distance)
+		}
+
+		literalCost := byteCost[src[i]]
+		nextArrival := &arrivals[i-historyLen]
+		if nextArrival.cost == 0 || arrivedHere.cost+literalCost < nextArrival.cost {
+			*nextArrival = arrival{
+				cost:   arrivedHere.cost + literalCost,
+				length: uint32(unmatched + 1),
+			}
+		}
+
+		if i > len(src)-8 {
+			// There's no room to check hashes.
+			continue
+		}
+
+		cv := binary.LittleEndian.Uint64(src[i:])
+		nextHash5 := z.hash5(cv)
+		nextHash8 := z.hash8(cv)
+		candidate5 := z.table5[nextHash5]
+		candidate8 := z.table8[nextHash8]
+
+		entry := tableEntry{offset: int32(i), val: uint32(cv)}
+		z.table5[nextHash5] = entry
+		z.table8[nextHash8] = entry
+
+		// Look for a repeat match, unless there is no previous distance, or a match at
+		// that distance has already been found.
+		if prevDistance != 0 && prevDistance != int(arrivals[i-historyLen-1+4].distance) {
+			repIndex := i - prevDistance
+			if repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv) {
+				// We have a repeat of the previous match distance.
+				m := extendMatch2(src, i, repIndex, i)
+				addMatch(m, unmatched, true)
+			}
+		}
+
+		if z.Skip {
+			if i%2 != 0 {
+				continue
+			}
+		}
+
+		nextByteIsUnmatched := arrivals[i-historyLen-1+1].distance == 0
+
+		if unmatched > 0 || i >= nextOverlapSearch || nextByteIsUnmatched {
+			if int(candidate5.offset) < i && i-int(candidate5.offset) < z.MaxDistance && uint32(cv) == candidate5.val &&
+				binary.LittleEndian.Uint32(src[candidate5.offset:]) == uint32(cv) {
+				m := extendMatch2(src, i, int(candidate5.offset), historyLen)
+				delta := i - m.Start
+				if delta == 0 {
+					addMatch(m, unmatched, false)
+				} else {
+					// The match was extended backwards. Add it with and without the extra.
+					addMatch(m, max(unmatched-delta, 0), false)
+					m.Start += delta
+					m.Match += delta
+					addMatch(m, unmatched, false)
+				}
+				nextOverlapSearch = max(nextOverlapSearch, m.Start+1, m.End-6)
+			}
+
+			if int(candidate8.offset) < i && i-int(candidate8.offset) < z.MaxDistance && uint32(cv) == candidate8.val &&
+				binary.LittleEndian.Uint32(src[candidate8.offset:]) == uint32(cv) {
+				m := extendMatch2(src, i, int(candidate8.offset), historyLen)
+				delta := i - m.Start
+				if delta == 0 {
+					addMatch(m, unmatched, false)
+				} else {
+					// The match was extended backwards. Add it with and without the extra.
+					addMatch(m, max(unmatched-delta, 0), false)
+					m.Start += delta
+					m.Match += delta
+					addMatch(m, unmatched, false)
+				}
+				nextOverlapSearch = max(nextOverlapSearch, m.Start+1, m.End-6)
+			}
+		}
+	}
+
+	// We've found the shortest path; now walk it backward and store the matches.
+	matches := z.matches[:0]
+	i := len(arrivals) - 1
+	for i >= 0 {
+		a := arrivals[i]
+		if a.distance > 0 {
+			matches = append(matches, Match{
+				Length:   int(a.length),
+				Distance: int(a.distance),
+			})
+			i -= int(a.length)
+		} else {
+			if len(matches) == 0 {
+				matches = append(matches, Match{})
+			}
+			matches[len(matches)-1].Unmatched = int(a.length)
+			i -= int(a.length)
+		}
+	}
+	z.matches = matches
+
+	slices.Reverse(matches)
+
+	return append(dst, matches...)
+}
+
+func (z *Bargain2) hash5(u uint64) uint32 {
+	return uint32(((u << 24) * 889523592379) >> (64 - bargain2TableBits))
+}
+
+func (z *Bargain2) hash8(u uint64) uint32 {
+	return uint32((u * 0xcf1bbcdcb7a56463) >> (64 - bargain2TableBits))
+}

+ 278 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/bargain3.go

@@ -0,0 +1,278 @@
+package matchfinder
+
+import (
+	"encoding/binary"
+	"math"
+	"math/bits"
+	"slices"
+)
+
+// Bargain3 is a MatchFinder that attempts to find the encoding with the lowest
+// "bit cost", using 3 hash lengths (5, 8, and 12).
+type Bargain3 struct {
+	MaxDistance int
+
+	// Skip is whether to look for matches at every other byte instead of every
+	// byte (to increase speed but decrease compression).
+	Skip bool
+
+	history []byte
+	table5  [1 << 17]tableEntry
+	table8  [1 << 18]tableEntry
+	table12 [1 << 19]tableEntry
+
+	// holding onto buffers to reduce allocations:
+
+	arrivals []arrival
+	matches  []Match
+}
+
+func (z *Bargain3) Reset() {
+	z.table5 = [len(z.table5)]tableEntry{}
+	z.table8 = [len(z.table8)]tableEntry{}
+	z.table12 = [len(z.table12)]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *Bargain3) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	var histogram [256]uint32
+	for _, b := range src {
+		histogram[b]++
+	}
+	var byteCost [256]float32
+	for b, n := range histogram {
+		cost := max(math.Log2(float64(len(src))/float64(n)), 1)
+		byteCost[b] = float32(cost)
+	}
+
+	// Each element in arrivals corresponds to the position just after
+	// the corresponding byte in src.
+	arrivals := z.arrivals
+	if len(arrivals) < len(src) {
+		arrivals = make([]arrival, len(src))
+		z.arrivals = arrivals
+	} else {
+		arrivals = arrivals[:len(src)]
+		for i := range arrivals {
+			arrivals[i] = arrival{}
+		}
+	}
+
+	if len(z.history) > z.MaxDistance*2 {
+		delta := len(z.history) - z.MaxDistance
+		copy(z.history, z.history[delta:])
+		z.history = z.history[:z.MaxDistance]
+
+		for i := range z.table5 {
+			v := z.table5[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table5[i] = tableEntry{}
+			} else {
+				z.table5[i].offset = v
+			}
+		}
+		for i := range z.table8 {
+			v := z.table8[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table8[i] = tableEntry{}
+			} else {
+				z.table8[i].offset = v
+			}
+		}
+		for i := range z.table12 {
+			v := z.table12[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table12[i] = tableEntry{}
+			} else {
+				z.table12[i].offset = v
+			}
+		}
+	}
+
+	historyLen := len(z.history)
+	z.history = append(z.history, src...)
+	src = z.history
+
+	addMatch := func(m absoluteMatch, unmatched int, repeat bool) {
+		var startCost float32
+		if m.Start > historyLen {
+			startCost = arrivals[m.Start-historyLen-1].cost
+		}
+		insertCost := float32(bits.Len(uint(unmatched)))
+		var distanceCost float32
+		if !repeat {
+			distanceCost = float32(bits.Len(uint(m.Start - m.Match)))
+		}
+		cost := startCost + baseMatchCost + insertCost + distanceCost
+		for j := m.End; j >= m.Start+3; j-- {
+			a := &arrivals[j-historyLen-1]
+			if a.cost > 0 && a.cost <= cost {
+				break
+			}
+			*a = arrival{
+				length:   uint32(j - m.Start),
+				distance: uint32(m.Start - m.Match),
+				cost:     cost,
+			}
+		}
+	}
+
+	var nextOverlapSearch int
+
+	for i := historyLen; i < len(src); i++ {
+		var arrivedHere arrival
+		if i > historyLen {
+			arrivedHere = arrivals[i-historyLen-1]
+		}
+
+		unmatched := 0
+		if arrivedHere.distance == 0 {
+			unmatched = int(arrivedHere.length)
+		}
+		prevDistance := 0
+		if unmatched != 0 && i-unmatched > historyLen {
+			prevDistance = int(arrivals[i-historyLen-1-unmatched].distance)
+		}
+
+		literalCost := byteCost[src[i]]
+		nextArrival := &arrivals[i-historyLen]
+		if nextArrival.cost == 0 || arrivedHere.cost+literalCost < nextArrival.cost {
+			*nextArrival = arrival{
+				cost:   arrivedHere.cost + literalCost,
+				length: uint32(unmatched + 1),
+			}
+		}
+
+		if i > len(src)-12 {
+			// There's no room to check hashes.
+			continue
+		}
+
+		cv := binary.LittleEndian.Uint64(src[i:])
+		extra := binary.LittleEndian.Uint32(src[i+8:])
+		nextHash5 := z.hash5(cv)
+		nextHash8 := z.hash8(cv)
+		nextHash12 := z.hash12(cv, extra)
+		candidate5 := z.table5[nextHash5]
+		candidate8 := z.table8[nextHash8]
+		candidate12 := z.table12[nextHash12]
+
+		entry := tableEntry{offset: int32(i), val: uint32(cv)}
+		z.table5[nextHash5] = entry
+		z.table8[nextHash8] = entry
+		z.table12[nextHash12] = entry
+
+		// Look for a repeat match, unless there is no previous distance, or a match at
+		// that distance has already been found.
+		if prevDistance != 0 && prevDistance != int(arrivals[i-historyLen-1+4].distance) {
+			repIndex := i - prevDistance
+			if repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv) {
+				// We have a repeat of the previous match distance.
+				m := extendMatch2(src, i, repIndex, i)
+				addMatch(m, unmatched, true)
+			}
+		}
+
+		if z.Skip {
+			if i%2 != 0 {
+				continue
+			}
+		}
+
+		nextByteIsUnmatched := arrivals[i-historyLen-1+1].distance == 0
+
+		if unmatched > 0 || i >= nextOverlapSearch || nextByteIsUnmatched {
+			if int(candidate5.offset) < i && i-int(candidate5.offset) < z.MaxDistance && uint32(cv) == candidate5.val &&
+				binary.LittleEndian.Uint32(src[candidate5.offset:]) == uint32(cv) {
+				m := extendMatch2(src, i, int(candidate5.offset), historyLen)
+				delta := i - m.Start
+				if delta == 0 {
+					addMatch(m, unmatched, false)
+				} else {
+					// The match was extended backwards. Add it with and without the extra.
+					addMatch(m, max(unmatched-delta, 0), false)
+					m.Start += delta
+					m.Match += delta
+					addMatch(m, unmatched, false)
+				}
+				nextOverlapSearch = max(nextOverlapSearch, m.Start+1, m.End-6)
+			}
+
+			if int(candidate8.offset) < i && i-int(candidate8.offset) < z.MaxDistance && uint32(cv) == candidate8.val &&
+				binary.LittleEndian.Uint32(src[candidate8.offset:]) == uint32(cv) {
+				m := extendMatch2(src, i, int(candidate8.offset), historyLen)
+				delta := i - m.Start
+				if delta == 0 {
+					addMatch(m, unmatched, false)
+				} else {
+					// The match was extended backwards. Add it with and without the extra.
+					addMatch(m, max(unmatched-delta, 0), false)
+					m.Start += delta
+					m.Match += delta
+					addMatch(m, unmatched, false)
+				}
+				nextOverlapSearch = max(nextOverlapSearch, m.Start+1, m.End-6)
+			}
+
+			if int(candidate12.offset) < i && i-int(candidate12.offset) < z.MaxDistance && uint32(cv) == candidate12.val &&
+				binary.LittleEndian.Uint32(src[candidate12.offset:]) == uint32(cv) {
+				m := extendMatch2(src, i, int(candidate12.offset), historyLen)
+				delta := i - m.Start
+				if delta == 0 {
+					addMatch(m, unmatched, false)
+				} else {
+					// The match was extended backwards. Add it with and without the extra.
+					addMatch(m, max(unmatched-delta, 0), false)
+					m.Start += delta
+					m.Match += delta
+					addMatch(m, unmatched, false)
+				}
+				nextOverlapSearch = max(nextOverlapSearch, m.Start+1, m.End-6)
+			}
+		}
+	}
+
+	// We've found the shortest path; now walk it backward and store the matches.
+	matches := z.matches[:0]
+	i := len(arrivals) - 1
+	for i >= 0 {
+		a := arrivals[i]
+		if a.distance > 0 {
+			matches = append(matches, Match{
+				Length:   int(a.length),
+				Distance: int(a.distance),
+			})
+			i -= int(a.length)
+		} else {
+			if len(matches) == 0 {
+				matches = append(matches, Match{})
+			}
+			matches[len(matches)-1].Unmatched = int(a.length)
+			i -= int(a.length)
+		}
+	}
+	z.matches = matches
+
+	slices.Reverse(matches)
+
+	return append(dst, matches...)
+}
+
+func (z *Bargain3) hash5(u uint64) uint32 {
+	return uint32(((u << 24) * 889523592379) >> (64 - 17))
+}
+
+func (z *Bargain3) hash8(u uint64) uint32 {
+	return uint32((u * 0xcf1bbcdcb7a56463) >> (64 - 18))
+}
+
+func (z *Bargain3) hash12(u uint64, e uint32) uint32 {
+	return uint32((u*0xcf1bbcdcb7a56463 + uint64(e)*(2654435761<<32)) >> (64 - 19))
+}

+ 12 - 6
v4/vendor/github.com/andybalholm/brotli/matchfinder/m0.go

@@ -22,7 +22,7 @@ func (M0) Reset() {}
 const (
 const (
 	m0HashLen = 5
 	m0HashLen = 5
 
 
-	m0TableBits = 14
+	m0TableBits = 16
 	m0TableSize = 1 << m0TableBits
 	m0TableSize = 1 << m0TableBits
 	m0Shift     = 32 - m0TableBits
 	m0Shift     = 32 - m0TableBits
 	// m0TableMask is redundant, but helps the compiler eliminate bounds
 	// m0TableMask is redundant, but helps the compiler eliminate bounds
@@ -145,18 +145,24 @@ func (m M0) FindMatches(dst []Match, src []byte) []Match {
 		if m.Lazy {
 		if m.Lazy {
 			// If lazy matching is enabled, we update the hash table for
 			// If lazy matching is enabled, we update the hash table for
 			// every byte in the match.
 			// every byte in the match.
-			for i := origBase + 2; i < s-1; i++ {
+			for i := origBase + 2; i < s-3; i++ {
 				x := binary.LittleEndian.Uint64(src[i:])
 				x := binary.LittleEndian.Uint64(src[i:])
 				table[m.hash(x)&m0TableMask] = uint16(i)
 				table[m.hash(x)&m0TableMask] = uint16(i)
 			}
 			}
+		} else {
+			// We update the hash table only at base+1
+			x := binary.LittleEndian.Uint64(src[base+1:])
+			table[m.hash(x)&m0TableMask] = uint16(base + 1)
 		}
 		}
 
 
 		// We could immediately start working at s now, but to improve
 		// We could immediately start working at s now, but to improve
-		// compression we first update the hash table at s-1 and at s.
-		x := binary.LittleEndian.Uint64(src[s-1:])
-		prevHash := m.hash(x >> 0)
+		// compression we first update the hash table.
+		x := binary.LittleEndian.Uint64(src[s-3:])
+		table[m.hash(x)&m0TableMask] = uint16(s - 3)
+		table[m.hash(x>>8)&m0TableMask] = uint16(s - 2)
+		prevHash := m.hash(x >> 16)
 		table[prevHash&m0TableMask] = uint16(s - 1)
 		table[prevHash&m0TableMask] = uint16(s - 1)
-		nextHash = m.hash(x >> 8)
+		nextHash = m.hash(x >> 24)
 	}
 	}
 
 
 emitRemainder:
 emitRemainder:

+ 1 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/m4.go

@@ -85,6 +85,7 @@ func (q *M4) FindMatches(dst []Match, src []byte) []Match {
 		copy(q.history, q.history[delta:])
 		copy(q.history, q.history[delta:])
 		q.history = q.history[:q.MaxDistance]
 		q.history = q.history[:q.MaxDistance]
 		if q.ChainLength > 0 {
 		if q.ChainLength > 0 {
+			copy(q.chain, q.chain[delta:])
 			q.chain = q.chain[:q.MaxDistance]
 			q.chain = q.chain[:q.MaxDistance]
 		}
 		}
 
 

+ 326 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/trio.go

@@ -0,0 +1,326 @@
+package matchfinder
+
+import "encoding/binary"
+
+// Trio is a MatchFinder that uses 3 different hash lengths, and
+// overlap parsing.
+type Trio struct {
+	MaxDistance int
+	history     []byte
+	table5      [1 << 16]tableEntry
+	table8      [1 << 17]tableEntry
+	table12     [1 << 18]tableEntry
+}
+
+func (z *Trio) Reset() {
+	z.table5 = [len(z.table5)]tableEntry{}
+	z.table8 = [len(z.table8)]tableEntry{}
+	z.table12 = [len(z.table12)]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *Trio) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	if len(z.history) > z.MaxDistance*2 {
+		delta := len(z.history) - z.MaxDistance
+		copy(z.history, z.history[delta:])
+		z.history = z.history[:z.MaxDistance]
+
+		for i := range z.table5 {
+			v := z.table5[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table5[i] = tableEntry{}
+			} else {
+				z.table5[i].offset = v
+			}
+		}
+		for i := range z.table8 {
+			v := z.table8[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table8[i] = tableEntry{}
+			} else {
+				z.table8[i].offset = v
+			}
+		}
+		for i := range z.table12 {
+			v := z.table12[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table12[i] = tableEntry{}
+			} else {
+				z.table12[i].offset = v
+			}
+		}
+	}
+
+	if len(src) < 20 {
+		return append(dst, Match{
+			Unmatched: len(src),
+		})
+	}
+
+	e := matchEmitter{
+		Dst:      dst,
+		NextEmit: len(z.history),
+	}
+	z.history = append(z.history, src...)
+	src = z.history
+
+	// matches stores the matches that have been found but not emitted,
+	// in reverse order. (matches[0] is the most recent one.)
+	var matches [3]absoluteMatch
+
+	sLimit := int32(len(src)) - 14
+
+mainLoop:
+	for {
+		// Search for a match, starting after the last match emitted.
+		s := int32(e.NextEmit)
+		if s > sLimit {
+			break mainLoop
+		}
+
+		// t will contain the match offset when we find one.
+		var t int32
+		var hashLengthFound int
+
+		cv := binary.LittleEndian.Uint64(src[s:])
+		extra := binary.LittleEndian.Uint32(src[s+8:])
+
+		for {
+			nextHash12 := z.hash12(cv, extra)
+			nextHash8 := z.hash8(cv)
+			nextHash5 := z.hash5(cv)
+			candidate12 := z.table12[nextHash12]
+			candidate8 := z.table8[nextHash8]
+			candidate5 := z.table5[nextHash5]
+
+			entry := tableEntry{offset: s, val: uint32(cv)}
+			z.table12[nextHash12] = entry
+			z.table8[nextHash8] = entry
+			z.table5[nextHash5] = entry
+
+			// Look for a repeat match one byte after the current position.
+			if len(e.Dst) > 0 {
+				prevDistance := int32(e.Dst[len(e.Dst)-1].Distance)
+				if prevDistance != 0 {
+					repIndex := s - prevDistance + 1
+					if repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv>>8) {
+						// There is a repeated match at s+2.
+						s++
+						t = repIndex
+						break
+					}
+				}
+			}
+
+			if candidate12.offset < s && s-candidate12.offset < int32(z.MaxDistance) && uint32(cv) == candidate12.val &&
+				binary.LittleEndian.Uint32(src[candidate12.offset:]) == uint32(cv) {
+				// There is a 12-byte match at s.
+				t = candidate12.offset
+				hashLengthFound = 12
+				break
+			}
+			if candidate8.offset < s && s-candidate8.offset < int32(z.MaxDistance) && uint32(cv) == candidate8.val &&
+				binary.LittleEndian.Uint32(src[candidate8.offset:]) == uint32(cv) {
+				t = candidate8.offset
+				hashLengthFound = 8
+				break
+			}
+			if candidate5.offset < s && s-candidate5.offset < int32(z.MaxDistance) && uint32(cv) == candidate5.val &&
+				binary.LittleEndian.Uint32(src[candidate5.offset:]) == uint32(cv) {
+				t = candidate5.offset
+				hashLengthFound = 5
+				break
+			}
+
+			s += 1 + ((s - int32(e.NextEmit)) >> 7)
+			if s > sLimit {
+				break mainLoop
+			}
+			cv = binary.LittleEndian.Uint64(src[s:])
+			extra = binary.LittleEndian.Uint32(src[s+8:])
+		}
+
+		if hashLengthFound != 0 && hashLengthFound < 12 {
+			// Look for a "lazy" match with a longer hash at s+1.
+			cv := binary.LittleEndian.Uint64(src[s+1:])
+			extra := binary.LittleEndian.Uint32(src[s+9:])
+			nextHash12 := z.hash12(cv, extra)
+			nextHash8 := z.hash8(cv)
+			candidate12 := z.table12[nextHash12]
+			candidate8 := z.table8[nextHash8]
+			coffset12 := s - candidate12.offset + 1
+			coffset8 := s - candidate8.offset + 1
+			entry := tableEntry{offset: s + 1, val: uint32(cv)}
+			z.table12[nextHash12] = entry
+			z.table8[nextHash8] = entry
+			if candidate12.offset < s+1 && coffset12 < int32(z.MaxDistance) && uint32(cv) == candidate12.val &&
+				binary.LittleEndian.Uint32(src[candidate12.offset:]) == uint32(cv) {
+				t = candidate12.offset
+				s++
+			} else if hashLengthFound < 8 && candidate8.offset < s+1 && coffset8 < int32(z.MaxDistance) && uint32(cv) == candidate8.val &&
+				binary.LittleEndian.Uint32(src[candidate8.offset:]) == uint32(cv) {
+				t = candidate8.offset
+				s++
+			}
+		}
+
+		currentMatch := extendMatch2(src, int(s), int(t), e.NextEmit)
+		matches[0] = currentMatch
+
+		index0 := s + 1
+
+		// We have a match in matches[0].
+		// Now look for overlapping matches.
+
+		for {
+			if matches[0].End > int(sLimit) {
+				break
+			}
+			s = int32(max(matches[0].Start+2, matches[0].End-10))
+
+			// Store some entries that haven't been indexed yet.
+			for index0 < s-1 {
+				cv0 := binary.LittleEndian.Uint64(src[index0:])
+				extra0 := binary.LittleEndian.Uint32(src[index0+8:])
+				te0 := tableEntry{offset: index0, val: uint32(cv0)}
+				z.table5[z.hash5(cv0)] = te0
+				z.table8[z.hash8(cv0)] = te0
+				z.table12[z.hash12(cv0, extra0)] = te0
+				index0++
+			}
+
+			cv = binary.LittleEndian.Uint64(src[s:])
+			extra = binary.LittleEndian.Uint32(src[s+8:])
+
+			nextHash12 := z.hash12(cv, extra)
+			nextHash8 := z.hash8(cv)
+			nextHash5 := z.hash5(cv)
+			candidate12 := z.table12[nextHash12]
+			candidate8 := z.table8[nextHash8]
+
+			entry := tableEntry{offset: s, val: uint32(cv)}
+			z.table12[nextHash12] = entry
+			z.table8[nextHash8] = entry
+			z.table5[nextHash5] = entry
+
+			t = -1
+			if candidate12.offset < s && s-candidate12.offset < int32(z.MaxDistance) && uint32(cv) == candidate12.val &&
+				binary.LittleEndian.Uint32(src[candidate12.offset:]) == uint32(cv) {
+				// There is a 12-byte match at s.
+				t = candidate12.offset
+			} else if candidate8.offset < s && s-candidate8.offset < int32(z.MaxDistance) && uint32(cv) == candidate8.val &&
+				binary.LittleEndian.Uint32(src[candidate8.offset:]) == uint32(cv) {
+				// There is a long match at s.
+				t = candidate8.offset
+			}
+
+			index0 = s + 1
+
+			if t == -1 {
+				// No overlapping match was found.
+				break
+			}
+
+			newMatch := extendMatch2(src, int(s), int(t), e.NextEmit)
+
+			if newMatch.End-newMatch.Start <= matches[0].End-matches[0].Start {
+				// The new match isn't longer than the old one, so we break out of the loop
+				// of looking for overlapping matches.
+				break
+			}
+
+			matches = [3]absoluteMatch{
+				newMatch,
+				matches[0],
+				matches[1],
+			}
+
+			if matches[2] == (absoluteMatch{}) {
+				continue
+			}
+
+			// We have three matches, so it's time to emit one and/or eliminate one.
+			switch {
+			case matches[0].Start < matches[2].End:
+				// The first and third matches overlap; discard the one in between.
+				matches = [3]absoluteMatch{
+					matches[0],
+					matches[2],
+					{},
+				}
+
+			case matches[0].Start < matches[2].End+4:
+				// The first and third matches don't overlap, but there's no room for
+				// another match between them. Emit the first match and discard the second.
+				e.emit(matches[2])
+				matches = [3]absoluteMatch{
+					matches[0],
+					{},
+					{},
+				}
+
+			default:
+				// Emit the first match, shortening it if necessary to avoid overlap with the second.
+				if matches[2].End > matches[1].Start {
+					matches[2].End = matches[1].Start
+				}
+				if matches[2].End-matches[2].Start >= 4 {
+					e.emit(matches[2])
+				}
+				matches[2] = absoluteMatch{}
+			}
+		}
+
+		// Store some entries up to the end of the last match.
+		for index0 < int32(matches[0].End) && index0 < sLimit {
+			cv0 := binary.LittleEndian.Uint64(src[index0:])
+			extra0 := binary.LittleEndian.Uint32(src[index0+8:])
+			te0 := tableEntry{offset: index0, val: uint32(cv0)}
+			z.table5[z.hash5(cv0)] = te0
+			z.table8[z.hash8(cv0)] = te0
+			z.table12[z.hash12(cv0, extra0)] = te0
+			index0++
+		}
+
+		// We're done looking for overlapping matches; emit the ones we have.
+
+		if matches[1] != (absoluteMatch{}) {
+			if matches[1].End > matches[0].Start {
+				matches[1].End = matches[0].Start
+			}
+			if matches[1].End-matches[1].Start >= 4 {
+				e.emit(matches[1])
+			}
+		}
+		e.emit(matches[0])
+		matches = [3]absoluteMatch{}
+	}
+
+	dst = e.Dst
+	if e.NextEmit < len(src) {
+		dst = append(dst, Match{
+			Unmatched: len(src) - e.NextEmit,
+		})
+	}
+
+	return dst
+}
+
+func (z *Trio) hash5(u uint64) uint32 {
+	return uint32(((u << 24) * 889523592379) >> (64 - 16))
+}
+
+func (z *Trio) hash8(u uint64) uint32 {
+	return uint32((u * 0xcf1bbcdcb7a56463) >> (64 - 17))
+}
+
+func (z *Trio) hash12(u uint64, e uint32) uint32 {
+	return uint32((u*0xcf1bbcdcb7a56463 + uint64(e)*(2654435761<<32)) >> (64 - 18))
+}

+ 258 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/zdfast.go

@@ -0,0 +1,258 @@
+package matchfinder
+
+import (
+	"encoding/binary"
+	"math"
+)
+
+const (
+	zdfastLongTableBits = 17
+	zdfastLongTableSize = 1 << zdfastLongTableBits
+)
+
+// ZDFast is a MatchFinder based on the "Default" setting in
+// github.com/klauspost/compress/zstd.
+type ZDFast struct {
+	MaxDistance int
+
+	history []byte
+	// current is the offset at the start of history
+	current   int32
+	table     [zfastTableSize]tableEntry
+	longTable [zdfastLongTableSize]tableEntry
+}
+
+func (z *ZDFast) Reset() {
+	z.current = 0
+	z.table = [zfastTableSize]tableEntry{}
+	z.longTable = [zdfastLongTableSize]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *ZDFast) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	// Protect against overflow of current.
+	if int(z.current) >= int(math.MaxInt32)-2*z.MaxDistance-len(z.history) {
+		minOffset := z.current + int32(len(z.history)) - int32(z.MaxDistance)
+		for i := range z.table {
+			v := z.table[i].offset
+			if v < minOffset {
+				v = 0
+			} else {
+				v = v - z.current + int32(z.MaxDistance)
+			}
+			z.table[i].offset = v
+		}
+		for i := range z.longTable {
+			v := z.longTable[i].offset
+			if v < minOffset {
+				v = 0
+			} else {
+				v = v - z.current + int32(z.MaxDistance)
+			}
+			z.longTable[i].offset = v
+		}
+		z.current = int32(z.MaxDistance)
+	}
+
+	if len(z.history)+len(src) > cap(z.history) {
+		// history doesn't have enough capacity to hold the new block.
+		if cap(z.history) == 0 {
+			historySize := max(2*z.MaxDistance, 1<<20, len(src))
+			z.history = make([]byte, 0, historySize)
+		} else {
+			// Move down
+			offset := len(z.history) - z.MaxDistance
+			copy(z.history[:z.MaxDistance], z.history[offset:])
+			z.current += int32(offset)
+			z.history = z.history[:z.MaxDistance]
+		}
+	}
+	s := int32(len(z.history))
+	z.history = append(z.history, src...)
+
+	if len(src) < 16 {
+		return append(dst, Match{
+			Unmatched: len(src),
+		})
+	}
+
+	src = z.history
+	sLimit := int32(len(src)) - 10
+
+	const stepSize = 1
+
+	nextEmit := s
+	cv := binary.LittleEndian.Uint64(src[s:])
+	var offset1, offset2 int32
+
+mainLoop:
+	for {
+		// t will contain the match offset when we find one.
+		// When exiting the search loop, we have already checked 4 bytes.
+		var t int32
+
+		for {
+			nextHashL := z.hashLong(cv)
+			nextHashS := z.hashShort(cv)
+			candidateL := z.longTable[nextHashL]
+			candidateS := z.table[nextHashS]
+
+			repIndex := s - offset1 + 1
+
+			entry := tableEntry{offset: s + z.current, val: uint32(cv)}
+			z.longTable[nextHashL] = entry
+			z.table[nextHashS] = entry
+
+			if offset1 != 0 && repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv>>8) {
+				// There is a repeated match at s+1.
+				end := extendMatch(src, int(repIndex+4), int(s+5))
+				start := s + 1
+				for repIndex > 0 && start > nextEmit && src[repIndex-1] == src[start-1] {
+					repIndex--
+					start--
+				}
+
+				dst = append(dst, Match{
+					Unmatched: int(start - nextEmit),
+					Length:    end - int(start),
+					Distance:  int(start - repIndex),
+				})
+				s = int32(end)
+				nextEmit = s
+				if s >= sLimit {
+					break mainLoop
+				}
+				cv = binary.LittleEndian.Uint64(src[s:])
+				continue
+			}
+
+			coffsetL := s - (candidateL.offset - z.current)
+			coffsetS := s - (candidateS.offset - z.current)
+			if coffsetL < int32(z.MaxDistance) && uint32(cv) == candidateL.val {
+				t = candidateL.offset - z.current
+				if binary.LittleEndian.Uint32(src[t:]) == uint32(cv) {
+					// found a long match (likely at least 8 bytes)
+					break
+				}
+			}
+			if coffsetS < int32(z.MaxDistance) && uint32(cv) == candidateS.val {
+				t = candidateS.offset - z.current
+				if binary.LittleEndian.Uint32(src[t:]) != uint32(cv) {
+					goto noMatch
+				}
+				// Found a regular match.
+				// See if we can find a long match at s+1
+				cv := binary.LittleEndian.Uint64(src[s+1:])
+				nextHashL = z.hashLong(cv)
+				candidateL = z.longTable[nextHashL]
+				coffsetL = s - (candidateL.offset - z.current) + 1
+				z.longTable[nextHashL] = tableEntry{offset: s + 1 + z.current, val: uint32(cv)}
+				if coffsetL < int32(z.MaxDistance) && uint32(cv) == candidateL.val {
+					t = candidateL.offset - z.current
+					if binary.LittleEndian.Uint32(src[t:]) == uint32(cv) {
+						// We found a long match at s+1, so we'll use that instead
+						// of the regular match at s.
+						s++
+						break
+					}
+				}
+
+				t = candidateS.offset - z.current
+				break
+			}
+		noMatch:
+
+			s += stepSize + ((s - nextEmit) >> 7)
+			if s > sLimit {
+				break mainLoop
+			}
+			cv = binary.LittleEndian.Uint64(src[s:])
+		}
+
+		// A 4-byte match has been found. We'll later see if more than
+		// 4 bytes.
+		offset2 = offset1
+		offset1 = s - t
+
+		end := extendMatch(src, int(t+4), int(s+4))
+		for t > 0 && s > nextEmit && src[t-1] == src[s-1] {
+			s--
+			t--
+		}
+
+		dst = append(dst, Match{
+			Unmatched: int(s - nextEmit),
+			Length:    end - int(s),
+			Distance:  int(s - t),
+		})
+		prevS := s
+		s = int32(end)
+		nextEmit = s
+		if s >= sLimit {
+			break mainLoop
+		}
+
+		// Store some table entries near the start and end of the match.
+		index0 := prevS + 1
+		index1 := s - 2
+		cv0 := binary.LittleEndian.Uint64(src[index0:])
+		cv1 := binary.LittleEndian.Uint64(src[index1:])
+		te0 := tableEntry{offset: index0 + z.current, val: uint32(cv0)}
+		te1 := tableEntry{offset: index1 + z.current, val: uint32(cv1)}
+		z.longTable[z.hashLong(cv0)] = te0
+		z.longTable[z.hashLong(cv1)] = te1
+		cv0 >>= 8
+		cv1 >>= 8
+		te0.offset++
+		te1.offset++
+		te0.val = uint32(cv0)
+		te1.val = uint32(cv1)
+		z.table[z.hashShort(cv0)] = te0
+		z.table[z.hashShort(cv1)] = te1
+
+		cv = binary.LittleEndian.Uint64(src[s:])
+
+		// Check offset 2
+		if o2 := s - offset2; offset2 != 0 && binary.LittleEndian.Uint32(src[o2:]) == uint32(cv) {
+			end := extendMatch(src, int(o2+4), int(s+4))
+
+			// Store the hashes, since we have them.
+			nextHashS := z.hashShort(cv)
+			nextHashL := z.hashLong(cv)
+			entry := tableEntry{offset: s + z.current, val: uint32(cv)}
+			z.table[nextHashS] = entry
+			z.longTable[nextHashL] = entry
+			dst = append(dst, Match{
+				Length:   end - int(s),
+				Distance: int(offset2),
+			})
+			s = int32(end)
+			nextEmit = s
+			offset1, offset2 = offset2, offset1
+			if s >= sLimit {
+				break mainLoop
+			}
+			cv = binary.LittleEndian.Uint64(src[s:])
+		}
+	}
+
+	if int(nextEmit) < len(src) {
+		dst = append(dst, Match{
+			Unmatched: len(src) - int(nextEmit),
+		})
+	}
+
+	return dst
+}
+
+func (z *ZDFast) hashShort(u uint64) uint32 {
+	return uint32(((u << 24) * 889523592379) >> (64 - zfastTableBits))
+}
+
+func (z *ZDFast) hashLong(u uint64) uint32 {
+	return uint32((u * 0xcf1bbcdcb7a56463) >> (64 - zdfastLongTableBits))
+}

+ 206 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/zfast.go

@@ -0,0 +1,206 @@
+package matchfinder
+
+import (
+	"encoding/binary"
+	"math"
+)
+
+type tableEntry struct {
+	val    uint32
+	offset int32
+}
+
+const (
+	zfastTableBits = 15
+	zfastTableSize = 1 << zfastTableBits
+	zfastHashLen   = 6
+
+	prime6Bytes = 227718039650203
+)
+
+// ZFast is a MatchFinder based on the "Fastest" setting in
+// github.com/klauspost/compress/zstd.
+type ZFast struct {
+	MaxDistance int
+
+	history []byte
+	// current is the offset at the start of history
+	current int32
+	table   [zfastTableSize]tableEntry
+}
+
+func (z *ZFast) Reset() {
+	z.current = 0
+	z.table = [zfastTableSize]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *ZFast) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	// Protect against overflow of current.
+	if int(z.current) >= int(math.MaxInt32)-2*z.MaxDistance-len(z.history) {
+		minOffset := z.current + int32(len(z.history)) - int32(z.MaxDistance)
+		for i := range z.table {
+			v := z.table[i].offset
+			if v < minOffset {
+				v = 0
+			} else {
+				v = v - z.current + int32(z.MaxDistance)
+			}
+			z.table[i].offset = v
+		}
+		z.current = int32(z.MaxDistance)
+	}
+
+	if len(z.history)+len(src) > cap(z.history) {
+		// history doesn't have enough capacity to hold the new block.
+		if cap(z.history) == 0 {
+			historySize := max(2*z.MaxDistance, 1<<20, len(src))
+			z.history = make([]byte, 0, historySize)
+		} else {
+			// Move down
+			offset := len(z.history) - z.MaxDistance
+			copy(z.history[:z.MaxDistance], z.history[offset:])
+			z.current += int32(offset)
+			z.history = z.history[:z.MaxDistance]
+		}
+	}
+	s := int32(len(z.history))
+	z.history = append(z.history, src...)
+
+	if len(src) < 10 {
+		return append(dst, Match{
+			Unmatched: len(src),
+		})
+	}
+
+	src = z.history
+	sLimit := int32(len(src)) - 8
+
+	const stepSize = 2
+
+	nextEmit := s
+	cv := binary.LittleEndian.Uint64(src[s:])
+	var offset1, offset2 int32
+
+mainLoop:
+	for {
+		// t will contain the match offset when we find one.
+		// When exiting the search loop, we have already checked 4 bytes.
+		var t int32
+
+		for {
+			nextHash := z.hash(cv)
+			nextHash2 := z.hash(cv >> 8)
+			candidate := z.table[nextHash]
+			candidate2 := z.table[nextHash2]
+			repIndex := s - offset1 + 2
+
+			z.table[nextHash] = tableEntry{offset: s + z.current, val: uint32(cv)}
+			z.table[nextHash2] = tableEntry{offset: s + z.current + 1, val: uint32(cv >> 8)}
+
+			if offset1 != 0 && repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv>>16) {
+				// There is a repeated match at s+2.
+				end := extendMatch(src, int(repIndex+4), int(s+6))
+				start := s + 2
+				for repIndex > 0 && start > nextEmit && src[repIndex-1] == src[start-1] {
+					repIndex--
+					start--
+				}
+				dst = append(dst, Match{
+					Unmatched: int(start - nextEmit),
+					Length:    end - int(start),
+					Distance:  int(start - repIndex),
+				})
+				s = int32(end)
+				nextEmit = s
+				if s >= sLimit {
+					break mainLoop
+				}
+				cv = binary.LittleEndian.Uint64(src[s:])
+				continue
+			}
+
+			coffset0 := s - (candidate.offset - z.current)
+			coffset1 := s - (candidate2.offset - z.current) + 1
+			if coffset0 < int32(z.MaxDistance) && uint32(cv) == candidate.val {
+				t = candidate.offset - z.current
+				if binary.LittleEndian.Uint32(src[t:]) == uint32(cv) {
+					// found a regular match
+					break
+				}
+			}
+			if coffset1 < int32(z.MaxDistance) && uint32(cv>>8) == candidate2.val {
+				t = candidate2.offset - z.current
+				if binary.LittleEndian.Uint32(src[t:]) == uint32(cv>>8) {
+					s++
+					break
+				}
+			}
+
+			s += stepSize + ((s - nextEmit) >> 5)
+			if s > sLimit {
+				break mainLoop
+			}
+			cv = binary.LittleEndian.Uint64(src[s:])
+		}
+
+		// A 4-byte match has been found. We'll later see if more than
+		// 4 bytes.
+		offset2 = offset1
+		offset1 = s - t
+
+		end := extendMatch(src, int(t+4), int(s+4))
+		for t > 0 && s > nextEmit && src[t-1] == src[s-1] {
+			s--
+			t--
+		}
+
+		dst = append(dst, Match{
+			Unmatched: int(s - nextEmit),
+			Length:    end - int(s),
+			Distance:  int(s - t),
+		})
+		s = int32(end)
+		nextEmit = s
+		if s >= sLimit {
+			break mainLoop
+		}
+		cv = binary.LittleEndian.Uint64(src[s:])
+
+		// Check offset 2
+		if o2 := s - offset2; offset2 != 0 && binary.LittleEndian.Uint32(src[o2:]) == uint32(cv) {
+			end := extendMatch(src, int(o2+4), int(s+4))
+
+			// Store the hash, since we have it.
+			nextHash := z.hash(cv)
+			z.table[nextHash] = tableEntry{offset: s + z.current, val: uint32(cv)}
+			dst = append(dst, Match{
+				Length:   end - int(s),
+				Distance: int(offset2),
+			})
+			s = int32(end)
+			nextEmit = s
+			offset1, offset2 = offset2, offset1
+			if s >= sLimit {
+				break mainLoop
+			}
+			cv = binary.LittleEndian.Uint64(src[s:])
+		}
+	}
+
+	if int(nextEmit) < len(src) {
+		dst = append(dst, Match{
+			Unmatched: len(src) - int(nextEmit),
+		})
+	}
+
+	return dst
+}
+
+func (z *ZFast) hash(u uint64) uint32 {
+	return uint32(((u << 16) * prime6Bytes) >> (64 - zfastTableBits))
+}

+ 301 - 0
v4/vendor/github.com/andybalholm/brotli/matchfinder/zm.go

@@ -0,0 +1,301 @@
+package matchfinder
+
+import "encoding/binary"
+
+const (
+	zmTableBits     = 15
+	zmTableSize     = 1 << zmTableBits
+	zmLongTableBits = 17
+	zmLongTableSize = 1 << zmLongTableBits
+)
+
+// ZM is a MatchFinder that combines the cache tables of ZDFast with the
+// overlap-based parsing of M4.
+type ZM struct {
+	MaxDistance int
+	history     []byte
+	table       [zmTableSize]tableEntry
+	longTable   [zmLongTableSize]tableEntry
+}
+
+func (z *ZM) Reset() {
+	z.table = [zmTableSize]tableEntry{}
+	z.longTable = [zmLongTableSize]tableEntry{}
+	z.history = z.history[:0]
+}
+
+func (z *ZM) FindMatches(dst []Match, src []byte) []Match {
+	if z.MaxDistance == 0 {
+		z.MaxDistance = 1 << 16
+	}
+
+	if len(z.history) > z.MaxDistance*2 {
+		delta := len(z.history) - z.MaxDistance
+		copy(z.history, z.history[delta:])
+		z.history = z.history[:z.MaxDistance]
+
+		for i := range z.table {
+			v := z.table[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.table[i] = tableEntry{}
+			} else {
+				z.table[i].offset = v
+			}
+		}
+		for i := range z.longTable {
+			v := z.longTable[i].offset
+			v -= int32(delta)
+			if v < 0 {
+				z.longTable[i] = tableEntry{}
+			} else {
+				z.longTable[i].offset = v
+			}
+		}
+	}
+
+	if len(src) < 16 {
+		return append(dst, Match{
+			Unmatched: len(src),
+		})
+	}
+
+	e := matchEmitter{
+		Dst:      dst,
+		NextEmit: len(z.history),
+	}
+	z.history = append(z.history, src...)
+	src = z.history
+
+	// matches stores the matches that have been found but not emitted,
+	// in reverse order. (matches[0] is the most recent one.)
+	var matches [3]absoluteMatch
+
+	sLimit := int32(len(src)) - 10
+
+mainLoop:
+	for {
+		// Search for a match, starting after the last match emitted.
+		s := int32(e.NextEmit)
+		if s > sLimit {
+			break mainLoop
+		}
+
+		// t will contain the match offset when we find one.
+		var t int32
+
+		cv := binary.LittleEndian.Uint64(src[s:])
+
+		for {
+			nextHashL := z.hashLong(cv)
+			nextHashS := z.hashShort(cv)
+			candidateL := z.longTable[nextHashL]
+			candidateS := z.table[nextHashS]
+
+			entry := tableEntry{offset: s, val: uint32(cv)}
+			z.longTable[nextHashL] = entry
+			z.table[nextHashS] = entry
+
+			// Look for a repeat match one byte after the current position.
+			if len(e.Dst) > 0 {
+				prevDistance := int32(e.Dst[len(e.Dst)-1].Distance)
+				if prevDistance != 0 {
+					repIndex := s - prevDistance + 1
+					if repIndex >= 0 && binary.LittleEndian.Uint32(src[repIndex:]) == uint32(cv>>8) {
+						// There is a repeated match at s+2.
+						s++
+						t = repIndex
+						break
+					}
+				}
+			}
+
+			if candidateL.offset < s && s-candidateL.offset < int32(z.MaxDistance) && uint32(cv) == candidateL.val &&
+				binary.LittleEndian.Uint32(src[candidateL.offset:]) == uint32(cv) {
+				// There is a long match at s.
+				t = candidateL.offset
+				break
+			}
+			if candidateS.offset < s && s-candidateS.offset < int32(z.MaxDistance) && uint32(cv) == candidateS.val &&
+				binary.LittleEndian.Uint32(src[candidateS.offset:]) == uint32(cv) {
+				// There is a regular match at s.
+				// See if we can find a long match at s+1.
+				cv := binary.LittleEndian.Uint64(src[s+1:])
+				nextHashL = z.hashLong(cv)
+				candidateL = z.longTable[nextHashL]
+				coffsetL := s - candidateL.offset + 1
+				z.longTable[nextHashL] = tableEntry{offset: s + 1, val: uint32(cv)}
+				if candidateL.offset < s+1 && coffsetL < int32(z.MaxDistance) && uint32(cv) == candidateL.val &&
+					binary.LittleEndian.Uint32(src[candidateL.offset:]) == uint32(cv) {
+					// We found a long match at s+1, so we'll use that instead
+					// of the regular match at s.
+					t = candidateL.offset
+					s++
+					break
+				}
+
+				t = candidateS.offset
+				break
+			}
+
+			s += 1 + ((s - int32(e.NextEmit)) >> 7)
+			if s > sLimit {
+				break mainLoop
+			}
+			cv = binary.LittleEndian.Uint64(src[s:])
+		}
+
+		currentMatch := extendMatch2(src, int(s), int(t), e.NextEmit)
+		matches[0] = currentMatch
+
+		// Store some table entries after s.
+		index0 := s + 1
+		cv0 := binary.LittleEndian.Uint64(src[index0:])
+		te0 := tableEntry{offset: index0, val: uint32(cv0)}
+		z.longTable[z.hashLong(cv0)] = te0
+		cv0 >>= 8
+		te0.offset++
+		te0.val = uint32(cv0)
+		z.table[z.hashShort(cv0)] = te0
+
+		// We have a match in matches[0].
+		// Now look for overlapping matches.
+
+		for {
+			if matches[0].End > int(sLimit) {
+				break
+			}
+			s = int32(max(matches[0].Start+2, matches[0].End-6))
+			cv = binary.LittleEndian.Uint64(src[s:])
+
+			nextHashL := z.hashLong(cv)
+			nextHashS := z.hashShort(cv)
+			candidateL := z.longTable[nextHashL]
+			candidateS := z.table[nextHashS]
+
+			entry := tableEntry{offset: s, val: uint32(cv)}
+			z.longTable[nextHashL] = entry
+			z.table[nextHashS] = entry
+
+			t = -1
+			if candidateL.offset < s && s-candidateL.offset < int32(z.MaxDistance) && uint32(cv) == candidateL.val &&
+				binary.LittleEndian.Uint32(src[candidateL.offset:]) == uint32(cv) {
+				// There is a long match at s.
+				t = candidateL.offset
+			} else if candidateS.offset < s && s-candidateS.offset < int32(z.MaxDistance) && uint32(cv) == candidateS.val &&
+				binary.LittleEndian.Uint32(src[candidateS.offset:]) == uint32(cv) {
+				// There is a regular match at s.
+				t = candidateS.offset
+				// See if we can find a long match at s+1.
+				cv := binary.LittleEndian.Uint64(src[s+1:])
+				nextHashL = z.hashLong(cv)
+				candidateL = z.longTable[nextHashL]
+				coffsetL := s - candidateL.offset + 1
+				z.longTable[nextHashL] = tableEntry{offset: s + 1, val: uint32(cv)}
+				if candidateL.offset < s+1 && coffsetL < int32(z.MaxDistance) && uint32(cv) == candidateL.val &&
+					binary.LittleEndian.Uint32(src[candidateL.offset:]) == uint32(cv) {
+					// We found a long match at s+1, so we'll use that instead
+					// of the regular match at s.
+					t = candidateL.offset
+					s++
+				}
+			}
+
+			if t == -1 {
+				// No overlapping match was found.
+				break
+			}
+
+			newMatch := extendMatch2(src, int(s), int(t), e.NextEmit)
+
+			if newMatch.End-newMatch.Start <= matches[0].End-matches[0].Start {
+				// The new match isn't longer than the old one, so we break out of the loop
+				// of looking for overlapping matches.
+				break
+			}
+
+			matches = [3]absoluteMatch{
+				newMatch,
+				matches[0],
+				matches[1],
+			}
+
+			if matches[2] == (absoluteMatch{}) {
+				continue
+			}
+
+			// We have three matches, so it's time to emit one and/or eliminate one.
+			switch {
+			case matches[0].Start < matches[2].End:
+				// The first and third matches overlap; discard the one in between.
+				matches = [3]absoluteMatch{
+					matches[0],
+					matches[2],
+					{},
+				}
+
+			case matches[0].Start < matches[2].End+4:
+				// The first and third matches don't overlap, but there's no room for
+				// another match between them. Emit the first match and discard the second.
+				e.emit(matches[2])
+				matches = [3]absoluteMatch{
+					matches[0],
+					{},
+					{},
+				}
+
+			default:
+				// Emit the first match, shortening it if necessary to avoid overlap with the second.
+				if matches[2].End > matches[1].Start {
+					matches[2].End = matches[1].Start
+				}
+				if matches[2].End-matches[2].Start >= 4 {
+					e.emit(matches[2])
+				}
+				matches[2] = absoluteMatch{}
+			}
+		}
+
+		// Store some table entries at the end of the last match.
+		index1 := int32(matches[0].End - 2)
+		if index1 < sLimit {
+			cv1 := binary.LittleEndian.Uint64(src[index1:])
+			te1 := tableEntry{offset: index1, val: uint32(cv1)}
+			z.longTable[z.hashLong(cv1)] = te1
+			cv1 >>= 8
+			te1.offset++
+			te1.val = uint32(cv1)
+			z.table[z.hashShort(cv1)] = te1
+		}
+
+		// We're done looking for overlapping matches; emit the ones we have.
+
+		if matches[1] != (absoluteMatch{}) {
+			if matches[1].End > matches[0].Start {
+				matches[1].End = matches[0].Start
+			}
+			if matches[1].End-matches[1].Start >= 4 {
+				e.emit(matches[1])
+			}
+		}
+		e.emit(matches[0])
+		matches = [3]absoluteMatch{}
+	}
+
+	dst = e.Dst
+	if e.NextEmit < len(src) {
+		dst = append(dst, Match{
+			Unmatched: len(src) - e.NextEmit,
+		})
+	}
+
+	return dst
+}
+
+func (z *ZM) hashShort(u uint64) uint32 {
+	return uint32(((u << 24) * 889523592379) >> (64 - zmTableBits))
+}
+
+func (z *ZM) hashLong(u uint64) uint32 {
+	return uint32((u * 0xcf1bbcdcb7a56463) >> (64 - zmLongTableBits))
+}

+ 1 - 1
v4/vendor/github.com/andybalholm/brotli/metablock_command.go

@@ -44,7 +44,7 @@ func initBlockSplitterCommand(self *blockSplitterCommand, alphabet_size uint, mi
 	brotli_ensure_capacity_uint32_t(&split.lengths, &split.lengths_alloc_size, max_num_blocks)
 	brotli_ensure_capacity_uint32_t(&split.lengths, &split.lengths_alloc_size, max_num_blocks)
 	self.split_.num_blocks = max_num_blocks
 	self.split_.num_blocks = max_num_blocks
 	*histograms_size = max_num_types
 	*histograms_size = max_num_types
-	if histograms == nil || cap(*histograms) < int(*histograms_size) {
+	if cap(*histograms) < int(*histograms_size) {
 		*histograms = make([]histogramCommand, (*histograms_size))
 		*histograms = make([]histogramCommand, (*histograms_size))
 	} else {
 	} else {
 		*histograms = (*histograms)[:*histograms_size]
 		*histograms = (*histograms)[:*histograms_size]

+ 1 - 1
v4/vendor/github.com/andybalholm/brotli/metablock_distance.go

@@ -44,7 +44,7 @@ func initBlockSplitterDistance(self *blockSplitterDistance, alphabet_size uint,
 	brotli_ensure_capacity_uint32_t(&split.lengths, &split.lengths_alloc_size, max_num_blocks)
 	brotli_ensure_capacity_uint32_t(&split.lengths, &split.lengths_alloc_size, max_num_blocks)
 	self.split_.num_blocks = max_num_blocks
 	self.split_.num_blocks = max_num_blocks
 	*histograms_size = max_num_types
 	*histograms_size = max_num_types
-	if histograms == nil || cap(*histograms) < int(*histograms_size) {
+	if cap(*histograms) < int(*histograms_size) {
 		*histograms = make([]histogramDistance, *histograms_size)
 		*histograms = make([]histogramDistance, *histograms_size)
 	} else {
 	} else {
 		*histograms = (*histograms)[:*histograms_size]
 		*histograms = (*histograms)[:*histograms_size]

+ 1 - 1
v4/vendor/github.com/andybalholm/brotli/metablock_literal.go

@@ -44,7 +44,7 @@ func initBlockSplitterLiteral(self *blockSplitterLiteral, alphabet_size uint, mi
 	brotli_ensure_capacity_uint32_t(&split.lengths, &split.lengths_alloc_size, max_num_blocks)
 	brotli_ensure_capacity_uint32_t(&split.lengths, &split.lengths_alloc_size, max_num_blocks)
 	self.split_.num_blocks = max_num_blocks
 	self.split_.num_blocks = max_num_blocks
 	*histograms_size = max_num_types
 	*histograms_size = max_num_types
-	if histograms == nil || cap(*histograms) < int(*histograms_size) {
+	if cap(*histograms) < int(*histograms_size) {
 		*histograms = make([]histogramLiteral, *histograms_size)
 		*histograms = make([]histogramLiteral, *histograms_size)
 	} else {
 	} else {
 		*histograms = (*histograms)[:*histograms_size]
 		*histograms = (*histograms)[:*histograms_size]

+ 27 - 39
v4/vendor/github.com/andybalholm/brotli/writer.go

@@ -124,51 +124,39 @@ func (nopCloser) Close() error { return nil }
 // based on the matchfinder package. It currently supports up to level 9;
 // based on the matchfinder package. It currently supports up to level 9;
 // if a higher level is specified, level 9 will be used.
 // if a higher level is specified, level 9 will be used.
 func NewWriterV2(dst io.Writer, level int) *matchfinder.Writer {
 func NewWriterV2(dst io.Writer, level int) *matchfinder.Writer {
+	if level < 0 {
+		level = 0
+	} else if level > 9 {
+		level = 9
+	}
 	var mf matchfinder.MatchFinder
 	var mf matchfinder.MatchFinder
-	if level < 2 {
-		mf = matchfinder.M0{Lazy: level == 1}
-	} else if level < 8 {
-		hashLen := 6
-		if level >= 6 {
-			hashLen = 5
-		}
-		chainLen := 16
-		switch level {
-		case 2:
-			chainLen = 0
-		case 3:
-			chainLen = 1
-		case 4:
-			chainLen = 2
-		case 5:
-			chainLen = 4
-		case 6:
-			chainLen = 8
-		}
-		mf = &matchfinder.M4{
-			MaxDistance:     1 << 20,
-			ChainLength:     chainLen,
-			HashLen:         hashLen,
-			DistanceBitCost: 66,
-		}
-	} else {
-		chainLen := 32
-		hashLen := 5
-		if level == 8 {
-			chainLen = 4
-			hashLen = 6
-		}
-		mf = &matchfinder.Pathfinder{
-			MaxDistance: 1 << 20,
-			ChainLength: chainLen,
-			HashLen:     hashLen,
-		}
+	switch level {
+	case 0, 1:
+		mf = &matchfinder.ZFast{MaxDistance: 1 << 20}
+	case 2:
+		mf = &matchfinder.ZDFast{MaxDistance: 1 << 20}
+	case 3:
+		mf = &matchfinder.ZM{MaxDistance: 1 << 20}
+	case 4:
+		mf = &matchfinder.Trio{MaxDistance: 1 << 20}
+	case 5, 6:
+		mf = &matchfinder.Bargain1{MaxDistance: 1 << 20}
+	case 7:
+		mf = &matchfinder.Bargain2{MaxDistance: 1 << 20, Skip: true}
+	case 8:
+		mf = &matchfinder.Bargain2{MaxDistance: 1 << 20}
+	case 9:
+		mf = &matchfinder.Bargain3{MaxDistance: 1 << 20}
 	}
 	}
 
 
-	return &matchfinder.Writer{
+	w := &matchfinder.Writer{
 		Dest:        dst,
 		Dest:        dst,
 		MatchFinder: mf,
 		MatchFinder: mf,
 		Encoder:     &Encoder{},
 		Encoder:     &Encoder{},
 		BlockSize:   1 << 16,
 		BlockSize:   1 << 16,
 	}
 	}
+	if level < 1 {
+		w.Encoder = &FastEncoder{}
+	}
+	return w
 }
 }

+ 0 - 2
v4/vendor/github.com/clipperhouse/stringish/.gitignore

@@ -1,2 +0,0 @@
-.DS_Store
-*.test

+ 0 - 64
v4/vendor/github.com/clipperhouse/stringish/README.md

@@ -1,64 +0,0 @@
-# stringish
-
-A small Go module that provides a generic type constraint for “string-like”
-data, and a utf8 package that works with both strings and byte slices
-without conversions.
-
-```go
-type Interface interface {
-	~[]byte | ~string
-}
-```
-
-[![Go Reference](https://pkg.go.dev/badge/github.com/clipperhouse/stringish/utf8.svg)](https://pkg.go.dev/github.com/clipperhouse/stringish/utf8)
-[![Test Status](https://github.com/clipperhouse/stringish/actions/workflows/gotest.yml/badge.svg)](https://github.com/clipperhouse/stringish/actions/workflows/gotest.yml)
-
-## Install
-
-```
-go get github.com/clipperhouse/stringish
-```
-
-## Examples
-
-```go
-import (
-    "github.com/clipperhouse/stringish"
-    "github.com/clipperhouse/stringish/utf8"
-)
-
-s := "Hello, 世界"
-r, size := utf8.DecodeRune(s)   // not DecodeRuneInString 🎉
-
-b := []byte("Hello, 世界")
-r, size = utf8.DecodeRune(b)    // same API!
-
-func MyFoo[T stringish.Interface](s T) T {
-    // pass a string or a []byte
-    // iterate, slice, transform, whatever
-}
-```
-
-## Motivation
-
-Sometimes we want APIs to accept `string` or `[]byte` without having to convert
-between those types. That conversion usually allocates!
-
-By implementing with `stringish.Interface`, we can have a single API, and
-single implementation for both types: one `Foo` instead of `Foo` and
-`FooString`.
-
-We have converted the
-[`unicode/utf8` package](https://github.com/clipperhouse/stringish/blob/main/utf8/utf8.go)
-as an example -- note the absence of`*InString` funcs. We might look at `x/text`
-next.
-
-## Used by
-
-- clipperhouse/uax29: [stringish trie](https://github.com/clipperhouse/uax29/blob/master/graphemes/trie.go#L27), [stringish iterator](https://github.com/clipperhouse/uax29/blob/master/internal/iterators/iterator.go#L9), [stringish SplitFunc](https://github.com/clipperhouse/uax29/blob/master/graphemes/splitfunc.go#L21)
-
-- [clipperhouse/displaywidth](https://github.com/clipperhouse/displaywidth)
-
-## Prior discussion
-
-- [Consideration of similar by the Go team](https://github.com/golang/go/issues/48643)

+ 0 - 5
v4/vendor/github.com/clipperhouse/stringish/interface.go

@@ -1,5 +0,0 @@
-package stringish
-
-type Interface interface {
-	~[]byte | ~string
-}

+ 0 - 94
v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/README.md

@@ -1,94 +0,0 @@
-An implementation of grapheme cluster boundaries from [Unicode text segmentation](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) (UAX 29), for Unicode version 15.0.0.
-
-[![Documentation](https://pkg.go.dev/badge/github.com/clipperhouse/uax29/v2/graphemes.svg)](https://pkg.go.dev/github.com/clipperhouse/uax29/v2/graphemes)
-![Tests](https://github.com/clipperhouse/uax29/actions/workflows/gotest.yml/badge.svg)
-![Fuzz](https://github.com/clipperhouse/uax29/actions/workflows/gofuzz.yml/badge.svg)
-
-## Quick start
-
-```
-go get "github.com/clipperhouse/uax29/v2/graphemes"
-```
-
-```go
-import "github.com/clipperhouse/uax29/v2/graphemes"
-
-text := "Hello, 世界. Nice dog! 👍🐶"
-
-tokens := graphemes.FromString(text)
-
-for tokens.Next() {                     // Next() returns true until end of data
-	fmt.Println(tokens.Value())         // Do something with the current grapheme
-}
-```
-
-_A grapheme is a “single visible character”, which might be a simple as a single letter, or a complex emoji that consists of several Unicode code points._
-
-## Conformance
-
-We use the Unicode [test suite](https://unicode.org/reports/tr41/tr41-26.html#Tests29).
-
-![Tests](https://github.com/clipperhouse/uax29/actions/workflows/gotest.yml/badge.svg)
-![Fuzz](https://github.com/clipperhouse/uax29/actions/workflows/gofuzz.yml/badge.svg)
-
-## APIs
-
-### If you have a `string`
-
-```go
-text := "Hello, 世界. Nice dog! 👍🐶"
-
-tokens := graphemes.FromString(text)
-
-for tokens.Next() {                     // Next() returns true until end of data
-	fmt.Println(tokens.Value())         // Do something with the current grapheme
-}
-```
-
-### If you have an `io.Reader`
-
-`FromReader` embeds a [`bufio.Scanner`](https://pkg.go.dev/bufio#Scanner), so just use those methods.
-
-```go
-r := getYourReader()                        // from a file or network maybe
-tokens := graphemes.FromReader(r)
-
-for tokens.Scan() {                         // Scan() returns true until error or EOF
-	fmt.Println(tokens.Text())              // Do something with the current grapheme
-}
-
-if tokens.Err() != nil {                    // Check the error
-	log.Fatal(tokens.Err())
-}
-```
-
-### If you have a `[]byte`
-
-```go
-b := []byte("Hello, 世界. Nice dog! 👍🐶")
-
-tokens := graphemes.FromBytes(b)
-
-for tokens.Next() {                     // Next() returns true until end of data
-	fmt.Println(tokens.Value())         // Do something with the current grapheme
-}
-```
-
-### Benchmarks
-
-On a Mac M2 laptop, we see around 200MB/s, or around 100 million graphemes per second, and no allocations.
-
-```
-goos: darwin
-goarch: arm64
-pkg: github.com/clipperhouse/uax29/graphemes/comparative
-cpu: Apple M2
-BenchmarkGraphemes/clipperhouse/uax29-8    	    173805 ns/op	 201.16 MB/s      0 B/op	   0 allocs/op
-BenchmarkGraphemes/rivo/uniseg-8           	   2045128 ns/op	  17.10 MB/s      0 B/op	   0 allocs/op
-```
-
-### Invalid inputs
-
-Invalid UTF-8 input is considered undefined behavior. We test to ensure that bad inputs will not cause pathological outcomes, such as a panic or infinite loop. Callers should expect “garbage-in, garbage-out”.
-
-Your pipeline should probably include a call to [`utf8.Valid()`](https://pkg.go.dev/unicode/utf8#Valid).

+ 0 - 31
v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/iterator.go

@@ -1,31 +0,0 @@
-package graphemes
-
-import (
-	"github.com/clipperhouse/stringish"
-	"github.com/clipperhouse/uax29/v2/internal/iterators"
-)
-
-type Iterator[T stringish.Interface] struct {
-	*iterators.Iterator[T]
-}
-
-var (
-	splitFuncString = splitFunc[string]
-	splitFuncBytes  = splitFunc[[]byte]
-)
-
-// FromString returns an iterator for the grapheme clusters in the input string.
-// Iterate while Next() is true, and access the grapheme via Value().
-func FromString(s string) Iterator[string] {
-	return Iterator[string]{
-		iterators.New(splitFuncString, s),
-	}
-}
-
-// FromBytes returns an iterator for the grapheme clusters in the input bytes.
-// Iterate while Next() is true, and access the grapheme via Value().
-func FromBytes(b []byte) Iterator[[]byte] {
-	return Iterator[[]byte]{
-		iterators.New(splitFuncBytes, b),
-	}
-}

+ 0 - 25
v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/reader.go

@@ -1,25 +0,0 @@
-// Package graphemes implements Unicode grapheme cluster boundaries: https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
-package graphemes
-
-import (
-	"bufio"
-	"io"
-)
-
-type Scanner struct {
-	*bufio.Scanner
-}
-
-// FromReader returns a Scanner, to split graphemes per
-// https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries.
-//
-// It embeds a [bufio.Scanner], so you can use its methods.
-//
-// Iterate through graphemes by calling Scan() until false, then check Err().
-func FromReader(r io.Reader) *Scanner {
-	sc := bufio.NewScanner(r)
-	sc.Split(SplitFunc)
-	return &Scanner{
-		Scanner: sc,
-	}
-}

+ 0 - 174
v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/splitfunc.go

@@ -1,174 +0,0 @@
-package graphemes
-
-import (
-	"bufio"
-
-	"github.com/clipperhouse/stringish"
-)
-
-// is determines if lookup intersects propert(ies)
-func (lookup property) is(properties property) bool {
-	return (lookup & properties) != 0
-}
-
-const _Ignore = _Extend
-
-// SplitFunc is a bufio.SplitFunc implementation of Unicode grapheme cluster segmentation, for use with bufio.Scanner.
-//
-// See https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries.
-var SplitFunc bufio.SplitFunc = splitFunc[[]byte]
-
-func splitFunc[T stringish.Interface](data T, atEOF bool) (advance int, token T, err error) {
-	var empty T
-	if len(data) == 0 {
-		return 0, empty, nil
-	}
-
-	// These vars are stateful across loop iterations
-	var pos int
-	var lastExIgnore property = 0     // "last excluding ignored categories"
-	var lastLastExIgnore property = 0 // "last one before that"
-	var regionalIndicatorCount int
-
-	// Rules are usually of the form Cat1 × Cat2; "current" refers to the first property
-	// to the right of the ×, from which we look back or forward
-
-	current, w := lookup(data[pos:])
-	if w == 0 {
-		if !atEOF {
-			// Rune extends past current data, request more
-			return 0, empty, nil
-		}
-		pos = len(data)
-		return pos, data[:pos], nil
-	}
-
-	// https://unicode.org/reports/tr29/#GB1
-	// Start of text always advances
-	pos += w
-
-	for {
-		eot := pos == len(data) // "end of text"
-
-		if eot {
-			if !atEOF {
-				// Token extends past current data, request more
-				return 0, empty, nil
-			}
-
-			// https://unicode.org/reports/tr29/#GB2
-			break
-		}
-
-		/*
-			We've switched the evaluation order of GB1↓ and GB2↑. It's ok:
-			because we've checked for len(data) at the top of this function,
-			sot and eot are mutually exclusive, order doesn't matter.
-		*/
-
-		// Rules are usually of the form Cat1 × Cat2; "current" refers to the first property
-		// to the right of the ×, from which we look back or forward
-
-		// Remember previous properties to avoid lookups/lookbacks
-		last := current
-		if !last.is(_Ignore) {
-			lastLastExIgnore = lastExIgnore
-			lastExIgnore = last
-		}
-
-		current, w = lookup(data[pos:])
-		if w == 0 {
-			if atEOF {
-				// Just return the bytes, we can't do anything with them
-				pos = len(data)
-				break
-			}
-			// Rune extends past current data, request more
-			return 0, empty, nil
-		}
-
-		// Optimization: no rule can possibly apply
-		if current|last == 0 { // i.e. both are zero
-			break
-		}
-
-		// https://unicode.org/reports/tr29/#GB3
-		if current.is(_LF) && last.is(_CR) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB4
-		// https://unicode.org/reports/tr29/#GB5
-		if (current | last).is(_Control | _CR | _LF) {
-			break
-		}
-
-		// https://unicode.org/reports/tr29/#GB6
-		if current.is(_L|_V|_LV|_LVT) && last.is(_L) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB7
-		if current.is(_V|_T) && last.is(_LV|_V) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB8
-		if current.is(_T) && last.is(_LVT|_T) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB9
-		if current.is(_Extend | _ZWJ) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB9a
-		if current.is(_SpacingMark) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB9b
-		if last.is(_Prepend) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB9c
-		// TODO(clipperhouse):
-		// It appears to be added in Unicode 15.1.0:
-		// https://unicode.org/versions/Unicode15.1.0/#Migration
-		// This package currently supports Unicode 15.0.0, so
-		// out of scope for now
-
-		// https://unicode.org/reports/tr29/#GB11
-		if current.is(_ExtendedPictographic) && last.is(_ZWJ) && lastLastExIgnore.is(_ExtendedPictographic) {
-			pos += w
-			continue
-		}
-
-		// https://unicode.org/reports/tr29/#GB12
-		// https://unicode.org/reports/tr29/#GB13
-		if (current & last).is(_RegionalIndicator) {
-			regionalIndicatorCount++
-
-			odd := regionalIndicatorCount%2 == 1
-			if odd {
-				pos += w
-				continue
-			}
-		}
-
-		// If we fall through all the above rules, it's a grapheme cluster break
-		break
-	}
-
-	// Return token
-	return pos, data[:pos], nil
-}

+ 0 - 1409
v4/vendor/github.com/clipperhouse/uax29/v2/graphemes/trie.go

@@ -1,1409 +0,0 @@
-package graphemes
-
-import "github.com/clipperhouse/stringish"
-
-// generated by github.com/clipperhouse/uax29/v2
-// from https://www.unicode.org/Public/15.0.0/ucd/auxiliary/GraphemeBreakProperty.txt
-
-type property uint16
-
-const (
-	_CR property = 1 << iota
-	_Control
-	_Extend
-	_ExtendedPictographic
-	_L
-	_LF
-	_LV
-	_LVT
-	_Prepend
-	_RegionalIndicator
-	_SpacingMark
-	_T
-	_V
-	_ZWJ
-)
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func lookup[T stringish.Interface](s T) (v property, sz int) {
-	c0 := s[0]
-	switch {
-	case c0 < 0x80: // is ASCII
-		return graphemesValues[c0], 1
-	case c0 < 0xC2:
-		return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
-	case c0 < 0xE0: // 2-byte UTF-8
-		if len(s) < 2 {
-			return 0, 0
-		}
-		i := graphemesIndex[c0]
-		c1 := s[1]
-		if c1 < 0x80 || 0xC0 <= c1 {
-			return 0, 1 // Illegal UTF-8: not a continuation byte.
-		}
-		return lookupValue(uint32(i), c1), 2
-	case c0 < 0xF0: // 3-byte UTF-8
-		if len(s) < 3 {
-			return 0, 0
-		}
-		i := graphemesIndex[c0]
-		c1 := s[1]
-		if c1 < 0x80 || 0xC0 <= c1 {
-			return 0, 1 // Illegal UTF-8: not a continuation byte.
-		}
-		o := uint32(i)<<6 + uint32(c1)
-		i = graphemesIndex[o]
-		c2 := s[2]
-		if c2 < 0x80 || 0xC0 <= c2 {
-			return 0, 2 // Illegal UTF-8: not a continuation byte.
-		}
-		return lookupValue(uint32(i), c2), 3
-	case c0 < 0xF8: // 4-byte UTF-8
-		if len(s) < 4 {
-			return 0, 0
-		}
-		i := graphemesIndex[c0]
-		c1 := s[1]
-		if c1 < 0x80 || 0xC0 <= c1 {
-			return 0, 1 // Illegal UTF-8: not a continuation byte.
-		}
-		o := uint32(i)<<6 + uint32(c1)
-		i = graphemesIndex[o]
-		c2 := s[2]
-		if c2 < 0x80 || 0xC0 <= c2 {
-			return 0, 2 // Illegal UTF-8: not a continuation byte.
-		}
-		o = uint32(i)<<6 + uint32(c2)
-		i = graphemesIndex[o]
-		c3 := s[3]
-		if c3 < 0x80 || 0xC0 <= c3 {
-			return 0, 3 // Illegal UTF-8: not a continuation byte.
-		}
-		return lookupValue(uint32(i), c3), 4
-	}
-	// Illegal rune
-	return 0, 1
-}
-
-// graphemesTrie. Total size: 29120 bytes (28.44 KiB). Checksum: 80ad0c5ab9375f7.
-// type graphemesTrie struct { }
-
-// func newGraphemesTrie(i int) *graphemesTrie {
-// 	return &graphemesTrie{}
-// }
-
-// lookupValue determines the type of block n and looks up the value for b.
-func lookupValue(n uint32, b byte) property {
-	switch {
-	default:
-		return property(graphemesValues[n<<6+uint32(b)])
-	}
-}
-
-// graphemesValues: 215 blocks, 13760 entries, 27520 bytes
-// The third block is the zero block.
-var graphemesValues = [13760]property{
-	// Block 0x0, offset 0x0
-	0x00: 0x0002, 0x01: 0x0002, 0x02: 0x0002, 0x03: 0x0002, 0x04: 0x0002, 0x05: 0x0002,
-	0x06: 0x0002, 0x07: 0x0002, 0x08: 0x0002, 0x09: 0x0002, 0x0a: 0x0020, 0x0b: 0x0002,
-	0x0c: 0x0002, 0x0d: 0x0001, 0x0e: 0x0002, 0x0f: 0x0002, 0x10: 0x0002, 0x11: 0x0002,
-	0x12: 0x0002, 0x13: 0x0002, 0x14: 0x0002, 0x15: 0x0002, 0x16: 0x0002, 0x17: 0x0002,
-	0x18: 0x0002, 0x19: 0x0002, 0x1a: 0x0002, 0x1b: 0x0002, 0x1c: 0x0002, 0x1d: 0x0002,
-	0x1e: 0x0002, 0x1f: 0x0002,
-	// Block 0x1, offset 0x40
-	0x7f: 0x0002,
-	// Block 0x2, offset 0x80
-	// Block 0x3, offset 0xc0
-	0xc0: 0x0002, 0xc1: 0x0002, 0xc2: 0x0002, 0xc3: 0x0002, 0xc4: 0x0002, 0xc5: 0x0002,
-	0xc6: 0x0002, 0xc7: 0x0002, 0xc8: 0x0002, 0xc9: 0x0002, 0xca: 0x0002, 0xcb: 0x0002,
-	0xcc: 0x0002, 0xcd: 0x0002, 0xce: 0x0002, 0xcf: 0x0002, 0xd0: 0x0002, 0xd1: 0x0002,
-	0xd2: 0x0002, 0xd3: 0x0002, 0xd4: 0x0002, 0xd5: 0x0002, 0xd6: 0x0002, 0xd7: 0x0002,
-	0xd8: 0x0002, 0xd9: 0x0002, 0xda: 0x0002, 0xdb: 0x0002, 0xdc: 0x0002, 0xdd: 0x0002,
-	0xde: 0x0002, 0xdf: 0x0002,
-	0xe9: 0x0008,
-	0xed: 0x0002, 0xee: 0x0008,
-	// Block 0x4, offset 0x100
-	0x100: 0x0004, 0x101: 0x0004, 0x102: 0x0004, 0x103: 0x0004, 0x104: 0x0004, 0x105: 0x0004,
-	0x106: 0x0004, 0x107: 0x0004, 0x108: 0x0004, 0x109: 0x0004, 0x10a: 0x0004, 0x10b: 0x0004,
-	0x10c: 0x0004, 0x10d: 0x0004, 0x10e: 0x0004, 0x10f: 0x0004, 0x110: 0x0004, 0x111: 0x0004,
-	0x112: 0x0004, 0x113: 0x0004, 0x114: 0x0004, 0x115: 0x0004, 0x116: 0x0004, 0x117: 0x0004,
-	0x118: 0x0004, 0x119: 0x0004, 0x11a: 0x0004, 0x11b: 0x0004, 0x11c: 0x0004, 0x11d: 0x0004,
-	0x11e: 0x0004, 0x11f: 0x0004, 0x120: 0x0004, 0x121: 0x0004, 0x122: 0x0004, 0x123: 0x0004,
-	0x124: 0x0004, 0x125: 0x0004, 0x126: 0x0004, 0x127: 0x0004, 0x128: 0x0004, 0x129: 0x0004,
-	0x12a: 0x0004, 0x12b: 0x0004, 0x12c: 0x0004, 0x12d: 0x0004, 0x12e: 0x0004, 0x12f: 0x0004,
-	0x130: 0x0004, 0x131: 0x0004, 0x132: 0x0004, 0x133: 0x0004, 0x134: 0x0004, 0x135: 0x0004,
-	0x136: 0x0004, 0x137: 0x0004, 0x138: 0x0004, 0x139: 0x0004, 0x13a: 0x0004, 0x13b: 0x0004,
-	0x13c: 0x0004, 0x13d: 0x0004, 0x13e: 0x0004, 0x13f: 0x0004,
-	// Block 0x5, offset 0x140
-	0x140: 0x0004, 0x141: 0x0004, 0x142: 0x0004, 0x143: 0x0004, 0x144: 0x0004, 0x145: 0x0004,
-	0x146: 0x0004, 0x147: 0x0004, 0x148: 0x0004, 0x149: 0x0004, 0x14a: 0x0004, 0x14b: 0x0004,
-	0x14c: 0x0004, 0x14d: 0x0004, 0x14e: 0x0004, 0x14f: 0x0004, 0x150: 0x0004, 0x151: 0x0004,
-	0x152: 0x0004, 0x153: 0x0004, 0x154: 0x0004, 0x155: 0x0004, 0x156: 0x0004, 0x157: 0x0004,
-	0x158: 0x0004, 0x159: 0x0004, 0x15a: 0x0004, 0x15b: 0x0004, 0x15c: 0x0004, 0x15d: 0x0004,
-	0x15e: 0x0004, 0x15f: 0x0004, 0x160: 0x0004, 0x161: 0x0004, 0x162: 0x0004, 0x163: 0x0004,
-	0x164: 0x0004, 0x165: 0x0004, 0x166: 0x0004, 0x167: 0x0004, 0x168: 0x0004, 0x169: 0x0004,
-	0x16a: 0x0004, 0x16b: 0x0004, 0x16c: 0x0004, 0x16d: 0x0004, 0x16e: 0x0004, 0x16f: 0x0004,
-	// Block 0x6, offset 0x180
-	0x183: 0x0004, 0x184: 0x0004, 0x185: 0x0004,
-	0x186: 0x0004, 0x187: 0x0004, 0x188: 0x0004, 0x189: 0x0004,
-	// Block 0x7, offset 0x1c0
-	0x1d1: 0x0004,
-	0x1d2: 0x0004, 0x1d3: 0x0004, 0x1d4: 0x0004, 0x1d5: 0x0004, 0x1d6: 0x0004, 0x1d7: 0x0004,
-	0x1d8: 0x0004, 0x1d9: 0x0004, 0x1da: 0x0004, 0x1db: 0x0004, 0x1dc: 0x0004, 0x1dd: 0x0004,
-	0x1de: 0x0004, 0x1df: 0x0004, 0x1e0: 0x0004, 0x1e1: 0x0004, 0x1e2: 0x0004, 0x1e3: 0x0004,
-	0x1e4: 0x0004, 0x1e5: 0x0004, 0x1e6: 0x0004, 0x1e7: 0x0004, 0x1e8: 0x0004, 0x1e9: 0x0004,
-	0x1ea: 0x0004, 0x1eb: 0x0004, 0x1ec: 0x0004, 0x1ed: 0x0004, 0x1ee: 0x0004, 0x1ef: 0x0004,
-	0x1f0: 0x0004, 0x1f1: 0x0004, 0x1f2: 0x0004, 0x1f3: 0x0004, 0x1f4: 0x0004, 0x1f5: 0x0004,
-	0x1f6: 0x0004, 0x1f7: 0x0004, 0x1f8: 0x0004, 0x1f9: 0x0004, 0x1fa: 0x0004, 0x1fb: 0x0004,
-	0x1fc: 0x0004, 0x1fd: 0x0004, 0x1ff: 0x0004,
-	// Block 0x8, offset 0x200
-	0x201: 0x0004, 0x202: 0x0004, 0x204: 0x0004, 0x205: 0x0004,
-	0x207: 0x0004,
-	// Block 0x9, offset 0x240
-	0x240: 0x0100, 0x241: 0x0100, 0x242: 0x0100, 0x243: 0x0100, 0x244: 0x0100, 0x245: 0x0100,
-	0x250: 0x0004, 0x251: 0x0004,
-	0x252: 0x0004, 0x253: 0x0004, 0x254: 0x0004, 0x255: 0x0004, 0x256: 0x0004, 0x257: 0x0004,
-	0x258: 0x0004, 0x259: 0x0004, 0x25a: 0x0004, 0x25c: 0x0002,
-	// Block 0xa, offset 0x280
-	0x28b: 0x0004,
-	0x28c: 0x0004, 0x28d: 0x0004, 0x28e: 0x0004, 0x28f: 0x0004, 0x290: 0x0004, 0x291: 0x0004,
-	0x292: 0x0004, 0x293: 0x0004, 0x294: 0x0004, 0x295: 0x0004, 0x296: 0x0004, 0x297: 0x0004,
-	0x298: 0x0004, 0x299: 0x0004, 0x29a: 0x0004, 0x29b: 0x0004, 0x29c: 0x0004, 0x29d: 0x0004,
-	0x29e: 0x0004, 0x29f: 0x0004,
-	0x2b0: 0x0004,
-	// Block 0xb, offset 0x2c0
-	0x2d6: 0x0004, 0x2d7: 0x0004,
-	0x2d8: 0x0004, 0x2d9: 0x0004, 0x2da: 0x0004, 0x2db: 0x0004, 0x2dc: 0x0004, 0x2dd: 0x0100,
-	0x2df: 0x0004, 0x2e0: 0x0004, 0x2e1: 0x0004, 0x2e2: 0x0004, 0x2e3: 0x0004,
-	0x2e4: 0x0004, 0x2e7: 0x0004, 0x2e8: 0x0004,
-	0x2ea: 0x0004, 0x2eb: 0x0004, 0x2ec: 0x0004, 0x2ed: 0x0004,
-	// Block 0xc, offset 0x300
-	0x30f: 0x0100, 0x311: 0x0004,
-	0x330: 0x0004, 0x331: 0x0004, 0x332: 0x0004, 0x333: 0x0004, 0x334: 0x0004, 0x335: 0x0004,
-	0x336: 0x0004, 0x337: 0x0004, 0x338: 0x0004, 0x339: 0x0004, 0x33a: 0x0004, 0x33b: 0x0004,
-	0x33c: 0x0004, 0x33d: 0x0004, 0x33e: 0x0004, 0x33f: 0x0004,
-	// Block 0xd, offset 0x340
-	0x340: 0x0004, 0x341: 0x0004, 0x342: 0x0004, 0x343: 0x0004, 0x344: 0x0004, 0x345: 0x0004,
-	0x346: 0x0004, 0x347: 0x0004, 0x348: 0x0004, 0x349: 0x0004, 0x34a: 0x0004,
-	// Block 0xe, offset 0x380
-	0x3a6: 0x0004, 0x3a7: 0x0004, 0x3a8: 0x0004, 0x3a9: 0x0004,
-	0x3aa: 0x0004, 0x3ab: 0x0004, 0x3ac: 0x0004, 0x3ad: 0x0004, 0x3ae: 0x0004, 0x3af: 0x0004,
-	0x3b0: 0x0004,
-	// Block 0xf, offset 0x3c0
-	0x3eb: 0x0004, 0x3ec: 0x0004, 0x3ed: 0x0004, 0x3ee: 0x0004, 0x3ef: 0x0004,
-	0x3f0: 0x0004, 0x3f1: 0x0004, 0x3f2: 0x0004, 0x3f3: 0x0004,
-	0x3fd: 0x0004,
-	// Block 0x10, offset 0x400
-	0x416: 0x0004, 0x417: 0x0004,
-	0x418: 0x0004, 0x419: 0x0004, 0x41b: 0x0004, 0x41c: 0x0004, 0x41d: 0x0004,
-	0x41e: 0x0004, 0x41f: 0x0004, 0x420: 0x0004, 0x421: 0x0004, 0x422: 0x0004, 0x423: 0x0004,
-	0x425: 0x0004, 0x426: 0x0004, 0x427: 0x0004, 0x429: 0x0004,
-	0x42a: 0x0004, 0x42b: 0x0004, 0x42c: 0x0004, 0x42d: 0x0004,
-	// Block 0x11, offset 0x440
-	0x459: 0x0004, 0x45a: 0x0004, 0x45b: 0x0004,
-	// Block 0x12, offset 0x480
-	0x490: 0x0100, 0x491: 0x0100,
-	0x498: 0x0004, 0x499: 0x0004, 0x49a: 0x0004, 0x49b: 0x0004, 0x49c: 0x0004, 0x49d: 0x0004,
-	0x49e: 0x0004, 0x49f: 0x0004,
-	// Block 0x13, offset 0x4c0
-	0x4ca: 0x0004, 0x4cb: 0x0004,
-	0x4cc: 0x0004, 0x4cd: 0x0004, 0x4ce: 0x0004, 0x4cf: 0x0004, 0x4d0: 0x0004, 0x4d1: 0x0004,
-	0x4d2: 0x0004, 0x4d3: 0x0004, 0x4d4: 0x0004, 0x4d5: 0x0004, 0x4d6: 0x0004, 0x4d7: 0x0004,
-	0x4d8: 0x0004, 0x4d9: 0x0004, 0x4da: 0x0004, 0x4db: 0x0004, 0x4dc: 0x0004, 0x4dd: 0x0004,
-	0x4de: 0x0004, 0x4df: 0x0004, 0x4e0: 0x0004, 0x4e1: 0x0004, 0x4e2: 0x0100, 0x4e3: 0x0004,
-	0x4e4: 0x0004, 0x4e5: 0x0004, 0x4e6: 0x0004, 0x4e7: 0x0004, 0x4e8: 0x0004, 0x4e9: 0x0004,
-	0x4ea: 0x0004, 0x4eb: 0x0004, 0x4ec: 0x0004, 0x4ed: 0x0004, 0x4ee: 0x0004, 0x4ef: 0x0004,
-	0x4f0: 0x0004, 0x4f1: 0x0004, 0x4f2: 0x0004, 0x4f3: 0x0004, 0x4f4: 0x0004, 0x4f5: 0x0004,
-	0x4f6: 0x0004, 0x4f7: 0x0004, 0x4f8: 0x0004, 0x4f9: 0x0004, 0x4fa: 0x0004, 0x4fb: 0x0004,
-	0x4fc: 0x0004, 0x4fd: 0x0004, 0x4fe: 0x0004, 0x4ff: 0x0004,
-	// Block 0x14, offset 0x500
-	0x500: 0x0004, 0x501: 0x0004, 0x502: 0x0004, 0x503: 0x0400,
-	0x53a: 0x0004, 0x53b: 0x0400,
-	0x53c: 0x0004, 0x53e: 0x0400, 0x53f: 0x0400,
-	// Block 0x15, offset 0x540
-	0x540: 0x0400, 0x541: 0x0004, 0x542: 0x0004, 0x543: 0x0004, 0x544: 0x0004, 0x545: 0x0004,
-	0x546: 0x0004, 0x547: 0x0004, 0x548: 0x0004, 0x549: 0x0400, 0x54a: 0x0400, 0x54b: 0x0400,
-	0x54c: 0x0400, 0x54d: 0x0004, 0x54e: 0x0400, 0x54f: 0x0400, 0x551: 0x0004,
-	0x552: 0x0004, 0x553: 0x0004, 0x554: 0x0004, 0x555: 0x0004, 0x556: 0x0004, 0x557: 0x0004,
-	0x562: 0x0004, 0x563: 0x0004,
-	// Block 0x16, offset 0x580
-	0x581: 0x0004, 0x582: 0x0400, 0x583: 0x0400,
-	0x5bc: 0x0004, 0x5be: 0x0004, 0x5bf: 0x0400,
-	// Block 0x17, offset 0x5c0
-	0x5c0: 0x0400, 0x5c1: 0x0004, 0x5c2: 0x0004, 0x5c3: 0x0004, 0x5c4: 0x0004,
-	0x5c7: 0x0400, 0x5c8: 0x0400, 0x5cb: 0x0400,
-	0x5cc: 0x0400, 0x5cd: 0x0004,
-	0x5d7: 0x0004,
-	0x5e2: 0x0004, 0x5e3: 0x0004,
-	0x5fe: 0x0004,
-	// Block 0x18, offset 0x600
-	0x601: 0x0004, 0x602: 0x0004, 0x603: 0x0400,
-	0x63c: 0x0004, 0x63e: 0x0400, 0x63f: 0x0400,
-	// Block 0x19, offset 0x640
-	0x640: 0x0400, 0x641: 0x0004, 0x642: 0x0004,
-	0x647: 0x0004, 0x648: 0x0004, 0x64b: 0x0004,
-	0x64c: 0x0004, 0x64d: 0x0004, 0x651: 0x0004,
-	0x670: 0x0004, 0x671: 0x0004, 0x675: 0x0004,
-	// Block 0x1a, offset 0x680
-	0x680: 0x0400, 0x681: 0x0004, 0x682: 0x0004, 0x683: 0x0004, 0x684: 0x0004, 0x685: 0x0004,
-	0x687: 0x0004, 0x688: 0x0004, 0x689: 0x0400, 0x68b: 0x0400,
-	0x68c: 0x0400, 0x68d: 0x0004,
-	0x6a2: 0x0004, 0x6a3: 0x0004,
-	0x6ba: 0x0004, 0x6bb: 0x0004,
-	0x6bc: 0x0004, 0x6bd: 0x0004, 0x6be: 0x0004, 0x6bf: 0x0004,
-	// Block 0x1b, offset 0x6c0
-	0x6c1: 0x0004, 0x6c2: 0x0400, 0x6c3: 0x0400,
-	0x6fc: 0x0004, 0x6fe: 0x0004, 0x6ff: 0x0004,
-	// Block 0x1c, offset 0x700
-	0x700: 0x0400, 0x701: 0x0004, 0x702: 0x0004, 0x703: 0x0004, 0x704: 0x0004,
-	0x707: 0x0400, 0x708: 0x0400, 0x70b: 0x0400,
-	0x70c: 0x0400, 0x70d: 0x0004,
-	0x715: 0x0004, 0x716: 0x0004, 0x717: 0x0004,
-	0x722: 0x0004, 0x723: 0x0004,
-	// Block 0x1d, offset 0x740
-	0x742: 0x0004,
-	0x77e: 0x0004, 0x77f: 0x0400,
-	// Block 0x1e, offset 0x780
-	0x780: 0x0004, 0x781: 0x0400, 0x782: 0x0400,
-	0x786: 0x0400, 0x787: 0x0400, 0x788: 0x0400, 0x78a: 0x0400, 0x78b: 0x0400,
-	0x78c: 0x0400, 0x78d: 0x0004,
-	0x797: 0x0004,
-	// Block 0x1f, offset 0x7c0
-	0x7c0: 0x0004, 0x7c1: 0x0400, 0x7c2: 0x0400, 0x7c3: 0x0400, 0x7c4: 0x0004,
-	0x7fc: 0x0004, 0x7fe: 0x0004, 0x7ff: 0x0004,
-	// Block 0x20, offset 0x800
-	0x800: 0x0004, 0x801: 0x0400, 0x802: 0x0400, 0x803: 0x0400, 0x804: 0x0400,
-	0x806: 0x0004, 0x807: 0x0004, 0x808: 0x0004, 0x80a: 0x0004, 0x80b: 0x0004,
-	0x80c: 0x0004, 0x80d: 0x0004,
-	0x815: 0x0004, 0x816: 0x0004,
-	0x822: 0x0004, 0x823: 0x0004,
-	// Block 0x21, offset 0x840
-	0x841: 0x0004, 0x842: 0x0400, 0x843: 0x0400,
-	0x87c: 0x0004, 0x87e: 0x0400, 0x87f: 0x0004,
-	// Block 0x22, offset 0x880
-	0x880: 0x0400, 0x881: 0x0400, 0x882: 0x0004, 0x883: 0x0400, 0x884: 0x0400,
-	0x886: 0x0004, 0x887: 0x0400, 0x888: 0x0400, 0x88a: 0x0400, 0x88b: 0x0400,
-	0x88c: 0x0004, 0x88d: 0x0004,
-	0x895: 0x0004, 0x896: 0x0004,
-	0x8a2: 0x0004, 0x8a3: 0x0004,
-	0x8b3: 0x0400,
-	// Block 0x23, offset 0x8c0
-	0x8c0: 0x0004, 0x8c1: 0x0004, 0x8c2: 0x0400, 0x8c3: 0x0400,
-	0x8fb: 0x0004,
-	0x8fc: 0x0004, 0x8fe: 0x0004, 0x8ff: 0x0400,
-	// Block 0x24, offset 0x900
-	0x900: 0x0400, 0x901: 0x0004, 0x902: 0x0004, 0x903: 0x0004, 0x904: 0x0004,
-	0x906: 0x0400, 0x907: 0x0400, 0x908: 0x0400, 0x90a: 0x0400, 0x90b: 0x0400,
-	0x90c: 0x0400, 0x90d: 0x0004, 0x90e: 0x0100,
-	0x917: 0x0004,
-	0x922: 0x0004, 0x923: 0x0004,
-	// Block 0x25, offset 0x940
-	0x941: 0x0004, 0x942: 0x0400, 0x943: 0x0400,
-	// Block 0x26, offset 0x980
-	0x98a: 0x0004,
-	0x98f: 0x0004, 0x990: 0x0400, 0x991: 0x0400,
-	0x992: 0x0004, 0x993: 0x0004, 0x994: 0x0004, 0x996: 0x0004,
-	0x998: 0x0400, 0x999: 0x0400, 0x99a: 0x0400, 0x99b: 0x0400, 0x99c: 0x0400, 0x99d: 0x0400,
-	0x99e: 0x0400, 0x99f: 0x0004,
-	0x9b2: 0x0400, 0x9b3: 0x0400,
-	// Block 0x27, offset 0x9c0
-	0x9f1: 0x0004, 0x9f3: 0x0400, 0x9f4: 0x0004, 0x9f5: 0x0004,
-	0x9f6: 0x0004, 0x9f7: 0x0004, 0x9f8: 0x0004, 0x9f9: 0x0004, 0x9fa: 0x0004,
-	// Block 0x28, offset 0xa00
-	0xa07: 0x0004, 0xa08: 0x0004, 0xa09: 0x0004, 0xa0a: 0x0004, 0xa0b: 0x0004,
-	0xa0c: 0x0004, 0xa0d: 0x0004, 0xa0e: 0x0004,
-	// Block 0x29, offset 0xa40
-	0xa71: 0x0004, 0xa73: 0x0400, 0xa74: 0x0004, 0xa75: 0x0004,
-	0xa76: 0x0004, 0xa77: 0x0004, 0xa78: 0x0004, 0xa79: 0x0004, 0xa7a: 0x0004, 0xa7b: 0x0004,
-	0xa7c: 0x0004,
-	// Block 0x2a, offset 0xa80
-	0xa88: 0x0004, 0xa89: 0x0004, 0xa8a: 0x0004, 0xa8b: 0x0004,
-	0xa8c: 0x0004, 0xa8d: 0x0004, 0xa8e: 0x0004,
-	// Block 0x2b, offset 0xac0
-	0xad8: 0x0004, 0xad9: 0x0004,
-	0xaf5: 0x0004,
-	0xaf7: 0x0004, 0xaf9: 0x0004,
-	0xafe: 0x0400, 0xaff: 0x0400,
-	// Block 0x2c, offset 0xb00
-	0xb31: 0x0004, 0xb32: 0x0004, 0xb33: 0x0004, 0xb34: 0x0004, 0xb35: 0x0004,
-	0xb36: 0x0004, 0xb37: 0x0004, 0xb38: 0x0004, 0xb39: 0x0004, 0xb3a: 0x0004, 0xb3b: 0x0004,
-	0xb3c: 0x0004, 0xb3d: 0x0004, 0xb3e: 0x0004, 0xb3f: 0x0400,
-	// Block 0x2d, offset 0xb40
-	0xb40: 0x0004, 0xb41: 0x0004, 0xb42: 0x0004, 0xb43: 0x0004, 0xb44: 0x0004,
-	0xb46: 0x0004, 0xb47: 0x0004,
-	0xb4d: 0x0004, 0xb4e: 0x0004, 0xb4f: 0x0004, 0xb50: 0x0004, 0xb51: 0x0004,
-	0xb52: 0x0004, 0xb53: 0x0004, 0xb54: 0x0004, 0xb55: 0x0004, 0xb56: 0x0004, 0xb57: 0x0004,
-	0xb59: 0x0004, 0xb5a: 0x0004, 0xb5b: 0x0004, 0xb5c: 0x0004, 0xb5d: 0x0004,
-	0xb5e: 0x0004, 0xb5f: 0x0004, 0xb60: 0x0004, 0xb61: 0x0004, 0xb62: 0x0004, 0xb63: 0x0004,
-	0xb64: 0x0004, 0xb65: 0x0004, 0xb66: 0x0004, 0xb67: 0x0004, 0xb68: 0x0004, 0xb69: 0x0004,
-	0xb6a: 0x0004, 0xb6b: 0x0004, 0xb6c: 0x0004, 0xb6d: 0x0004, 0xb6e: 0x0004, 0xb6f: 0x0004,
-	0xb70: 0x0004, 0xb71: 0x0004, 0xb72: 0x0004, 0xb73: 0x0004, 0xb74: 0x0004, 0xb75: 0x0004,
-	0xb76: 0x0004, 0xb77: 0x0004, 0xb78: 0x0004, 0xb79: 0x0004, 0xb7a: 0x0004, 0xb7b: 0x0004,
-	0xb7c: 0x0004,
-	// Block 0x2e, offset 0xb80
-	0xb86: 0x0004,
-	// Block 0x2f, offset 0xbc0
-	0xbed: 0x0004, 0xbee: 0x0004, 0xbef: 0x0004,
-	0xbf0: 0x0004, 0xbf1: 0x0400, 0xbf2: 0x0004, 0xbf3: 0x0004, 0xbf4: 0x0004, 0xbf5: 0x0004,
-	0xbf6: 0x0004, 0xbf7: 0x0004, 0xbf9: 0x0004, 0xbfa: 0x0004, 0xbfb: 0x0400,
-	0xbfc: 0x0400, 0xbfd: 0x0004, 0xbfe: 0x0004,
-	// Block 0x30, offset 0xc00
-	0xc16: 0x0400, 0xc17: 0x0400,
-	0xc18: 0x0004, 0xc19: 0x0004,
-	0xc1e: 0x0004, 0xc1f: 0x0004, 0xc20: 0x0004,
-	0xc31: 0x0004, 0xc32: 0x0004, 0xc33: 0x0004, 0xc34: 0x0004,
-	// Block 0x31, offset 0xc40
-	0xc42: 0x0004, 0xc44: 0x0400, 0xc45: 0x0004,
-	0xc46: 0x0004,
-	0xc4d: 0x0004,
-	0xc5d: 0x0004,
-	// Block 0x32, offset 0xc80
-	0xc80: 0x0010, 0xc81: 0x0010, 0xc82: 0x0010, 0xc83: 0x0010, 0xc84: 0x0010, 0xc85: 0x0010,
-	0xc86: 0x0010, 0xc87: 0x0010, 0xc88: 0x0010, 0xc89: 0x0010, 0xc8a: 0x0010, 0xc8b: 0x0010,
-	0xc8c: 0x0010, 0xc8d: 0x0010, 0xc8e: 0x0010, 0xc8f: 0x0010, 0xc90: 0x0010, 0xc91: 0x0010,
-	0xc92: 0x0010, 0xc93: 0x0010, 0xc94: 0x0010, 0xc95: 0x0010, 0xc96: 0x0010, 0xc97: 0x0010,
-	0xc98: 0x0010, 0xc99: 0x0010, 0xc9a: 0x0010, 0xc9b: 0x0010, 0xc9c: 0x0010, 0xc9d: 0x0010,
-	0xc9e: 0x0010, 0xc9f: 0x0010, 0xca0: 0x0010, 0xca1: 0x0010, 0xca2: 0x0010, 0xca3: 0x0010,
-	0xca4: 0x0010, 0xca5: 0x0010, 0xca6: 0x0010, 0xca7: 0x0010, 0xca8: 0x0010, 0xca9: 0x0010,
-	0xcaa: 0x0010, 0xcab: 0x0010, 0xcac: 0x0010, 0xcad: 0x0010, 0xcae: 0x0010, 0xcaf: 0x0010,
-	0xcb0: 0x0010, 0xcb1: 0x0010, 0xcb2: 0x0010, 0xcb3: 0x0010, 0xcb4: 0x0010, 0xcb5: 0x0010,
-	0xcb6: 0x0010, 0xcb7: 0x0010, 0xcb8: 0x0010, 0xcb9: 0x0010, 0xcba: 0x0010, 0xcbb: 0x0010,
-	0xcbc: 0x0010, 0xcbd: 0x0010, 0xcbe: 0x0010, 0xcbf: 0x0010,
-	// Block 0x33, offset 0xcc0
-	0xcc0: 0x0010, 0xcc1: 0x0010, 0xcc2: 0x0010, 0xcc3: 0x0010, 0xcc4: 0x0010, 0xcc5: 0x0010,
-	0xcc6: 0x0010, 0xcc7: 0x0010, 0xcc8: 0x0010, 0xcc9: 0x0010, 0xcca: 0x0010, 0xccb: 0x0010,
-	0xccc: 0x0010, 0xccd: 0x0010, 0xcce: 0x0010, 0xccf: 0x0010, 0xcd0: 0x0010, 0xcd1: 0x0010,
-	0xcd2: 0x0010, 0xcd3: 0x0010, 0xcd4: 0x0010, 0xcd5: 0x0010, 0xcd6: 0x0010, 0xcd7: 0x0010,
-	0xcd8: 0x0010, 0xcd9: 0x0010, 0xcda: 0x0010, 0xcdb: 0x0010, 0xcdc: 0x0010, 0xcdd: 0x0010,
-	0xcde: 0x0010, 0xcdf: 0x0010, 0xce0: 0x1000, 0xce1: 0x1000, 0xce2: 0x1000, 0xce3: 0x1000,
-	0xce4: 0x1000, 0xce5: 0x1000, 0xce6: 0x1000, 0xce7: 0x1000, 0xce8: 0x1000, 0xce9: 0x1000,
-	0xcea: 0x1000, 0xceb: 0x1000, 0xcec: 0x1000, 0xced: 0x1000, 0xcee: 0x1000, 0xcef: 0x1000,
-	0xcf0: 0x1000, 0xcf1: 0x1000, 0xcf2: 0x1000, 0xcf3: 0x1000, 0xcf4: 0x1000, 0xcf5: 0x1000,
-	0xcf6: 0x1000, 0xcf7: 0x1000, 0xcf8: 0x1000, 0xcf9: 0x1000, 0xcfa: 0x1000, 0xcfb: 0x1000,
-	0xcfc: 0x1000, 0xcfd: 0x1000, 0xcfe: 0x1000, 0xcff: 0x1000,
-	// Block 0x34, offset 0xd00
-	0xd00: 0x1000, 0xd01: 0x1000, 0xd02: 0x1000, 0xd03: 0x1000, 0xd04: 0x1000, 0xd05: 0x1000,
-	0xd06: 0x1000, 0xd07: 0x1000, 0xd08: 0x1000, 0xd09: 0x1000, 0xd0a: 0x1000, 0xd0b: 0x1000,
-	0xd0c: 0x1000, 0xd0d: 0x1000, 0xd0e: 0x1000, 0xd0f: 0x1000, 0xd10: 0x1000, 0xd11: 0x1000,
-	0xd12: 0x1000, 0xd13: 0x1000, 0xd14: 0x1000, 0xd15: 0x1000, 0xd16: 0x1000, 0xd17: 0x1000,
-	0xd18: 0x1000, 0xd19: 0x1000, 0xd1a: 0x1000, 0xd1b: 0x1000, 0xd1c: 0x1000, 0xd1d: 0x1000,
-	0xd1e: 0x1000, 0xd1f: 0x1000, 0xd20: 0x1000, 0xd21: 0x1000, 0xd22: 0x1000, 0xd23: 0x1000,
-	0xd24: 0x1000, 0xd25: 0x1000, 0xd26: 0x1000, 0xd27: 0x1000, 0xd28: 0x0800, 0xd29: 0x0800,
-	0xd2a: 0x0800, 0xd2b: 0x0800, 0xd2c: 0x0800, 0xd2d: 0x0800, 0xd2e: 0x0800, 0xd2f: 0x0800,
-	0xd30: 0x0800, 0xd31: 0x0800, 0xd32: 0x0800, 0xd33: 0x0800, 0xd34: 0x0800, 0xd35: 0x0800,
-	0xd36: 0x0800, 0xd37: 0x0800, 0xd38: 0x0800, 0xd39: 0x0800, 0xd3a: 0x0800, 0xd3b: 0x0800,
-	0xd3c: 0x0800, 0xd3d: 0x0800, 0xd3e: 0x0800, 0xd3f: 0x0800,
-	// Block 0x35, offset 0xd40
-	0xd40: 0x0800, 0xd41: 0x0800, 0xd42: 0x0800, 0xd43: 0x0800, 0xd44: 0x0800, 0xd45: 0x0800,
-	0xd46: 0x0800, 0xd47: 0x0800, 0xd48: 0x0800, 0xd49: 0x0800, 0xd4a: 0x0800, 0xd4b: 0x0800,
-	0xd4c: 0x0800, 0xd4d: 0x0800, 0xd4e: 0x0800, 0xd4f: 0x0800, 0xd50: 0x0800, 0xd51: 0x0800,
-	0xd52: 0x0800, 0xd53: 0x0800, 0xd54: 0x0800, 0xd55: 0x0800, 0xd56: 0x0800, 0xd57: 0x0800,
-	0xd58: 0x0800, 0xd59: 0x0800, 0xd5a: 0x0800, 0xd5b: 0x0800, 0xd5c: 0x0800, 0xd5d: 0x0800,
-	0xd5e: 0x0800, 0xd5f: 0x0800, 0xd60: 0x0800, 0xd61: 0x0800, 0xd62: 0x0800, 0xd63: 0x0800,
-	0xd64: 0x0800, 0xd65: 0x0800, 0xd66: 0x0800, 0xd67: 0x0800, 0xd68: 0x0800, 0xd69: 0x0800,
-	0xd6a: 0x0800, 0xd6b: 0x0800, 0xd6c: 0x0800, 0xd6d: 0x0800, 0xd6e: 0x0800, 0xd6f: 0x0800,
-	0xd70: 0x0800, 0xd71: 0x0800, 0xd72: 0x0800, 0xd73: 0x0800, 0xd74: 0x0800, 0xd75: 0x0800,
-	0xd76: 0x0800, 0xd77: 0x0800, 0xd78: 0x0800, 0xd79: 0x0800, 0xd7a: 0x0800, 0xd7b: 0x0800,
-	0xd7c: 0x0800, 0xd7d: 0x0800, 0xd7e: 0x0800, 0xd7f: 0x0800,
-	// Block 0x36, offset 0xd80
-	0xd9d: 0x0004,
-	0xd9e: 0x0004, 0xd9f: 0x0004,
-	// Block 0x37, offset 0xdc0
-	0xdd2: 0x0004, 0xdd3: 0x0004, 0xdd4: 0x0004, 0xdd5: 0x0400,
-	0xdf2: 0x0004, 0xdf3: 0x0004, 0xdf4: 0x0400,
-	// Block 0x38, offset 0xe00
-	0xe12: 0x0004, 0xe13: 0x0004,
-	0xe32: 0x0004, 0xe33: 0x0004,
-	// Block 0x39, offset 0xe40
-	0xe74: 0x0004, 0xe75: 0x0004,
-	0xe76: 0x0400, 0xe77: 0x0004, 0xe78: 0x0004, 0xe79: 0x0004, 0xe7a: 0x0004, 0xe7b: 0x0004,
-	0xe7c: 0x0004, 0xe7d: 0x0004, 0xe7e: 0x0400, 0xe7f: 0x0400,
-	// Block 0x3a, offset 0xe80
-	0xe80: 0x0400, 0xe81: 0x0400, 0xe82: 0x0400, 0xe83: 0x0400, 0xe84: 0x0400, 0xe85: 0x0400,
-	0xe86: 0x0004, 0xe87: 0x0400, 0xe88: 0x0400, 0xe89: 0x0004, 0xe8a: 0x0004, 0xe8b: 0x0004,
-	0xe8c: 0x0004, 0xe8d: 0x0004, 0xe8e: 0x0004, 0xe8f: 0x0004, 0xe90: 0x0004, 0xe91: 0x0004,
-	0xe92: 0x0004, 0xe93: 0x0004,
-	0xe9d: 0x0004,
-	// Block 0x3b, offset 0xec0
-	0xecb: 0x0004,
-	0xecc: 0x0004, 0xecd: 0x0004, 0xece: 0x0002, 0xecf: 0x0004,
-	// Block 0x3c, offset 0xf00
-	0xf05: 0x0004,
-	0xf06: 0x0004,
-	0xf29: 0x0004,
-	// Block 0x3d, offset 0xf40
-	0xf60: 0x0004, 0xf61: 0x0004, 0xf62: 0x0004, 0xf63: 0x0400,
-	0xf64: 0x0400, 0xf65: 0x0400, 0xf66: 0x0400, 0xf67: 0x0004, 0xf68: 0x0004, 0xf69: 0x0400,
-	0xf6a: 0x0400, 0xf6b: 0x0400,
-	0xf70: 0x0400, 0xf71: 0x0400, 0xf72: 0x0004, 0xf73: 0x0400, 0xf74: 0x0400, 0xf75: 0x0400,
-	0xf76: 0x0400, 0xf77: 0x0400, 0xf78: 0x0400, 0xf79: 0x0004, 0xf7a: 0x0004, 0xf7b: 0x0004,
-	// Block 0x3e, offset 0xf80
-	0xf97: 0x0004,
-	0xf98: 0x0004, 0xf99: 0x0400, 0xf9a: 0x0400, 0xf9b: 0x0004,
-	// Block 0x3f, offset 0xfc0
-	0xfd5: 0x0400, 0xfd6: 0x0004, 0xfd7: 0x0400,
-	0xfd8: 0x0004, 0xfd9: 0x0004, 0xfda: 0x0004, 0xfdb: 0x0004, 0xfdc: 0x0004, 0xfdd: 0x0004,
-	0xfde: 0x0004, 0xfe0: 0x0004, 0xfe2: 0x0004,
-	0xfe5: 0x0004, 0xfe6: 0x0004, 0xfe7: 0x0004, 0xfe8: 0x0004, 0xfe9: 0x0004,
-	0xfea: 0x0004, 0xfeb: 0x0004, 0xfec: 0x0004, 0xfed: 0x0400, 0xfee: 0x0400, 0xfef: 0x0400,
-	0xff0: 0x0400, 0xff1: 0x0400, 0xff2: 0x0400, 0xff3: 0x0004, 0xff4: 0x0004, 0xff5: 0x0004,
-	0xff6: 0x0004, 0xff7: 0x0004, 0xff8: 0x0004, 0xff9: 0x0004, 0xffa: 0x0004, 0xffb: 0x0004,
-	0xffc: 0x0004, 0xfff: 0x0004,
-	// Block 0x40, offset 0x1000
-	0x1030: 0x0004, 0x1031: 0x0004, 0x1032: 0x0004, 0x1033: 0x0004, 0x1034: 0x0004, 0x1035: 0x0004,
-	0x1036: 0x0004, 0x1037: 0x0004, 0x1038: 0x0004, 0x1039: 0x0004, 0x103a: 0x0004, 0x103b: 0x0004,
-	0x103c: 0x0004, 0x103d: 0x0004, 0x103e: 0x0004, 0x103f: 0x0004,
-	// Block 0x41, offset 0x1040
-	0x1040: 0x0004, 0x1041: 0x0004, 0x1042: 0x0004, 0x1043: 0x0004, 0x1044: 0x0004, 0x1045: 0x0004,
-	0x1046: 0x0004, 0x1047: 0x0004, 0x1048: 0x0004, 0x1049: 0x0004, 0x104a: 0x0004, 0x104b: 0x0004,
-	0x104c: 0x0004, 0x104d: 0x0004, 0x104e: 0x0004,
-	// Block 0x42, offset 0x1080
-	0x1080: 0x0004, 0x1081: 0x0004, 0x1082: 0x0004, 0x1083: 0x0004, 0x1084: 0x0400,
-	0x10b4: 0x0004, 0x10b5: 0x0004,
-	0x10b6: 0x0004, 0x10b7: 0x0004, 0x10b8: 0x0004, 0x10b9: 0x0004, 0x10ba: 0x0004, 0x10bb: 0x0400,
-	0x10bc: 0x0004, 0x10bd: 0x0400, 0x10be: 0x0400, 0x10bf: 0x0400,
-	// Block 0x43, offset 0x10c0
-	0x10c0: 0x0400, 0x10c1: 0x0400, 0x10c2: 0x0004, 0x10c3: 0x0400, 0x10c4: 0x0400,
-	0x10eb: 0x0004, 0x10ec: 0x0004, 0x10ed: 0x0004, 0x10ee: 0x0004, 0x10ef: 0x0004,
-	0x10f0: 0x0004, 0x10f1: 0x0004, 0x10f2: 0x0004, 0x10f3: 0x0004,
-	// Block 0x44, offset 0x1100
-	0x1100: 0x0004, 0x1101: 0x0004, 0x1102: 0x0400,
-	0x1121: 0x0400, 0x1122: 0x0004, 0x1123: 0x0004,
-	0x1124: 0x0004, 0x1125: 0x0004, 0x1126: 0x0400, 0x1127: 0x0400, 0x1128: 0x0004, 0x1129: 0x0004,
-	0x112a: 0x0400, 0x112b: 0x0004, 0x112c: 0x0004, 0x112d: 0x0004,
-	// Block 0x45, offset 0x1140
-	0x1166: 0x0004, 0x1167: 0x0400, 0x1168: 0x0004, 0x1169: 0x0004,
-	0x116a: 0x0400, 0x116b: 0x0400, 0x116c: 0x0400, 0x116d: 0x0004, 0x116e: 0x0400, 0x116f: 0x0004,
-	0x1170: 0x0004, 0x1171: 0x0004, 0x1172: 0x0400, 0x1173: 0x0400,
-	// Block 0x46, offset 0x1180
-	0x11a4: 0x0400, 0x11a5: 0x0400, 0x11a6: 0x0400, 0x11a7: 0x0400, 0x11a8: 0x0400, 0x11a9: 0x0400,
-	0x11aa: 0x0400, 0x11ab: 0x0400, 0x11ac: 0x0004, 0x11ad: 0x0004, 0x11ae: 0x0004, 0x11af: 0x0004,
-	0x11b0: 0x0004, 0x11b1: 0x0004, 0x11b2: 0x0004, 0x11b3: 0x0004, 0x11b4: 0x0400, 0x11b5: 0x0400,
-	0x11b6: 0x0004, 0x11b7: 0x0004,
-	// Block 0x47, offset 0x11c0
-	0x11d0: 0x0004, 0x11d1: 0x0004,
-	0x11d2: 0x0004, 0x11d4: 0x0004, 0x11d5: 0x0004, 0x11d6: 0x0004, 0x11d7: 0x0004,
-	0x11d8: 0x0004, 0x11d9: 0x0004, 0x11da: 0x0004, 0x11db: 0x0004, 0x11dc: 0x0004, 0x11dd: 0x0004,
-	0x11de: 0x0004, 0x11df: 0x0004, 0x11e0: 0x0004, 0x11e1: 0x0400, 0x11e2: 0x0004, 0x11e3: 0x0004,
-	0x11e4: 0x0004, 0x11e5: 0x0004, 0x11e6: 0x0004, 0x11e7: 0x0004, 0x11e8: 0x0004,
-	0x11ed: 0x0004,
-	0x11f4: 0x0004,
-	0x11f7: 0x0400, 0x11f8: 0x0004, 0x11f9: 0x0004,
-	// Block 0x48, offset 0x1200
-	0x120b: 0x0002,
-	0x120c: 0x0004, 0x120d: 0x2000, 0x120e: 0x0002, 0x120f: 0x0002,
-	0x1228: 0x0002, 0x1229: 0x0002,
-	0x122a: 0x0002, 0x122b: 0x0002, 0x122c: 0x0002, 0x122d: 0x0002, 0x122e: 0x0002,
-	0x123c: 0x0008,
-	// Block 0x49, offset 0x1240
-	0x1249: 0x0008,
-	0x1260: 0x0002, 0x1261: 0x0002, 0x1262: 0x0002, 0x1263: 0x0002,
-	0x1264: 0x0002, 0x1265: 0x0002, 0x1266: 0x0002, 0x1267: 0x0002, 0x1268: 0x0002, 0x1269: 0x0002,
-	0x126a: 0x0002, 0x126b: 0x0002, 0x126c: 0x0002, 0x126d: 0x0002, 0x126e: 0x0002, 0x126f: 0x0002,
-	// Block 0x4a, offset 0x1280
-	0x1290: 0x0004, 0x1291: 0x0004,
-	0x1292: 0x0004, 0x1293: 0x0004, 0x1294: 0x0004, 0x1295: 0x0004, 0x1296: 0x0004, 0x1297: 0x0004,
-	0x1298: 0x0004, 0x1299: 0x0004, 0x129a: 0x0004, 0x129b: 0x0004, 0x129c: 0x0004, 0x129d: 0x0004,
-	0x129e: 0x0004, 0x129f: 0x0004, 0x12a0: 0x0004, 0x12a1: 0x0004, 0x12a2: 0x0004, 0x12a3: 0x0004,
-	0x12a4: 0x0004, 0x12a5: 0x0004, 0x12a6: 0x0004, 0x12a7: 0x0004, 0x12a8: 0x0004, 0x12a9: 0x0004,
-	0x12aa: 0x0004, 0x12ab: 0x0004, 0x12ac: 0x0004, 0x12ad: 0x0004, 0x12ae: 0x0004, 0x12af: 0x0004,
-	0x12b0: 0x0004,
-	// Block 0x4b, offset 0x12c0
-	0x12e2: 0x0008,
-	0x12f9: 0x0008,
-	// Block 0x4c, offset 0x1300
-	0x1314: 0x0008, 0x1315: 0x0008, 0x1316: 0x0008, 0x1317: 0x0008,
-	0x1318: 0x0008, 0x1319: 0x0008,
-	0x1329: 0x0008,
-	0x132a: 0x0008,
-	// Block 0x4d, offset 0x1340
-	0x135a: 0x0008, 0x135b: 0x0008,
-	0x1368: 0x0008,
-	// Block 0x4e, offset 0x1380
-	0x1388: 0x0008,
-	// Block 0x4f, offset 0x13c0
-	0x13cf: 0x0008,
-	0x13e9: 0x0008,
-	0x13ea: 0x0008, 0x13eb: 0x0008, 0x13ec: 0x0008, 0x13ed: 0x0008, 0x13ee: 0x0008, 0x13ef: 0x0008,
-	0x13f0: 0x0008, 0x13f1: 0x0008, 0x13f2: 0x0008, 0x13f3: 0x0008,
-	0x13f8: 0x0008, 0x13f9: 0x0008, 0x13fa: 0x0008,
-	// Block 0x50, offset 0x1400
-	0x1402: 0x0008,
-	// Block 0x51, offset 0x1440
-	0x146a: 0x0008, 0x146b: 0x0008,
-	0x1476: 0x0008,
-	// Block 0x52, offset 0x1480
-	0x1480: 0x0008,
-	0x14bb: 0x0008,
-	0x14bc: 0x0008, 0x14bd: 0x0008, 0x14be: 0x0008,
-	// Block 0x53, offset 0x14c0
-	0x14c0: 0x0008, 0x14c1: 0x0008, 0x14c2: 0x0008, 0x14c3: 0x0008, 0x14c4: 0x0008, 0x14c5: 0x0008,
-	0x14c7: 0x0008, 0x14c8: 0x0008, 0x14c9: 0x0008, 0x14ca: 0x0008, 0x14cb: 0x0008,
-	0x14cc: 0x0008, 0x14cd: 0x0008, 0x14ce: 0x0008, 0x14cf: 0x0008, 0x14d0: 0x0008, 0x14d1: 0x0008,
-	0x14d2: 0x0008, 0x14d4: 0x0008, 0x14d5: 0x0008, 0x14d6: 0x0008, 0x14d7: 0x0008,
-	0x14d8: 0x0008, 0x14d9: 0x0008, 0x14da: 0x0008, 0x14db: 0x0008, 0x14dc: 0x0008, 0x14dd: 0x0008,
-	0x14de: 0x0008, 0x14df: 0x0008, 0x14e0: 0x0008, 0x14e1: 0x0008, 0x14e2: 0x0008, 0x14e3: 0x0008,
-	0x14e4: 0x0008, 0x14e5: 0x0008, 0x14e6: 0x0008, 0x14e7: 0x0008, 0x14e8: 0x0008, 0x14e9: 0x0008,
-	0x14ea: 0x0008, 0x14eb: 0x0008, 0x14ec: 0x0008, 0x14ed: 0x0008, 0x14ee: 0x0008, 0x14ef: 0x0008,
-	0x14f0: 0x0008, 0x14f1: 0x0008, 0x14f2: 0x0008, 0x14f3: 0x0008, 0x14f4: 0x0008, 0x14f5: 0x0008,
-	0x14f6: 0x0008, 0x14f7: 0x0008, 0x14f8: 0x0008, 0x14f9: 0x0008, 0x14fa: 0x0008, 0x14fb: 0x0008,
-	0x14fc: 0x0008, 0x14fd: 0x0008, 0x14fe: 0x0008, 0x14ff: 0x0008,
-	// Block 0x54, offset 0x1500
-	0x1500: 0x0008, 0x1501: 0x0008, 0x1502: 0x0008, 0x1503: 0x0008, 0x1504: 0x0008, 0x1505: 0x0008,
-	0x1506: 0x0008, 0x1507: 0x0008, 0x1508: 0x0008, 0x1509: 0x0008, 0x150a: 0x0008, 0x150b: 0x0008,
-	0x150c: 0x0008, 0x150d: 0x0008, 0x150e: 0x0008, 0x150f: 0x0008, 0x1510: 0x0008, 0x1511: 0x0008,
-	0x1512: 0x0008, 0x1513: 0x0008, 0x1514: 0x0008, 0x1515: 0x0008, 0x1516: 0x0008, 0x1517: 0x0008,
-	0x1518: 0x0008, 0x1519: 0x0008, 0x151a: 0x0008, 0x151b: 0x0008, 0x151c: 0x0008, 0x151d: 0x0008,
-	0x151e: 0x0008, 0x151f: 0x0008, 0x1520: 0x0008, 0x1521: 0x0008, 0x1522: 0x0008, 0x1523: 0x0008,
-	0x1524: 0x0008, 0x1525: 0x0008, 0x1526: 0x0008, 0x1527: 0x0008, 0x1528: 0x0008, 0x1529: 0x0008,
-	0x152a: 0x0008, 0x152b: 0x0008, 0x152c: 0x0008, 0x152d: 0x0008, 0x152e: 0x0008, 0x152f: 0x0008,
-	0x1530: 0x0008, 0x1531: 0x0008, 0x1532: 0x0008, 0x1533: 0x0008, 0x1534: 0x0008, 0x1535: 0x0008,
-	0x1536: 0x0008, 0x1537: 0x0008, 0x1538: 0x0008, 0x1539: 0x0008, 0x153a: 0x0008, 0x153b: 0x0008,
-	0x153c: 0x0008, 0x153d: 0x0008, 0x153e: 0x0008, 0x153f: 0x0008,
-	// Block 0x55, offset 0x1540
-	0x1540: 0x0008, 0x1541: 0x0008, 0x1542: 0x0008, 0x1543: 0x0008, 0x1544: 0x0008, 0x1545: 0x0008,
-	0x1550: 0x0008, 0x1551: 0x0008,
-	0x1552: 0x0008, 0x1553: 0x0008, 0x1554: 0x0008, 0x1555: 0x0008, 0x1556: 0x0008, 0x1557: 0x0008,
-	0x1558: 0x0008, 0x1559: 0x0008, 0x155a: 0x0008, 0x155b: 0x0008, 0x155c: 0x0008, 0x155d: 0x0008,
-	0x155e: 0x0008, 0x155f: 0x0008, 0x1560: 0x0008, 0x1561: 0x0008, 0x1562: 0x0008, 0x1563: 0x0008,
-	0x1564: 0x0008, 0x1565: 0x0008, 0x1566: 0x0008, 0x1567: 0x0008, 0x1568: 0x0008, 0x1569: 0x0008,
-	0x156a: 0x0008, 0x156b: 0x0008, 0x156c: 0x0008, 0x156d: 0x0008, 0x156e: 0x0008, 0x156f: 0x0008,
-	0x1570: 0x0008, 0x1571: 0x0008, 0x1572: 0x0008, 0x1573: 0x0008, 0x1574: 0x0008, 0x1575: 0x0008,
-	0x1576: 0x0008, 0x1577: 0x0008, 0x1578: 0x0008, 0x1579: 0x0008, 0x157a: 0x0008, 0x157b: 0x0008,
-	0x157c: 0x0008, 0x157d: 0x0008, 0x157e: 0x0008, 0x157f: 0x0008,
-	// Block 0x56, offset 0x1580
-	0x1580: 0x0008, 0x1581: 0x0008, 0x1582: 0x0008, 0x1583: 0x0008, 0x1584: 0x0008, 0x1585: 0x0008,
-	0x1588: 0x0008, 0x1589: 0x0008, 0x158a: 0x0008, 0x158b: 0x0008,
-	0x158c: 0x0008, 0x158d: 0x0008, 0x158e: 0x0008, 0x158f: 0x0008, 0x1590: 0x0008, 0x1591: 0x0008,
-	0x1592: 0x0008, 0x1594: 0x0008, 0x1596: 0x0008,
-	0x159d: 0x0008,
-	0x15a1: 0x0008,
-	0x15a8: 0x0008,
-	0x15b3: 0x0008, 0x15b4: 0x0008,
-	// Block 0x57, offset 0x15c0
-	0x15c4: 0x0008,
-	0x15c7: 0x0008,
-	0x15cc: 0x0008, 0x15ce: 0x0008,
-	0x15d3: 0x0008, 0x15d4: 0x0008, 0x15d5: 0x0008, 0x15d7: 0x0008,
-	0x15e3: 0x0008,
-	0x15e4: 0x0008, 0x15e5: 0x0008, 0x15e6: 0x0008, 0x15e7: 0x0008,
-	// Block 0x58, offset 0x1600
-	0x1615: 0x0008, 0x1616: 0x0008, 0x1617: 0x0008,
-	0x1621: 0x0008,
-	0x1630: 0x0008,
-	0x163f: 0x0008,
-	// Block 0x59, offset 0x1640
-	0x1674: 0x0008, 0x1675: 0x0008,
-	// Block 0x5a, offset 0x1680
-	0x1685: 0x0008,
-	0x1686: 0x0008, 0x1687: 0x0008,
-	0x169b: 0x0008, 0x169c: 0x0008,
-	// Block 0x5b, offset 0x16c0
-	0x16d0: 0x0008,
-	0x16d5: 0x0008,
-	// Block 0x5c, offset 0x1700
-	0x172f: 0x0004,
-	0x1730: 0x0004, 0x1731: 0x0004,
-	// Block 0x5d, offset 0x1740
-	0x177f: 0x0004,
-	// Block 0x5e, offset 0x1780
-	0x17a0: 0x0004, 0x17a1: 0x0004, 0x17a2: 0x0004, 0x17a3: 0x0004,
-	0x17a4: 0x0004, 0x17a5: 0x0004, 0x17a6: 0x0004, 0x17a7: 0x0004, 0x17a8: 0x0004, 0x17a9: 0x0004,
-	0x17aa: 0x0004, 0x17ab: 0x0004, 0x17ac: 0x0004, 0x17ad: 0x0004, 0x17ae: 0x0004, 0x17af: 0x0004,
-	0x17b0: 0x0004, 0x17b1: 0x0004, 0x17b2: 0x0004, 0x17b3: 0x0004, 0x17b4: 0x0004, 0x17b5: 0x0004,
-	0x17b6: 0x0004, 0x17b7: 0x0004, 0x17b8: 0x0004, 0x17b9: 0x0004, 0x17ba: 0x0004, 0x17bb: 0x0004,
-	0x17bc: 0x0004, 0x17bd: 0x0004, 0x17be: 0x0004, 0x17bf: 0x0004,
-	// Block 0x5f, offset 0x17c0
-	0x17ea: 0x0004, 0x17eb: 0x0004, 0x17ec: 0x0004, 0x17ed: 0x0004, 0x17ee: 0x0004, 0x17ef: 0x0004,
-	0x17f0: 0x0008,
-	0x17fd: 0x0008,
-	// Block 0x60, offset 0x1800
-	0x1819: 0x0004, 0x181a: 0x0004,
-	// Block 0x61, offset 0x1840
-	0x1857: 0x0008,
-	0x1859: 0x0008,
-	// Block 0x62, offset 0x1880
-	0x18af: 0x0004,
-	0x18b0: 0x0004, 0x18b1: 0x0004, 0x18b2: 0x0004, 0x18b4: 0x0004, 0x18b5: 0x0004,
-	0x18b6: 0x0004, 0x18b7: 0x0004, 0x18b8: 0x0004, 0x18b9: 0x0004, 0x18ba: 0x0004, 0x18bb: 0x0004,
-	0x18bc: 0x0004, 0x18bd: 0x0004,
-	// Block 0x63, offset 0x18c0
-	0x18de: 0x0004, 0x18df: 0x0004,
-	// Block 0x64, offset 0x1900
-	0x1930: 0x0004, 0x1931: 0x0004,
-	// Block 0x65, offset 0x1940
-	0x1942: 0x0004,
-	0x1946: 0x0004, 0x194b: 0x0004,
-	0x1963: 0x0400,
-	0x1964: 0x0400, 0x1965: 0x0004, 0x1966: 0x0004, 0x1967: 0x0400,
-	0x196c: 0x0004,
-	// Block 0x66, offset 0x1980
-	0x1980: 0x0400, 0x1981: 0x0400,
-	0x19b4: 0x0400, 0x19b5: 0x0400,
-	0x19b6: 0x0400, 0x19b7: 0x0400, 0x19b8: 0x0400, 0x19b9: 0x0400, 0x19ba: 0x0400, 0x19bb: 0x0400,
-	0x19bc: 0x0400, 0x19bd: 0x0400, 0x19be: 0x0400, 0x19bf: 0x0400,
-	// Block 0x67, offset 0x19c0
-	0x19c0: 0x0400, 0x19c1: 0x0400, 0x19c2: 0x0400, 0x19c3: 0x0400, 0x19c4: 0x0004, 0x19c5: 0x0004,
-	0x19e0: 0x0004, 0x19e1: 0x0004, 0x19e2: 0x0004, 0x19e3: 0x0004,
-	0x19e4: 0x0004, 0x19e5: 0x0004, 0x19e6: 0x0004, 0x19e7: 0x0004, 0x19e8: 0x0004, 0x19e9: 0x0004,
-	0x19ea: 0x0004, 0x19eb: 0x0004, 0x19ec: 0x0004, 0x19ed: 0x0004, 0x19ee: 0x0004, 0x19ef: 0x0004,
-	0x19f0: 0x0004, 0x19f1: 0x0004,
-	0x19ff: 0x0004,
-	// Block 0x68, offset 0x1a00
-	0x1a26: 0x0004, 0x1a27: 0x0004, 0x1a28: 0x0004, 0x1a29: 0x0004,
-	0x1a2a: 0x0004, 0x1a2b: 0x0004, 0x1a2c: 0x0004, 0x1a2d: 0x0004,
-	// Block 0x69, offset 0x1a40
-	0x1a47: 0x0004, 0x1a48: 0x0004, 0x1a49: 0x0004, 0x1a4a: 0x0004, 0x1a4b: 0x0004,
-	0x1a4c: 0x0004, 0x1a4d: 0x0004, 0x1a4e: 0x0004, 0x1a4f: 0x0004, 0x1a50: 0x0004, 0x1a51: 0x0004,
-	0x1a52: 0x0400, 0x1a53: 0x0400,
-	0x1a60: 0x0010, 0x1a61: 0x0010, 0x1a62: 0x0010, 0x1a63: 0x0010,
-	0x1a64: 0x0010, 0x1a65: 0x0010, 0x1a66: 0x0010, 0x1a67: 0x0010, 0x1a68: 0x0010, 0x1a69: 0x0010,
-	0x1a6a: 0x0010, 0x1a6b: 0x0010, 0x1a6c: 0x0010, 0x1a6d: 0x0010, 0x1a6e: 0x0010, 0x1a6f: 0x0010,
-	0x1a70: 0x0010, 0x1a71: 0x0010, 0x1a72: 0x0010, 0x1a73: 0x0010, 0x1a74: 0x0010, 0x1a75: 0x0010,
-	0x1a76: 0x0010, 0x1a77: 0x0010, 0x1a78: 0x0010, 0x1a79: 0x0010, 0x1a7a: 0x0010, 0x1a7b: 0x0010,
-	0x1a7c: 0x0010,
-	// Block 0x6a, offset 0x1a80
-	0x1a80: 0x0004, 0x1a81: 0x0004, 0x1a82: 0x0004, 0x1a83: 0x0400,
-	0x1ab3: 0x0004, 0x1ab4: 0x0400, 0x1ab5: 0x0400,
-	0x1ab6: 0x0004, 0x1ab7: 0x0004, 0x1ab8: 0x0004, 0x1ab9: 0x0004, 0x1aba: 0x0400, 0x1abb: 0x0400,
-	0x1abc: 0x0004, 0x1abd: 0x0004, 0x1abe: 0x0400, 0x1abf: 0x0400,
-	// Block 0x6b, offset 0x1ac0
-	0x1ac0: 0x0400,
-	0x1ae5: 0x0004,
-	// Block 0x6c, offset 0x1b00
-	0x1b29: 0x0004,
-	0x1b2a: 0x0004, 0x1b2b: 0x0004, 0x1b2c: 0x0004, 0x1b2d: 0x0004, 0x1b2e: 0x0004, 0x1b2f: 0x0400,
-	0x1b30: 0x0400, 0x1b31: 0x0004, 0x1b32: 0x0004, 0x1b33: 0x0400, 0x1b34: 0x0400, 0x1b35: 0x0004,
-	0x1b36: 0x0004,
-	// Block 0x6d, offset 0x1b40
-	0x1b43: 0x0004,
-	0x1b4c: 0x0004, 0x1b4d: 0x0400,
-	0x1b7c: 0x0004,
-	// Block 0x6e, offset 0x1b80
-	0x1bb0: 0x0004, 0x1bb2: 0x0004, 0x1bb3: 0x0004, 0x1bb4: 0x0004,
-	0x1bb7: 0x0004, 0x1bb8: 0x0004,
-	0x1bbe: 0x0004, 0x1bbf: 0x0004,
-	// Block 0x6f, offset 0x1bc0
-	0x1bc1: 0x0004,
-	0x1beb: 0x0400, 0x1bec: 0x0004, 0x1bed: 0x0004, 0x1bee: 0x0400, 0x1bef: 0x0400,
-	0x1bf5: 0x0400,
-	0x1bf6: 0x0004,
-	// Block 0x70, offset 0x1c00
-	0x1c23: 0x0400,
-	0x1c24: 0x0400, 0x1c25: 0x0004, 0x1c26: 0x0400, 0x1c27: 0x0400, 0x1c28: 0x0004, 0x1c29: 0x0400,
-	0x1c2a: 0x0400, 0x1c2c: 0x0400, 0x1c2d: 0x0004,
-	// Block 0x71, offset 0x1c40
-	0x1c40: 0x0040, 0x1c41: 0x0080, 0x1c42: 0x0080, 0x1c43: 0x0080, 0x1c44: 0x0080, 0x1c45: 0x0080,
-	0x1c46: 0x0080, 0x1c47: 0x0080, 0x1c48: 0x0080, 0x1c49: 0x0080, 0x1c4a: 0x0080, 0x1c4b: 0x0080,
-	0x1c4c: 0x0080, 0x1c4d: 0x0080, 0x1c4e: 0x0080, 0x1c4f: 0x0080, 0x1c50: 0x0080, 0x1c51: 0x0080,
-	0x1c52: 0x0080, 0x1c53: 0x0080, 0x1c54: 0x0080, 0x1c55: 0x0080, 0x1c56: 0x0080, 0x1c57: 0x0080,
-	0x1c58: 0x0080, 0x1c59: 0x0080, 0x1c5a: 0x0080, 0x1c5b: 0x0080, 0x1c5c: 0x0040, 0x1c5d: 0x0080,
-	0x1c5e: 0x0080, 0x1c5f: 0x0080, 0x1c60: 0x0080, 0x1c61: 0x0080, 0x1c62: 0x0080, 0x1c63: 0x0080,
-	0x1c64: 0x0080, 0x1c65: 0x0080, 0x1c66: 0x0080, 0x1c67: 0x0080, 0x1c68: 0x0080, 0x1c69: 0x0080,
-	0x1c6a: 0x0080, 0x1c6b: 0x0080, 0x1c6c: 0x0080, 0x1c6d: 0x0080, 0x1c6e: 0x0080, 0x1c6f: 0x0080,
-	0x1c70: 0x0080, 0x1c71: 0x0080, 0x1c72: 0x0080, 0x1c73: 0x0080, 0x1c74: 0x0080, 0x1c75: 0x0080,
-	0x1c76: 0x0080, 0x1c77: 0x0080, 0x1c78: 0x0040, 0x1c79: 0x0080, 0x1c7a: 0x0080, 0x1c7b: 0x0080,
-	0x1c7c: 0x0080, 0x1c7d: 0x0080, 0x1c7e: 0x0080, 0x1c7f: 0x0080,
-	// Block 0x72, offset 0x1c80
-	0x1c80: 0x0080, 0x1c81: 0x0080, 0x1c82: 0x0080, 0x1c83: 0x0080, 0x1c84: 0x0080, 0x1c85: 0x0080,
-	0x1c86: 0x0080, 0x1c87: 0x0080, 0x1c88: 0x0080, 0x1c89: 0x0080, 0x1c8a: 0x0080, 0x1c8b: 0x0080,
-	0x1c8c: 0x0080, 0x1c8d: 0x0080, 0x1c8e: 0x0080, 0x1c8f: 0x0080, 0x1c90: 0x0080, 0x1c91: 0x0080,
-	0x1c92: 0x0080, 0x1c93: 0x0080, 0x1c94: 0x0040, 0x1c95: 0x0080, 0x1c96: 0x0080, 0x1c97: 0x0080,
-	0x1c98: 0x0080, 0x1c99: 0x0080, 0x1c9a: 0x0080, 0x1c9b: 0x0080, 0x1c9c: 0x0080, 0x1c9d: 0x0080,
-	0x1c9e: 0x0080, 0x1c9f: 0x0080, 0x1ca0: 0x0080, 0x1ca1: 0x0080, 0x1ca2: 0x0080, 0x1ca3: 0x0080,
-	0x1ca4: 0x0080, 0x1ca5: 0x0080, 0x1ca6: 0x0080, 0x1ca7: 0x0080, 0x1ca8: 0x0080, 0x1ca9: 0x0080,
-	0x1caa: 0x0080, 0x1cab: 0x0080, 0x1cac: 0x0080, 0x1cad: 0x0080, 0x1cae: 0x0080, 0x1caf: 0x0080,
-	0x1cb0: 0x0040, 0x1cb1: 0x0080, 0x1cb2: 0x0080, 0x1cb3: 0x0080, 0x1cb4: 0x0080, 0x1cb5: 0x0080,
-	0x1cb6: 0x0080, 0x1cb7: 0x0080, 0x1cb8: 0x0080, 0x1cb9: 0x0080, 0x1cba: 0x0080, 0x1cbb: 0x0080,
-	0x1cbc: 0x0080, 0x1cbd: 0x0080, 0x1cbe: 0x0080, 0x1cbf: 0x0080,
-	// Block 0x73, offset 0x1cc0
-	0x1cc0: 0x0080, 0x1cc1: 0x0080, 0x1cc2: 0x0080, 0x1cc3: 0x0080, 0x1cc4: 0x0080, 0x1cc5: 0x0080,
-	0x1cc6: 0x0080, 0x1cc7: 0x0080, 0x1cc8: 0x0080, 0x1cc9: 0x0080, 0x1cca: 0x0080, 0x1ccb: 0x0080,
-	0x1ccc: 0x0040, 0x1ccd: 0x0080, 0x1cce: 0x0080, 0x1ccf: 0x0080, 0x1cd0: 0x0080, 0x1cd1: 0x0080,
-	0x1cd2: 0x0080, 0x1cd3: 0x0080, 0x1cd4: 0x0080, 0x1cd5: 0x0080, 0x1cd6: 0x0080, 0x1cd7: 0x0080,
-	0x1cd8: 0x0080, 0x1cd9: 0x0080, 0x1cda: 0x0080, 0x1cdb: 0x0080, 0x1cdc: 0x0080, 0x1cdd: 0x0080,
-	0x1cde: 0x0080, 0x1cdf: 0x0080, 0x1ce0: 0x0080, 0x1ce1: 0x0080, 0x1ce2: 0x0080, 0x1ce3: 0x0080,
-	0x1ce4: 0x0080, 0x1ce5: 0x0080, 0x1ce6: 0x0080, 0x1ce7: 0x0080, 0x1ce8: 0x0040, 0x1ce9: 0x0080,
-	0x1cea: 0x0080, 0x1ceb: 0x0080, 0x1cec: 0x0080, 0x1ced: 0x0080, 0x1cee: 0x0080, 0x1cef: 0x0080,
-	0x1cf0: 0x0080, 0x1cf1: 0x0080, 0x1cf2: 0x0080, 0x1cf3: 0x0080, 0x1cf4: 0x0080, 0x1cf5: 0x0080,
-	0x1cf6: 0x0080, 0x1cf7: 0x0080, 0x1cf8: 0x0080, 0x1cf9: 0x0080, 0x1cfa: 0x0080, 0x1cfb: 0x0080,
-	0x1cfc: 0x0080, 0x1cfd: 0x0080, 0x1cfe: 0x0080, 0x1cff: 0x0080,
-	// Block 0x74, offset 0x1d00
-	0x1d00: 0x0080, 0x1d01: 0x0080, 0x1d02: 0x0080, 0x1d03: 0x0080, 0x1d04: 0x0040, 0x1d05: 0x0080,
-	0x1d06: 0x0080, 0x1d07: 0x0080, 0x1d08: 0x0080, 0x1d09: 0x0080, 0x1d0a: 0x0080, 0x1d0b: 0x0080,
-	0x1d0c: 0x0080, 0x1d0d: 0x0080, 0x1d0e: 0x0080, 0x1d0f: 0x0080, 0x1d10: 0x0080, 0x1d11: 0x0080,
-	0x1d12: 0x0080, 0x1d13: 0x0080, 0x1d14: 0x0080, 0x1d15: 0x0080, 0x1d16: 0x0080, 0x1d17: 0x0080,
-	0x1d18: 0x0080, 0x1d19: 0x0080, 0x1d1a: 0x0080, 0x1d1b: 0x0080, 0x1d1c: 0x0080, 0x1d1d: 0x0080,
-	0x1d1e: 0x0080, 0x1d1f: 0x0080, 0x1d20: 0x0040, 0x1d21: 0x0080, 0x1d22: 0x0080, 0x1d23: 0x0080,
-	0x1d24: 0x0080, 0x1d25: 0x0080, 0x1d26: 0x0080, 0x1d27: 0x0080, 0x1d28: 0x0080, 0x1d29: 0x0080,
-	0x1d2a: 0x0080, 0x1d2b: 0x0080, 0x1d2c: 0x0080, 0x1d2d: 0x0080, 0x1d2e: 0x0080, 0x1d2f: 0x0080,
-	0x1d30: 0x0080, 0x1d31: 0x0080, 0x1d32: 0x0080, 0x1d33: 0x0080, 0x1d34: 0x0080, 0x1d35: 0x0080,
-	0x1d36: 0x0080, 0x1d37: 0x0080, 0x1d38: 0x0080, 0x1d39: 0x0080, 0x1d3a: 0x0080, 0x1d3b: 0x0080,
-	0x1d3c: 0x0040, 0x1d3d: 0x0080, 0x1d3e: 0x0080, 0x1d3f: 0x0080,
-	// Block 0x75, offset 0x1d40
-	0x1d40: 0x0080, 0x1d41: 0x0080, 0x1d42: 0x0080, 0x1d43: 0x0080, 0x1d44: 0x0080, 0x1d45: 0x0080,
-	0x1d46: 0x0080, 0x1d47: 0x0080, 0x1d48: 0x0080, 0x1d49: 0x0080, 0x1d4a: 0x0080, 0x1d4b: 0x0080,
-	0x1d4c: 0x0080, 0x1d4d: 0x0080, 0x1d4e: 0x0080, 0x1d4f: 0x0080, 0x1d50: 0x0080, 0x1d51: 0x0080,
-	0x1d52: 0x0080, 0x1d53: 0x0080, 0x1d54: 0x0080, 0x1d55: 0x0080, 0x1d56: 0x0080, 0x1d57: 0x0080,
-	0x1d58: 0x0040, 0x1d59: 0x0080, 0x1d5a: 0x0080, 0x1d5b: 0x0080, 0x1d5c: 0x0080, 0x1d5d: 0x0080,
-	0x1d5e: 0x0080, 0x1d5f: 0x0080, 0x1d60: 0x0080, 0x1d61: 0x0080, 0x1d62: 0x0080, 0x1d63: 0x0080,
-	0x1d64: 0x0080, 0x1d65: 0x0080, 0x1d66: 0x0080, 0x1d67: 0x0080, 0x1d68: 0x0080, 0x1d69: 0x0080,
-	0x1d6a: 0x0080, 0x1d6b: 0x0080, 0x1d6c: 0x0080, 0x1d6d: 0x0080, 0x1d6e: 0x0080, 0x1d6f: 0x0080,
-	0x1d70: 0x0080, 0x1d71: 0x0080, 0x1d72: 0x0080, 0x1d73: 0x0080, 0x1d74: 0x0040, 0x1d75: 0x0080,
-	0x1d76: 0x0080, 0x1d77: 0x0080, 0x1d78: 0x0080, 0x1d79: 0x0080, 0x1d7a: 0x0080, 0x1d7b: 0x0080,
-	0x1d7c: 0x0080, 0x1d7d: 0x0080, 0x1d7e: 0x0080, 0x1d7f: 0x0080,
-	// Block 0x76, offset 0x1d80
-	0x1d80: 0x0080, 0x1d81: 0x0080, 0x1d82: 0x0080, 0x1d83: 0x0080, 0x1d84: 0x0080, 0x1d85: 0x0080,
-	0x1d86: 0x0080, 0x1d87: 0x0080, 0x1d88: 0x0080, 0x1d89: 0x0080, 0x1d8a: 0x0080, 0x1d8b: 0x0080,
-	0x1d8c: 0x0080, 0x1d8d: 0x0080, 0x1d8e: 0x0080, 0x1d8f: 0x0080, 0x1d90: 0x0040, 0x1d91: 0x0080,
-	0x1d92: 0x0080, 0x1d93: 0x0080, 0x1d94: 0x0080, 0x1d95: 0x0080, 0x1d96: 0x0080, 0x1d97: 0x0080,
-	0x1d98: 0x0080, 0x1d99: 0x0080, 0x1d9a: 0x0080, 0x1d9b: 0x0080, 0x1d9c: 0x0080, 0x1d9d: 0x0080,
-	0x1d9e: 0x0080, 0x1d9f: 0x0080, 0x1da0: 0x0080, 0x1da1: 0x0080, 0x1da2: 0x0080, 0x1da3: 0x0080,
-	0x1da4: 0x0080, 0x1da5: 0x0080, 0x1da6: 0x0080, 0x1da7: 0x0080, 0x1da8: 0x0080, 0x1da9: 0x0080,
-	0x1daa: 0x0080, 0x1dab: 0x0080, 0x1dac: 0x0040, 0x1dad: 0x0080, 0x1dae: 0x0080, 0x1daf: 0x0080,
-	0x1db0: 0x0080, 0x1db1: 0x0080, 0x1db2: 0x0080, 0x1db3: 0x0080, 0x1db4: 0x0080, 0x1db5: 0x0080,
-	0x1db6: 0x0080, 0x1db7: 0x0080, 0x1db8: 0x0080, 0x1db9: 0x0080, 0x1dba: 0x0080, 0x1dbb: 0x0080,
-	0x1dbc: 0x0080, 0x1dbd: 0x0080, 0x1dbe: 0x0080, 0x1dbf: 0x0080,
-	// Block 0x77, offset 0x1dc0
-	0x1dc0: 0x0080, 0x1dc1: 0x0080, 0x1dc2: 0x0080, 0x1dc3: 0x0080, 0x1dc4: 0x0080, 0x1dc5: 0x0080,
-	0x1dc6: 0x0080, 0x1dc7: 0x0080, 0x1dc8: 0x0040, 0x1dc9: 0x0080, 0x1dca: 0x0080, 0x1dcb: 0x0080,
-	0x1dcc: 0x0080, 0x1dcd: 0x0080, 0x1dce: 0x0080, 0x1dcf: 0x0080, 0x1dd0: 0x0080, 0x1dd1: 0x0080,
-	0x1dd2: 0x0080, 0x1dd3: 0x0080, 0x1dd4: 0x0080, 0x1dd5: 0x0080, 0x1dd6: 0x0080, 0x1dd7: 0x0080,
-	0x1dd8: 0x0080, 0x1dd9: 0x0080, 0x1dda: 0x0080, 0x1ddb: 0x0080, 0x1ddc: 0x0080, 0x1ddd: 0x0080,
-	0x1dde: 0x0080, 0x1ddf: 0x0080, 0x1de0: 0x0080, 0x1de1: 0x0080, 0x1de2: 0x0080, 0x1de3: 0x0080,
-	0x1de4: 0x0040, 0x1de5: 0x0080, 0x1de6: 0x0080, 0x1de7: 0x0080, 0x1de8: 0x0080, 0x1de9: 0x0080,
-	0x1dea: 0x0080, 0x1deb: 0x0080, 0x1dec: 0x0080, 0x1ded: 0x0080, 0x1dee: 0x0080, 0x1def: 0x0080,
-	0x1df0: 0x0080, 0x1df1: 0x0080, 0x1df2: 0x0080, 0x1df3: 0x0080, 0x1df4: 0x0080, 0x1df5: 0x0080,
-	0x1df6: 0x0080, 0x1df7: 0x0080, 0x1df8: 0x0080, 0x1df9: 0x0080, 0x1dfa: 0x0080, 0x1dfb: 0x0080,
-	0x1dfc: 0x0080, 0x1dfd: 0x0080, 0x1dfe: 0x0080, 0x1dff: 0x0080,
-	// Block 0x78, offset 0x1e00
-	0x1e00: 0x0080, 0x1e01: 0x0080, 0x1e02: 0x0080, 0x1e03: 0x0080, 0x1e04: 0x0080, 0x1e05: 0x0080,
-	0x1e06: 0x0080, 0x1e07: 0x0080, 0x1e08: 0x0040, 0x1e09: 0x0080, 0x1e0a: 0x0080, 0x1e0b: 0x0080,
-	0x1e0c: 0x0080, 0x1e0d: 0x0080, 0x1e0e: 0x0080, 0x1e0f: 0x0080, 0x1e10: 0x0080, 0x1e11: 0x0080,
-	0x1e12: 0x0080, 0x1e13: 0x0080, 0x1e14: 0x0080, 0x1e15: 0x0080, 0x1e16: 0x0080, 0x1e17: 0x0080,
-	0x1e18: 0x0080, 0x1e19: 0x0080, 0x1e1a: 0x0080, 0x1e1b: 0x0080, 0x1e1c: 0x0080, 0x1e1d: 0x0080,
-	0x1e1e: 0x0080, 0x1e1f: 0x0080, 0x1e20: 0x0080, 0x1e21: 0x0080, 0x1e22: 0x0080, 0x1e23: 0x0080,
-	0x1e30: 0x1000, 0x1e31: 0x1000, 0x1e32: 0x1000, 0x1e33: 0x1000, 0x1e34: 0x1000, 0x1e35: 0x1000,
-	0x1e36: 0x1000, 0x1e37: 0x1000, 0x1e38: 0x1000, 0x1e39: 0x1000, 0x1e3a: 0x1000, 0x1e3b: 0x1000,
-	0x1e3c: 0x1000, 0x1e3d: 0x1000, 0x1e3e: 0x1000, 0x1e3f: 0x1000,
-	// Block 0x79, offset 0x1e40
-	0x1e40: 0x1000, 0x1e41: 0x1000, 0x1e42: 0x1000, 0x1e43: 0x1000, 0x1e44: 0x1000, 0x1e45: 0x1000,
-	0x1e46: 0x1000, 0x1e4b: 0x0800,
-	0x1e4c: 0x0800, 0x1e4d: 0x0800, 0x1e4e: 0x0800, 0x1e4f: 0x0800, 0x1e50: 0x0800, 0x1e51: 0x0800,
-	0x1e52: 0x0800, 0x1e53: 0x0800, 0x1e54: 0x0800, 0x1e55: 0x0800, 0x1e56: 0x0800, 0x1e57: 0x0800,
-	0x1e58: 0x0800, 0x1e59: 0x0800, 0x1e5a: 0x0800, 0x1e5b: 0x0800, 0x1e5c: 0x0800, 0x1e5d: 0x0800,
-	0x1e5e: 0x0800, 0x1e5f: 0x0800, 0x1e60: 0x0800, 0x1e61: 0x0800, 0x1e62: 0x0800, 0x1e63: 0x0800,
-	0x1e64: 0x0800, 0x1e65: 0x0800, 0x1e66: 0x0800, 0x1e67: 0x0800, 0x1e68: 0x0800, 0x1e69: 0x0800,
-	0x1e6a: 0x0800, 0x1e6b: 0x0800, 0x1e6c: 0x0800, 0x1e6d: 0x0800, 0x1e6e: 0x0800, 0x1e6f: 0x0800,
-	0x1e70: 0x0800, 0x1e71: 0x0800, 0x1e72: 0x0800, 0x1e73: 0x0800, 0x1e74: 0x0800, 0x1e75: 0x0800,
-	0x1e76: 0x0800, 0x1e77: 0x0800, 0x1e78: 0x0800, 0x1e79: 0x0800, 0x1e7a: 0x0800, 0x1e7b: 0x0800,
-	// Block 0x7a, offset 0x1e80
-	0x1e9e: 0x0004,
-	// Block 0x7b, offset 0x1ec0
-	0x1ec0: 0x0004, 0x1ec1: 0x0004, 0x1ec2: 0x0004, 0x1ec3: 0x0004, 0x1ec4: 0x0004, 0x1ec5: 0x0004,
-	0x1ec6: 0x0004, 0x1ec7: 0x0004, 0x1ec8: 0x0004, 0x1ec9: 0x0004, 0x1eca: 0x0004, 0x1ecb: 0x0004,
-	0x1ecc: 0x0004, 0x1ecd: 0x0004, 0x1ece: 0x0004, 0x1ecf: 0x0004,
-	0x1ee0: 0x0004, 0x1ee1: 0x0004, 0x1ee2: 0x0004, 0x1ee3: 0x0004,
-	0x1ee4: 0x0004, 0x1ee5: 0x0004, 0x1ee6: 0x0004, 0x1ee7: 0x0004, 0x1ee8: 0x0004, 0x1ee9: 0x0004,
-	0x1eea: 0x0004, 0x1eeb: 0x0004, 0x1eec: 0x0004, 0x1eed: 0x0004, 0x1eee: 0x0004, 0x1eef: 0x0004,
-	// Block 0x7c, offset 0x1f00
-	0x1f3f: 0x0002,
-	// Block 0x7d, offset 0x1f40
-	0x1f70: 0x0002, 0x1f71: 0x0002, 0x1f72: 0x0002, 0x1f73: 0x0002, 0x1f74: 0x0002, 0x1f75: 0x0002,
-	0x1f76: 0x0002, 0x1f77: 0x0002, 0x1f78: 0x0002, 0x1f79: 0x0002, 0x1f7a: 0x0002, 0x1f7b: 0x0002,
-	// Block 0x7e, offset 0x1f80
-	0x1fbd: 0x0004,
-	// Block 0x7f, offset 0x1fc0
-	0x1fe0: 0x0004,
-	// Block 0x80, offset 0x2000
-	0x2036: 0x0004, 0x2037: 0x0004, 0x2038: 0x0004, 0x2039: 0x0004, 0x203a: 0x0004,
-	// Block 0x81, offset 0x2040
-	0x2041: 0x0004, 0x2042: 0x0004, 0x2043: 0x0004, 0x2045: 0x0004,
-	0x2046: 0x0004,
-	0x204c: 0x0004, 0x204d: 0x0004, 0x204e: 0x0004, 0x204f: 0x0004,
-	0x2078: 0x0004, 0x2079: 0x0004, 0x207a: 0x0004,
-	0x207f: 0x0004,
-	// Block 0x82, offset 0x2080
-	0x20a5: 0x0004, 0x20a6: 0x0004,
-	// Block 0x83, offset 0x20c0
-	0x20e4: 0x0004, 0x20e5: 0x0004, 0x20e6: 0x0004, 0x20e7: 0x0004,
-	// Block 0x84, offset 0x2100
-	0x212b: 0x0004, 0x212c: 0x0004,
-	// Block 0x85, offset 0x2140
-	0x217d: 0x0004, 0x217e: 0x0004, 0x217f: 0x0004,
-	// Block 0x86, offset 0x2180
-	0x2186: 0x0004, 0x2187: 0x0004, 0x2188: 0x0004, 0x2189: 0x0004, 0x218a: 0x0004, 0x218b: 0x0004,
-	0x218c: 0x0004, 0x218d: 0x0004, 0x218e: 0x0004, 0x218f: 0x0004, 0x2190: 0x0004,
-	// Block 0x87, offset 0x21c0
-	0x21c2: 0x0004, 0x21c3: 0x0004, 0x21c4: 0x0004, 0x21c5: 0x0004,
-	// Block 0x88, offset 0x2200
-	0x2200: 0x0400, 0x2201: 0x0004, 0x2202: 0x0400,
-	0x2238: 0x0004, 0x2239: 0x0004, 0x223a: 0x0004, 0x223b: 0x0004,
-	0x223c: 0x0004, 0x223d: 0x0004, 0x223e: 0x0004, 0x223f: 0x0004,
-	// Block 0x89, offset 0x2240
-	0x2240: 0x0004, 0x2241: 0x0004, 0x2242: 0x0004, 0x2243: 0x0004, 0x2244: 0x0004, 0x2245: 0x0004,
-	0x2246: 0x0004,
-	0x2270: 0x0004, 0x2273: 0x0004, 0x2274: 0x0004,
-	0x227f: 0x0004,
-	// Block 0x8a, offset 0x2280
-	0x2280: 0x0004, 0x2281: 0x0004, 0x2282: 0x0400,
-	0x22b0: 0x0400, 0x22b1: 0x0400, 0x22b2: 0x0400, 0x22b3: 0x0004, 0x22b4: 0x0004, 0x22b5: 0x0004,
-	0x22b6: 0x0004, 0x22b7: 0x0400, 0x22b8: 0x0400, 0x22b9: 0x0004, 0x22ba: 0x0004,
-	0x22bd: 0x0100,
-	// Block 0x8b, offset 0x22c0
-	0x22c2: 0x0004,
-	0x22cd: 0x0100,
-	// Block 0x8c, offset 0x2300
-	0x2300: 0x0004, 0x2301: 0x0004, 0x2302: 0x0004,
-	0x2327: 0x0004, 0x2328: 0x0004, 0x2329: 0x0004,
-	0x232a: 0x0004, 0x232b: 0x0004, 0x232c: 0x0400, 0x232d: 0x0004, 0x232e: 0x0004, 0x232f: 0x0004,
-	0x2330: 0x0004, 0x2331: 0x0004, 0x2332: 0x0004, 0x2333: 0x0004, 0x2334: 0x0004,
-	// Block 0x8d, offset 0x2340
-	0x2345: 0x0400,
-	0x2346: 0x0400,
-	0x2373: 0x0004,
-	// Block 0x8e, offset 0x2380
-	0x2380: 0x0004, 0x2381: 0x0004, 0x2382: 0x0400,
-	0x23b3: 0x0400, 0x23b4: 0x0400, 0x23b5: 0x0400,
-	0x23b6: 0x0004, 0x23b7: 0x0004, 0x23b8: 0x0004, 0x23b9: 0x0004, 0x23ba: 0x0004, 0x23bb: 0x0004,
-	0x23bc: 0x0004, 0x23bd: 0x0004, 0x23be: 0x0004, 0x23bf: 0x0400,
-	// Block 0x8f, offset 0x23c0
-	0x23c0: 0x0400, 0x23c2: 0x0100, 0x23c3: 0x0100,
-	0x23c9: 0x0004, 0x23ca: 0x0004, 0x23cb: 0x0004,
-	0x23cc: 0x0004, 0x23ce: 0x0400, 0x23cf: 0x0004,
-	// Block 0x90, offset 0x2400
-	0x242c: 0x0400, 0x242d: 0x0400, 0x242e: 0x0400, 0x242f: 0x0004,
-	0x2430: 0x0004, 0x2431: 0x0004, 0x2432: 0x0400, 0x2433: 0x0400, 0x2434: 0x0004, 0x2435: 0x0400,
-	0x2436: 0x0004, 0x2437: 0x0004,
-	0x243e: 0x0004,
-	// Block 0x91, offset 0x2440
-	0x2441: 0x0004,
-	// Block 0x92, offset 0x2480
-	0x249f: 0x0004, 0x24a0: 0x0400, 0x24a1: 0x0400, 0x24a2: 0x0400, 0x24a3: 0x0004,
-	0x24a4: 0x0004, 0x24a5: 0x0004, 0x24a6: 0x0004, 0x24a7: 0x0004, 0x24a8: 0x0004, 0x24a9: 0x0004,
-	0x24aa: 0x0004,
-	// Block 0x93, offset 0x24c0
-	0x24c0: 0x0004, 0x24c1: 0x0400, 0x24c2: 0x0400, 0x24c3: 0x0400, 0x24c4: 0x0400,
-	0x24c7: 0x0400, 0x24c8: 0x0400, 0x24cb: 0x0400,
-	0x24cc: 0x0400, 0x24cd: 0x0400,
-	0x24d7: 0x0004,
-	0x24e2: 0x0400, 0x24e3: 0x0400,
-	0x24e6: 0x0004, 0x24e7: 0x0004, 0x24e8: 0x0004, 0x24e9: 0x0004,
-	0x24ea: 0x0004, 0x24eb: 0x0004, 0x24ec: 0x0004,
-	0x24f0: 0x0004, 0x24f1: 0x0004, 0x24f2: 0x0004, 0x24f3: 0x0004, 0x24f4: 0x0004,
-	// Block 0x94, offset 0x2500
-	0x2535: 0x0400,
-	0x2536: 0x0400, 0x2537: 0x0400, 0x2538: 0x0004, 0x2539: 0x0004, 0x253a: 0x0004, 0x253b: 0x0004,
-	0x253c: 0x0004, 0x253d: 0x0004, 0x253e: 0x0004, 0x253f: 0x0004,
-	// Block 0x95, offset 0x2540
-	0x2540: 0x0400, 0x2541: 0x0400, 0x2542: 0x0004, 0x2543: 0x0004, 0x2544: 0x0004, 0x2545: 0x0400,
-	0x2546: 0x0004,
-	0x255e: 0x0004,
-	// Block 0x96, offset 0x2580
-	0x25b0: 0x0004, 0x25b1: 0x0400, 0x25b2: 0x0400, 0x25b3: 0x0004, 0x25b4: 0x0004, 0x25b5: 0x0004,
-	0x25b6: 0x0004, 0x25b7: 0x0004, 0x25b8: 0x0004, 0x25b9: 0x0400, 0x25ba: 0x0004, 0x25bb: 0x0400,
-	0x25bc: 0x0400, 0x25bd: 0x0004, 0x25be: 0x0400, 0x25bf: 0x0004,
-	// Block 0x97, offset 0x25c0
-	0x25c0: 0x0004, 0x25c1: 0x0400, 0x25c2: 0x0004, 0x25c3: 0x0004,
-	// Block 0x98, offset 0x2600
-	0x262f: 0x0004,
-	0x2630: 0x0400, 0x2631: 0x0400, 0x2632: 0x0004, 0x2633: 0x0004, 0x2634: 0x0004, 0x2635: 0x0004,
-	0x2638: 0x0400, 0x2639: 0x0400, 0x263a: 0x0400, 0x263b: 0x0400,
-	0x263c: 0x0004, 0x263d: 0x0004, 0x263e: 0x0400, 0x263f: 0x0004,
-	// Block 0x99, offset 0x2640
-	0x2640: 0x0004,
-	0x265c: 0x0004, 0x265d: 0x0004,
-	// Block 0x9a, offset 0x2680
-	0x26b0: 0x0400, 0x26b1: 0x0400, 0x26b2: 0x0400, 0x26b3: 0x0004, 0x26b4: 0x0004, 0x26b5: 0x0004,
-	0x26b6: 0x0004, 0x26b7: 0x0004, 0x26b8: 0x0004, 0x26b9: 0x0004, 0x26ba: 0x0004, 0x26bb: 0x0400,
-	0x26bc: 0x0400, 0x26bd: 0x0004, 0x26be: 0x0400, 0x26bf: 0x0004,
-	// Block 0x9b, offset 0x26c0
-	0x26c0: 0x0004,
-	// Block 0x9c, offset 0x2700
-	0x272b: 0x0004, 0x272c: 0x0400, 0x272d: 0x0004, 0x272e: 0x0400, 0x272f: 0x0400,
-	0x2730: 0x0004, 0x2731: 0x0004, 0x2732: 0x0004, 0x2733: 0x0004, 0x2734: 0x0004, 0x2735: 0x0004,
-	0x2736: 0x0400, 0x2737: 0x0004,
-	// Block 0x9d, offset 0x2740
-	0x275d: 0x0004,
-	0x275e: 0x0004, 0x275f: 0x0004, 0x2762: 0x0004, 0x2763: 0x0004,
-	0x2764: 0x0004, 0x2765: 0x0004, 0x2766: 0x0400, 0x2767: 0x0004, 0x2768: 0x0004, 0x2769: 0x0004,
-	0x276a: 0x0004, 0x276b: 0x0004,
-	// Block 0x9e, offset 0x2780
-	0x27ac: 0x0400, 0x27ad: 0x0400, 0x27ae: 0x0400, 0x27af: 0x0004,
-	0x27b0: 0x0004, 0x27b1: 0x0004, 0x27b2: 0x0004, 0x27b3: 0x0004, 0x27b4: 0x0004, 0x27b5: 0x0004,
-	0x27b6: 0x0004, 0x27b7: 0x0004, 0x27b8: 0x0400, 0x27b9: 0x0004, 0x27ba: 0x0004,
-	// Block 0x9f, offset 0x27c0
-	0x27f0: 0x0004, 0x27f1: 0x0400, 0x27f2: 0x0400, 0x27f3: 0x0400, 0x27f4: 0x0400, 0x27f5: 0x0400,
-	0x27f7: 0x0400, 0x27f8: 0x0400, 0x27fb: 0x0004,
-	0x27fc: 0x0004, 0x27fd: 0x0400, 0x27fe: 0x0004, 0x27ff: 0x0100,
-	// Block 0xa0, offset 0x2800
-	0x2800: 0x0400, 0x2801: 0x0100, 0x2802: 0x0400, 0x2803: 0x0004,
-	// Block 0xa1, offset 0x2840
-	0x2851: 0x0400,
-	0x2852: 0x0400, 0x2853: 0x0400, 0x2854: 0x0004, 0x2855: 0x0004, 0x2856: 0x0004, 0x2857: 0x0004,
-	0x285a: 0x0004, 0x285b: 0x0004, 0x285c: 0x0400, 0x285d: 0x0400,
-	0x285e: 0x0400, 0x285f: 0x0400, 0x2860: 0x0004,
-	0x2864: 0x0400,
-	// Block 0xa2, offset 0x2880
-	0x2881: 0x0004, 0x2882: 0x0004, 0x2883: 0x0004, 0x2884: 0x0004, 0x2885: 0x0004,
-	0x2886: 0x0004, 0x2887: 0x0004, 0x2888: 0x0004, 0x2889: 0x0004, 0x288a: 0x0004,
-	0x28b3: 0x0004, 0x28b4: 0x0004, 0x28b5: 0x0004,
-	0x28b6: 0x0004, 0x28b7: 0x0004, 0x28b8: 0x0004, 0x28b9: 0x0400, 0x28ba: 0x0100, 0x28bb: 0x0004,
-	0x28bc: 0x0004, 0x28bd: 0x0004, 0x28be: 0x0004,
-	// Block 0xa3, offset 0x28c0
-	0x28c7: 0x0004,
-	0x28d1: 0x0004,
-	0x28d2: 0x0004, 0x28d3: 0x0004, 0x28d4: 0x0004, 0x28d5: 0x0004, 0x28d6: 0x0004, 0x28d7: 0x0400,
-	0x28d8: 0x0400, 0x28d9: 0x0004, 0x28da: 0x0004, 0x28db: 0x0004,
-	// Block 0xa4, offset 0x2900
-	0x2904: 0x0100, 0x2905: 0x0100,
-	0x2906: 0x0100, 0x2907: 0x0100, 0x2908: 0x0100, 0x2909: 0x0100, 0x290a: 0x0004, 0x290b: 0x0004,
-	0x290c: 0x0004, 0x290d: 0x0004, 0x290e: 0x0004, 0x290f: 0x0004, 0x2910: 0x0004, 0x2911: 0x0004,
-	0x2912: 0x0004, 0x2913: 0x0004, 0x2914: 0x0004, 0x2915: 0x0004, 0x2916: 0x0004, 0x2917: 0x0400,
-	0x2918: 0x0004, 0x2919: 0x0004,
-	// Block 0xa5, offset 0x2940
-	0x296f: 0x0400,
-	0x2970: 0x0004, 0x2971: 0x0004, 0x2972: 0x0004, 0x2973: 0x0004, 0x2974: 0x0004, 0x2975: 0x0004,
-	0x2976: 0x0004, 0x2978: 0x0004, 0x2979: 0x0004, 0x297a: 0x0004, 0x297b: 0x0004,
-	0x297c: 0x0004, 0x297d: 0x0004, 0x297e: 0x0400, 0x297f: 0x0004,
-	// Block 0xa6, offset 0x2980
-	0x2992: 0x0004, 0x2993: 0x0004, 0x2994: 0x0004, 0x2995: 0x0004, 0x2996: 0x0004, 0x2997: 0x0004,
-	0x2998: 0x0004, 0x2999: 0x0004, 0x299a: 0x0004, 0x299b: 0x0004, 0x299c: 0x0004, 0x299d: 0x0004,
-	0x299e: 0x0004, 0x299f: 0x0004, 0x29a0: 0x0004, 0x29a1: 0x0004, 0x29a2: 0x0004, 0x29a3: 0x0004,
-	0x29a4: 0x0004, 0x29a5: 0x0004, 0x29a6: 0x0004, 0x29a7: 0x0004, 0x29a9: 0x0400,
-	0x29aa: 0x0004, 0x29ab: 0x0004, 0x29ac: 0x0004, 0x29ad: 0x0004, 0x29ae: 0x0004, 0x29af: 0x0004,
-	0x29b0: 0x0004, 0x29b1: 0x0400, 0x29b2: 0x0004, 0x29b3: 0x0004, 0x29b4: 0x0400, 0x29b5: 0x0004,
-	0x29b6: 0x0004,
-	// Block 0xa7, offset 0x29c0
-	0x29f1: 0x0004, 0x29f2: 0x0004, 0x29f3: 0x0004, 0x29f4: 0x0004, 0x29f5: 0x0004,
-	0x29f6: 0x0004, 0x29fa: 0x0004,
-	0x29fc: 0x0004, 0x29fd: 0x0004, 0x29ff: 0x0004,
-	// Block 0xa8, offset 0x2a00
-	0x2a00: 0x0004, 0x2a01: 0x0004, 0x2a02: 0x0004, 0x2a03: 0x0004, 0x2a04: 0x0004, 0x2a05: 0x0004,
-	0x2a06: 0x0100, 0x2a07: 0x0004,
-	// Block 0xa9, offset 0x2a40
-	0x2a4a: 0x0400, 0x2a4b: 0x0400,
-	0x2a4c: 0x0400, 0x2a4d: 0x0400, 0x2a4e: 0x0400, 0x2a50: 0x0004, 0x2a51: 0x0004,
-	0x2a53: 0x0400, 0x2a54: 0x0400, 0x2a55: 0x0004, 0x2a56: 0x0400, 0x2a57: 0x0004,
-	// Block 0xaa, offset 0x2a80
-	0x2ab3: 0x0004, 0x2ab4: 0x0004, 0x2ab5: 0x0400,
-	0x2ab6: 0x0400,
-	// Block 0xab, offset 0x2ac0
-	0x2ac0: 0x0004, 0x2ac1: 0x0004, 0x2ac2: 0x0100, 0x2ac3: 0x0400,
-	0x2af4: 0x0400, 0x2af5: 0x0400,
-	0x2af6: 0x0004, 0x2af7: 0x0004, 0x2af8: 0x0004, 0x2af9: 0x0004, 0x2afa: 0x0004,
-	0x2afe: 0x0400, 0x2aff: 0x0400,
-	// Block 0xac, offset 0x2b00
-	0x2b00: 0x0004, 0x2b01: 0x0400, 0x2b02: 0x0004,
-	// Block 0xad, offset 0x2b40
-	0x2b70: 0x0002, 0x2b71: 0x0002, 0x2b72: 0x0002, 0x2b73: 0x0002, 0x2b74: 0x0002, 0x2b75: 0x0002,
-	0x2b76: 0x0002, 0x2b77: 0x0002, 0x2b78: 0x0002, 0x2b79: 0x0002, 0x2b7a: 0x0002, 0x2b7b: 0x0002,
-	0x2b7c: 0x0002, 0x2b7d: 0x0002, 0x2b7e: 0x0002, 0x2b7f: 0x0002,
-	// Block 0xae, offset 0x2b80
-	0x2b80: 0x0004,
-	0x2b87: 0x0004, 0x2b88: 0x0004, 0x2b89: 0x0004, 0x2b8a: 0x0004, 0x2b8b: 0x0004,
-	0x2b8c: 0x0004, 0x2b8d: 0x0004, 0x2b8e: 0x0004, 0x2b8f: 0x0004, 0x2b90: 0x0004, 0x2b91: 0x0004,
-	0x2b92: 0x0004, 0x2b93: 0x0004, 0x2b94: 0x0004, 0x2b95: 0x0004,
-	// Block 0xaf, offset 0x2bc0
-	0x2bf0: 0x0004, 0x2bf1: 0x0004, 0x2bf2: 0x0004, 0x2bf3: 0x0004, 0x2bf4: 0x0004,
-	// Block 0xb0, offset 0x2c00
-	0x2c30: 0x0004, 0x2c31: 0x0004, 0x2c32: 0x0004, 0x2c33: 0x0004, 0x2c34: 0x0004, 0x2c35: 0x0004,
-	0x2c36: 0x0004,
-	// Block 0xb1, offset 0x2c40
-	0x2c4f: 0x0004, 0x2c51: 0x0400,
-	0x2c52: 0x0400, 0x2c53: 0x0400, 0x2c54: 0x0400, 0x2c55: 0x0400, 0x2c56: 0x0400, 0x2c57: 0x0400,
-	0x2c58: 0x0400, 0x2c59: 0x0400, 0x2c5a: 0x0400, 0x2c5b: 0x0400, 0x2c5c: 0x0400, 0x2c5d: 0x0400,
-	0x2c5e: 0x0400, 0x2c5f: 0x0400, 0x2c60: 0x0400, 0x2c61: 0x0400, 0x2c62: 0x0400, 0x2c63: 0x0400,
-	0x2c64: 0x0400, 0x2c65: 0x0400, 0x2c66: 0x0400, 0x2c67: 0x0400, 0x2c68: 0x0400, 0x2c69: 0x0400,
-	0x2c6a: 0x0400, 0x2c6b: 0x0400, 0x2c6c: 0x0400, 0x2c6d: 0x0400, 0x2c6e: 0x0400, 0x2c6f: 0x0400,
-	0x2c70: 0x0400, 0x2c71: 0x0400, 0x2c72: 0x0400, 0x2c73: 0x0400, 0x2c74: 0x0400, 0x2c75: 0x0400,
-	0x2c76: 0x0400, 0x2c77: 0x0400, 0x2c78: 0x0400, 0x2c79: 0x0400, 0x2c7a: 0x0400, 0x2c7b: 0x0400,
-	0x2c7c: 0x0400, 0x2c7d: 0x0400, 0x2c7e: 0x0400, 0x2c7f: 0x0400,
-	// Block 0xb2, offset 0x2c80
-	0x2c80: 0x0400, 0x2c81: 0x0400, 0x2c82: 0x0400, 0x2c83: 0x0400, 0x2c84: 0x0400, 0x2c85: 0x0400,
-	0x2c86: 0x0400, 0x2c87: 0x0400,
-	0x2c8f: 0x0004, 0x2c90: 0x0004, 0x2c91: 0x0004,
-	0x2c92: 0x0004,
-	// Block 0xb3, offset 0x2cc0
-	0x2ce4: 0x0004,
-	0x2cf0: 0x0400, 0x2cf1: 0x0400,
-	// Block 0xb4, offset 0x2d00
-	0x2d1d: 0x0004,
-	0x2d1e: 0x0004, 0x2d20: 0x0002, 0x2d21: 0x0002, 0x2d22: 0x0002, 0x2d23: 0x0002,
-	// Block 0xb5, offset 0x2d40
-	0x2d40: 0x0004, 0x2d41: 0x0004, 0x2d42: 0x0004, 0x2d43: 0x0004, 0x2d44: 0x0004, 0x2d45: 0x0004,
-	0x2d46: 0x0004, 0x2d47: 0x0004, 0x2d48: 0x0004, 0x2d49: 0x0004, 0x2d4a: 0x0004, 0x2d4b: 0x0004,
-	0x2d4c: 0x0004, 0x2d4d: 0x0004, 0x2d4e: 0x0004, 0x2d4f: 0x0004, 0x2d50: 0x0004, 0x2d51: 0x0004,
-	0x2d52: 0x0004, 0x2d53: 0x0004, 0x2d54: 0x0004, 0x2d55: 0x0004, 0x2d56: 0x0004, 0x2d57: 0x0004,
-	0x2d58: 0x0004, 0x2d59: 0x0004, 0x2d5a: 0x0004, 0x2d5b: 0x0004, 0x2d5c: 0x0004, 0x2d5d: 0x0004,
-	0x2d5e: 0x0004, 0x2d5f: 0x0004, 0x2d60: 0x0004, 0x2d61: 0x0004, 0x2d62: 0x0004, 0x2d63: 0x0004,
-	0x2d64: 0x0004, 0x2d65: 0x0004, 0x2d66: 0x0004, 0x2d67: 0x0004, 0x2d68: 0x0004, 0x2d69: 0x0004,
-	0x2d6a: 0x0004, 0x2d6b: 0x0004, 0x2d6c: 0x0004, 0x2d6d: 0x0004,
-	0x2d70: 0x0004, 0x2d71: 0x0004, 0x2d72: 0x0004, 0x2d73: 0x0004, 0x2d74: 0x0004, 0x2d75: 0x0004,
-	0x2d76: 0x0004, 0x2d77: 0x0004, 0x2d78: 0x0004, 0x2d79: 0x0004, 0x2d7a: 0x0004, 0x2d7b: 0x0004,
-	0x2d7c: 0x0004, 0x2d7d: 0x0004, 0x2d7e: 0x0004, 0x2d7f: 0x0004,
-	// Block 0xb6, offset 0x2d80
-	0x2d80: 0x0004, 0x2d81: 0x0004, 0x2d82: 0x0004, 0x2d83: 0x0004, 0x2d84: 0x0004, 0x2d85: 0x0004,
-	0x2d86: 0x0004,
-	// Block 0xb7, offset 0x2dc0
-	0x2de5: 0x0004, 0x2de6: 0x0400, 0x2de7: 0x0004, 0x2de8: 0x0004, 0x2de9: 0x0004,
-	0x2ded: 0x0400, 0x2dee: 0x0004, 0x2def: 0x0004,
-	0x2df0: 0x0004, 0x2df1: 0x0004, 0x2df2: 0x0004, 0x2df3: 0x0002, 0x2df4: 0x0002, 0x2df5: 0x0002,
-	0x2df6: 0x0002, 0x2df7: 0x0002, 0x2df8: 0x0002, 0x2df9: 0x0002, 0x2dfa: 0x0002, 0x2dfb: 0x0004,
-	0x2dfc: 0x0004, 0x2dfd: 0x0004, 0x2dfe: 0x0004, 0x2dff: 0x0004,
-	// Block 0xb8, offset 0x2e00
-	0x2e00: 0x0004, 0x2e01: 0x0004, 0x2e02: 0x0004, 0x2e05: 0x0004,
-	0x2e06: 0x0004, 0x2e07: 0x0004, 0x2e08: 0x0004, 0x2e09: 0x0004, 0x2e0a: 0x0004, 0x2e0b: 0x0004,
-	0x2e2a: 0x0004, 0x2e2b: 0x0004, 0x2e2c: 0x0004, 0x2e2d: 0x0004,
-	// Block 0xb9, offset 0x2e40
-	0x2e42: 0x0004, 0x2e43: 0x0004, 0x2e44: 0x0004,
-	// Block 0xba, offset 0x2e80
-	0x2e80: 0x0004, 0x2e81: 0x0004, 0x2e82: 0x0004, 0x2e83: 0x0004, 0x2e84: 0x0004, 0x2e85: 0x0004,
-	0x2e86: 0x0004, 0x2e87: 0x0004, 0x2e88: 0x0004, 0x2e89: 0x0004, 0x2e8a: 0x0004, 0x2e8b: 0x0004,
-	0x2e8c: 0x0004, 0x2e8d: 0x0004, 0x2e8e: 0x0004, 0x2e8f: 0x0004, 0x2e90: 0x0004, 0x2e91: 0x0004,
-	0x2e92: 0x0004, 0x2e93: 0x0004, 0x2e94: 0x0004, 0x2e95: 0x0004, 0x2e96: 0x0004, 0x2e97: 0x0004,
-	0x2e98: 0x0004, 0x2e99: 0x0004, 0x2e9a: 0x0004, 0x2e9b: 0x0004, 0x2e9c: 0x0004, 0x2e9d: 0x0004,
-	0x2e9e: 0x0004, 0x2e9f: 0x0004, 0x2ea0: 0x0004, 0x2ea1: 0x0004, 0x2ea2: 0x0004, 0x2ea3: 0x0004,
-	0x2ea4: 0x0004, 0x2ea5: 0x0004, 0x2ea6: 0x0004, 0x2ea7: 0x0004, 0x2ea8: 0x0004, 0x2ea9: 0x0004,
-	0x2eaa: 0x0004, 0x2eab: 0x0004, 0x2eac: 0x0004, 0x2ead: 0x0004, 0x2eae: 0x0004, 0x2eaf: 0x0004,
-	0x2eb0: 0x0004, 0x2eb1: 0x0004, 0x2eb2: 0x0004, 0x2eb3: 0x0004, 0x2eb4: 0x0004, 0x2eb5: 0x0004,
-	0x2eb6: 0x0004, 0x2ebb: 0x0004,
-	0x2ebc: 0x0004, 0x2ebd: 0x0004, 0x2ebe: 0x0004, 0x2ebf: 0x0004,
-	// Block 0xbb, offset 0x2ec0
-	0x2ec0: 0x0004, 0x2ec1: 0x0004, 0x2ec2: 0x0004, 0x2ec3: 0x0004, 0x2ec4: 0x0004, 0x2ec5: 0x0004,
-	0x2ec6: 0x0004, 0x2ec7: 0x0004, 0x2ec8: 0x0004, 0x2ec9: 0x0004, 0x2eca: 0x0004, 0x2ecb: 0x0004,
-	0x2ecc: 0x0004, 0x2ecd: 0x0004, 0x2ece: 0x0004, 0x2ecf: 0x0004, 0x2ed0: 0x0004, 0x2ed1: 0x0004,
-	0x2ed2: 0x0004, 0x2ed3: 0x0004, 0x2ed4: 0x0004, 0x2ed5: 0x0004, 0x2ed6: 0x0004, 0x2ed7: 0x0004,
-	0x2ed8: 0x0004, 0x2ed9: 0x0004, 0x2eda: 0x0004, 0x2edb: 0x0004, 0x2edc: 0x0004, 0x2edd: 0x0004,
-	0x2ede: 0x0004, 0x2edf: 0x0004, 0x2ee0: 0x0004, 0x2ee1: 0x0004, 0x2ee2: 0x0004, 0x2ee3: 0x0004,
-	0x2ee4: 0x0004, 0x2ee5: 0x0004, 0x2ee6: 0x0004, 0x2ee7: 0x0004, 0x2ee8: 0x0004, 0x2ee9: 0x0004,
-	0x2eea: 0x0004, 0x2eeb: 0x0004, 0x2eec: 0x0004,
-	0x2ef5: 0x0004,
-	// Block 0xbc, offset 0x2f00
-	0x2f04: 0x0004,
-	0x2f1b: 0x0004, 0x2f1c: 0x0004, 0x2f1d: 0x0004,
-	0x2f1e: 0x0004, 0x2f1f: 0x0004, 0x2f21: 0x0004, 0x2f22: 0x0004, 0x2f23: 0x0004,
-	0x2f24: 0x0004, 0x2f25: 0x0004, 0x2f26: 0x0004, 0x2f27: 0x0004, 0x2f28: 0x0004, 0x2f29: 0x0004,
-	0x2f2a: 0x0004, 0x2f2b: 0x0004, 0x2f2c: 0x0004, 0x2f2d: 0x0004, 0x2f2e: 0x0004, 0x2f2f: 0x0004,
-	// Block 0xbd, offset 0x2f40
-	0x2f40: 0x0004, 0x2f41: 0x0004, 0x2f42: 0x0004, 0x2f43: 0x0004, 0x2f44: 0x0004, 0x2f45: 0x0004,
-	0x2f46: 0x0004, 0x2f48: 0x0004, 0x2f49: 0x0004, 0x2f4a: 0x0004, 0x2f4b: 0x0004,
-	0x2f4c: 0x0004, 0x2f4d: 0x0004, 0x2f4e: 0x0004, 0x2f4f: 0x0004, 0x2f50: 0x0004, 0x2f51: 0x0004,
-	0x2f52: 0x0004, 0x2f53: 0x0004, 0x2f54: 0x0004, 0x2f55: 0x0004, 0x2f56: 0x0004, 0x2f57: 0x0004,
-	0x2f58: 0x0004, 0x2f5b: 0x0004, 0x2f5c: 0x0004, 0x2f5d: 0x0004,
-	0x2f5e: 0x0004, 0x2f5f: 0x0004, 0x2f60: 0x0004, 0x2f61: 0x0004, 0x2f63: 0x0004,
-	0x2f64: 0x0004, 0x2f66: 0x0004, 0x2f67: 0x0004, 0x2f68: 0x0004, 0x2f69: 0x0004,
-	0x2f6a: 0x0004,
-	// Block 0xbe, offset 0x2f80
-	0x2f8f: 0x0004,
-	// Block 0xbf, offset 0x2fc0
-	0x2fee: 0x0004,
-	// Block 0xc0, offset 0x3000
-	0x302c: 0x0004, 0x302d: 0x0004, 0x302e: 0x0004, 0x302f: 0x0004,
-	// Block 0xc1, offset 0x3040
-	0x3050: 0x0004, 0x3051: 0x0004,
-	0x3052: 0x0004, 0x3053: 0x0004, 0x3054: 0x0004, 0x3055: 0x0004, 0x3056: 0x0004,
-	// Block 0xc2, offset 0x3080
-	0x3084: 0x0004, 0x3085: 0x0004,
-	0x3086: 0x0004, 0x3087: 0x0004, 0x3088: 0x0004, 0x3089: 0x0004, 0x308a: 0x0004,
-	// Block 0xc3, offset 0x30c0
-	0x30cd: 0x0008, 0x30ce: 0x0008, 0x30cf: 0x0008,
-	0x30ef: 0x0008,
-	// Block 0xc4, offset 0x3100
-	0x312c: 0x0008, 0x312d: 0x0008, 0x312e: 0x0008, 0x312f: 0x0008,
-	0x3130: 0x0008, 0x3131: 0x0008,
-	0x313e: 0x0008, 0x313f: 0x0008,
-	// Block 0xc5, offset 0x3140
-	0x314e: 0x0008, 0x3151: 0x0008,
-	0x3152: 0x0008, 0x3153: 0x0008, 0x3154: 0x0008, 0x3155: 0x0008, 0x3156: 0x0008, 0x3157: 0x0008,
-	0x3158: 0x0008, 0x3159: 0x0008, 0x315a: 0x0008,
-	0x316d: 0x0008, 0x316e: 0x0008, 0x316f: 0x0008,
-	0x3170: 0x0008, 0x3171: 0x0008, 0x3172: 0x0008, 0x3173: 0x0008, 0x3174: 0x0008, 0x3175: 0x0008,
-	0x3176: 0x0008, 0x3177: 0x0008, 0x3178: 0x0008, 0x3179: 0x0008, 0x317a: 0x0008, 0x317b: 0x0008,
-	0x317c: 0x0008, 0x317d: 0x0008, 0x317e: 0x0008, 0x317f: 0x0008,
-	// Block 0xc6, offset 0x3180
-	0x3180: 0x0008, 0x3181: 0x0008, 0x3182: 0x0008, 0x3183: 0x0008, 0x3184: 0x0008, 0x3185: 0x0008,
-	0x3186: 0x0008, 0x3187: 0x0008, 0x3188: 0x0008, 0x3189: 0x0008, 0x318a: 0x0008, 0x318b: 0x0008,
-	0x318c: 0x0008, 0x318d: 0x0008, 0x318e: 0x0008, 0x318f: 0x0008, 0x3190: 0x0008, 0x3191: 0x0008,
-	0x3192: 0x0008, 0x3193: 0x0008, 0x3194: 0x0008, 0x3195: 0x0008, 0x3196: 0x0008, 0x3197: 0x0008,
-	0x3198: 0x0008, 0x3199: 0x0008, 0x319a: 0x0008, 0x319b: 0x0008, 0x319c: 0x0008, 0x319d: 0x0008,
-	0x319e: 0x0008, 0x319f: 0x0008, 0x31a0: 0x0008, 0x31a1: 0x0008, 0x31a2: 0x0008, 0x31a3: 0x0008,
-	0x31a4: 0x0008, 0x31a5: 0x0008, 0x31a6: 0x0200, 0x31a7: 0x0200, 0x31a8: 0x0200, 0x31a9: 0x0200,
-	0x31aa: 0x0200, 0x31ab: 0x0200, 0x31ac: 0x0200, 0x31ad: 0x0200, 0x31ae: 0x0200, 0x31af: 0x0200,
-	0x31b0: 0x0200, 0x31b1: 0x0200, 0x31b2: 0x0200, 0x31b3: 0x0200, 0x31b4: 0x0200, 0x31b5: 0x0200,
-	0x31b6: 0x0200, 0x31b7: 0x0200, 0x31b8: 0x0200, 0x31b9: 0x0200, 0x31ba: 0x0200, 0x31bb: 0x0200,
-	0x31bc: 0x0200, 0x31bd: 0x0200, 0x31be: 0x0200, 0x31bf: 0x0200,
-	// Block 0xc7, offset 0x31c0
-	0x31c1: 0x0008, 0x31c2: 0x0008, 0x31c3: 0x0008, 0x31c4: 0x0008, 0x31c5: 0x0008,
-	0x31c6: 0x0008, 0x31c7: 0x0008, 0x31c8: 0x0008, 0x31c9: 0x0008, 0x31ca: 0x0008, 0x31cb: 0x0008,
-	0x31cc: 0x0008, 0x31cd: 0x0008, 0x31ce: 0x0008, 0x31cf: 0x0008,
-	0x31da: 0x0008,
-	0x31ef: 0x0008,
-	0x31f2: 0x0008, 0x31f3: 0x0008, 0x31f4: 0x0008, 0x31f5: 0x0008,
-	0x31f6: 0x0008, 0x31f7: 0x0008, 0x31f8: 0x0008, 0x31f9: 0x0008, 0x31fa: 0x0008,
-	0x31fc: 0x0008, 0x31fd: 0x0008, 0x31fe: 0x0008, 0x31ff: 0x0008,
-	// Block 0xc8, offset 0x3200
-	0x3209: 0x0008, 0x320a: 0x0008, 0x320b: 0x0008,
-	0x320c: 0x0008, 0x320d: 0x0008, 0x320e: 0x0008, 0x320f: 0x0008, 0x3210: 0x0008, 0x3211: 0x0008,
-	0x3212: 0x0008, 0x3213: 0x0008, 0x3214: 0x0008, 0x3215: 0x0008, 0x3216: 0x0008, 0x3217: 0x0008,
-	0x3218: 0x0008, 0x3219: 0x0008, 0x321a: 0x0008, 0x321b: 0x0008, 0x321c: 0x0008, 0x321d: 0x0008,
-	0x321e: 0x0008, 0x321f: 0x0008, 0x3220: 0x0008, 0x3221: 0x0008, 0x3222: 0x0008, 0x3223: 0x0008,
-	0x3224: 0x0008, 0x3225: 0x0008, 0x3226: 0x0008, 0x3227: 0x0008, 0x3228: 0x0008, 0x3229: 0x0008,
-	0x322a: 0x0008, 0x322b: 0x0008, 0x322c: 0x0008, 0x322d: 0x0008, 0x322e: 0x0008, 0x322f: 0x0008,
-	0x3230: 0x0008, 0x3231: 0x0008, 0x3232: 0x0008, 0x3233: 0x0008, 0x3234: 0x0008, 0x3235: 0x0008,
-	0x3236: 0x0008, 0x3237: 0x0008, 0x3238: 0x0008, 0x3239: 0x0008, 0x323a: 0x0008, 0x323b: 0x0008,
-	0x323c: 0x0008, 0x323d: 0x0008, 0x323e: 0x0008, 0x323f: 0x0008,
-	// Block 0xc9, offset 0x3240
-	0x3240: 0x0008, 0x3241: 0x0008, 0x3242: 0x0008, 0x3243: 0x0008, 0x3244: 0x0008, 0x3245: 0x0008,
-	0x3246: 0x0008, 0x3247: 0x0008, 0x3248: 0x0008, 0x3249: 0x0008, 0x324a: 0x0008, 0x324b: 0x0008,
-	0x324c: 0x0008, 0x324d: 0x0008, 0x324e: 0x0008, 0x324f: 0x0008, 0x3250: 0x0008, 0x3251: 0x0008,
-	0x3252: 0x0008, 0x3253: 0x0008, 0x3254: 0x0008, 0x3255: 0x0008, 0x3256: 0x0008, 0x3257: 0x0008,
-	0x3258: 0x0008, 0x3259: 0x0008, 0x325a: 0x0008, 0x325b: 0x0008, 0x325c: 0x0008, 0x325d: 0x0008,
-	0x325e: 0x0008, 0x325f: 0x0008, 0x3260: 0x0008, 0x3261: 0x0008, 0x3262: 0x0008, 0x3263: 0x0008,
-	0x3264: 0x0008, 0x3265: 0x0008, 0x3266: 0x0008, 0x3267: 0x0008, 0x3268: 0x0008, 0x3269: 0x0008,
-	0x326a: 0x0008, 0x326b: 0x0008, 0x326c: 0x0008, 0x326d: 0x0008, 0x326e: 0x0008, 0x326f: 0x0008,
-	0x3270: 0x0008, 0x3271: 0x0008, 0x3272: 0x0008, 0x3273: 0x0008, 0x3274: 0x0008, 0x3275: 0x0008,
-	0x3276: 0x0008, 0x3277: 0x0008, 0x3278: 0x0008, 0x3279: 0x0008, 0x327a: 0x0008, 0x327b: 0x0004,
-	0x327c: 0x0004, 0x327d: 0x0004, 0x327e: 0x0004, 0x327f: 0x0004,
-	// Block 0xca, offset 0x3280
-	0x3280: 0x0008, 0x3281: 0x0008, 0x3282: 0x0008, 0x3283: 0x0008, 0x3284: 0x0008, 0x3285: 0x0008,
-	0x3286: 0x0008, 0x3287: 0x0008, 0x3288: 0x0008, 0x3289: 0x0008, 0x328a: 0x0008, 0x328b: 0x0008,
-	0x328c: 0x0008, 0x328d: 0x0008, 0x328e: 0x0008, 0x328f: 0x0008, 0x3290: 0x0008, 0x3291: 0x0008,
-	0x3292: 0x0008, 0x3293: 0x0008, 0x3294: 0x0008, 0x3295: 0x0008, 0x3296: 0x0008, 0x3297: 0x0008,
-	0x3298: 0x0008, 0x3299: 0x0008, 0x329a: 0x0008, 0x329b: 0x0008, 0x329c: 0x0008, 0x329d: 0x0008,
-	0x329e: 0x0008, 0x329f: 0x0008, 0x32a0: 0x0008, 0x32a1: 0x0008, 0x32a2: 0x0008, 0x32a3: 0x0008,
-	0x32a4: 0x0008, 0x32a5: 0x0008, 0x32a6: 0x0008, 0x32a7: 0x0008, 0x32a8: 0x0008, 0x32a9: 0x0008,
-	0x32aa: 0x0008, 0x32ab: 0x0008, 0x32ac: 0x0008, 0x32ad: 0x0008, 0x32ae: 0x0008, 0x32af: 0x0008,
-	0x32b0: 0x0008, 0x32b1: 0x0008, 0x32b2: 0x0008, 0x32b3: 0x0008, 0x32b4: 0x0008, 0x32b5: 0x0008,
-	0x32b6: 0x0008, 0x32b7: 0x0008, 0x32b8: 0x0008, 0x32b9: 0x0008, 0x32ba: 0x0008, 0x32bb: 0x0008,
-	0x32bc: 0x0008, 0x32bd: 0x0008,
-	// Block 0xcb, offset 0x32c0
-	0x32c6: 0x0008, 0x32c7: 0x0008, 0x32c8: 0x0008, 0x32c9: 0x0008, 0x32ca: 0x0008, 0x32cb: 0x0008,
-	0x32cc: 0x0008, 0x32cd: 0x0008, 0x32ce: 0x0008, 0x32cf: 0x0008, 0x32d0: 0x0008, 0x32d1: 0x0008,
-	0x32d2: 0x0008, 0x32d3: 0x0008, 0x32d4: 0x0008, 0x32d5: 0x0008, 0x32d6: 0x0008, 0x32d7: 0x0008,
-	0x32d8: 0x0008, 0x32d9: 0x0008, 0x32da: 0x0008, 0x32db: 0x0008, 0x32dc: 0x0008, 0x32dd: 0x0008,
-	0x32de: 0x0008, 0x32df: 0x0008, 0x32e0: 0x0008, 0x32e1: 0x0008, 0x32e2: 0x0008, 0x32e3: 0x0008,
-	0x32e4: 0x0008, 0x32e5: 0x0008, 0x32e6: 0x0008, 0x32e7: 0x0008, 0x32e8: 0x0008, 0x32e9: 0x0008,
-	0x32ea: 0x0008, 0x32eb: 0x0008, 0x32ec: 0x0008, 0x32ed: 0x0008, 0x32ee: 0x0008, 0x32ef: 0x0008,
-	0x32f0: 0x0008, 0x32f1: 0x0008, 0x32f2: 0x0008, 0x32f3: 0x0008, 0x32f4: 0x0008, 0x32f5: 0x0008,
-	0x32f6: 0x0008, 0x32f7: 0x0008, 0x32f8: 0x0008, 0x32f9: 0x0008, 0x32fa: 0x0008, 0x32fb: 0x0008,
-	0x32fc: 0x0008, 0x32fd: 0x0008, 0x32fe: 0x0008, 0x32ff: 0x0008,
-	// Block 0xcc, offset 0x3300
-	0x3300: 0x0008, 0x3301: 0x0008, 0x3302: 0x0008, 0x3303: 0x0008, 0x3304: 0x0008, 0x3305: 0x0008,
-	0x3306: 0x0008, 0x3307: 0x0008, 0x3308: 0x0008, 0x3309: 0x0008, 0x330a: 0x0008, 0x330b: 0x0008,
-	0x330c: 0x0008, 0x330d: 0x0008, 0x330e: 0x0008, 0x330f: 0x0008,
-	// Block 0xcd, offset 0x3340
-	0x3374: 0x0008, 0x3375: 0x0008,
-	0x3376: 0x0008, 0x3377: 0x0008, 0x3378: 0x0008, 0x3379: 0x0008, 0x337a: 0x0008, 0x337b: 0x0008,
-	0x337c: 0x0008, 0x337d: 0x0008, 0x337e: 0x0008, 0x337f: 0x0008,
-	// Block 0xce, offset 0x3380
-	0x3395: 0x0008, 0x3396: 0x0008, 0x3397: 0x0008,
-	0x3398: 0x0008, 0x3399: 0x0008, 0x339a: 0x0008, 0x339b: 0x0008, 0x339c: 0x0008, 0x339d: 0x0008,
-	0x339e: 0x0008, 0x339f: 0x0008, 0x33a0: 0x0008, 0x33a1: 0x0008, 0x33a2: 0x0008, 0x33a3: 0x0008,
-	0x33a4: 0x0008, 0x33a5: 0x0008, 0x33a6: 0x0008, 0x33a7: 0x0008, 0x33a8: 0x0008, 0x33a9: 0x0008,
-	0x33aa: 0x0008, 0x33ab: 0x0008, 0x33ac: 0x0008, 0x33ad: 0x0008, 0x33ae: 0x0008, 0x33af: 0x0008,
-	0x33b0: 0x0008, 0x33b1: 0x0008, 0x33b2: 0x0008, 0x33b3: 0x0008, 0x33b4: 0x0008, 0x33b5: 0x0008,
-	0x33b6: 0x0008, 0x33b7: 0x0008, 0x33b8: 0x0008, 0x33b9: 0x0008, 0x33ba: 0x0008, 0x33bb: 0x0008,
-	0x33bc: 0x0008, 0x33bd: 0x0008, 0x33be: 0x0008, 0x33bf: 0x0008,
-	// Block 0xcf, offset 0x33c0
-	0x33cc: 0x0008, 0x33cd: 0x0008, 0x33ce: 0x0008, 0x33cf: 0x0008,
-	// Block 0xd0, offset 0x3400
-	0x3408: 0x0008, 0x3409: 0x0008, 0x340a: 0x0008, 0x340b: 0x0008,
-	0x340c: 0x0008, 0x340d: 0x0008, 0x340e: 0x0008, 0x340f: 0x0008,
-	0x341a: 0x0008, 0x341b: 0x0008, 0x341c: 0x0008, 0x341d: 0x0008,
-	0x341e: 0x0008, 0x341f: 0x0008,
-	// Block 0xd1, offset 0x3440
-	0x3448: 0x0008, 0x3449: 0x0008, 0x344a: 0x0008, 0x344b: 0x0008,
-	0x344c: 0x0008, 0x344d: 0x0008, 0x344e: 0x0008, 0x344f: 0x0008,
-	0x346e: 0x0008, 0x346f: 0x0008,
-	0x3470: 0x0008, 0x3471: 0x0008, 0x3472: 0x0008, 0x3473: 0x0008, 0x3474: 0x0008, 0x3475: 0x0008,
-	0x3476: 0x0008, 0x3477: 0x0008, 0x3478: 0x0008, 0x3479: 0x0008, 0x347a: 0x0008, 0x347b: 0x0008,
-	0x347c: 0x0008, 0x347d: 0x0008, 0x347e: 0x0008, 0x347f: 0x0008,
-	// Block 0xd2, offset 0x3480
-	0x348c: 0x0008, 0x348d: 0x0008, 0x348e: 0x0008, 0x348f: 0x0008, 0x3490: 0x0008, 0x3491: 0x0008,
-	0x3492: 0x0008, 0x3493: 0x0008, 0x3494: 0x0008, 0x3495: 0x0008, 0x3496: 0x0008, 0x3497: 0x0008,
-	0x3498: 0x0008, 0x3499: 0x0008, 0x349a: 0x0008, 0x349b: 0x0008, 0x349c: 0x0008, 0x349d: 0x0008,
-	0x349e: 0x0008, 0x349f: 0x0008, 0x34a0: 0x0008, 0x34a1: 0x0008, 0x34a2: 0x0008, 0x34a3: 0x0008,
-	0x34a4: 0x0008, 0x34a5: 0x0008, 0x34a6: 0x0008, 0x34a7: 0x0008, 0x34a8: 0x0008, 0x34a9: 0x0008,
-	0x34aa: 0x0008, 0x34ab: 0x0008, 0x34ac: 0x0008, 0x34ad: 0x0008, 0x34ae: 0x0008, 0x34af: 0x0008,
-	0x34b0: 0x0008, 0x34b1: 0x0008, 0x34b2: 0x0008, 0x34b3: 0x0008, 0x34b4: 0x0008, 0x34b5: 0x0008,
-	0x34b6: 0x0008, 0x34b7: 0x0008, 0x34b8: 0x0008, 0x34b9: 0x0008, 0x34ba: 0x0008,
-	0x34bc: 0x0008, 0x34bd: 0x0008, 0x34be: 0x0008, 0x34bf: 0x0008,
-	// Block 0xd3, offset 0x34c0
-	0x34c0: 0x0008, 0x34c1: 0x0008, 0x34c2: 0x0008, 0x34c3: 0x0008, 0x34c4: 0x0008, 0x34c5: 0x0008,
-	0x34c7: 0x0008, 0x34c8: 0x0008, 0x34c9: 0x0008, 0x34ca: 0x0008, 0x34cb: 0x0008,
-	0x34cc: 0x0008, 0x34cd: 0x0008, 0x34ce: 0x0008, 0x34cf: 0x0008, 0x34d0: 0x0008, 0x34d1: 0x0008,
-	0x34d2: 0x0008, 0x34d3: 0x0008, 0x34d4: 0x0008, 0x34d5: 0x0008, 0x34d6: 0x0008, 0x34d7: 0x0008,
-	0x34d8: 0x0008, 0x34d9: 0x0008, 0x34da: 0x0008, 0x34db: 0x0008, 0x34dc: 0x0008, 0x34dd: 0x0008,
-	0x34de: 0x0008, 0x34df: 0x0008, 0x34e0: 0x0008, 0x34e1: 0x0008, 0x34e2: 0x0008, 0x34e3: 0x0008,
-	0x34e4: 0x0008, 0x34e5: 0x0008, 0x34e6: 0x0008, 0x34e7: 0x0008, 0x34e8: 0x0008, 0x34e9: 0x0008,
-	0x34ea: 0x0008, 0x34eb: 0x0008, 0x34ec: 0x0008, 0x34ed: 0x0008, 0x34ee: 0x0008, 0x34ef: 0x0008,
-	0x34f0: 0x0008, 0x34f1: 0x0008, 0x34f2: 0x0008, 0x34f3: 0x0008, 0x34f4: 0x0008, 0x34f5: 0x0008,
-	0x34f6: 0x0008, 0x34f7: 0x0008, 0x34f8: 0x0008, 0x34f9: 0x0008, 0x34fa: 0x0008, 0x34fb: 0x0008,
-	0x34fc: 0x0008, 0x34fd: 0x0008, 0x34fe: 0x0008, 0x34ff: 0x0008,
-	// Block 0xd4, offset 0x3500
-	0x3500: 0x0002, 0x3501: 0x0002, 0x3502: 0x0002, 0x3503: 0x0002, 0x3504: 0x0002, 0x3505: 0x0002,
-	0x3506: 0x0002, 0x3507: 0x0002, 0x3508: 0x0002, 0x3509: 0x0002, 0x350a: 0x0002, 0x350b: 0x0002,
-	0x350c: 0x0002, 0x350d: 0x0002, 0x350e: 0x0002, 0x350f: 0x0002, 0x3510: 0x0002, 0x3511: 0x0002,
-	0x3512: 0x0002, 0x3513: 0x0002, 0x3514: 0x0002, 0x3515: 0x0002, 0x3516: 0x0002, 0x3517: 0x0002,
-	0x3518: 0x0002, 0x3519: 0x0002, 0x351a: 0x0002, 0x351b: 0x0002, 0x351c: 0x0002, 0x351d: 0x0002,
-	0x351e: 0x0002, 0x351f: 0x0002, 0x3520: 0x0004, 0x3521: 0x0004, 0x3522: 0x0004, 0x3523: 0x0004,
-	0x3524: 0x0004, 0x3525: 0x0004, 0x3526: 0x0004, 0x3527: 0x0004, 0x3528: 0x0004, 0x3529: 0x0004,
-	0x352a: 0x0004, 0x352b: 0x0004, 0x352c: 0x0004, 0x352d: 0x0004, 0x352e: 0x0004, 0x352f: 0x0004,
-	0x3530: 0x0004, 0x3531: 0x0004, 0x3532: 0x0004, 0x3533: 0x0004, 0x3534: 0x0004, 0x3535: 0x0004,
-	0x3536: 0x0004, 0x3537: 0x0004, 0x3538: 0x0004, 0x3539: 0x0004, 0x353a: 0x0004, 0x353b: 0x0004,
-	0x353c: 0x0004, 0x353d: 0x0004, 0x353e: 0x0004, 0x353f: 0x0004,
-	// Block 0xd5, offset 0x3540
-	0x3540: 0x0002, 0x3541: 0x0002, 0x3542: 0x0002, 0x3543: 0x0002, 0x3544: 0x0002, 0x3545: 0x0002,
-	0x3546: 0x0002, 0x3547: 0x0002, 0x3548: 0x0002, 0x3549: 0x0002, 0x354a: 0x0002, 0x354b: 0x0002,
-	0x354c: 0x0002, 0x354d: 0x0002, 0x354e: 0x0002, 0x354f: 0x0002, 0x3550: 0x0002, 0x3551: 0x0002,
-	0x3552: 0x0002, 0x3553: 0x0002, 0x3554: 0x0002, 0x3555: 0x0002, 0x3556: 0x0002, 0x3557: 0x0002,
-	0x3558: 0x0002, 0x3559: 0x0002, 0x355a: 0x0002, 0x355b: 0x0002, 0x355c: 0x0002, 0x355d: 0x0002,
-	0x355e: 0x0002, 0x355f: 0x0002, 0x3560: 0x0002, 0x3561: 0x0002, 0x3562: 0x0002, 0x3563: 0x0002,
-	0x3564: 0x0002, 0x3565: 0x0002, 0x3566: 0x0002, 0x3567: 0x0002, 0x3568: 0x0002, 0x3569: 0x0002,
-	0x356a: 0x0002, 0x356b: 0x0002, 0x356c: 0x0002, 0x356d: 0x0002, 0x356e: 0x0002, 0x356f: 0x0002,
-	0x3570: 0x0002, 0x3571: 0x0002, 0x3572: 0x0002, 0x3573: 0x0002, 0x3574: 0x0002, 0x3575: 0x0002,
-	0x3576: 0x0002, 0x3577: 0x0002, 0x3578: 0x0002, 0x3579: 0x0002, 0x357a: 0x0002, 0x357b: 0x0002,
-	0x357c: 0x0002, 0x357d: 0x0002, 0x357e: 0x0002, 0x357f: 0x0002,
-	// Block 0xd6, offset 0x3580
-	0x3580: 0x0004, 0x3581: 0x0004, 0x3582: 0x0004, 0x3583: 0x0004, 0x3584: 0x0004, 0x3585: 0x0004,
-	0x3586: 0x0004, 0x3587: 0x0004, 0x3588: 0x0004, 0x3589: 0x0004, 0x358a: 0x0004, 0x358b: 0x0004,
-	0x358c: 0x0004, 0x358d: 0x0004, 0x358e: 0x0004, 0x358f: 0x0004, 0x3590: 0x0004, 0x3591: 0x0004,
-	0x3592: 0x0004, 0x3593: 0x0004, 0x3594: 0x0004, 0x3595: 0x0004, 0x3596: 0x0004, 0x3597: 0x0004,
-	0x3598: 0x0004, 0x3599: 0x0004, 0x359a: 0x0004, 0x359b: 0x0004, 0x359c: 0x0004, 0x359d: 0x0004,
-	0x359e: 0x0004, 0x359f: 0x0004, 0x35a0: 0x0004, 0x35a1: 0x0004, 0x35a2: 0x0004, 0x35a3: 0x0004,
-	0x35a4: 0x0004, 0x35a5: 0x0004, 0x35a6: 0x0004, 0x35a7: 0x0004, 0x35a8: 0x0004, 0x35a9: 0x0004,
-	0x35aa: 0x0004, 0x35ab: 0x0004, 0x35ac: 0x0004, 0x35ad: 0x0004, 0x35ae: 0x0004, 0x35af: 0x0004,
-	0x35b0: 0x0002, 0x35b1: 0x0002, 0x35b2: 0x0002, 0x35b3: 0x0002, 0x35b4: 0x0002, 0x35b5: 0x0002,
-	0x35b6: 0x0002, 0x35b7: 0x0002, 0x35b8: 0x0002, 0x35b9: 0x0002, 0x35ba: 0x0002, 0x35bb: 0x0002,
-	0x35bc: 0x0002, 0x35bd: 0x0002, 0x35be: 0x0002, 0x35bf: 0x0002,
-}
-
-// graphemesIndex: 25 blocks, 1600 entries, 1600 bytes
-// Block 0 is the zero block.
-var graphemesIndex = [1600]property{
-	// Block 0x0, offset 0x0
-	// Block 0x1, offset 0x40
-	// Block 0x2, offset 0x80
-	// Block 0x3, offset 0xc0
-	0xc2: 0x01,
-	0xcc: 0x02, 0xcd: 0x03,
-	0xd2: 0x04, 0xd6: 0x05, 0xd7: 0x06,
-	0xd8: 0x07, 0xd9: 0x08, 0xdb: 0x09, 0xdc: 0x0a, 0xdd: 0x0b, 0xde: 0x0c, 0xdf: 0x0d,
-	0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05,
-	0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a,
-	0xf0: 0x14, 0xf3: 0x16,
-	// Block 0x4, offset 0x100
-	0x120: 0x0e, 0x121: 0x0f, 0x122: 0x10, 0x123: 0x11, 0x124: 0x12, 0x125: 0x13, 0x126: 0x14, 0x127: 0x15,
-	0x128: 0x16, 0x129: 0x17, 0x12a: 0x16, 0x12b: 0x18, 0x12c: 0x19, 0x12d: 0x1a, 0x12e: 0x1b, 0x12f: 0x1c,
-	0x130: 0x1d, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x21, 0x135: 0x22, 0x136: 0x23, 0x137: 0x24,
-	0x138: 0x25, 0x139: 0x26, 0x13a: 0x27, 0x13b: 0x28, 0x13c: 0x29, 0x13d: 0x2a, 0x13e: 0x2b, 0x13f: 0x2c,
-	// Block 0x5, offset 0x140
-	0x140: 0x2d, 0x141: 0x2e, 0x142: 0x2f, 0x144: 0x30, 0x145: 0x31, 0x146: 0x32, 0x147: 0x33,
-	0x14d: 0x34,
-	0x15c: 0x35, 0x15d: 0x36, 0x15e: 0x37, 0x15f: 0x38,
-	0x160: 0x39, 0x162: 0x3a, 0x164: 0x3b,
-	0x168: 0x3c, 0x169: 0x3d, 0x16a: 0x3e, 0x16b: 0x3f, 0x16c: 0x40, 0x16d: 0x41, 0x16e: 0x42, 0x16f: 0x43,
-	0x170: 0x44, 0x173: 0x45, 0x177: 0x02,
-	// Block 0x6, offset 0x180
-	0x180: 0x46, 0x181: 0x47, 0x183: 0x48, 0x184: 0x49, 0x186: 0x4a,
-	0x18c: 0x4b, 0x18e: 0x4c, 0x18f: 0x4d,
-	0x193: 0x4e, 0x196: 0x4f, 0x197: 0x50,
-	0x198: 0x51, 0x199: 0x52, 0x19a: 0x53, 0x19b: 0x52, 0x19c: 0x54, 0x19d: 0x55, 0x19e: 0x56,
-	0x1a4: 0x57,
-	0x1ac: 0x58, 0x1ad: 0x59,
-	0x1b3: 0x5a, 0x1b5: 0x5b, 0x1b7: 0x5c,
-	// Block 0x7, offset 0x1c0
-	0x1c0: 0x5d, 0x1c2: 0x5e,
-	0x1ca: 0x5f,
-	// Block 0x8, offset 0x200
-	0x219: 0x60, 0x21a: 0x61, 0x21b: 0x62,
-	0x220: 0x63, 0x222: 0x64, 0x223: 0x65, 0x224: 0x66, 0x225: 0x67, 0x226: 0x68, 0x227: 0x69,
-	0x228: 0x6a, 0x229: 0x6b, 0x22a: 0x6c, 0x22b: 0x6d, 0x22f: 0x6e,
-	0x230: 0x6f, 0x231: 0x70, 0x232: 0x71, 0x233: 0x72, 0x234: 0x73, 0x235: 0x74, 0x236: 0x75, 0x237: 0x6f,
-	0x238: 0x70, 0x239: 0x71, 0x23a: 0x72, 0x23b: 0x73, 0x23c: 0x74, 0x23d: 0x75, 0x23e: 0x6f, 0x23f: 0x70,
-	// Block 0x9, offset 0x240
-	0x240: 0x71, 0x241: 0x72, 0x242: 0x73, 0x243: 0x74, 0x244: 0x75, 0x245: 0x6f, 0x246: 0x70, 0x247: 0x71,
-	0x248: 0x72, 0x249: 0x73, 0x24a: 0x74, 0x24b: 0x75, 0x24c: 0x6f, 0x24d: 0x70, 0x24e: 0x71, 0x24f: 0x72,
-	0x250: 0x73, 0x251: 0x74, 0x252: 0x75, 0x253: 0x6f, 0x254: 0x70, 0x255: 0x71, 0x256: 0x72, 0x257: 0x73,
-	0x258: 0x74, 0x259: 0x75, 0x25a: 0x6f, 0x25b: 0x70, 0x25c: 0x71, 0x25d: 0x72, 0x25e: 0x73, 0x25f: 0x74,
-	0x260: 0x75, 0x261: 0x6f, 0x262: 0x70, 0x263: 0x71, 0x264: 0x72, 0x265: 0x73, 0x266: 0x74, 0x267: 0x75,
-	0x268: 0x6f, 0x269: 0x70, 0x26a: 0x71, 0x26b: 0x72, 0x26c: 0x73, 0x26d: 0x74, 0x26e: 0x75, 0x26f: 0x6f,
-	0x270: 0x70, 0x271: 0x71, 0x272: 0x72, 0x273: 0x73, 0x274: 0x74, 0x275: 0x75, 0x276: 0x6f, 0x277: 0x70,
-	0x278: 0x71, 0x279: 0x72, 0x27a: 0x73, 0x27b: 0x74, 0x27c: 0x75, 0x27d: 0x6f, 0x27e: 0x70, 0x27f: 0x71,
-	// Block 0xa, offset 0x280
-	0x280: 0x72, 0x281: 0x73, 0x282: 0x74, 0x283: 0x75, 0x284: 0x6f, 0x285: 0x70, 0x286: 0x71, 0x287: 0x72,
-	0x288: 0x73, 0x289: 0x74, 0x28a: 0x75, 0x28b: 0x6f, 0x28c: 0x70, 0x28d: 0x71, 0x28e: 0x72, 0x28f: 0x73,
-	0x290: 0x74, 0x291: 0x75, 0x292: 0x6f, 0x293: 0x70, 0x294: 0x71, 0x295: 0x72, 0x296: 0x73, 0x297: 0x74,
-	0x298: 0x75, 0x299: 0x6f, 0x29a: 0x70, 0x29b: 0x71, 0x29c: 0x72, 0x29d: 0x73, 0x29e: 0x74, 0x29f: 0x75,
-	0x2a0: 0x6f, 0x2a1: 0x70, 0x2a2: 0x71, 0x2a3: 0x72, 0x2a4: 0x73, 0x2a5: 0x74, 0x2a6: 0x75, 0x2a7: 0x6f,
-	0x2a8: 0x70, 0x2a9: 0x71, 0x2aa: 0x72, 0x2ab: 0x73, 0x2ac: 0x74, 0x2ad: 0x75, 0x2ae: 0x6f, 0x2af: 0x70,
-	0x2b0: 0x71, 0x2b1: 0x72, 0x2b2: 0x73, 0x2b3: 0x74, 0x2b4: 0x75, 0x2b5: 0x6f, 0x2b6: 0x70, 0x2b7: 0x71,
-	0x2b8: 0x72, 0x2b9: 0x73, 0x2ba: 0x74, 0x2bb: 0x75, 0x2bc: 0x6f, 0x2bd: 0x70, 0x2be: 0x71, 0x2bf: 0x72,
-	// Block 0xb, offset 0x2c0
-	0x2c0: 0x73, 0x2c1: 0x74, 0x2c2: 0x75, 0x2c3: 0x6f, 0x2c4: 0x70, 0x2c5: 0x71, 0x2c6: 0x72, 0x2c7: 0x73,
-	0x2c8: 0x74, 0x2c9: 0x75, 0x2ca: 0x6f, 0x2cb: 0x70, 0x2cc: 0x71, 0x2cd: 0x72, 0x2ce: 0x73, 0x2cf: 0x74,
-	0x2d0: 0x75, 0x2d1: 0x6f, 0x2d2: 0x70, 0x2d3: 0x71, 0x2d4: 0x72, 0x2d5: 0x73, 0x2d6: 0x74, 0x2d7: 0x75,
-	0x2d8: 0x6f, 0x2d9: 0x70, 0x2da: 0x71, 0x2db: 0x72, 0x2dc: 0x73, 0x2dd: 0x74, 0x2de: 0x76, 0x2df: 0x77,
-	// Block 0xc, offset 0x300
-	0x32c: 0x78,
-	0x338: 0x79, 0x33b: 0x7a, 0x33e: 0x61, 0x33f: 0x7b,
-	// Block 0xd, offset 0x340
-	0x347: 0x7c,
-	0x34b: 0x7d, 0x34d: 0x7e,
-	0x368: 0x7f, 0x36b: 0x80,
-	0x374: 0x81,
-	0x37a: 0x82, 0x37b: 0x83, 0x37d: 0x84, 0x37e: 0x85,
-	// Block 0xe, offset 0x380
-	0x380: 0x86, 0x381: 0x87, 0x382: 0x88, 0x383: 0x89, 0x384: 0x8a, 0x385: 0x8b, 0x386: 0x8c, 0x387: 0x8d,
-	0x388: 0x8e, 0x389: 0x8f, 0x38b: 0x90, 0x38c: 0x21, 0x38d: 0x91,
-	0x390: 0x92, 0x391: 0x93, 0x392: 0x94, 0x393: 0x95, 0x396: 0x96, 0x397: 0x97,
-	0x398: 0x98, 0x399: 0x99, 0x39a: 0x9a, 0x39c: 0x9b,
-	0x3a0: 0x9c, 0x3a4: 0x9d, 0x3a5: 0x9e, 0x3a7: 0x9f,
-	0x3a8: 0xa0, 0x3a9: 0xa1, 0x3aa: 0xa2,
-	0x3b0: 0xa3, 0x3b2: 0xa4, 0x3b4: 0xa5, 0x3b5: 0xa6, 0x3b6: 0xa7,
-	0x3bb: 0xa8, 0x3bc: 0xa9, 0x3bd: 0xaa,
-	// Block 0xf, offset 0x3c0
-	0x3d0: 0xab, 0x3d1: 0xac,
-	// Block 0x10, offset 0x400
-	0x42b: 0xad, 0x42c: 0xae,
-	0x43d: 0xaf, 0x43e: 0xb0, 0x43f: 0xb1,
-	// Block 0x11, offset 0x440
-	0x472: 0xb2,
-	// Block 0x12, offset 0x480
-	0x4bc: 0xb3, 0x4bd: 0xb4,
-	// Block 0x13, offset 0x4c0
-	0x4c5: 0xb5, 0x4c6: 0xb6,
-	0x4c9: 0xb7,
-	0x4e8: 0xb8, 0x4e9: 0xb9, 0x4ea: 0xba,
-	// Block 0x14, offset 0x500
-	0x500: 0xbb, 0x502: 0xbc, 0x504: 0xae,
-	0x50a: 0xbd, 0x50b: 0xbe,
-	0x513: 0xbe,
-	0x523: 0xbf, 0x525: 0xc0,
-	// Block 0x15, offset 0x540
-	0x540: 0x52, 0x541: 0x52, 0x542: 0x52, 0x543: 0x52, 0x544: 0xc1, 0x545: 0xc2, 0x546: 0xc3, 0x547: 0xc4,
-	0x548: 0xc5, 0x549: 0xc6, 0x54a: 0x52, 0x54b: 0x52, 0x54c: 0x52, 0x54d: 0x52, 0x54e: 0x52, 0x54f: 0xc7,
-	0x550: 0x52, 0x551: 0x52, 0x552: 0x52, 0x553: 0x52, 0x554: 0xc8, 0x555: 0xc9, 0x556: 0x52, 0x557: 0x52,
-	0x558: 0x52, 0x559: 0xca, 0x55a: 0x52, 0x55b: 0x52, 0x55d: 0xcb, 0x55f: 0xcc,
-	0x560: 0xcd, 0x561: 0xce, 0x562: 0xcf, 0x563: 0x52, 0x564: 0xd0, 0x565: 0xd1, 0x566: 0x52, 0x567: 0x52,
-	0x568: 0x52, 0x569: 0x52, 0x56a: 0x52, 0x56b: 0x52,
-	0x570: 0x52, 0x571: 0x52, 0x572: 0x52, 0x573: 0x52, 0x574: 0x52, 0x575: 0x52, 0x576: 0x52, 0x577: 0x52,
-	0x578: 0x52, 0x579: 0x52, 0x57a: 0x52, 0x57b: 0x52, 0x57c: 0x52, 0x57d: 0x52, 0x57e: 0x52, 0x57f: 0xc8,
-	// Block 0x16, offset 0x580
-	0x590: 0x0b, 0x591: 0x0c, 0x593: 0x0d, 0x596: 0x0e,
-	0x59b: 0x0f, 0x59c: 0x10, 0x59d: 0x11, 0x59e: 0x12, 0x59f: 0x13,
-	// Block 0x17, offset 0x5c0
-	0x5c0: 0xd2, 0x5c1: 0x02, 0x5c2: 0xd3, 0x5c3: 0xd3, 0x5c4: 0x02, 0x5c5: 0x02, 0x5c6: 0x02, 0x5c7: 0xd4,
-	0x5c8: 0xd3, 0x5c9: 0xd3, 0x5ca: 0xd3, 0x5cb: 0xd3, 0x5cc: 0xd3, 0x5cd: 0xd3, 0x5ce: 0xd3, 0x5cf: 0xd3,
-	0x5d0: 0xd3, 0x5d1: 0xd3, 0x5d2: 0xd3, 0x5d3: 0xd3, 0x5d4: 0xd3, 0x5d5: 0xd3, 0x5d6: 0xd3, 0x5d7: 0xd3,
-	0x5d8: 0xd3, 0x5d9: 0xd3, 0x5da: 0xd3, 0x5db: 0xd3, 0x5dc: 0xd3, 0x5dd: 0xd3, 0x5de: 0xd3, 0x5df: 0xd3,
-	0x5e0: 0xd3, 0x5e1: 0xd3, 0x5e2: 0xd3, 0x5e3: 0xd3, 0x5e4: 0xd3, 0x5e5: 0xd3, 0x5e6: 0xd3, 0x5e7: 0xd3,
-	0x5e8: 0xd3, 0x5e9: 0xd3, 0x5ea: 0xd3, 0x5eb: 0xd3, 0x5ec: 0xd3, 0x5ed: 0xd3, 0x5ee: 0xd3, 0x5ef: 0xd3,
-	0x5f0: 0xd3, 0x5f1: 0xd3, 0x5f2: 0xd3, 0x5f3: 0xd3, 0x5f4: 0xd3, 0x5f5: 0xd3, 0x5f6: 0xd3, 0x5f7: 0xd3,
-	0x5f8: 0xd3, 0x5f9: 0xd3, 0x5fa: 0xd3, 0x5fb: 0xd3, 0x5fc: 0xd3, 0x5fd: 0xd3, 0x5fe: 0xd3, 0x5ff: 0xd3,
-	// Block 0x18, offset 0x600
-	0x620: 0x15,
-}

+ 0 - 100
v4/vendor/github.com/clipperhouse/uax29/v2/internal/iterators/iterator.go

@@ -1,100 +0,0 @@
-package iterators
-
-import "github.com/clipperhouse/stringish"
-
-type SplitFunc[T stringish.Interface] func(T, bool) (int, T, error)
-
-// Iterator is a generic iterator for words that are either []byte or string.
-// Iterate while Next() is true, and access the word via Value().
-type Iterator[T stringish.Interface] struct {
-	split SplitFunc[T]
-	data  T
-	start int
-	pos   int
-}
-
-// New creates a new Iterator for the given data and SplitFunc.
-func New[T stringish.Interface](split SplitFunc[T], data T) *Iterator[T] {
-	return &Iterator[T]{
-		split: split,
-		data:  data,
-	}
-}
-
-// SetText sets the text for the iterator to operate on, and resets all state.
-func (iter *Iterator[T]) SetText(data T) {
-	iter.data = data
-	iter.start = 0
-	iter.pos = 0
-}
-
-// Split sets the SplitFunc for the Iterator.
-func (iter *Iterator[T]) Split(split SplitFunc[T]) {
-	iter.split = split
-}
-
-// Next advances the iterator to the next token. It returns false when there
-// are no remaining tokens or an error occurred.
-func (iter *Iterator[T]) Next() bool {
-	if iter.pos == len(iter.data) {
-		return false
-	}
-	if iter.pos > len(iter.data) {
-		panic("SplitFunc advanced beyond the end of the data")
-	}
-
-	iter.start = iter.pos
-
-	advance, _, err := iter.split(iter.data[iter.pos:], true)
-	if err != nil {
-		panic(err)
-	}
-	if advance <= 0 {
-		panic("SplitFunc returned a zero or negative advance")
-	}
-
-	iter.pos += advance
-	if iter.pos > len(iter.data) {
-		panic("SplitFunc advanced beyond the end of the data")
-	}
-
-	return true
-}
-
-// Value returns the current token.
-func (iter *Iterator[T]) Value() T {
-	return iter.data[iter.start:iter.pos]
-}
-
-// Start returns the byte position of the current token in the original data.
-func (iter *Iterator[T]) Start() int {
-	return iter.start
-}
-
-// End returns the byte position after the current token in the original data.
-func (iter *Iterator[T]) End() int {
-	return iter.pos
-}
-
-// Reset resets the iterator to the beginning of the data.
-func (iter *Iterator[T]) Reset() {
-	iter.start = 0
-	iter.pos = 0
-}
-
-func (iter *Iterator[T]) First() T {
-	if len(iter.data) == 0 {
-		return iter.data
-	}
-	advance, _, err := iter.split(iter.data, true)
-	if err != nil {
-		panic(err)
-	}
-	if advance <= 0 {
-		panic("SplitFunc returned a zero or negative advance")
-	}
-	if advance > len(iter.data) {
-		panic("SplitFunc advanced beyond the end of the data")
-	}
-	return iter.data[:advance]
-}

+ 1 - 0
v4/vendor/github.com/ebitengine/purego/.gitignore

@@ -0,0 +1 @@
+*~

+ 201 - 0
v4/vendor/github.com/ebitengine/purego/LICENSE

@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

+ 119 - 0
v4/vendor/github.com/ebitengine/purego/README.md

@@ -0,0 +1,119 @@
+# purego
+[![Go Reference](https://pkg.go.dev/badge/github.com/ebitengine/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/ebitengine/purego?GOOS=darwin)
+
+A library for calling C functions from Go without Cgo.
+
+> This is beta software so expect bugs and potentially API breaking changes
+> but each release will be tagged to avoid breaking people's code.
+> Bug reports are encouraged.
+
+## Motivation
+
+The [Ebitengine](https://github.com/hajimehoshi/ebiten) game engine was ported to use only Go on Windows. This enabled
+cross-compiling to Windows from any other operating system simply by setting `GOOS=windows`. The purego project was
+born to bring that same vision to the other platforms supported by Ebitengine.
+
+## Benefits
+
+- **Simple Cross-Compilation**: No C means you can build for other platforms easily without a C compiler.
+- **Faster Compilation**: Efficiently cache your entirely Go builds.
+- **Smaller Binaries**: Using Cgo generates a C wrapper function for each C function called. Purego doesn't!
+- **Dynamic Linking**: Load symbols at runtime and use it as a plugin system.
+- **Foreign Function Interface**: Call into other languages that are compiled into shared objects.
+- **Cgo Fallback**: Works even with CGO_ENABLED=1 so incremental porting is possible. 
+This also means unsupported GOARCHs (freebsd/riscv64, linux/mips, etc.) will still work
+except for float arguments and return values.
+
+## Supported Platforms
+
+### Tier 1
+
+Tier 1 platforms are the primary targets officially supported by PureGo. When a new version of PureGo is released, any critical bugs found on Tier 1 platforms are treated as release blockers. The release will be postponed until such issues are resolved.
+
+- **Android**: amd64<sup>1</sup>, arm64<sup>1</sup>
+- **iOS**: amd64<sup>1</sup>, arm64<sup>1</sup>
+- **Linux**: amd64, arm64
+- **macOS**: amd64, arm64
+- **Windows**: amd64, arm64
+
+### Tier 2
+
+Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs on Tier 2 platforms do not block new PureGo releases. However, fixes contributed by external contributors are very welcome and encouraged.
+
+- **Android**: 386<sup>1</sup>, arm<sup>1</sup>
+- **FreeBSD**: amd64<sup>2</sup>, arm64<sup>2</sup>
+- **Linux**: 386, arm, loong64, ppc64le, riscv64, s390x<sup>1</sup>
+- **Windows**: 386<sup>3</sup>, arm<sup>3,4</sup>
+
+#### Support Notes
+
+1. These architectures require CGO_ENABLED=1 to compile
+2. These architectures require the special flag `-gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
+3. These architectures only support `SyscallN` and `NewCallback`
+4. These architectures are no longer supported as of Go 1.26
+
+## Example
+
+The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can
+be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
+
+```go
+package main
+
+import (
+	"fmt"
+	"runtime"
+
+	"github.com/ebitengine/purego"
+)
+
+func getSystemLibrary() string {
+	switch runtime.GOOS {
+	case "darwin":
+		return "/usr/lib/libSystem.B.dylib"
+	case "linux":
+		return "libc.so.6"
+	default:
+		panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS))
+	}
+}
+
+func main() {
+	libc, err := purego.Dlopen(getSystemLibrary(), purego.RTLD_NOW|purego.RTLD_GLOBAL)
+	if err != nil {
+		panic(err)
+	}
+	var puts func(string)
+	purego.RegisterLibFunc(&puts, libc, "puts")
+	puts("Calling C from Go without Cgo!")
+}
+```
+
+Then to run: `CGO_ENABLED=0 go run main.go`
+
+## Questions
+
+If you have questions about how to incorporate purego in your project or want to discuss
+how it works join the [Discord](https://discord.gg/HzGZVD6BkY)!
+
+### External Code
+
+Purego uses code that originates from the Go runtime. These files are under the BSD-3
+License that can be found [in the Go Source](https://github.com/golang/go/blob/master/LICENSE).
+This is a list of the copied files:
+
+* `abi_*.h` from package `runtime/cgo`
+* `wincallback.go` from package `runtime`
+* `zcallback_darwin_*.s` from package `runtime`
+* `internal/fakecgo/abi_*.h` from package `runtime/cgo`
+* `internal/fakecgo/asm_GOARCH.s` from package `runtime/cgo`
+* `internal/fakecgo/callbacks.go` from package `runtime/cgo`
+* `internal/fakecgo/iscgo.go` from package `runtime/cgo`
+* `internal/fakecgo/setenv.go` from package `runtime/cgo`
+* `internal/fakecgo/freebsd.go` from package `runtime/cgo`
+* `internal/fakecgo/netbsd.go` from package `runtime/cgo`
+
+The `internal/fakecgo/go_GOOS.go` files were modified from `runtime/cgo/gcc_GOOS_GOARCH.go`.
+
+The files `abi_*.h` and `internal/fakecgo/abi_*.h` are the same because Bazel does not support cross-package use of
+`#include` so we need each one once per package. (cf. [issue](https://github.com/bazelbuild/rules_go/issues/3636))

+ 99 - 0
v4/vendor/github.com/ebitengine/purego/abi_amd64.h

@@ -0,0 +1,99 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI0.
+//
+// These save the frame pointer, so in general, functions that use
+// these should have zero frame size to suppress the automatic frame
+// pointer, though it's harmless to not do this.
+
+#ifdef GOOS_windows
+
+// REGS_HOST_TO_ABI0_STACK is the stack bytes used by
+// PUSH_REGS_HOST_TO_ABI0.
+#define REGS_HOST_TO_ABI0_STACK (28*8 + 8)
+
+// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from
+// the host ABI to Go ABI0 code. It saves all registers that are
+// callee-save in the host ABI and caller-save in Go ABI0 and prepares
+// for entry to Go.
+//
+// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag.
+// Clear the DF flag for the Go ABI.
+// MXCSR matches the Go ABI, so we don't have to set that,
+// and Go doesn't modify it, so we don't have to save it.
+#define PUSH_REGS_HOST_TO_ABI0()	\
+	PUSHFQ			\
+	CLD			\
+	ADJSP	$(REGS_HOST_TO_ABI0_STACK - 8)	\
+	MOVQ	DI, (0*0)(SP)	\
+	MOVQ	SI, (1*8)(SP)	\
+	MOVQ	BP, (2*8)(SP)	\
+	MOVQ	BX, (3*8)(SP)	\
+	MOVQ	R12, (4*8)(SP)	\
+	MOVQ	R13, (5*8)(SP)	\
+	MOVQ	R14, (6*8)(SP)	\
+	MOVQ	R15, (7*8)(SP)	\
+	MOVUPS	X6, (8*8)(SP)	\
+	MOVUPS	X7, (10*8)(SP)	\
+	MOVUPS	X8, (12*8)(SP)	\
+	MOVUPS	X9, (14*8)(SP)	\
+	MOVUPS	X10, (16*8)(SP)	\
+	MOVUPS	X11, (18*8)(SP)	\
+	MOVUPS	X12, (20*8)(SP)	\
+	MOVUPS	X13, (22*8)(SP)	\
+	MOVUPS	X14, (24*8)(SP)	\
+	MOVUPS	X15, (26*8)(SP)
+
+#define POP_REGS_HOST_TO_ABI0()	\
+	MOVQ	(0*0)(SP), DI	\
+	MOVQ	(1*8)(SP), SI	\
+	MOVQ	(2*8)(SP), BP	\
+	MOVQ	(3*8)(SP), BX	\
+	MOVQ	(4*8)(SP), R12	\
+	MOVQ	(5*8)(SP), R13	\
+	MOVQ	(6*8)(SP), R14	\
+	MOVQ	(7*8)(SP), R15	\
+	MOVUPS	(8*8)(SP), X6	\
+	MOVUPS	(10*8)(SP), X7	\
+	MOVUPS	(12*8)(SP), X8	\
+	MOVUPS	(14*8)(SP), X9	\
+	MOVUPS	(16*8)(SP), X10	\
+	MOVUPS	(18*8)(SP), X11	\
+	MOVUPS	(20*8)(SP), X12	\
+	MOVUPS	(22*8)(SP), X13	\
+	MOVUPS	(24*8)(SP), X14	\
+	MOVUPS	(26*8)(SP), X15	\
+	ADJSP	$-(REGS_HOST_TO_ABI0_STACK - 8)	\
+	POPFQ
+
+#else
+// SysV ABI
+
+#define REGS_HOST_TO_ABI0_STACK (6*8)
+
+// SysV MXCSR matches the Go ABI, so we don't have to set that,
+// and Go doesn't modify it, so we don't have to save it.
+// Both SysV and Go require DF to be cleared, so that's already clear.
+// The SysV and Go frame pointer conventions are compatible.
+#define PUSH_REGS_HOST_TO_ABI0()	\
+	ADJSP	$(REGS_HOST_TO_ABI0_STACK)	\
+	MOVQ	BP, (5*8)(SP)	\
+	LEAQ	(5*8)(SP), BP	\
+	MOVQ	BX, (0*8)(SP)	\
+	MOVQ	R12, (1*8)(SP)	\
+	MOVQ	R13, (2*8)(SP)	\
+	MOVQ	R14, (3*8)(SP)	\
+	MOVQ	R15, (4*8)(SP)
+
+#define POP_REGS_HOST_TO_ABI0()	\
+	MOVQ	(0*8)(SP), BX	\
+	MOVQ	(1*8)(SP), R12	\
+	MOVQ	(2*8)(SP), R13	\
+	MOVQ	(3*8)(SP), R14	\
+	MOVQ	(4*8)(SP), R15	\
+	MOVQ	(5*8)(SP), BP	\
+	ADJSP	$-(REGS_HOST_TO_ABI0_STACK)
+
+#endif

+ 39 - 0
v4/vendor/github.com/ebitengine/purego/abi_arm64.h

@@ -0,0 +1,39 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI0.
+//
+// These macros save and restore the callee-saved registers
+// from the stack, but they don't adjust stack pointer, so
+// the user should prepare stack space in advance.
+// SAVE_R19_TO_R28(offset) saves R19 ~ R28 to the stack space
+// of ((offset)+0*8)(RSP) ~ ((offset)+9*8)(RSP).
+//
+// SAVE_F8_TO_F15(offset) saves F8 ~ F15 to the stack space
+// of ((offset)+0*8)(RSP) ~ ((offset)+7*8)(RSP).
+//
+// R29 is not saved because Go will save and restore it.
+
+#define SAVE_R19_TO_R28(offset) \
+	STP	(R19, R20), ((offset)+0*8)(RSP) \
+	STP	(R21, R22), ((offset)+2*8)(RSP) \
+	STP	(R23, R24), ((offset)+4*8)(RSP) \
+	STP	(R25, R26), ((offset)+6*8)(RSP) \
+	STP	(R27, g), ((offset)+8*8)(RSP)
+#define RESTORE_R19_TO_R28(offset) \
+	LDP	((offset)+0*8)(RSP), (R19, R20) \
+	LDP	((offset)+2*8)(RSP), (R21, R22) \
+	LDP	((offset)+4*8)(RSP), (R23, R24) \
+	LDP	((offset)+6*8)(RSP), (R25, R26) \
+	LDP	((offset)+8*8)(RSP), (R27, g) /* R28 */
+#define SAVE_F8_TO_F15(offset) \
+	FSTPD	(F8, F9), ((offset)+0*8)(RSP) \
+	FSTPD	(F10, F11), ((offset)+2*8)(RSP) \
+	FSTPD	(F12, F13), ((offset)+4*8)(RSP) \
+	FSTPD	(F14, F15), ((offset)+6*8)(RSP)
+#define RESTORE_F8_TO_F15(offset) \
+	FLDPD	((offset)+0*8)(RSP), (F8, F9) \
+	FLDPD	((offset)+2*8)(RSP), (F10, F11) \
+	FLDPD	((offset)+4*8)(RSP), (F12, F13) \
+	FLDPD	((offset)+6*8)(RSP), (F14, F15)

+ 60 - 0
v4/vendor/github.com/ebitengine/purego/abi_loong64.h

@@ -0,0 +1,60 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI0.
+//
+// These macros save and restore the callee-saved registers
+// from the stack, but they don't adjust stack pointer, so
+// the user should prepare stack space in advance.
+// SAVE_R22_TO_R31(offset) saves R22 ~ R31 to the stack space
+// of ((offset)+0*8)(R3) ~ ((offset)+9*8)(R3).
+//
+// SAVE_F24_TO_F31(offset) saves F24 ~ F31 to the stack space
+// of ((offset)+0*8)(R3) ~ ((offset)+7*8)(R3).
+//
+// Note: g is R22
+
+#define SAVE_R22_TO_R31(offset)	\
+	MOVV	g,   ((offset)+(0*8))(R3)	\
+	MOVV	R23, ((offset)+(1*8))(R3)	\
+	MOVV	R24, ((offset)+(2*8))(R3)	\
+	MOVV	R25, ((offset)+(3*8))(R3)	\
+	MOVV	R26, ((offset)+(4*8))(R3)	\
+	MOVV	R27, ((offset)+(5*8))(R3)	\
+	MOVV	R28, ((offset)+(6*8))(R3)	\
+	MOVV	R29, ((offset)+(7*8))(R3)	\
+	MOVV	R30, ((offset)+(8*8))(R3)	\
+	MOVV	R31, ((offset)+(9*8))(R3)
+
+#define SAVE_F24_TO_F31(offset)	\
+	MOVD	F24, ((offset)+(0*8))(R3)	\
+	MOVD	F25, ((offset)+(1*8))(R3)	\
+	MOVD	F26, ((offset)+(2*8))(R3)	\
+	MOVD	F27, ((offset)+(3*8))(R3)	\
+	MOVD	F28, ((offset)+(4*8))(R3)	\
+	MOVD	F29, ((offset)+(5*8))(R3)	\
+	MOVD	F30, ((offset)+(6*8))(R3)	\
+	MOVD	F31, ((offset)+(7*8))(R3)
+
+#define RESTORE_R22_TO_R31(offset)	\
+	MOVV	((offset)+(0*8))(R3),  g	\
+	MOVV	((offset)+(1*8))(R3), R23	\
+	MOVV	((offset)+(2*8))(R3), R24	\
+	MOVV	((offset)+(3*8))(R3), R25	\
+	MOVV	((offset)+(4*8))(R3), R26	\
+	MOVV	((offset)+(5*8))(R3), R27	\
+	MOVV	((offset)+(6*8))(R3), R28	\
+	MOVV	((offset)+(7*8))(R3), R29	\
+	MOVV	((offset)+(8*8))(R3), R30	\
+	MOVV	((offset)+(9*8))(R3), R31
+
+#define RESTORE_F24_TO_F31(offset)	\
+	MOVD	((offset)+(0*8))(R3), F24	\
+	MOVD	((offset)+(1*8))(R3), F25	\
+	MOVD	((offset)+(2*8))(R3), F26	\
+	MOVD	((offset)+(3*8))(R3), F27	\
+	MOVD	((offset)+(4*8))(R3), F28	\
+	MOVD	((offset)+(5*8))(R3), F29	\
+	MOVD	((offset)+(6*8))(R3), F30	\
+	MOVD	((offset)+(7*8))(R3), F31

+ 19 - 0
v4/vendor/github.com/ebitengine/purego/cgo.go

@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build cgo && (darwin || freebsd || linux || netbsd)
+
+package purego
+
+// if CGO_ENABLED=1 import the Cgo runtime to ensure that it is set up properly.
+// This is required since some frameworks need TLS setup the C way which Go doesn't do.
+// We currently don't support ios in fakecgo mode so force Cgo or fail.
+// Even if CGO_ENABLED=1 the Cgo runtime is not imported unless `import "C"` is used,
+// which will import this package automatically. Normally this isn't an issue since it
+// usually isn't possible to call into C without using that import. However, with purego
+// it is since we don't use `import "C"`!
+import (
+	_ "runtime/cgo"
+
+	_ "github.com/ebitengine/purego/internal/cgo"
+)

+ 17 - 0
v4/vendor/github.com/ebitengine/purego/dlerror.go

@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2023 The Ebitengine Authors
+
+//go:build darwin || freebsd || linux || netbsd
+
+package purego
+
+// Dlerror represents an error value returned from Dlopen, Dlsym, or Dlclose.
+//
+// This type is not available on Windows as there is no counterpart to it on Windows.
+type Dlerror struct {
+	s string
+}
+
+func (e Dlerror) Error() string {
+	return e.s
+}

+ 99 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn.go

@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build (darwin || freebsd || linux || netbsd) && !android && !faketime
+
+package purego
+
+import (
+	"unsafe"
+)
+
+// Unix Specification for dlfcn.h: https://pubs.opengroup.org/onlinepubs/7908799/xsh/dlfcn.h.html
+
+var (
+	fnDlopen  func(path string, mode int) uintptr
+	fnDlsym   func(handle uintptr, name string) uintptr
+	fnDlerror func() string
+	fnDlclose func(handle uintptr) bool
+)
+
+func init() {
+	RegisterFunc(&fnDlopen, dlopenABI0)
+	RegisterFunc(&fnDlsym, dlsymABI0)
+	RegisterFunc(&fnDlerror, dlerrorABI0)
+	RegisterFunc(&fnDlclose, dlcloseABI0)
+}
+
+// Dlopen examines the dynamic library or bundle file specified by path. If the file is compatible
+// with the current process and has not already been loaded into the
+// current process, it is loaded and linked. After being linked, if it contains
+// any initializer functions, they are called, before Dlopen
+// returns. It returns a handle that can be used with Dlsym and Dlclose.
+// A second call to Dlopen with the same path will return the same handle, but the internal
+// reference count for the handle will be incremented. Therefore, all
+// Dlopen calls should be balanced with a Dlclose call.
+//
+// This function is not available on Windows.
+// Use [golang.org/x/sys/windows.LoadLibrary], [golang.org/x/sys/windows.LoadLibraryEx],
+// [golang.org/x/sys/windows.NewLazyDLL], or [golang.org/x/sys/windows.NewLazySystemDLL] for Windows instead.
+func Dlopen(path string, mode int) (uintptr, error) {
+	u := fnDlopen(path, mode)
+	if u == 0 {
+		return 0, Dlerror{fnDlerror()}
+	}
+	return u, nil
+}
+
+// Dlsym takes a "handle" of a dynamic library returned by Dlopen and the symbol name.
+// It returns the address where that symbol is loaded into memory. If the symbol is not found,
+// in the specified library or any of the libraries that were automatically loaded by Dlopen
+// when that library was loaded, Dlsym returns zero.
+//
+// This function is not available on Windows.
+// Use [golang.org/x/sys/windows.GetProcAddress] for Windows instead.
+func Dlsym(handle uintptr, name string) (uintptr, error) {
+	u := fnDlsym(handle, name)
+	if u == 0 {
+		return 0, Dlerror{fnDlerror()}
+	}
+	return u, nil
+}
+
+// Dlclose decrements the reference count on the dynamic library handle.
+// If the reference count drops to zero and no other loaded libraries
+// use symbols in it, then the dynamic library is unloaded.
+//
+// This function is not available on Windows.
+// Use [golang.org/x/sys/windows.FreeLibrary] for Windows instead.
+func Dlclose(handle uintptr) error {
+	if fnDlclose(handle) {
+		return Dlerror{fnDlerror()}
+	}
+	return nil
+}
+
+func loadSymbol(handle uintptr, name string) (uintptr, error) {
+	return Dlsym(handle, name)
+}
+
+// these functions exist in dlfcn_stubs.s and are calling C functions linked to in dlfcn_GOOS.go
+// the indirection is necessary because a function is actually a pointer to the pointer to the code.
+// sadly, I do not know of anyway to remove the assembly stubs entirely because //go:linkname doesn't
+// appear to work if you link directly to the C function on darwin arm64.
+
+//go:linkname dlopen dlopen
+var dlopen uint8
+var dlopenABI0 = uintptr(unsafe.Pointer(&dlopen))
+
+//go:linkname dlsym dlsym
+var dlsym uint8
+var dlsymABI0 = uintptr(unsafe.Pointer(&dlsym))
+
+//go:linkname dlclose dlclose
+var dlclose uint8
+var dlcloseABI0 = uintptr(unsafe.Pointer(&dlclose))
+
+//go:linkname dlerror dlerror
+var dlerror uint8
+var dlerrorABI0 = uintptr(unsafe.Pointer(&dlerror))

+ 34 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_android.go

@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
+
+package purego
+
+import "github.com/ebitengine/purego/internal/cgo"
+
+// Source for constants: https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/dlfcn.h
+
+const (
+	is64bit      = 1 << (^uintptr(0) >> 63) / 2
+	is32bit      = 1 - is64bit
+	RTLD_DEFAULT = is32bit * 0xffffffff
+	RTLD_LAZY    = 0x00000001
+	RTLD_NOW     = is64bit * 0x00000002
+	RTLD_LOCAL   = 0x00000000
+	RTLD_GLOBAL  = is64bit*0x00100 | is32bit*0x00000002
+)
+
+func Dlopen(path string, mode int) (uintptr, error) {
+	return cgo.Dlopen(path, mode)
+}
+
+func Dlsym(handle uintptr, name string) (uintptr, error) {
+	return cgo.Dlsym(handle, name)
+}
+
+func Dlclose(handle uintptr) error {
+	return cgo.Dlclose(handle)
+}
+
+func loadSymbol(handle uintptr, name string) (uintptr, error) {
+	return Dlsym(handle, name)
+}

+ 20 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_darwin.go

@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+package purego
+
+// Source for constants: https://opensource.apple.com/source/dyld/dyld-360.14/include/dlfcn.h.auto.html
+
+const (
+	RTLD_DEFAULT = 1<<64 - 2 // Pseudo-handle for dlsym so search for any loaded symbol
+	RTLD_LAZY    = 0x1       // Relocations are performed at an implementation-dependent time.
+	RTLD_NOW     = 0x2       // Relocations are performed when the object is loaded.
+	RTLD_LOCAL   = 0x4       // All symbols are not made available for relocation processing by other modules.
+	RTLD_GLOBAL  = 0x8       // All symbols are available for relocation processing of other modules.
+)
+
+//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic purego_error __error "/usr/lib/libSystem.B.dylib"

+ 14 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go

@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+package purego
+
+// Constants as defined in https://github.com/freebsd/freebsd-src/blob/main/include/dlfcn.h
+const (
+	intSize      = 32 << (^uint(0) >> 63) // 32 or 64
+	RTLD_DEFAULT = 1<<intSize - 2         // Pseudo-handle for dlsym so search for any loaded symbol
+	RTLD_LAZY    = 0x00000001             // Relocations are performed at an implementation-dependent time.
+	RTLD_NOW     = 0x00000002             // Relocations are performed when the object is loaded.
+	RTLD_LOCAL   = 0x00000000             // All symbols are not made available for relocation processing by other modules.
+	RTLD_GLOBAL  = 0x00000100             // All symbols are available for relocation processing of other modules.
+)

+ 16 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_linux.go

@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !android
+
+package purego
+
+// Source for constants: https://codebrowser.dev/glibc/glibc/bits/dlfcn.h.html
+
+const (
+	RTLD_DEFAULT = 0x00000 // Pseudo-handle for dlsym so search for any loaded symbol
+	RTLD_LAZY    = 0x00001 // Relocations are performed at an implementation-dependent time.
+	RTLD_NOW     = 0x00002 // Relocations are performed when the object is loaded.
+	RTLD_LOCAL   = 0x00000 // All symbols are not made available for relocation processing by other modules.
+	RTLD_GLOBAL  = 0x00100 // All symbols are available for relocation processing of other modules.
+)

+ 15 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_netbsd.go

@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
+
+package purego
+
+// Source for constants: https://github.com/NetBSD/src/blob/trunk/include/dlfcn.h
+
+const (
+	intSize      = 32 << (^uint(0) >> 63) // 32 or 64
+	RTLD_DEFAULT = 1<<intSize - 2         // Pseudo-handle for dlsym so search for any loaded symbol
+	RTLD_LAZY    = 0x00000001             // Relocations are performed at an implementation-dependent time.
+	RTLD_NOW     = 0x00000002             // Relocations are performed when the object is loaded.
+	RTLD_LOCAL   = 0x00000000             // All symbols are not made available for relocation processing by other modules.
+	RTLD_GLOBAL  = 0x00000100             // All symbols are available for relocation processing of other modules.
+)

+ 11 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_nocgo_freebsd.go

@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo
+
+package purego
+
+//go:cgo_import_dynamic purego_dlopen dlopen "libc.so.7"
+//go:cgo_import_dynamic purego_dlsym dlsym "libc.so.7"
+//go:cgo_import_dynamic purego_dlerror dlerror "libc.so.7"
+//go:cgo_import_dynamic purego_dlclose dlclose "libc.so.7"

+ 19 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_nocgo_linux.go

@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && !faketime
+
+package purego
+
+// if there is no Cgo we must link to each of the functions from dlfcn.h
+// then the functions are called inside dlfcn_stubs.s
+
+//go:cgo_import_dynamic purego_dlopen dlopen "libdl.so.2"
+//go:cgo_import_dynamic purego_dlsym dlsym "libdl.so.2"
+//go:cgo_import_dynamic purego_dlerror dlerror "libdl.so.2"
+//go:cgo_import_dynamic purego_dlclose dlclose "libdl.so.2"
+
+// on amd64 we don't need the following line - on 386 we do...
+// anyway - with those lines the output is better (but doesn't matter) - without it on amd64 we get multiple DT_NEEDED with "libc.so.6" etc
+
+//go:cgo_import_dynamic _ _ "libdl.so.2"

+ 9 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_nocgo_netbsd.go

@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
+
+package purego
+
+//go:cgo_import_dynamic purego_dlopen dlopen "libc.so"
+//go:cgo_import_dynamic purego_dlsym dlsym "libc.so"
+//go:cgo_import_dynamic purego_dlerror dlerror "libc.so"
+//go:cgo_import_dynamic purego_dlclose dlclose "libc.so"

+ 24 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_playground.go

@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
+
+//go:build faketime
+
+package purego
+
+import "errors"
+
+func Dlopen(path string, mode int) (uintptr, error) {
+	return 0, errors.New("Dlopen is not supported in the playground")
+}
+
+func Dlsym(handle uintptr, name string) (uintptr, error) {
+	return 0, errors.New("Dlsym is not supported in the playground")
+}
+
+func Dlclose(handle uintptr) error {
+	return errors.New("Dlclose is not supported in the playground")
+}
+
+func loadSymbol(handle uintptr, name string) (uintptr, error) {
+	return Dlsym(handle, name)
+}

+ 22 - 0
v4/vendor/github.com/ebitengine/purego/dlfcn_stubs.s

@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build darwin || !cgo && (freebsd || linux || netbsd) && !faketime
+
+#include "textflag.h"
+
+// func dlopen(path *byte, mode int) (ret uintptr)
+TEXT dlopen(SB), NOSPLIT|NOFRAME, $0-0
+	JMP purego_dlopen(SB)
+
+// func dlsym(handle uintptr, symbol *byte) (ret uintptr)
+TEXT dlsym(SB), NOSPLIT|NOFRAME, $0-0
+	JMP purego_dlsym(SB)
+
+// func dlerror() (ret *byte)
+TEXT dlerror(SB), NOSPLIT|NOFRAME, $0-0
+	JMP purego_dlerror(SB)
+
+// func dlclose(handle uintptr) (ret int)
+TEXT dlclose(SB), NOSPLIT|NOFRAME, $0-0
+	JMP purego_dlclose(SB)

+ 571 - 0
v4/vendor/github.com/ebitengine/purego/func.go

@@ -0,0 +1,571 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build darwin || freebsd || linux || netbsd || windows
+
+package purego
+
+import (
+	"fmt"
+	"math"
+	"reflect"
+	"runtime"
+	"sync"
+	"unsafe"
+
+	"github.com/ebitengine/purego/internal/strings"
+	"github.com/ebitengine/purego/internal/xreflect"
+)
+
+const (
+	align8ByteMask = 7 // Mask for 8-byte alignment: (val + 7) &^ 7
+	align8ByteSize = 8 // 8-byte alignment boundary
+)
+
+var thePool = sync.Pool{New: func() any {
+	return new(syscall15Args)
+}}
+
+// RegisterLibFunc is a wrapper around RegisterFunc that uses the C function returned from Dlsym(handle, name).
+// It panics if it can't find the name symbol.
+func RegisterLibFunc(fptr any, handle uintptr, name string) {
+	sym, err := loadSymbol(handle, name)
+	if err != nil {
+		panic(err)
+	}
+	RegisterFunc(fptr, sym)
+}
+
+// RegisterFunc takes a pointer to a Go function representing the calling convention of the C function.
+// fptr will be set to a function that when called will call the C function given by cfn with the
+// parameters passed in the correct registers and stack.
+//
+// A panic is produced if the type is not a function pointer or if the function returns more than 1 value.
+//
+// These conversions describe how a Go type in the fptr will be used to call
+// the C function. It is important to note that there is no way to verify that fptr
+// matches the C function. This also holds true for struct types where the padding
+// needs to be ensured to match that of C; RegisterFunc does not verify this.
+//
+// # Type Conversions (Go <=> C)
+//
+//	string <=> char*
+//	bool <=> _Bool
+//	uintptr <=> uintptr_t
+//	uint <=> uint32_t or uint64_t
+//	uint8 <=> uint8_t
+//	uint16 <=> uint16_t
+//	uint32 <=> uint32_t
+//	uint64 <=> uint64_t
+//	int <=> int32_t or int64_t
+//	int8 <=> int8_t
+//	int16 <=> int16_t
+//	int32 <=> int32_t
+//	int64 <=> int64_t
+//	float32 <=> float
+//	float64 <=> double
+//	struct <=> struct (darwin amd64/arm64, linux amd64/arm64)
+//	func <=> C function
+//	unsafe.Pointer, *T <=> void*
+//	[]T => void*
+//
+// There is a special case when the last argument of fptr is a variadic interface (or []interface}
+// it will be expanded into a call to the C function as if it had the arguments in that slice.
+// This means that using arg ...any is like a cast to the function with the arguments inside arg.
+// This is not the same as C variadic.
+//
+// # Memory
+//
+// In general it is not possible for purego to guarantee the lifetimes of objects returned or received from
+// calling functions using RegisterFunc. For arguments to a C function it is important that the C function doesn't
+// hold onto a reference to Go memory. This is the same as the [Cgo rules].
+//
+// However, there are some special cases. When passing a string as an argument if the string does not end in a null
+// terminated byte (\x00) then the string will be copied into memory maintained by purego. The memory is only valid for
+// that specific call. Therefore, if the C code keeps a reference to that string it may become invalid at some
+// undefined time. However, if the string does already contain a null-terminated byte then no copy is done.
+// It is then the responsibility of the caller to ensure the string stays alive as long as it's needed in C memory.
+// This can be done using runtime.KeepAlive or allocating the string in C memory using malloc. When a C function
+// returns a null-terminated pointer to char a Go string can be used. Purego will allocate a new string in Go memory
+// and copy the data over. This string will be garbage collected whenever Go decides it's no longer referenced.
+// This C created string will not be freed by purego. If the pointer to char is not null-terminated or must continue
+// to point to C memory (because it's a buffer for example) then use a pointer to byte and then convert that to a slice
+// using unsafe.Slice. Doing this means that it becomes the responsibility of the caller to care about the lifetime
+// of the pointer
+//
+// # Structs
+//
+// Purego can handle the most common structs that have fields of builtin types like int8, uint16, float32, etc. However,
+// it does not support aligning fields properly. It is therefore the responsibility of the caller to ensure
+// that all padding is added to the Go struct to match the C one. See `BoolStructFn` in struct_test.go for an example.
+//
+// On Darwin ARM64, purego handles proper alignment of struct arguments when passing them on the stack,
+// following the C ABI's byte-level packing rules.
+//
+// # Example
+//
+// All functions below call this C function:
+//
+//	char *foo(char *str);
+//
+//	// Let purego convert types
+//	var foo func(s string) string
+//	goString := foo("copied")
+//	// Go will garbage collect this string
+//
+//	// Manually, handle allocations
+//	var foo2 func(b string) *byte
+//	mustFree := foo2("not copied\x00")
+//	defer free(mustFree)
+//
+// [Cgo rules]: https://pkg.go.dev/cmd/cgo#hdr-Go_references_to_C
+func RegisterFunc(fptr any, cfn uintptr) {
+	const is32bit = unsafe.Sizeof(uintptr(0)) == 4
+	fn := reflect.ValueOf(fptr).Elem()
+	ty := fn.Type()
+	if ty.Kind() != reflect.Func {
+		panic("purego: fptr must be a function pointer")
+	}
+	if ty.NumOut() > 1 {
+		panic("purego: function can only return zero or one values")
+	}
+	if cfn == 0 {
+		panic("purego: cfn is nil")
+	}
+	if ty.NumOut() == 1 && (ty.Out(0).Kind() == reflect.Float32 || ty.Out(0).Kind() == reflect.Float64) &&
+		runtime.GOARCH != "arm" && runtime.GOARCH != "arm64" && runtime.GOARCH != "386" && runtime.GOARCH != "amd64" && runtime.GOARCH != "loong64" && runtime.GOARCH != "ppc64le" && runtime.GOARCH != "riscv64" && runtime.GOARCH != "s390x" {
+		panic("purego: float returns are not supported")
+	}
+	{
+		// this code checks how many registers and stack this function will use
+		// to avoid crashing with too many arguments
+		var ints int
+		var floats int
+		var stack int
+		for i := 0; i < ty.NumIn(); i++ {
+			arg := ty.In(i)
+			switch arg.Kind() {
+			case reflect.Func:
+				// This only does preliminary testing to ensure the CDecl argument
+				// is the first argument. Full testing is done when the callback is actually
+				// created in NewCallback.
+				for j := 0; j < arg.NumIn(); j++ {
+					in := arg.In(j)
+					if !in.AssignableTo(reflect.TypeOf(CDecl{})) {
+						continue
+					}
+					if j != 0 {
+						panic("purego: CDecl must be the first argument")
+					}
+				}
+			case reflect.String, reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
+				reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Ptr, reflect.UnsafePointer,
+				reflect.Slice, reflect.Bool:
+				if ints < numOfIntegerRegisters() {
+					ints++
+				} else {
+					stack++
+				}
+			case reflect.Float32, reflect.Float64:
+				if floats < numOfFloatRegisters() {
+					floats++
+				} else {
+					stack++
+				}
+			case reflect.Struct:
+				ensureStructSupportedForRegisterFunc()
+				if arg.Size() == 0 {
+					continue
+				}
+				addInt := func(u uintptr) {
+					ints++
+				}
+				addFloat := func(u uintptr) {
+					floats++
+				}
+				addStack := func(u uintptr) {
+					stack++
+				}
+				_ = addStruct(reflect.New(arg).Elem(), &ints, &floats, &stack, addInt, addFloat, addStack, nil)
+			default:
+				panic("purego: unsupported kind " + arg.Kind().String())
+			}
+		}
+		if ty.NumOut() == 1 && ty.Out(0).Kind() == reflect.Struct {
+			ensureStructSupportedForRegisterFunc()
+			outType := ty.Out(0)
+			checkStructFieldsSupported(outType)
+			if runtime.GOARCH == "amd64" && outType.Size() > maxRegAllocStructSize {
+				// on amd64 if struct is bigger than 16 bytes allocate the return struct
+				// and pass it in as a hidden first argument.
+				ints++
+			}
+		}
+
+		sizeOfStack := maxArgs - numOfIntegerRegisters()
+		// On Darwin ARM64, use byte-based validation since arguments pack efficiently.
+		// See https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
+		if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
+			stackBytes := estimateStackBytes(ty)
+			maxStackBytes := sizeOfStack * 8
+			if stackBytes > maxStackBytes {
+				panic("purego: too many stack arguments")
+			}
+		} else {
+			if stack > sizeOfStack {
+				panic("purego: too many stack arguments")
+			}
+		}
+	}
+
+	v := reflect.MakeFunc(ty, func(args []reflect.Value) (results []reflect.Value) {
+		var sysargs [maxArgs]uintptr
+		// Use maxArgs instead of numOfFloatRegisters() to keep this code path allocation-free,
+		// since numOfFloatRegisters() is a function call, not a constant.
+		// maxArgs is always greater than or equal to numOfFloatRegisters() so this is safe.
+		var floats [maxArgs]uintptr
+		var numInts int
+		var numFloats int
+		var numStack int
+		var addStack, addInt, addFloat func(x uintptr)
+		if runtime.GOARCH == "arm64" || runtime.GOOS != "windows" {
+			// Windows arm64 uses the same calling convention as macOS and Linux
+			addStack = func(x uintptr) {
+				sysargs[numOfIntegerRegisters()+numStack] = x
+				numStack++
+			}
+			addInt = func(x uintptr) {
+				if numInts >= numOfIntegerRegisters() {
+					addStack(x)
+				} else {
+					sysargs[numInts] = x
+					numInts++
+				}
+			}
+			addFloat = func(x uintptr) {
+				if numFloats < numOfFloatRegisters() {
+					floats[numFloats] = x
+					numFloats++
+				} else {
+					addStack(x)
+				}
+			}
+		} else {
+			// On Windows amd64 the arguments are passed in the numbered registered.
+			// So the first int is in the first integer register and the first float
+			// is in the second floating register if there is already a first int.
+			// This is in contrast to how macOS and Linux pass arguments which
+			// tries to use as many registers as possible in the calling convention.
+			addStack = func(x uintptr) {
+				sysargs[numStack] = x
+				numStack++
+			}
+			addInt = addStack
+			addFloat = addStack
+		}
+
+		var keepAlive []any
+		defer func() {
+			runtime.KeepAlive(keepAlive)
+			runtime.KeepAlive(args)
+		}()
+
+		var arm64_r8 uintptr
+		if ty.NumOut() == 1 && ty.Out(0).Kind() == reflect.Struct {
+			outType := ty.Out(0)
+			if (runtime.GOARCH == "amd64" || runtime.GOARCH == "loong64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "s390x") && outType.Size() > maxRegAllocStructSize {
+				val := reflect.New(outType)
+				keepAlive = append(keepAlive, val)
+				addInt(val.Pointer())
+			} else if runtime.GOARCH == "arm64" && outType.Size() > maxRegAllocStructSize {
+				isAllFloats, numFields := isAllSameFloat(outType)
+				if !isAllFloats || numFields > 4 {
+					val := reflect.New(outType)
+					keepAlive = append(keepAlive, val)
+					arm64_r8 = val.Pointer()
+				}
+			}
+		}
+		for i, v := range args {
+			if variadic, ok := xreflect.TypeAssert[[]any](args[i]); ok {
+				if i != len(args)-1 {
+					panic("purego: can only expand last parameter")
+				}
+				for _, x := range variadic {
+					keepAlive = addValue(reflect.ValueOf(x), keepAlive, addInt, addFloat, addStack, &numInts, &numFloats, &numStack)
+				}
+				continue
+			}
+			// Check if we need to start Darwin ARM64 C-style stack packing
+			if runtime.GOARCH == "arm64" && runtime.GOOS == "darwin" && shouldBundleStackArgs(v, numInts, numFloats) {
+				// Collect and separate remaining args into register vs stack
+				stackArgs, newKeepAlive := collectStackArgs(args, i, numInts, numFloats,
+					keepAlive, addInt, addFloat, addStack, &numInts, &numFloats, &numStack)
+				keepAlive = newKeepAlive
+
+				// Bundle stack arguments with C-style packing
+				bundleStackArgs(stackArgs, addStack)
+				break
+			}
+			keepAlive = addValue(v, keepAlive, addInt, addFloat, addStack, &numInts, &numFloats, &numStack)
+		}
+
+		syscall := thePool.Get().(*syscall15Args)
+		defer thePool.Put(syscall)
+
+		if runtime.GOARCH == "loong64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "s390x" {
+			syscall.Set(cfn, sysargs[:], floats[:], 0)
+			runtime_cgocall(syscall15XABI0, unsafe.Pointer(syscall))
+		} else if runtime.GOARCH == "arm64" || runtime.GOOS != "windows" {
+			// Use the normal arm64 calling convention even on Windows
+			syscall.Set(cfn, sysargs[:], floats[:], arm64_r8)
+			runtime_cgocall(syscall15XABI0, unsafe.Pointer(syscall))
+		} else {
+			*syscall = syscall15Args{}
+			// This is a fallback for Windows amd64, 386, and arm. Note this may not support floats
+			syscall.a1, syscall.a2, _ = syscall_syscall15X(cfn, sysargs[0], sysargs[1], sysargs[2], sysargs[3], sysargs[4],
+				sysargs[5], sysargs[6], sysargs[7], sysargs[8], sysargs[9], sysargs[10], sysargs[11],
+				sysargs[12], sysargs[13], sysargs[14])
+			syscall.f1 = syscall.a2 // on amd64 a2 stores the float return. On 32bit platforms floats aren't support
+		}
+		if ty.NumOut() == 0 {
+			return nil
+		}
+		outType := ty.Out(0)
+		v := reflect.New(outType).Elem()
+		switch outType.Kind() {
+		case reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+			v.SetUint(uint64(syscall.a1))
+		case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+			v.SetInt(int64(syscall.a1))
+		case reflect.Bool:
+			v.SetBool(byte(syscall.a1) != 0)
+		case reflect.UnsafePointer:
+			// We take the address and then dereference it to trick go vet from creating a possible miss-use of unsafe.Pointer
+			v.SetPointer(*(*unsafe.Pointer)(unsafe.Pointer(&syscall.a1)))
+		case reflect.Ptr:
+			v = reflect.NewAt(outType, unsafe.Pointer(&syscall.a1)).Elem()
+		case reflect.Func:
+			// wrap this C function in a nicely typed Go function
+			v = reflect.New(outType)
+			RegisterFunc(v.Interface(), syscall.a1)
+		case reflect.String:
+			v.SetString(strings.GoString(syscall.a1))
+		case reflect.Float32:
+			// NOTE: syscall.r2 is only the floating return value on 64bit platforms.
+			// On 32bit platforms syscall.r2 is the upper part of a 64bit return.
+			// On 386, x87 FPU returns floats as float64 in ST(0), so we read as float64 and convert.
+			// On PPC64LE, C ABI converts float32 to double in FPR, so we read as float64.
+			// On S390X (big-endian), float32 is in upper 32 bits of the 64-bit FP register.
+			switch runtime.GOARCH {
+			case "386":
+				v.SetFloat(math.Float64frombits(uint64(syscall.f1) | (uint64(syscall.f2) << 32)))
+			case "ppc64le":
+				v.SetFloat(math.Float64frombits(uint64(syscall.f1)))
+			case "s390x":
+				// S390X is big-endian: float32 in upper 32 bits of 64-bit register
+				v.SetFloat(float64(math.Float32frombits(uint32(syscall.f1 >> 32))))
+			default:
+				v.SetFloat(float64(math.Float32frombits(uint32(syscall.f1))))
+			}
+		case reflect.Float64:
+			// NOTE: syscall.r2 is only the floating return value on 64bit platforms.
+			// On 32bit platforms syscall.r2 is the upper part of a 64bit return.
+			if is32bit {
+				v.SetFloat(math.Float64frombits(uint64(syscall.f1) | (uint64(syscall.f2) << 32)))
+			} else {
+				v.SetFloat(math.Float64frombits(uint64(syscall.f1)))
+			}
+		case reflect.Struct:
+			v = getStruct(outType, *syscall)
+		default:
+			panic("purego: unsupported return kind: " + outType.Kind().String())
+		}
+		if len(args) > 0 {
+			// reuse args slice instead of allocating one when possible
+			args[0] = v
+			return args[:1]
+		} else {
+			return []reflect.Value{v}
+		}
+	})
+	fn.Set(v)
+}
+
+func addValue(v reflect.Value, keepAlive []any, addInt func(x uintptr), addFloat func(x uintptr), addStack func(x uintptr), numInts *int, numFloats *int, numStack *int) []any {
+	const is32bit = unsafe.Sizeof(uintptr(0)) == 4
+	switch v.Kind() {
+	case reflect.String:
+		ptr := strings.CString(v.String())
+		keepAlive = append(keepAlive, ptr)
+		addInt(uintptr(unsafe.Pointer(ptr)))
+	case reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+		addInt(uintptr(v.Uint()))
+	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+		addInt(uintptr(v.Int()))
+	case reflect.Ptr, reflect.UnsafePointer, reflect.Slice:
+		// There is no need to keepAlive this pointer separately because it is kept alive in the args variable
+		addInt(v.Pointer())
+	case reflect.Func:
+		addInt(NewCallback(v.Interface()))
+	case reflect.Bool:
+		if v.Bool() {
+			addInt(1)
+		} else {
+			addInt(0)
+		}
+	case reflect.Float32:
+		// On S390X big-endian, float32 goes in upper 32 bits of 64-bit FP register
+		if runtime.GOARCH == "s390x" {
+			addFloat(uintptr(math.Float32bits(float32(v.Float()))) << 32)
+		} else {
+			addFloat(uintptr(math.Float32bits(float32(v.Float()))))
+		}
+	case reflect.Float64:
+		if is32bit {
+			bits := math.Float64bits(v.Float())
+			addFloat(uintptr(bits))
+			addFloat(uintptr(bits >> 32))
+		} else {
+			addFloat(uintptr(math.Float64bits(v.Float())))
+		}
+	case reflect.Struct:
+		keepAlive = addStruct(v, numInts, numFloats, numStack, addInt, addFloat, addStack, keepAlive)
+	default:
+		panic("purego: unsupported kind: " + v.Kind().String())
+	}
+	return keepAlive
+}
+
+// maxRegAllocStructSize is the biggest a struct can be while still fitting in registers.
+// if it is bigger than this than enough space must be allocated on the heap and then passed into
+// the function as the first parameter on amd64 or in R8 on arm64.
+//
+// If you change this make sure to update it in objc_runtime_darwin.go
+const maxRegAllocStructSize = 16
+
+func isAllSameFloat(ty reflect.Type) (allFloats bool, numFields int) {
+	allFloats = true
+	root := ty.Field(0).Type
+	for root.Kind() == reflect.Struct {
+		root = root.Field(0).Type
+	}
+	first := root.Kind()
+	if first != reflect.Float32 && first != reflect.Float64 {
+		allFloats = false
+	}
+	for i := 0; i < ty.NumField(); i++ {
+		f := ty.Field(i).Type
+		if f.Kind() == reflect.Struct {
+			var structNumFields int
+			allFloats, structNumFields = isAllSameFloat(f)
+			numFields += structNumFields
+			continue
+		}
+		numFields++
+		if f.Kind() != first {
+			allFloats = false
+		}
+	}
+	return allFloats, numFields
+}
+
+func checkStructFieldsSupported(ty reflect.Type) {
+	for i := 0; i < ty.NumField(); i++ {
+		f := ty.Field(i).Type
+		if f.Kind() == reflect.Array {
+			f = f.Elem()
+		} else if f.Kind() == reflect.Struct {
+			checkStructFieldsSupported(f)
+			continue
+		}
+		switch f.Kind() {
+		case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+			reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
+			reflect.Uintptr, reflect.Ptr, reflect.UnsafePointer, reflect.Float64, reflect.Float32,
+			reflect.Bool:
+		default:
+			panic(fmt.Sprintf("purego: struct field type %s is not supported", f))
+		}
+	}
+}
+
+func ensureStructSupportedForRegisterFunc() {
+	if runtime.GOARCH != "amd64" && runtime.GOARCH != "arm64" {
+		panic("purego: struct arguments are only supported on amd64 and arm64")
+	}
+	if runtime.GOOS != "darwin" && runtime.GOOS != "linux" {
+		panic("purego: struct arguments are only supported on darwin and linux")
+	}
+}
+
+func roundUpTo8(val uintptr) uintptr {
+	return (val + align8ByteMask) &^ align8ByteMask
+}
+
+func numOfFloatRegisters() int {
+	switch runtime.GOARCH {
+	case "amd64", "arm64", "loong64", "ppc64le", "riscv64":
+		return 8
+	case "s390x":
+		return 4
+	case "arm":
+		return 16
+	case "386":
+		// i386 SysV ABI passes all arguments on the stack, including floats
+		return 0
+	default:
+		// since this platform isn't supported and can therefore only access
+		// integer registers it is safest to return 8
+		return 8
+	}
+}
+
+func numOfIntegerRegisters() int {
+	switch runtime.GOARCH {
+	case "arm64", "loong64", "ppc64le", "riscv64":
+		return 8
+	case "amd64":
+		return 6
+	case "s390x":
+		// S390X uses R2-R6 for integer arguments
+		return 5
+	case "arm":
+		return 4
+	case "386":
+		// i386 SysV ABI passes all arguments on the stack
+		return 0
+	default:
+		// since this platform isn't supported and can therefore only access
+		// integer registers it is fine to return the maxArgs
+		return maxArgs
+	}
+}
+
+// estimateStackBytes estimates stack bytes needed for Darwin ARM64 validation.
+// This is a conservative estimate used only for early error detection.
+func estimateStackBytes(ty reflect.Type) int {
+	var numInts, numFloats int
+	var stackBytes int
+
+	for i := 0; i < ty.NumIn(); i++ {
+		arg := ty.In(i)
+		size := int(arg.Size())
+
+		// Check if this goes to register or stack
+		usesInt := arg.Kind() != reflect.Float32 && arg.Kind() != reflect.Float64
+		if usesInt && numInts < numOfIntegerRegisters() {
+			numInts++
+		} else if !usesInt && numFloats < numOfFloatRegisters() {
+			numFloats++
+		} else {
+			// Goes to stack - accumulate total bytes
+			stackBytes += size
+		}
+	}
+	// Round total to 8-byte boundary
+	if stackBytes > 0 && stackBytes%align8ByteSize != 0 {
+		stackBytes = int(roundUpTo8(uintptr(stackBytes)))
+	}
+	return stackBytes
+}

+ 6 - 0
v4/vendor/github.com/ebitengine/purego/gen.go

@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
+
+package purego
+
+//go:generate go run wincallback.go

+ 13 - 0
v4/vendor/github.com/ebitengine/purego/go_runtime.go

@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build darwin || freebsd || linux || netbsd || windows
+
+package purego
+
+import (
+	"unsafe"
+)
+
+//go:linkname runtime_cgocall runtime.cgocall
+func runtime_cgocall(fn uintptr, arg unsafe.Pointer) int32 // from runtime/sys_libc.go

+ 56 - 0
v4/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go

@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
+
+//go:build freebsd || linux || netbsd
+
+package cgo
+
+/*
+#cgo !netbsd LDFLAGS: -ldl
+
+#include <dlfcn.h>
+#include <stdlib.h>
+*/
+import "C"
+
+import (
+	"errors"
+	"unsafe"
+)
+
+func Dlopen(filename string, flag int) (uintptr, error) {
+	cfilename := C.CString(filename)
+	defer C.free(unsafe.Pointer(cfilename))
+	handle := C.dlopen(cfilename, C.int(flag))
+	if handle == nil {
+		return 0, errors.New(C.GoString(C.dlerror()))
+	}
+	return uintptr(handle), nil
+}
+
+func Dlsym(handle uintptr, symbol string) (uintptr, error) {
+	csymbol := C.CString(symbol)
+	defer C.free(unsafe.Pointer(csymbol))
+	symbolAddr := C.dlsym(*(*unsafe.Pointer)(unsafe.Pointer(&handle)), csymbol)
+	if symbolAddr == nil {
+		return 0, errors.New(C.GoString(C.dlerror()))
+	}
+	return uintptr(symbolAddr), nil
+}
+
+func Dlclose(handle uintptr) error {
+	result := C.dlclose(*(*unsafe.Pointer)(unsafe.Pointer(&handle)))
+	if result != 0 {
+		return errors.New(C.GoString(C.dlerror()))
+	}
+	return nil
+}
+
+// all that is needed is to assign each dl function because then its
+// symbol will then be made available to the linker and linked to inside dlfcn.go
+var (
+	_ = C.dlopen
+	_ = C.dlsym
+	_ = C.dlerror
+	_ = C.dlclose
+)

+ 6 - 0
v4/vendor/github.com/ebitengine/purego/internal/cgo/empty.go

@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
+
+package cgo
+
+// Empty so that importing this package doesn't cause issue for certain platforms.

+ 55 - 0
v4/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go

@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build freebsd || (linux && !(386 || amd64 || arm || arm64 || loong64 || ppc64le || riscv64)) || netbsd
+
+package cgo
+
+// this file is placed inside internal/cgo and not package purego
+// because Cgo and assembly files can't be in the same package.
+
+/*
+#cgo !netbsd LDFLAGS: -ldl
+
+#include <stdint.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <assert.h>
+
+typedef struct syscall15Args {
+	uintptr_t fn;
+	uintptr_t a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15;
+	uintptr_t f1, f2, f3, f4, f5, f6, f7, f8;
+	uintptr_t err;
+} syscall15Args;
+
+void syscall15(struct syscall15Args *args) {
+	assert((args->f1|args->f2|args->f3|args->f4|args->f5|args->f6|args->f7|args->f8) == 0);
+	uintptr_t (*func_name)(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6,
+		uintptr_t a7, uintptr_t a8, uintptr_t a9, uintptr_t a10, uintptr_t a11, uintptr_t a12,
+		uintptr_t a13, uintptr_t a14, uintptr_t a15);
+	*(void**)(&func_name) = (void*)(args->fn);
+	uintptr_t r1 =  func_name(args->a1,args->a2,args->a3,args->a4,args->a5,args->a6,args->a7,args->a8,args->a9,
+		args->a10,args->a11,args->a12,args->a13,args->a14,args->a15);
+	args->a1 = r1;
+	args->err = errno;
+}
+
+*/
+import "C"
+import "unsafe"
+
+// assign purego.syscall15XABI0 to the C version of this function.
+var Syscall15XABI0 = unsafe.Pointer(C.syscall15)
+
+//go:nosplit
+func Syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) {
+	args := C.syscall15Args{
+		C.uintptr_t(fn), C.uintptr_t(a1), C.uintptr_t(a2), C.uintptr_t(a3),
+		C.uintptr_t(a4), C.uintptr_t(a5), C.uintptr_t(a6),
+		C.uintptr_t(a7), C.uintptr_t(a8), C.uintptr_t(a9), C.uintptr_t(a10), C.uintptr_t(a11), C.uintptr_t(a12),
+		C.uintptr_t(a13), C.uintptr_t(a14), C.uintptr_t(a15), 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	}
+	C.syscall15(&args)
+	return uintptr(args.a1), 0, uintptr(args.err)
+}

+ 99 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h

@@ -0,0 +1,99 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI0.
+//
+// These save the frame pointer, so in general, functions that use
+// these should have zero frame size to suppress the automatic frame
+// pointer, though it's harmless to not do this.
+
+#ifdef GOOS_windows
+
+// REGS_HOST_TO_ABI0_STACK is the stack bytes used by
+// PUSH_REGS_HOST_TO_ABI0.
+#define REGS_HOST_TO_ABI0_STACK (28*8 + 8)
+
+// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from
+// the host ABI to Go ABI0 code. It saves all registers that are
+// callee-save in the host ABI and caller-save in Go ABI0 and prepares
+// for entry to Go.
+//
+// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag.
+// Clear the DF flag for the Go ABI.
+// MXCSR matches the Go ABI, so we don't have to set that,
+// and Go doesn't modify it, so we don't have to save it.
+#define PUSH_REGS_HOST_TO_ABI0()	\
+	PUSHFQ			\
+	CLD			\
+	ADJSP	$(REGS_HOST_TO_ABI0_STACK - 8)	\
+	MOVQ	DI, (0*0)(SP)	\
+	MOVQ	SI, (1*8)(SP)	\
+	MOVQ	BP, (2*8)(SP)	\
+	MOVQ	BX, (3*8)(SP)	\
+	MOVQ	R12, (4*8)(SP)	\
+	MOVQ	R13, (5*8)(SP)	\
+	MOVQ	R14, (6*8)(SP)	\
+	MOVQ	R15, (7*8)(SP)	\
+	MOVUPS	X6, (8*8)(SP)	\
+	MOVUPS	X7, (10*8)(SP)	\
+	MOVUPS	X8, (12*8)(SP)	\
+	MOVUPS	X9, (14*8)(SP)	\
+	MOVUPS	X10, (16*8)(SP)	\
+	MOVUPS	X11, (18*8)(SP)	\
+	MOVUPS	X12, (20*8)(SP)	\
+	MOVUPS	X13, (22*8)(SP)	\
+	MOVUPS	X14, (24*8)(SP)	\
+	MOVUPS	X15, (26*8)(SP)
+
+#define POP_REGS_HOST_TO_ABI0()	\
+	MOVQ	(0*0)(SP), DI	\
+	MOVQ	(1*8)(SP), SI	\
+	MOVQ	(2*8)(SP), BP	\
+	MOVQ	(3*8)(SP), BX	\
+	MOVQ	(4*8)(SP), R12	\
+	MOVQ	(5*8)(SP), R13	\
+	MOVQ	(6*8)(SP), R14	\
+	MOVQ	(7*8)(SP), R15	\
+	MOVUPS	(8*8)(SP), X6	\
+	MOVUPS	(10*8)(SP), X7	\
+	MOVUPS	(12*8)(SP), X8	\
+	MOVUPS	(14*8)(SP), X9	\
+	MOVUPS	(16*8)(SP), X10	\
+	MOVUPS	(18*8)(SP), X11	\
+	MOVUPS	(20*8)(SP), X12	\
+	MOVUPS	(22*8)(SP), X13	\
+	MOVUPS	(24*8)(SP), X14	\
+	MOVUPS	(26*8)(SP), X15	\
+	ADJSP	$-(REGS_HOST_TO_ABI0_STACK - 8)	\
+	POPFQ
+
+#else
+// SysV ABI
+
+#define REGS_HOST_TO_ABI0_STACK (6*8)
+
+// SysV MXCSR matches the Go ABI, so we don't have to set that,
+// and Go doesn't modify it, so we don't have to save it.
+// Both SysV and Go require DF to be cleared, so that's already clear.
+// The SysV and Go frame pointer conventions are compatible.
+#define PUSH_REGS_HOST_TO_ABI0()	\
+	ADJSP	$(REGS_HOST_TO_ABI0_STACK)	\
+	MOVQ	BP, (5*8)(SP)	\
+	LEAQ	(5*8)(SP), BP	\
+	MOVQ	BX, (0*8)(SP)	\
+	MOVQ	R12, (1*8)(SP)	\
+	MOVQ	R13, (2*8)(SP)	\
+	MOVQ	R14, (3*8)(SP)	\
+	MOVQ	R15, (4*8)(SP)
+
+#define POP_REGS_HOST_TO_ABI0()	\
+	MOVQ	(0*8)(SP), BX	\
+	MOVQ	(1*8)(SP), R12	\
+	MOVQ	(2*8)(SP), R13	\
+	MOVQ	(3*8)(SP), R14	\
+	MOVQ	(4*8)(SP), R15	\
+	MOVQ	(5*8)(SP), BP	\
+	ADJSP	$-(REGS_HOST_TO_ABI0_STACK)
+
+#endif

+ 39 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h

@@ -0,0 +1,39 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI0.
+//
+// These macros save and restore the callee-saved registers
+// from the stack, but they don't adjust stack pointer, so
+// the user should prepare stack space in advance.
+// SAVE_R19_TO_R28(offset) saves R19 ~ R28 to the stack space
+// of ((offset)+0*8)(RSP) ~ ((offset)+9*8)(RSP).
+//
+// SAVE_F8_TO_F15(offset) saves F8 ~ F15 to the stack space
+// of ((offset)+0*8)(RSP) ~ ((offset)+7*8)(RSP).
+//
+// R29 is not saved because Go will save and restore it.
+
+#define SAVE_R19_TO_R28(offset) \
+	STP	(R19, R20), ((offset)+0*8)(RSP) \
+	STP	(R21, R22), ((offset)+2*8)(RSP) \
+	STP	(R23, R24), ((offset)+4*8)(RSP) \
+	STP	(R25, R26), ((offset)+6*8)(RSP) \
+	STP	(R27, g), ((offset)+8*8)(RSP)
+#define RESTORE_R19_TO_R28(offset) \
+	LDP	((offset)+0*8)(RSP), (R19, R20) \
+	LDP	((offset)+2*8)(RSP), (R21, R22) \
+	LDP	((offset)+4*8)(RSP), (R23, R24) \
+	LDP	((offset)+6*8)(RSP), (R25, R26) \
+	LDP	((offset)+8*8)(RSP), (R27, g) /* R28 */
+#define SAVE_F8_TO_F15(offset) \
+	FSTPD	(F8, F9), ((offset)+0*8)(RSP) \
+	FSTPD	(F10, F11), ((offset)+2*8)(RSP) \
+	FSTPD	(F12, F13), ((offset)+4*8)(RSP) \
+	FSTPD	(F14, F15), ((offset)+6*8)(RSP)
+#define RESTORE_F8_TO_F15(offset) \
+	FLDPD	((offset)+0*8)(RSP), (F8, F9) \
+	FLDPD	((offset)+2*8)(RSP), (F10, F11) \
+	FLDPD	((offset)+4*8)(RSP), (F12, F13) \
+	FLDPD	((offset)+6*8)(RSP), (F14, F15)

+ 60 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_loong64.h

@@ -0,0 +1,60 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI0.
+//
+// These macros save and restore the callee-saved registers
+// from the stack, but they don't adjust stack pointer, so
+// the user should prepare stack space in advance.
+// SAVE_R22_TO_R31(offset) saves R22 ~ R31 to the stack space
+// of ((offset)+0*8)(R3) ~ ((offset)+9*8)(R3).
+//
+// SAVE_F24_TO_F31(offset) saves F24 ~ F31 to the stack space
+// of ((offset)+0*8)(R3) ~ ((offset)+7*8)(R3).
+//
+// Note: g is R22
+
+#define SAVE_R22_TO_R31(offset)	\
+	MOVV	g,   ((offset)+(0*8))(R3)	\
+	MOVV	R23, ((offset)+(1*8))(R3)	\
+	MOVV	R24, ((offset)+(2*8))(R3)	\
+	MOVV	R25, ((offset)+(3*8))(R3)	\
+	MOVV	R26, ((offset)+(4*8))(R3)	\
+	MOVV	R27, ((offset)+(5*8))(R3)	\
+	MOVV	R28, ((offset)+(6*8))(R3)	\
+	MOVV	R29, ((offset)+(7*8))(R3)	\
+	MOVV	R30, ((offset)+(8*8))(R3)	\
+	MOVV	R31, ((offset)+(9*8))(R3)
+
+#define SAVE_F24_TO_F31(offset)	\
+	MOVD	F24, ((offset)+(0*8))(R3)	\
+	MOVD	F25, ((offset)+(1*8))(R3)	\
+	MOVD	F26, ((offset)+(2*8))(R3)	\
+	MOVD	F27, ((offset)+(3*8))(R3)	\
+	MOVD	F28, ((offset)+(4*8))(R3)	\
+	MOVD	F29, ((offset)+(5*8))(R3)	\
+	MOVD	F30, ((offset)+(6*8))(R3)	\
+	MOVD	F31, ((offset)+(7*8))(R3)
+
+#define RESTORE_R22_TO_R31(offset)	\
+	MOVV	((offset)+(0*8))(R3),  g	\
+	MOVV	((offset)+(1*8))(R3), R23	\
+	MOVV	((offset)+(2*8))(R3), R24	\
+	MOVV	((offset)+(3*8))(R3), R25	\
+	MOVV	((offset)+(4*8))(R3), R26	\
+	MOVV	((offset)+(5*8))(R3), R27	\
+	MOVV	((offset)+(6*8))(R3), R28	\
+	MOVV	((offset)+(7*8))(R3), R29	\
+	MOVV	((offset)+(8*8))(R3), R30	\
+	MOVV	((offset)+(9*8))(R3), R31
+
+#define RESTORE_F24_TO_F31(offset)	\
+	MOVD	((offset)+(0*8))(R3), F24	\
+	MOVD	((offset)+(1*8))(R3), F25	\
+	MOVD	((offset)+(2*8))(R3), F26	\
+	MOVD	((offset)+(3*8))(R3), F27	\
+	MOVD	((offset)+(4*8))(R3), F28	\
+	MOVD	((offset)+(5*8))(R3), F29	\
+	MOVD	((offset)+(6*8))(R3), F30	\
+	MOVD	((offset)+(7*8))(R3), F31

+ 195 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_ppc64x.h

@@ -0,0 +1,195 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Macros for transitioning from the host ABI to Go ABI
+//
+// On PPC64/ELFv2 targets, the following registers are callee
+// saved when called from C. They must be preserved before
+// calling into Go which does not preserve any of them.
+//
+//	R14-R31
+//	CR2-4
+//	VR20-31
+//	F14-F31
+//
+// xcoff(aix) and ELFv1 are similar, but may only require a
+// subset of these.
+//
+// These macros assume a 16 byte aligned stack pointer. This
+// is required by ELFv1, ELFv2, and AIX PPC64.
+
+#define SAVE_GPR_SIZE (18*8)
+#define SAVE_GPR(offset)               \
+	MOVD	R14, (offset+8*0)(R1)  \
+	MOVD	R15, (offset+8*1)(R1)  \
+	MOVD	R16, (offset+8*2)(R1)  \
+	MOVD	R17, (offset+8*3)(R1)  \
+	MOVD	R18, (offset+8*4)(R1)  \
+	MOVD	R19, (offset+8*5)(R1)  \
+	MOVD	R20, (offset+8*6)(R1)  \
+	MOVD	R21, (offset+8*7)(R1)  \
+	MOVD	R22, (offset+8*8)(R1)  \
+	MOVD	R23, (offset+8*9)(R1)  \
+	MOVD	R24, (offset+8*10)(R1) \
+	MOVD	R25, (offset+8*11)(R1) \
+	MOVD	R26, (offset+8*12)(R1) \
+	MOVD	R27, (offset+8*13)(R1) \
+	MOVD	R28, (offset+8*14)(R1) \
+	MOVD	R29, (offset+8*15)(R1) \
+	MOVD	g,   (offset+8*16)(R1) \
+	MOVD	R31, (offset+8*17)(R1)
+
+#define RESTORE_GPR(offset)            \
+	MOVD	(offset+8*0)(R1), R14  \
+	MOVD	(offset+8*1)(R1), R15  \
+	MOVD	(offset+8*2)(R1), R16  \
+	MOVD	(offset+8*3)(R1), R17  \
+	MOVD	(offset+8*4)(R1), R18  \
+	MOVD	(offset+8*5)(R1), R19  \
+	MOVD	(offset+8*6)(R1), R20  \
+	MOVD	(offset+8*7)(R1), R21  \
+	MOVD	(offset+8*8)(R1), R22  \
+	MOVD	(offset+8*9)(R1), R23  \
+	MOVD	(offset+8*10)(R1), R24 \
+	MOVD	(offset+8*11)(R1), R25 \
+	MOVD	(offset+8*12)(R1), R26 \
+	MOVD	(offset+8*13)(R1), R27 \
+	MOVD	(offset+8*14)(R1), R28 \
+	MOVD	(offset+8*15)(R1), R29 \
+	MOVD	(offset+8*16)(R1), g   \
+	MOVD	(offset+8*17)(R1), R31
+
+#define SAVE_FPR_SIZE (18*8)
+#define SAVE_FPR(offset)               \
+	FMOVD	F14, (offset+8*0)(R1)  \
+	FMOVD	F15, (offset+8*1)(R1)  \
+	FMOVD	F16, (offset+8*2)(R1)  \
+	FMOVD	F17, (offset+8*3)(R1)  \
+	FMOVD	F18, (offset+8*4)(R1)  \
+	FMOVD	F19, (offset+8*5)(R1)  \
+	FMOVD	F20, (offset+8*6)(R1)  \
+	FMOVD	F21, (offset+8*7)(R1)  \
+	FMOVD	F22, (offset+8*8)(R1)  \
+	FMOVD	F23, (offset+8*9)(R1)  \
+	FMOVD	F24, (offset+8*10)(R1) \
+	FMOVD	F25, (offset+8*11)(R1) \
+	FMOVD	F26, (offset+8*12)(R1) \
+	FMOVD	F27, (offset+8*13)(R1) \
+	FMOVD	F28, (offset+8*14)(R1) \
+	FMOVD	F29, (offset+8*15)(R1) \
+	FMOVD	F30, (offset+8*16)(R1) \
+	FMOVD	F31, (offset+8*17)(R1)
+
+#define RESTORE_FPR(offset)            \
+	FMOVD	(offset+8*0)(R1), F14  \
+	FMOVD	(offset+8*1)(R1), F15  \
+	FMOVD	(offset+8*2)(R1), F16  \
+	FMOVD	(offset+8*3)(R1), F17  \
+	FMOVD	(offset+8*4)(R1), F18  \
+	FMOVD	(offset+8*5)(R1), F19  \
+	FMOVD	(offset+8*6)(R1), F20  \
+	FMOVD	(offset+8*7)(R1), F21  \
+	FMOVD	(offset+8*8)(R1), F22  \
+	FMOVD	(offset+8*9)(R1), F23  \
+	FMOVD	(offset+8*10)(R1), F24 \
+	FMOVD	(offset+8*11)(R1), F25 \
+	FMOVD	(offset+8*12)(R1), F26 \
+	FMOVD	(offset+8*13)(R1), F27 \
+	FMOVD	(offset+8*14)(R1), F28 \
+	FMOVD	(offset+8*15)(R1), F29 \
+	FMOVD	(offset+8*16)(R1), F30 \
+	FMOVD	(offset+8*17)(R1), F31
+
+// Save and restore VR20-31 (aka VSR56-63). These
+// macros must point to a 16B aligned offset.
+#define SAVE_VR_SIZE (12*16)
+#define SAVE_VR(offset, rtmp)         \
+	MOVD	$(offset+16*0), rtmp  \
+	STVX	V20, (rtmp)(R1)       \
+	MOVD	$(offset+16*1), rtmp  \
+	STVX	V21, (rtmp)(R1)       \
+	MOVD	$(offset+16*2), rtmp  \
+	STVX	V22, (rtmp)(R1)       \
+	MOVD	$(offset+16*3), rtmp  \
+	STVX	V23, (rtmp)(R1)       \
+	MOVD	$(offset+16*4), rtmp  \
+	STVX	V24, (rtmp)(R1)       \
+	MOVD	$(offset+16*5), rtmp  \
+	STVX	V25, (rtmp)(R1)       \
+	MOVD	$(offset+16*6), rtmp  \
+	STVX	V26, (rtmp)(R1)       \
+	MOVD	$(offset+16*7), rtmp  \
+	STVX	V27, (rtmp)(R1)       \
+	MOVD	$(offset+16*8), rtmp  \
+	STVX	V28, (rtmp)(R1)       \
+	MOVD	$(offset+16*9), rtmp  \
+	STVX	V29, (rtmp)(R1)       \
+	MOVD	$(offset+16*10), rtmp \
+	STVX	V30, (rtmp)(R1)       \
+	MOVD	$(offset+16*11), rtmp \
+	STVX	V31, (rtmp)(R1)
+
+#define RESTORE_VR(offset, rtmp)      \
+	MOVD	$(offset+16*0), rtmp  \
+	LVX	(rtmp)(R1), V20       \
+	MOVD	$(offset+16*1), rtmp  \
+	LVX	(rtmp)(R1), V21       \
+	MOVD	$(offset+16*2), rtmp  \
+	LVX	(rtmp)(R1), V22       \
+	MOVD	$(offset+16*3), rtmp  \
+	LVX	(rtmp)(R1), V23       \
+	MOVD	$(offset+16*4), rtmp  \
+	LVX	(rtmp)(R1), V24       \
+	MOVD	$(offset+16*5), rtmp  \
+	LVX	(rtmp)(R1), V25       \
+	MOVD	$(offset+16*6), rtmp  \
+	LVX	(rtmp)(R1), V26       \
+	MOVD	$(offset+16*7), rtmp  \
+	LVX	(rtmp)(R1), V27       \
+	MOVD	$(offset+16*8), rtmp  \
+	LVX	(rtmp)(R1), V28       \
+	MOVD	$(offset+16*9), rtmp  \
+	LVX	(rtmp)(R1), V29       \
+	MOVD	$(offset+16*10), rtmp \
+	LVX	(rtmp)(R1), V30       \
+	MOVD	$(offset+16*11), rtmp \
+	LVX	(rtmp)(R1), V31
+
+// LR and CR are saved in the caller's frame. The callee must
+// make space for all other callee-save registers.
+#define SAVE_ALL_REG_SIZE (SAVE_GPR_SIZE+SAVE_FPR_SIZE+SAVE_VR_SIZE)
+
+// Stack a frame and save all callee-save registers following the
+// host OS's ABI. Fortunately, this is identical for AIX, ELFv1, and
+// ELFv2. All host ABIs require the stack pointer to maintain 16 byte
+// alignment, and save the callee-save registers in the same places.
+//
+// To restate, R1 is assumed to be aligned when this macro is used.
+// This assumes the caller's frame is compliant with the host ABI.
+// CR and LR are saved into the caller's frame per the host ABI.
+// R0 is initialized to $0 as expected by Go.
+#define STACK_AND_SAVE_HOST_TO_GO_ABI(extra)                       \
+	MOVD	LR, R0                                             \
+	MOVD	R0, 16(R1)                                         \
+	MOVW	CR, R0                                             \
+	MOVD	R0, 8(R1)                                          \
+	MOVDU	R1, -(extra)-FIXED_FRAME-SAVE_ALL_REG_SIZE(R1)     \
+	SAVE_GPR(extra+FIXED_FRAME)                                \
+	SAVE_FPR(extra+FIXED_FRAME+SAVE_GPR_SIZE)                  \
+	SAVE_VR(extra+FIXED_FRAME+SAVE_GPR_SIZE+SAVE_FPR_SIZE, R0) \
+	MOVD	$0, R0
+
+// This unstacks the frame, restoring all callee-save registers
+// as saved by STACK_AND_SAVE_HOST_TO_GO_ABI.
+//
+// R0 is not guaranteed to contain $0 after this macro.
+#define UNSTACK_AND_RESTORE_GO_TO_HOST_ABI(extra)                     \
+	RESTORE_GPR(extra+FIXED_FRAME)                                \
+	RESTORE_FPR(extra+FIXED_FRAME+SAVE_GPR_SIZE)                  \
+	RESTORE_VR(extra+FIXED_FRAME+SAVE_GPR_SIZE+SAVE_FPR_SIZE, R0) \
+	ADD 	$(extra+FIXED_FRAME+SAVE_ALL_REG_SIZE), R1            \
+	MOVD	16(R1), R0                                            \
+	MOVD	R0, LR                                                \
+	MOVD	8(R1), R0                                             \
+	MOVW	R0, CR

+ 29 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_386.s

@@ -0,0 +1,29 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+TEXT crosscall2(SB), NOSPLIT, $28-16
+	MOVL BP, 24(SP)
+	MOVL BX, 20(SP)
+	MOVL SI, 16(SP)
+	MOVL DI, 12(SP)
+
+	MOVL ctxt+12(FP), AX
+	MOVL AX, 8(SP)
+	MOVL a+4(FP), AX
+	MOVL AX, 4(SP)
+	MOVL fn+0(FP), AX
+	MOVL AX, 0(SP)
+	CALL runtime·cgocallback(SB)
+
+	MOVL 12(SP), DI
+	MOVL 16(SP), SI
+	MOVL 20(SP), BX
+	MOVL 24(SP), BP
+	RET

+ 39 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s

@@ -0,0 +1,39 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+#include "abi_amd64.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+// This signature is known to SWIG, so we can't change it.
+TEXT crosscall2(SB), NOSPLIT, $0-0
+	PUSH_REGS_HOST_TO_ABI0()
+
+	// Make room for arguments to cgocallback.
+	ADJSP $0x18
+
+#ifndef GOOS_windows
+	MOVQ DI, 0x0(SP) // fn
+	MOVQ SI, 0x8(SP) // arg
+
+	// Skip n in DX.
+	MOVQ CX, 0x10(SP) // ctxt
+
+#else
+	MOVQ CX, 0x0(SP) // fn
+	MOVQ DX, 0x8(SP) // arg
+
+	// Skip n in R8.
+	MOVQ R9, 0x10(SP) // ctxt
+
+#endif
+
+	CALL runtime·cgocallback(SB)
+
+	ADJSP $-0x18
+	POP_REGS_HOST_TO_ABI0()
+	RET

+ 52 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm.s

@@ -0,0 +1,52 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0
+	SUB $(8*9), R13 // Reserve space for the floating point registers.
+
+	// The C arguments arrive in R0, R1, R2, and R3. We want to
+	// pass R0, R1, and R3 to Go, so we push those on the stack.
+	// Also, save C callee-save registers R4-R12.
+	MOVM.WP [R0, R1, R3, R4, R5, R6, R7, R8, R9, g, R11, R12], (R13)
+
+	// Finally, save the link register R14. This also puts the
+	// arguments we pushed for cgocallback where they need to be,
+	// starting at 4(R13).
+	MOVW.W R14, -4(R13)
+
+	// Save VFP callee-saved registers D8-D15 (same as S16-S31).
+	// Note: We always save these since we target hard-float ABI.
+	MOVD F8, (13*4+8*1)(R13)
+	MOVD F9, (13*4+8*2)(R13)
+	MOVD F10, (13*4+8*3)(R13)
+	MOVD F11, (13*4+8*4)(R13)
+	MOVD F12, (13*4+8*5)(R13)
+	MOVD F13, (13*4+8*6)(R13)
+	MOVD F14, (13*4+8*7)(R13)
+	MOVD F15, (13*4+8*8)(R13)
+
+	BL runtime·load_g(SB)
+
+	// We set up the arguments to cgocallback when saving registers above.
+	BL runtime·cgocallback(SB)
+
+	MOVD (13*4+8*1)(R13), F8
+	MOVD (13*4+8*2)(R13), F9
+	MOVD (13*4+8*3)(R13), F10
+	MOVD (13*4+8*4)(R13), F11
+	MOVD (13*4+8*5)(R13), F12
+	MOVD (13*4+8*6)(R13), F13
+	MOVD (13*4+8*7)(R13), F14
+	MOVD (13*4+8*8)(R13), F15
+
+	MOVW.P   4(R13), R14
+	MOVM.IAW (R13), [R0, R1, R3, R4, R5, R6, R7, R8, R9, g, R11, R12]
+	ADD      $(8*9), R13
+	MOVW     R14, R15

+ 36 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s

@@ -0,0 +1,36 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+#include "abi_arm64.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0
+/*
+ * We still need to save all callee save register as before, and then
+ *  push 3 args for fn (R0, R1, R3), skipping R2.
+ * Also note that at procedure entry in gc world, 8(RSP) will be the
+ *  first arg.
+ */
+	SUB  $(8*24), RSP
+	STP  (R0, R1), (8*1)(RSP)
+	MOVD R3, (8*3)(RSP)
+
+	SAVE_R19_TO_R28(8*4)
+	SAVE_F8_TO_F15(8*14)
+	STP (R29, R30), (8*22)(RSP)
+
+	// Initialize Go ABI environment
+	BL runtime·load_g(SB)
+	BL runtime·cgocallback(SB)
+
+	RESTORE_R19_TO_R28(8*4)
+	RESTORE_F8_TO_F15(8*14)
+	LDP (8*22)(RSP), (R29, R30)
+
+	ADD $(8*24), RSP
+	RET

+ 40 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_loong64.s

@@ -0,0 +1,40 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+#include "abi_loong64.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0
+/*
+ * We still need to save all callee save register as before, and then
+ * push 3 args for fn (R4, R5, R7), skipping R6.
+ * Also note that at procedure entry in gc world, 8(R29) will be the
+ *  first arg.
+ */
+
+	ADDV $(-23*8), R3
+	MOVV R4, (1*8)(R3) // fn unsafe.Pointer
+	MOVV R5, (2*8)(R3) // a unsafe.Pointer
+	MOVV R7, (3*8)(R3) // ctxt uintptr
+
+	SAVE_R22_TO_R31((4*8))
+	SAVE_F24_TO_F31((14*8))
+	MOVV R1, (22*8)(R3)
+
+	// Initialize Go ABI environment
+	JAL runtime·load_g(SB)
+
+	JAL runtime·cgocallback(SB)
+
+	RESTORE_R22_TO_R31((4*8))
+	RESTORE_F24_TO_F31((14*8))
+	MOVV (22*8)(R3), R1
+
+	ADDV $(23*8), R3
+
+	RET

+ 82 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_ppc64le.s

@@ -0,0 +1,82 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+#include "abi_ppc64x.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+//
+// This is a simplified version that only saves GPR and FPR registers,
+// not vector registers. This keeps the stack frame smaller to avoid
+// exceeding the nosplit stack limit.
+//
+// On PPC64LE ELFv2, callee-save registers are:
+//   R14-R31 (18 GPRs = 144 bytes)
+//   F14-F31 (18 FPRs = 144 bytes)
+//   CR2-CR4 (saved in CR field)
+//
+// Stack layout (must be 16-byte aligned):
+//   32 (FIXED_FRAME) + 24 (args) + 144 (GPR) + 144 (FPR) = 344
+//   Rounded to 352 for 16-byte alignment.
+
+#define FIXED_FRAME 32
+#define SAVE_SIZE    352
+#define GPR_OFFSET   (FIXED_FRAME+24)
+#define FPR_OFFSET   (GPR_OFFSET+SAVE_GPR_SIZE)
+
+TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0
+	// Save LR and CR in caller's frame per ELFv2 ABI
+	MOVD LR, R0
+	MOVD R0, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	// Allocate our stack frame
+	MOVDU R1, -SAVE_SIZE(R1)
+
+	// Save TOC (R2) in case needed
+	MOVD R2, 24(R1)
+
+	// Save callee-save GPRs
+	SAVE_GPR(GPR_OFFSET)
+
+	// Save callee-save FPRs
+	SAVE_FPR(FPR_OFFSET)
+
+	// Initialize R0 to 0 as expected by Go
+	MOVD $0, R0
+
+	// Load the current g.
+	BL runtime·load_g(SB)
+
+	// Set up arguments for cgocallback
+	MOVD R3, FIXED_FRAME+0(R1) // fn unsafe.Pointer
+	MOVD R4, FIXED_FRAME+8(R1) // a unsafe.Pointer
+
+	// Skip R5 = n uint32
+	MOVD R6, FIXED_FRAME+16(R1)  // ctxt uintptr
+	BL   runtime·cgocallback(SB)
+
+	// Restore callee-save FPRs
+	RESTORE_FPR(FPR_OFFSET)
+
+	// Restore callee-save GPRs
+	RESTORE_GPR(GPR_OFFSET)
+
+	// Restore TOC
+	MOVD 24(R1), R2
+
+	// Deallocate stack frame
+	ADD $SAVE_SIZE, R1
+
+	// Restore LR and CR from caller's frame
+	MOVD 16(R1), R0
+	MOVD R0, LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+
+	RET

+ 78 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_riscv64.s

@@ -0,0 +1,78 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0
+/*
+ * Push arguments for fn (X10, X11, X13), along with all callee-save
+ * registers. Note that at procedure entry the first argument is at
+ * 8(X2).
+ */
+	ADD  $(-8*29), X2
+	MOV  X10, (8*1)(X2)  // fn unsafe.Pointer
+	MOV  X11, (8*2)(X2)  // a unsafe.Pointer
+	MOV  X13, (8*3)(X2)  // ctxt uintptr
+	MOV  X8, (8*4)(X2)
+	MOV  X9, (8*5)(X2)
+	MOV  X18, (8*6)(X2)
+	MOV  X19, (8*7)(X2)
+	MOV  X20, (8*8)(X2)
+	MOV  X21, (8*9)(X2)
+	MOV  X22, (8*10)(X2)
+	MOV  X23, (8*11)(X2)
+	MOV  X24, (8*12)(X2)
+	MOV  X25, (8*13)(X2)
+	MOV  X26, (8*14)(X2)
+	MOV  g, (8*15)(X2)
+	MOV  X1, (8*16)(X2)
+	MOVD F8, (8*17)(X2)
+	MOVD F9, (8*18)(X2)
+	MOVD F18, (8*19)(X2)
+	MOVD F19, (8*20)(X2)
+	MOVD F20, (8*21)(X2)
+	MOVD F21, (8*22)(X2)
+	MOVD F22, (8*23)(X2)
+	MOVD F23, (8*24)(X2)
+	MOVD F24, (8*25)(X2)
+	MOVD F25, (8*26)(X2)
+	MOVD F26, (8*27)(X2)
+	MOVD F27, (8*28)(X2)
+
+	// Initialize Go ABI environment
+	CALL runtime·load_g(SB)
+	CALL runtime·cgocallback(SB)
+
+	MOV  (8*4)(X2), X8
+	MOV  (8*5)(X2), X9
+	MOV  (8*6)(X2), X18
+	MOV  (8*7)(X2), X19
+	MOV  (8*8)(X2), X20
+	MOV  (8*9)(X2), X21
+	MOV  (8*10)(X2), X22
+	MOV  (8*11)(X2), X23
+	MOV  (8*12)(X2), X24
+	MOV  (8*13)(X2), X25
+	MOV  (8*14)(X2), X26
+	MOV  (8*15)(X2), g
+	MOV  (8*16)(X2), X1
+	MOVD (8*17)(X2), F8
+	MOVD (8*18)(X2), F9
+	MOVD (8*19)(X2), F18
+	MOVD (8*20)(X2), F19
+	MOVD (8*21)(X2), F20
+	MOVD (8*22)(X2), F21
+	MOVD (8*23)(X2), F22
+	MOVD (8*24)(X2), F23
+	MOVD (8*25)(X2), F24
+	MOVD (8*26)(X2), F25
+	MOVD (8*27)(X2), F26
+	MOVD (8*28)(X2), F27
+	ADD  $(8*29), X2
+
+	RET

+ 55 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_s390x.s

@@ -0,0 +1,55 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// Called by C code generated by cmd/cgo.
+// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
+// Saves C callee-saved registers and calls cgocallback with three arguments.
+// fn is the PC of a func(a unsafe.Pointer) function.
+TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0
+	// Start with standard C stack frame layout and linkage.
+
+	// Save R6-R15 in the register save area of the calling function.
+	STMG R6, R15, 48(R15)
+
+	// Allocate 96 bytes on the stack.
+	MOVD $-96(R15), R15
+
+	// Save F8-F15 in our stack frame.
+	FMOVD F8, 32(R15)
+	FMOVD F9, 40(R15)
+	FMOVD F10, 48(R15)
+	FMOVD F11, 56(R15)
+	FMOVD F12, 64(R15)
+	FMOVD F13, 72(R15)
+	FMOVD F14, 80(R15)
+	FMOVD F15, 88(R15)
+
+	// Initialize Go ABI environment.
+	BL runtime·load_g(SB)
+
+	MOVD R2, 8(R15)  // fn unsafe.Pointer
+	MOVD R3, 16(R15) // a unsafe.Pointer
+
+	// Skip R4 = n uint32
+	MOVD R5, 24(R15)             // ctxt uintptr
+	BL   runtime·cgocallback(SB)
+
+	FMOVD 32(R15), F8
+	FMOVD 40(R15), F9
+	FMOVD 48(R15), F10
+	FMOVD 56(R15), F11
+	FMOVD 64(R15), F12
+	FMOVD 72(R15), F13
+	FMOVD 80(R15), F14
+	FMOVD 88(R15), F15
+
+	// De-allocate stack frame.
+	MOVD $96(R15), R15
+
+	// Restore R6-R15.
+	LMG 48(R15), R6, R15
+
+	RET

+ 93 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go

@@ -0,0 +1,93 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+import (
+	_ "unsafe"
+)
+
+// TODO: decide if we need _runtime_cgo_panic_internal
+
+//go:linkname x_cgo_init_trampoline x_cgo_init_trampoline
+//go:linkname _cgo_init _cgo_init
+var x_cgo_init_trampoline byte
+var _cgo_init = &x_cgo_init_trampoline
+
+// Creates a new system thread without updating any Go state.
+//
+// This method is invoked during shared library loading to create a new OS
+// thread to perform the runtime initialization. This method is similar to
+// _cgo_sys_thread_start except that it doesn't update any Go state.
+
+//go:linkname x_cgo_thread_start_trampoline x_cgo_thread_start_trampoline
+//go:linkname _cgo_thread_start _cgo_thread_start
+var x_cgo_thread_start_trampoline byte
+var _cgo_thread_start = &x_cgo_thread_start_trampoline
+
+// Notifies that the runtime has been initialized.
+//
+// We currently block at every CGO entry point (via _cgo_wait_runtime_init_done)
+// to ensure that the runtime has been initialized before the CGO call is
+// executed. This is necessary for shared libraries where we kickoff runtime
+// initialization in a separate thread and return without waiting for this
+// thread to complete the init.
+
+//go:linkname x_cgo_notify_runtime_init_done_trampoline x_cgo_notify_runtime_init_done_trampoline
+//go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done
+var x_cgo_notify_runtime_init_done_trampoline byte
+var _cgo_notify_runtime_init_done = &x_cgo_notify_runtime_init_done_trampoline
+
+// Indicates whether a dummy thread key has been created or not.
+//
+// When calling go exported function from C, we register a destructor
+// callback, for a dummy thread key, by using pthread_key_create.
+
+//go:linkname _cgo_pthread_key_created _cgo_pthread_key_created
+var x_cgo_pthread_key_created uintptr
+var _cgo_pthread_key_created = &x_cgo_pthread_key_created
+
+// Set the x_crosscall2_ptr C function pointer variable point to crosscall2.
+// It's for the runtime package to call at init time.
+func set_crosscall2() {
+	// nothing needs to be done here for fakecgo
+	// because it's possible to just call cgocallback directly
+}
+
+//go:linkname _set_crosscall2 runtime.set_crosscall2
+var _set_crosscall2 = set_crosscall2
+
+// Store the g into the thread-specific value.
+// So that pthread_key_destructor will dropm when the thread is exiting.
+
+//go:linkname x_cgo_bindm_trampoline x_cgo_bindm_trampoline
+//go:linkname _cgo_bindm _cgo_bindm
+var x_cgo_bindm_trampoline byte
+var _cgo_bindm = &x_cgo_bindm_trampoline
+
+// TODO: decide if we need x_cgo_set_context_function
+// TODO: decide if we need _cgo_yield
+
+var (
+	// In Go 1.20 the race detector was rewritten to pure Go
+	// on darwin. This means that when CGO_ENABLED=0 is set
+	// fakecgo is built with race detector code. This is not
+	// good since this code is pretending to be C. The go:norace
+	// pragma is not enough, since it only applies to the native
+	// ABIInternal function. The ABIO wrapper (which is necessary,
+	// since all references to text symbols from assembly will use it)
+	// does not inherit the go:norace pragma, so it will still be
+	// instrumented by the race detector.
+	//
+	// To circumvent this issue, using closure calls in the
+	// assembly, which forces the compiler to use the ABIInternal
+	// native implementation (which has go:norace) instead.
+	threadentry_call        = threadentry
+	x_cgo_init_call         = x_cgo_init
+	x_cgo_setenv_call       = x_cgo_setenv
+	x_cgo_unsetenv_call     = x_cgo_unsetenv
+	x_cgo_thread_start_call = x_cgo_thread_start
+)

+ 32 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go

@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+// Package fakecgo implements the Cgo runtime (runtime/cgo) entirely in Go.
+// This allows code that calls into C to function properly when CGO_ENABLED=0.
+//
+// # Goals
+//
+// fakecgo attempts to replicate the same naming structure as in the runtime.
+// For example, functions that have the prefix "gcc_*" are named "go_*".
+// This makes it easier to port other GOOSs and GOARCHs as well as to keep
+// it in sync with runtime/cgo.
+//
+// # Support
+//
+// Currently, fakecgo only supports macOS on amd64 & arm64. It also cannot
+// be used with -buildmode=c-archive because that requires special initialization
+// that fakecgo does not implement at the moment.
+//
+// # Usage
+//
+// Using fakecgo is easy just import _ "github.com/ebitengine/purego" and then
+// set the environment variable CGO_ENABLED=0.
+// The recommended usage for fakecgo is to prefer using runtime/cgo if possible
+// but if cross-compiling or fast build times are important fakecgo is available.
+// Purego will pick which ever Cgo runtime is available and prefer the one that
+// comes with Go (runtime/cgo).
+package fakecgo
+
+//go:generate go run gen.go

+ 14 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/fakecgo.go

@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+import _ "unsafe"
+
+// setg_trampoline calls setg with the G provided
+func setg_trampoline(setg uintptr, G uintptr)
+
+// call5 takes fn the C function and 5 arguments and calls the function with those arguments
+func call5(fn, a1, a2, a3, a4, a5 uintptr) uintptr

+ 27 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go

@@ -0,0 +1,27 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build freebsd && !cgo
+
+package fakecgo
+
+import _ "unsafe" // for go:linkname
+
+// Supply environ and __progname, because we don't
+// link against the standard FreeBSD crt0.o and the
+// libc dynamic library needs them.
+
+// Note: when building with cross-compiling or CGO_ENABLED=0, add
+// the following argument to `go` so that these symbols are defined by
+// making fakecgo the Cgo.
+//   -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"
+
+//go:linkname _environ environ
+//go:linkname _progname __progname
+
+//go:cgo_export_dynamic environ
+//go:cgo_export_dynamic __progname
+
+var _environ uintptr
+var _progname uintptr

+ 88 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin.go

@@ -0,0 +1,88 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo
+
+package fakecgo
+
+import "unsafe"
+
+//go:nosplit
+//go:norace
+func _cgo_sys_thread_start(ts *ThreadStart) {
+	var attr pthread_attr_t
+	var ign, oset sigset_t
+	var p pthread_t
+	var size size_t
+	var err int
+
+	sigfillset(&ign)
+	pthread_sigmask(SIG_SETMASK, &ign, &oset)
+
+	size = pthread_get_stacksize_np(pthread_self())
+	pthread_attr_init(&attr)
+	pthread_attr_setstacksize(&attr, size)
+	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
+	ts.g.stackhi = uintptr(size)
+
+	err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts)
+
+	pthread_sigmask(SIG_SETMASK, &oset, nil)
+
+	if err != 0 {
+		print("fakecgo: pthread_create failed: ")
+		println(err)
+		abort()
+	}
+}
+
+// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function
+//
+//go:linkname x_threadentry_trampoline threadentry_trampoline
+var x_threadentry_trampoline byte
+var threadentry_trampolineABI0 = &x_threadentry_trampoline
+
+//go:nosplit
+//go:norace
+func threadentry(v unsafe.Pointer) unsafe.Pointer {
+	ts := *(*ThreadStart)(v)
+	free(v)
+
+	// TODO: support ios
+	//#if TARGET_OS_IPHONE
+	//	darwin_arm_init_thread_exception_port();
+	//#endif
+	setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g)))
+
+	// faking funcs in go is a bit a... involved - but the following works :)
+	fn := uintptr(unsafe.Pointer(&ts.fn))
+	(*(*func())(unsafe.Pointer(&fn)))()
+
+	return nil
+}
+
+// here we will store a pointer to the provided setg func
+var setg_func uintptr
+
+// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c)
+// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us
+// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup
+// This function can't be go:systemstack since go is not in a state where the systemcheck would work.
+//
+//go:nosplit
+//go:norace
+func x_cgo_init(g *G, setg uintptr) {
+	var size size_t
+
+	setg_func = setg
+	size = pthread_get_stacksize_np(pthread_self())
+	g.stacklo = uintptr(unsafe.Add(unsafe.Pointer(&size), -size+4096))
+
+	//TODO: support ios
+	//#if TARGET_OS_IPHONE
+	//	darwin_arm_init_mach_exception_handler();
+	//	darwin_arm_init_thread_exception_port();
+	//	init_working_dir();
+	//#endif
+}

+ 100 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd.go

@@ -0,0 +1,100 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo
+
+package fakecgo
+
+import "unsafe"
+
+//go:nosplit
+func _cgo_sys_thread_start(ts *ThreadStart) {
+	var attr pthread_attr_t
+	var ign, oset sigset_t
+	var p pthread_t
+	var size size_t
+	var err int
+
+	// fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug
+	sigfillset(&ign)
+	pthread_sigmask(SIG_SETMASK, &ign, &oset)
+
+	pthread_attr_init(&attr)
+	pthread_attr_getstacksize(&attr, &size)
+	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
+	ts.g.stackhi = uintptr(size)
+
+	err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts)
+
+	pthread_sigmask(SIG_SETMASK, &oset, nil)
+
+	if err != 0 {
+		print("fakecgo: pthread_create failed: ")
+		println(err)
+		abort()
+	}
+}
+
+// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function
+//
+//go:linkname x_threadentry_trampoline threadentry_trampoline
+var x_threadentry_trampoline byte
+var threadentry_trampolineABI0 = &x_threadentry_trampoline
+
+//go:nosplit
+func threadentry(v unsafe.Pointer) unsafe.Pointer {
+	ts := *(*ThreadStart)(v)
+	free(v)
+
+	setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g)))
+
+	// faking funcs in go is a bit a... involved - but the following works :)
+	fn := uintptr(unsafe.Pointer(&ts.fn))
+	(*(*func())(unsafe.Pointer(&fn)))()
+
+	return nil
+}
+
+// here we will store a pointer to the provided setg func
+var setg_func uintptr
+
+// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c)
+// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us
+// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup
+// This function can't be go:systemstack since go is not in a state where the systemcheck would work.
+//
+//go:nosplit
+func x_cgo_init(g *G, setg uintptr) {
+	var size size_t
+	var attr *pthread_attr_t
+
+	/* The memory sanitizer distributed with versions of clang
+	   before 3.8 has a bug: if you call mmap before malloc, mmap
+	   may return an address that is later overwritten by the msan
+	   library.  Avoid this problem by forcing a call to malloc
+	   here, before we ever call malloc.
+
+	   This is only required for the memory sanitizer, so it's
+	   unfortunate that we always run it.  It should be possible
+	   to remove this when we no longer care about versions of
+	   clang before 3.8.  The test for this is
+	   misc/cgo/testsanitizers.
+
+	   GCC works hard to eliminate a seemingly unnecessary call to
+	   malloc, so we actually use the memory we allocate.  */
+
+	setg_func = setg
+	attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr)))
+	if attr == nil {
+		println("fakecgo: malloc failed")
+		abort()
+	}
+	pthread_attr_init(attr)
+	pthread_attr_getstacksize(attr, &size)
+	// runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))`
+	// but this should be OK since we are taking the address of the first variable in this function.
+	g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096
+	pthread_attr_destroy(attr)
+	free(unsafe.Pointer(attr))
+}

+ 72 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go

@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+import (
+	"syscall"
+	"unsafe"
+)
+
+var (
+	pthread_g pthread_key_t
+
+	runtime_init_cond = PTHREAD_COND_INITIALIZER
+	runtime_init_mu   = PTHREAD_MUTEX_INITIALIZER
+	runtime_init_done int
+)
+
+//go:nosplit
+//go:norace
+func x_cgo_notify_runtime_init_done() {
+	pthread_mutex_lock(&runtime_init_mu)
+	runtime_init_done = 1
+	pthread_cond_broadcast(&runtime_init_cond)
+	pthread_mutex_unlock(&runtime_init_mu)
+}
+
+// Store the g into a thread-specific value associated with the pthread key pthread_g.
+// And pthread_key_destructor will dropm when the thread is exiting.
+//
+//go:norace
+func x_cgo_bindm(g unsafe.Pointer) {
+	// We assume this will always succeed, otherwise, there might be extra M leaking,
+	// when a C thread exits after a cgo call.
+	// We only invoke this function once per thread in runtime.needAndBindM,
+	// and the next calls just reuse the bound m.
+	pthread_setspecific(pthread_g, g)
+}
+
+// _cgo_try_pthread_create retries pthread_create if it fails with
+// EAGAIN.
+//
+//go:nosplit
+//go:norace
+func _cgo_try_pthread_create(thread *pthread_t, attr *pthread_attr_t, pfn unsafe.Pointer, arg *ThreadStart) int {
+	var ts syscall.Timespec
+	// tries needs to be the same type as syscall.Timespec.Nsec
+	// but the fields are int32 on 32bit and int64 on 64bit.
+	// tries is assigned to syscall.Timespec.Nsec in order to match its type.
+	tries := ts.Nsec
+	var err int
+
+	for tries = 0; tries < 20; tries++ {
+		// inlined this call because it ran out of stack when inlining was disabled
+		err = int(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(pfn), uintptr(unsafe.Pointer(arg)), 0))
+		if err == 0 {
+			// inlined this call because it ran out of stack when inlining was disabled
+			call5(pthread_detachABI0, uintptr(*thread), 0, 0, 0, 0)
+			return 0
+		}
+		if err != int(syscall.EAGAIN) {
+			return err
+		}
+		ts.Sec = 0
+		ts.Nsec = (tries + 1) * 1000 * 1000 // Milliseconds.
+		// inlined this call because it ran out of stack when inlining was disabled
+		call5(nanosleepABI0, uintptr(unsafe.Pointer(&ts)), 0, 0, 0, 0)
+	}
+	return int(syscall.EAGAIN)
+}

+ 100 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux.go

@@ -0,0 +1,100 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo
+
+package fakecgo
+
+import "unsafe"
+
+//go:nosplit
+func _cgo_sys_thread_start(ts *ThreadStart) {
+	var attr pthread_attr_t
+	var ign, oset sigset_t
+	var p pthread_t
+	var size size_t
+	var err int
+
+	//fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug
+	sigfillset(&ign)
+	pthread_sigmask(SIG_SETMASK, &ign, &oset)
+
+	pthread_attr_init(&attr)
+	pthread_attr_getstacksize(&attr, &size)
+	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
+	ts.g.stackhi = uintptr(size)
+
+	err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts)
+
+	pthread_sigmask(SIG_SETMASK, &oset, nil)
+
+	if err != 0 {
+		print("fakecgo: pthread_create failed: ")
+		println(err)
+		abort()
+	}
+}
+
+// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function
+//
+//go:linkname x_threadentry_trampoline threadentry_trampoline
+var x_threadentry_trampoline byte
+var threadentry_trampolineABI0 = &x_threadentry_trampoline
+
+//go:nosplit
+func threadentry(v unsafe.Pointer) unsafe.Pointer {
+	ts := *(*ThreadStart)(v)
+	free(v)
+
+	setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g)))
+
+	// faking funcs in go is a bit a... involved - but the following works :)
+	fn := uintptr(unsafe.Pointer(&ts.fn))
+	(*(*func())(unsafe.Pointer(&fn)))()
+
+	return nil
+}
+
+// here we will store a pointer to the provided setg func
+var setg_func uintptr
+
+// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c)
+// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us
+// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup
+// This function can't be go:systemstack since go is not in a state where the systemcheck would work.
+//
+//go:nosplit
+func x_cgo_init(g *G, setg uintptr) {
+	var size size_t
+	var attr *pthread_attr_t
+
+	/* The memory sanitizer distributed with versions of clang
+	   before 3.8 has a bug: if you call mmap before malloc, mmap
+	   may return an address that is later overwritten by the msan
+	   library.  Avoid this problem by forcing a call to malloc
+	   here, before we ever call malloc.
+
+	   This is only required for the memory sanitizer, so it's
+	   unfortunate that we always run it.  It should be possible
+	   to remove this when we no longer care about versions of
+	   clang before 3.8.  The test for this is
+	   misc/cgo/testsanitizers.
+
+	   GCC works hard to eliminate a seemingly unnecessary call to
+	   malloc, so we actually use the memory we allocate.  */
+
+	setg_func = setg
+	attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr)))
+	if attr == nil {
+		println("fakecgo: malloc failed")
+		abort()
+	}
+	pthread_attr_init(attr)
+	pthread_attr_getstacksize(attr, &size)
+	// runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))`
+	// but this should be OK since we are taking the address of the first variable in this function.
+	g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096
+	pthread_attr_destroy(attr)
+	free(unsafe.Pointer(attr))
+}

+ 106 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_netbsd.go

@@ -0,0 +1,106 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo && (amd64 || arm64)
+
+package fakecgo
+
+import "unsafe"
+
+//go:nosplit
+func _cgo_sys_thread_start(ts *ThreadStart) {
+	var attr pthread_attr_t
+	var ign, oset sigset_t
+	var p pthread_t
+	var size size_t
+	var err int
+
+	// fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug
+	sigfillset(&ign)
+	pthread_sigmask(SIG_SETMASK, &ign, &oset)
+
+	pthread_attr_init(&attr)
+	pthread_attr_getstacksize(&attr, &size)
+	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
+	ts.g.stackhi = uintptr(size)
+
+	err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts)
+
+	pthread_sigmask(SIG_SETMASK, &oset, nil)
+
+	if err != 0 {
+		print("fakecgo: pthread_create failed: ")
+		println(err)
+		abort()
+	}
+}
+
+// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function
+//
+//go:linkname x_threadentry_trampoline threadentry_trampoline
+var x_threadentry_trampoline byte
+var threadentry_trampolineABI0 = &x_threadentry_trampoline
+
+//go:nosplit
+func threadentry(v unsafe.Pointer) unsafe.Pointer {
+	var ss stack_t
+	ts := *(*ThreadStart)(v)
+	free(v)
+
+	// On NetBSD, a new thread inherits the signal stack of the
+	// creating thread. That confuses minit, so we remove that
+	// signal stack here before calling the regular mstart. It's
+	// a bit baroque to remove a signal stack here only to add one
+	// in minit, but it's a simple change that keeps NetBSD
+	// working like other OS's. At this point all signals are
+	// blocked, so there is no race.
+	ss.ss_flags = SS_DISABLE
+	sigaltstack(&ss, nil)
+
+	setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g)))
+
+	// faking funcs in go is a bit a... involved - but the following works :)
+	fn := uintptr(unsafe.Pointer(&ts.fn))
+	(*(*func())(unsafe.Pointer(&fn)))()
+
+	return nil
+}
+
+// here we will store a pointer to the provided setg func
+var setg_func uintptr
+
+//go:nosplit
+func x_cgo_init(g *G, setg uintptr) {
+	var size size_t
+	var attr *pthread_attr_t
+
+	/* The memory sanitizer distributed with versions of clang
+	   before 3.8 has a bug: if you call mmap before malloc, mmap
+	   may return an address that is later overwritten by the msan
+	   library.  Avoid this problem by forcing a call to malloc
+	   here, before we ever call malloc.
+
+	   This is only required for the memory sanitizer, so it's
+	   unfortunate that we always run it.  It should be possible
+	   to remove this when we no longer care about versions of
+	   clang before 3.8.  The test for this is
+	   misc/cgo/testsanitizers.
+
+	   GCC works hard to eliminate a seemingly unnecessary call to
+	   malloc, so we actually use the memory we allocate.  */
+
+	setg_func = setg
+	attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr)))
+	if attr == nil {
+		println("fakecgo: malloc failed")
+		abort()
+	}
+	pthread_attr_init(attr)
+	pthread_attr_getstacksize(attr, &size)
+	// runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))`
+	// but this should be OK since we are taking the address of the first variable in this function.
+	g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096
+	pthread_attr_destroy(attr)
+	free(unsafe.Pointer(attr))
+}

+ 18 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go

@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+//go:nosplit
+//go:norace
+func x_cgo_setenv(arg *[2]*byte) {
+	setenv(arg[0], arg[1], 1)
+}
+
+//go:nosplit
+//go:norace
+func x_cgo_unsetenv(arg *[1]*byte) {
+	unsetenv(arg[0])
+}

+ 38 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go

@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+import "unsafe"
+
+// _cgo_thread_start is split into three parts in cgo since only one part is system dependent (keep it here for easier handling)
+
+// _cgo_thread_start(ThreadStart *arg) (runtime/cgo/gcc_util.c)
+// This get's called instead of the go code for creating new threads
+// -> pthread_* stuff is used, so threads are setup correctly for C
+// If this is missing, TLS is only setup correctly on thread 1!
+// This function should be go:systemstack instead of go:nosplit (but that requires runtime)
+//
+//go:nosplit
+//go:norace
+func x_cgo_thread_start(arg *ThreadStart) {
+	var ts *ThreadStart
+	// Make our own copy that can persist after we return.
+	//	_cgo_tsan_acquire();
+	ts = (*ThreadStart)(malloc(unsafe.Sizeof(*ts)))
+	//	_cgo_tsan_release();
+	if ts == nil {
+		println("fakecgo: out of memory in thread_start")
+		abort()
+	}
+	// *ts = *arg would cause a writebarrier so copy using slices
+	const ptrSize = unsafe.Sizeof(uintptr(0))
+	s1 := unsafe.Slice((*uintptr)(unsafe.Pointer(ts)), unsafe.Sizeof(*ts)/ptrSize)
+	s2 := unsafe.Slice((*uintptr)(unsafe.Pointer(arg)), unsafe.Sizeof(*arg)/ptrSize)
+	for i := range s2 {
+		s1[i] = s2[i]
+	}
+	_cgo_sys_thread_start(ts) // OS-dependent half
+}

+ 19 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go

@@ -0,0 +1,19 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+// The runtime package contains an uninitialized definition
+// for runtime·iscgo. Override it to tell the runtime we're here.
+// There are various function pointers that should be set too,
+// but those depend on dynamic linker magic to get initialized
+// correctly, and sometimes they break. This variable is a
+// backup: it depends only on old C style static linking rules.
+
+package fakecgo
+
+import _ "unsafe" // for go:linkname
+
+//go:linkname _iscgo runtime.iscgo
+var _iscgo bool = true

+ 39 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go

@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+type (
+	size_t uintptr
+	// Sources:
+	// Darwin (32 bytes) - https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/_types.h#L74
+	// FreeBSD (32 bytes) - https://github.com/DoctorWkt/xv6-freebsd/blob/d2a294c2a984baed27676068b15ed9a29b06ab6f/include/signal.h#L98C9-L98C21
+	// Linux (128 bytes) - https://github.com/torvalds/linux/blob/ab75170520d4964f3acf8bb1f91d34cbc650688e/arch/x86/include/asm/signal.h#L25
+	sigset_t       [128]byte
+	pthread_attr_t [64]byte
+	pthread_t      int
+	pthread_key_t  uint64
+)
+
+// for pthread_sigmask:
+
+type sighow int32
+
+const (
+	SIG_BLOCK   sighow = 0
+	SIG_UNBLOCK sighow = 1
+	SIG_SETMASK sighow = 2
+)
+
+type G struct {
+	stacklo uintptr
+	stackhi uintptr
+}
+
+type ThreadStart struct {
+	g   *G
+	tls *uintptr
+	fn  uintptr
+}

+ 26 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go

@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo
+
+package fakecgo
+
+type (
+	pthread_mutex_t struct {
+		sig    int64
+		opaque [56]byte
+	}
+	pthread_cond_t struct {
+		sig    int64
+		opaque [40]byte
+	}
+)
+
+var (
+	PTHREAD_COND_INITIALIZER  = pthread_cond_t{sig: 0x3CB0B1BB}
+	PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t{sig: 0x32AAABA7}
+)
+
+type stack_t struct {
+	/* not implemented */
+}

+ 20 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go

@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo
+
+package fakecgo
+
+type (
+	pthread_cond_t  uintptr
+	pthread_mutex_t uintptr
+)
+
+var (
+	PTHREAD_COND_INITIALIZER  = pthread_cond_t(0)
+	PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t(0)
+)
+
+type stack_t struct {
+	/* not implemented */
+}

+ 20 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go

@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo
+
+package fakecgo
+
+type (
+	pthread_cond_t  [48]byte
+	pthread_mutex_t [48]byte
+)
+
+var (
+	PTHREAD_COND_INITIALIZER  = pthread_cond_t{}
+	PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t{}
+)
+
+type stack_t struct {
+	/* not implemented */
+}

+ 26 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_netbsd.go

@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
+
+//go:build !cgo
+
+package fakecgo
+
+type (
+	pthread_cond_t  uintptr
+	pthread_mutex_t uintptr
+)
+
+var (
+	PTHREAD_COND_INITIALIZER  = pthread_cond_t(0)
+	PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t(0)
+)
+
+// Source: https://github.com/NetBSD/src/blob/613e27c65223fd2283b6ed679da1197e12f50e27/sys/compat/linux/arch/m68k/linux_signal.h#L133
+type stack_t struct {
+	ss_sp    uintptr
+	ss_flags int32
+	ss_size  uintptr
+}
+
+// Source: https://github.com/NetBSD/src/blob/613e27c65223fd2283b6ed679da1197e12f50e27/sys/sys/signal.h#L261
+const SS_DISABLE = 0x004

+ 23 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/netbsd.go

@@ -0,0 +1,23 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build netbsd
+
+package fakecgo
+
+import _ "unsafe" // for go:linkname
+
+// Supply environ and __progname, because we don't
+// link against the standard NetBSD crt0.o and the
+// libc dynamic library needs them.
+
+//go:linkname _environ environ
+//go:linkname _progname __progname
+//go:linkname ___ps_strings __ps_strings
+
+var (
+	_environ      uintptr
+	_progname     uintptr
+	___ps_strings uintptr
+)

+ 19 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go

@@ -0,0 +1,19 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+import _ "unsafe" // for go:linkname
+
+//go:linkname x_cgo_setenv_trampoline x_cgo_setenv_trampoline
+//go:linkname _cgo_setenv runtime._cgo_setenv
+var x_cgo_setenv_trampoline byte
+var _cgo_setenv = &x_cgo_setenv_trampoline
+
+//go:linkname x_cgo_unsetenv_trampoline x_cgo_unsetenv_trampoline
+//go:linkname _cgo_unsetenv runtime._cgo_unsetenv
+var x_cgo_unsetenv_trampoline byte
+var _cgo_unsetenv = &x_cgo_unsetenv_trampoline

+ 107 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_386.s

@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
+
+//go:build !cgo && (freebsd || linux)
+
+#include "textflag.h"
+#include "go_asm.h"
+
+// These trampolines map the gcc ABI to Go ABI0 and then call into the Go equivalent functions.
+// On i386, both GCC and Go use stack-based calling conventions.
+//
+// When C calls a function, the stack looks like:
+//   0(SP) = return address
+//   4(SP) = arg1
+//   8(SP) = arg2
+//   ...
+//
+// When we declare a Go function with frame size $N-0, Go's prologue
+// effectively does SUB $N, SP, so the C arguments shift up by N bytes:
+//   N+0(SP) = return address
+//   N+4(SP) = arg1
+//   N+8(SP) = arg2
+//
+// Go ABI0 on 386 expects arguments starting at 0(FP) which equals N+4(SP)
+// after the prologue (where N is the local frame size).
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT, $8-0
+	// C args at 12(SP) and 16(SP) after frame setup (8 bytes local + 4 bytes ret addr)
+	// Go function expects args at 0(SP) and 4(SP) in local frame
+	MOVL 12(SP), AX               // first C arg
+	MOVL 16(SP), BX               // second C arg
+	MOVL AX, 0(SP)                // Go arg 1
+	MOVL BX, 4(SP)                // Go arg 2
+	MOVL ·x_cgo_init_call(SB), CX
+	MOVL (CX), CX
+	CALL CX
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $4-0
+	// C args at 8(SP) after frame setup (4 bytes local + 4 bytes ret addr)
+	MOVL 8(SP), AX                        // first C arg
+	MOVL AX, 0(SP)                        // Go arg 1
+	MOVL ·x_cgo_thread_start_call(SB), CX
+	MOVL (CX), CX
+	CALL CX
+	RET
+
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $4-0
+	MOVL 8(SP), AX                  // first C arg
+	MOVL AX, 0(SP)                  // Go arg 1
+	MOVL ·x_cgo_setenv_call(SB), CX
+	MOVL (CX), CX
+	CALL CX
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $4-0
+	MOVL 8(SP), AX                    // first C arg
+	MOVL AX, 0(SP)                    // Go arg 1
+	MOVL ·x_cgo_unsetenv_call(SB), CX
+	MOVL (CX), CX
+	CALL CX
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0-0
+	CALL ·x_cgo_notify_runtime_init_done(SB)
+	RET
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_bindm(SB)
+	RET
+
+// func setg_trampoline(setg uintptr, g uintptr)
+// This is called from Go, so args are at normal FP positions
+TEXT ·setg_trampoline(SB), NOSPLIT, $4-8
+	MOVL g+4(FP), AX
+	MOVL setg+0(FP), BX
+
+	// setg expects g in 0(SP)
+	MOVL AX, 0(SP)
+	CALL BX
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT, $4-0
+	MOVL 8(SP), AX                 // first C arg
+	MOVL AX, 0(SP)                 // Go arg 1
+	MOVL ·threadentry_call(SB), CX
+	MOVL (CX), CX
+	CALL CX
+	RET
+
+TEXT ·call5(SB), NOSPLIT, $20-28
+	MOVL fn+0(FP), AX
+	MOVL a1+4(FP), BX
+	MOVL a2+8(FP), CX
+	MOVL a3+12(FP), DX
+	MOVL a4+16(FP), SI
+	MOVL a5+20(FP), DI
+
+	// Place arguments on local stack frame for C calling convention
+	MOVL BX, 0(SP)     // a1
+	MOVL CX, 4(SP)     // a2
+	MOVL DX, 8(SP)     // a3
+	MOVL SI, 12(SP)    // a4
+	MOVL DI, 16(SP)    // a5
+	CALL AX
+	MOVL AX, r1+24(FP)
+	RET

+ 107 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s

@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || linux || freebsd)
+
+/*
+trampoline for emulating required C functions for cgo in go (see cgo.go)
+(we convert cdecl calling convention to go and vice-versa)
+
+C Calling convention cdecl used here (we only need integer args):
+1. arg: DI
+2. arg: SI
+3. arg: DX
+4. arg: CX
+5. arg: R8
+6. arg: R9
+We don't need floats with these functions -> AX=0
+return value will be in AX
+temporary register is R11
+*/
+#include "textflag.h"
+#include "go_asm.h"
+#include "abi_amd64.h"
+
+// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions.
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16
+	MOVQ DI, AX
+	MOVQ SI, BX
+	MOVQ ·x_cgo_init_call(SB), R11
+	MOVQ (R11), R11
+	CALL R11
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8
+	MOVQ DI, AX
+	MOVQ ·x_cgo_thread_start_call(SB), R11
+	MOVQ (R11), R11
+	CALL R11
+	RET
+
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8
+	MOVQ DI, AX
+	MOVQ ·x_cgo_setenv_call(SB), R11
+	MOVQ (R11), R11
+	CALL R11
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8
+	MOVQ DI, AX
+	MOVQ ·x_cgo_unsetenv_call(SB), R11
+	MOVQ (R11), R11
+	CALL R11
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0
+	JMP ·x_cgo_notify_runtime_init_done(SB)
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
+	JMP ·x_cgo_bindm(SB)
+
+// func setg_trampoline(setg uintptr, g uintptr)
+TEXT ·setg_trampoline(SB), NOSPLIT, $0-16
+	MOVQ G+8(FP), DI
+	MOVQ setg+0(FP), R11
+	XORL AX, AX
+	CALL R11
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT, $0
+	// See crosscall2.
+	PUSH_REGS_HOST_TO_ABI0()
+
+	// X15 is designated by Go as a fixed zero register.
+	// Calling directly into ABIInternal, ensure it is zero.
+	PXOR X15, X15
+
+	MOVQ DI, AX
+	MOVQ ·threadentry_call(SB), R11
+	MOVQ (R11), R11
+	CALL R11
+
+	POP_REGS_HOST_TO_ABI0()
+	RET
+
+TEXT ·call5(SB), NOSPLIT, $0-56
+	MOVQ fn+0(FP), R11
+	MOVQ a1+8(FP), DI
+	MOVQ a2+16(FP), SI
+	MOVQ a3+24(FP), DX
+	MOVQ a4+32(FP), CX
+	MOVQ a5+40(FP), R8
+
+	XORL AX, AX // no floats
+
+	PUSHQ BP       // save BP
+	MOVQ  SP, BP   // save SP inside BP bc BP is callee-saved
+	SUBQ  $16, SP  // allocate space for alignment
+	ANDQ  $-16, SP // align on 16 bytes for SSE
+
+	CALL R11
+
+	MOVQ BP, SP // get SP back
+	POPQ BP     // restore BP
+
+	MOVQ AX, ret+48(FP)
+	RET

+ 81 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm.s

@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
+
+//go:build !cgo && (freebsd || linux)
+
+#include "textflag.h"
+#include "go_asm.h"
+
+// These trampolines map the gcc ABI to Go ABI0 and then call into the Go equivalent functions.
+// On ARM32, Go ABI0 uses stack-based calling convention.
+// Arguments are placed on the stack starting at 4(SP) after the prologue.
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT, $8-0
+	MOVW R0, 4(R13)
+	MOVW R1, 8(R13)
+	MOVW ·x_cgo_init_call(SB), R12
+	MOVW (R12), R12
+	CALL (R12)
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8-0
+	MOVW R0, 4(R13)
+	MOVW ·x_cgo_thread_start_call(SB), R12
+	MOVW (R12), R12
+	CALL (R12)
+	RET
+
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8-0
+	MOVW R0, 4(R13)
+	MOVW ·x_cgo_setenv_call(SB), R12
+	MOVW (R12), R12
+	CALL (R12)
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8-0
+	MOVW R0, 4(R13)
+	MOVW ·x_cgo_unsetenv_call(SB), R12
+	MOVW (R12), R12
+	CALL (R12)
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0-0
+	CALL ·x_cgo_notify_runtime_init_done(SB)
+	RET
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_bindm(SB)
+	RET
+
+// func setg_trampoline(setg uintptr, g uintptr)
+TEXT ·setg_trampoline(SB), NOSPLIT, $0-8
+	MOVW G+4(FP), R0
+	MOVW setg+0(FP), R12
+	BL   (R12)
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT, $8-0
+	// See crosscall2.
+	MOVW R0, 4(R13)
+	MOVW ·threadentry_call(SB), R12
+	MOVW (R12), R12
+	CALL (R12)
+	RET
+
+TEXT ·call5(SB), NOSPLIT, $8-28
+	MOVW fn+0(FP), R12
+	MOVW a1+4(FP), R0
+	MOVW a2+8(FP), R1
+	MOVW a3+12(FP), R2
+	MOVW a4+16(FP), R3
+	MOVW a5+20(FP), R4
+
+	// Store 5th arg below SP (in local frame area)
+	MOVW R4, arg5-8(SP)
+
+	// Align SP to 8 bytes for call (required by ARM AAPCS)
+	SUB  $8, R13
+	CALL (R12)
+	ADD  $8, R13
+	MOVW R0, r1+24(FP)
+	RET

+ 84 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s

@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux)
+
+#include "textflag.h"
+#include "go_asm.h"
+#include "abi_arm64.h"
+
+// These trampolines map the gcc ABI to Go ABIInternal and then calls into the Go equivalent functions.
+// Note that C arguments are passed in R0-R7, which matches Go ABIInternal for the first eight arguments.
+// R9 is used as a temporary register.
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT, $0-0
+	MOVD ·x_cgo_init_call(SB), R9
+	MOVD (R9), R9
+	CALL R9
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $0-0
+	MOVD ·x_cgo_thread_start_call(SB), R9
+	MOVD (R9), R9
+	CALL R9
+	RET
+
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $0-0
+	MOVD ·x_cgo_setenv_call(SB), R9
+	MOVD (R9), R9
+	CALL R9
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $0-0
+	MOVD ·x_cgo_unsetenv_call(SB), R9
+	MOVD (R9), R9
+	CALL R9
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0-0
+	CALL ·x_cgo_notify_runtime_init_done(SB)
+	RET
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_bindm(SB)
+	RET
+
+// func setg_trampoline(setg uintptr, g uintptr)
+TEXT ·setg_trampoline(SB), NOSPLIT, $0-16
+	MOVD G+8(FP), R0
+	MOVD setg+0(FP), R9
+	CALL R9
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT, $0-0
+	// See crosscall2.
+	SUB  $(8*24), RSP
+	STP  (R0, R1), (8*1)(RSP)
+	MOVD R3, (8*3)(RSP)
+
+	SAVE_R19_TO_R28(8*4)
+	SAVE_F8_TO_F15(8*14)
+	STP (R29, R30), (8*22)(RSP)
+
+	MOVD ·threadentry_call(SB), R9
+	MOVD (R9), R9
+	CALL R9
+	MOVD $0, R0                    // TODO: get the return value from threadentry
+
+	RESTORE_R19_TO_R28(8*4)
+	RESTORE_F8_TO_F15(8*14)
+	LDP (8*22)(RSP), (R29, R30)
+
+	ADD $(8*24), RSP
+	RET
+
+TEXT ·call5(SB), NOSPLIT, $0-0
+	MOVD fn+0(FP), R9
+	MOVD a1+8(FP), R0
+	MOVD a2+16(FP), R1
+	MOVD a3+24(FP), R2
+	MOVD a4+32(FP), R3
+	MOVD a5+40(FP), R4
+	CALL R9
+	MOVD R0, ret+48(FP)
+	RET

+ 88 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_loong64.s

@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
+
+//go:build !cgo && linux
+
+#include "textflag.h"
+#include "go_asm.h"
+#include "abi_loong64.h"
+
+// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions.
+// R23 is used as temporary register.
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16
+	MOVV R4, 8(R3)
+	MOVV R5, 16(R3)
+	MOVV ·x_cgo_init_call(SB), R23
+	MOVV (R23), R23
+	CALL (R23)
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8
+	MOVV R4, 8(R3)
+	MOVV ·x_cgo_thread_start_call(SB), R23
+	MOVV (R23), R23
+	CALL (R23)
+	RET
+
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8
+	MOVV R4, 8(R3)
+	MOVV ·x_cgo_setenv_call(SB), R23
+	MOVV (R23), R23
+	CALL (R23)
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8
+	MOVV R4, 8(R3)
+	MOVV ·x_cgo_unsetenv_call(SB), R23
+	MOVV (R23), R23
+	CALL (R23)
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_notify_runtime_init_done(SB)
+	RET
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_bindm(SB)
+	RET
+
+// func setg_trampoline(setg uintptr, g uintptr)
+TEXT ·setg_trampoline(SB), NOSPLIT, $0
+	MOVV G+8(FP), R4
+	MOVV setg+0(FP), R23
+	CALL (R23)
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT, $0
+	// See crosscall2.
+	ADDV $(-23*8), R3
+	MOVV R4, (1*8)(R3) // fn unsafe.Pointer
+	MOVV R5, (2*8)(R3) // a unsafe.Pointer
+	MOVV R7, (3*8)(R3) // ctxt uintptr
+
+	SAVE_R22_TO_R31((4*8))
+	SAVE_F24_TO_F31((14*8))
+	MOVV R1, (22*8)(R3)
+
+	MOVV ·threadentry_call(SB), R23
+	MOVV (R23), R23
+	CALL (R23)
+
+	RESTORE_R22_TO_R31((4*8))
+	RESTORE_F24_TO_F31((14*8))
+	MOVV (22*8)(R3), R1
+
+	ADDV $(23*8), R3
+	RET
+
+TEXT ·call5(SB), NOSPLIT, $0-0
+	MOVV fn+0(FP), R23
+	MOVV a1+8(FP), R4
+	MOVV a2+16(FP), R5
+	MOVV a3+24(FP), R6
+	MOVV a4+32(FP), R7
+	MOVV a5+40(FP), R8
+	CALL (R23)
+	MOVV R4, ret+48(FP)
+	RET

+ 227 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_ppc64le.s

@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
+
+//go:build !cgo && linux
+
+#include "textflag.h"
+#include "go_asm.h"
+
+// These trampolines map the C ABI to Go ABI and call into the Go equivalent functions.
+//
+// PPC64LE ELFv2 ABI stack frame layout:
+//   0(R1)  = backchain (pointer to caller's frame)
+//   8(R1)  = CR save area
+//   16(R1) = LR save area
+//   24(R1) = reserved
+//   32(R1) = parameter save area (minimum 64 bytes for 8 args)
+//
+// Two patterns are used depending on call direction:
+//
+// C→Go trampolines: The C caller already provides a 32-byte linkage area.
+//   Save LR/CR into caller's frame at 16(R1)/8(R1) BEFORE allocating,
+//   then use MOVDU to allocate and set backchain atomically.
+//
+// Go→C trampolines: Go callers don't provide ELFv2 linkage area.
+//   Allocate frame first with MOVDU, then save LR/CR into OUR frame.
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	// R3, R4 already have the arguments
+	MOVD ·x_cgo_init_call(SB), R12
+	MOVD (R12), R12
+	MOVD R12, CTR
+	CALL CTR
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	MOVD ·x_cgo_thread_start_call(SB), R12
+	MOVD (R12), R12
+	MOVD R12, CTR
+	CALL CTR
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+// void (*_cgo_setenv)(char**)
+// C arg: R3 = pointer to env
+// This is C→Go: caller is C ABI.
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	MOVD ·x_cgo_setenv_call(SB), R12
+	MOVD (R12), R12
+	MOVD R12, CTR
+	CALL CTR
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	MOVD ·x_cgo_unsetenv_call(SB), R12
+	MOVD (R12), R12
+	MOVD R12, CTR
+	CALL CTR
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	CALL ·x_cgo_notify_runtime_init_done(SB)
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	CALL ·x_cgo_bindm(SB)
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+TEXT ·setg_trampoline(SB), NOSPLIT|NOFRAME, $0-16
+	// Save LR, CR, and R31 to non-volatile registers (C ABI preserves R14-R31)
+	MOVD LR, R20
+	MOVW CR, R21
+	MOVD R31, R22 // save R31 because load_g clobbers it
+
+	// Load arguments from Go stack
+	MOVD 32(R1), R12 // setg function pointer
+	MOVD 40(R1), R3  // g pointer → first C arg
+
+	// Allocate ELFv2 frame for the C callee (32 bytes minimum)
+	MOVDU R1, -32(R1)
+
+	// Call setg_gcc which stores g to TLS
+	MOVD R12, CTR
+	CALL CTR
+
+	// setg_gcc stored g to TLS but restored old g in R30.
+	// Call load_g to reload g from TLS into R30.
+	// Note: load_g clobbers R31
+	CALL runtime·load_g(SB)
+
+	// Deallocate frame
+	ADD $32, R1
+
+	// Clear R0 before returning to Go code.
+	// Go uses R0 as a constant 0 for things like "std r0,X(r1)" to zero stack locations.
+	// C/assembly functions may leave garbage in R0.
+	XOR R0, R0, R0
+
+	// Restore LR, CR, and R31 from non-volatile registers
+	MOVD R22, R31 // restore R31
+	MOVD R20, LR
+	MOVW R21, CR
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT|NOFRAME, $0-0
+	MOVD LR, 16(R1)
+	MOVW CR, R0
+	MOVD R0, 8(R1)
+
+	MOVDU R1, -32(R1)
+
+	MOVD ·threadentry_call(SB), R12
+	MOVD (R12), R12
+	MOVD R12, CTR
+	CALL CTR
+
+	ADD $32, R1
+
+	MOVD 16(R1), LR
+	MOVD 8(R1), R0
+	MOVW R0, CR
+	RET
+
+TEXT ·call5(SB), NOSPLIT|NOFRAME, $0-56
+	MOVD LR, R20
+	MOVW CR, R21
+
+	// Load arguments from Go stack into C argument registers
+	// Go placed args at 32(R1), 40(R1), etc.
+	MOVD 32(R1), R12 // fn
+	MOVD 40(R1), R3  // a1 → first C arg
+	MOVD 48(R1), R4  // a2 → second C arg
+	MOVD 56(R1), R5  // a3 → third C arg
+	MOVD 64(R1), R6  // a4 → fourth C arg
+	MOVD 72(R1), R7  // a5 → fifth C arg
+
+	MOVDU R1, -32(R1)
+
+	MOVD R12, CTR
+	CALL CTR
+
+	// Store return value
+	// After MOVDU -32, original 80(R1) is now at 80+32=112(R1)
+	MOVD R3, (80+32)(R1)
+
+	// Deallocate frame
+	ADD $32, R1
+
+	// Clear R0 before returning to Go code.
+	// Go uses R0 as a constant 0 register for things like "std r0,X(r1)"
+	// to zero stack locations. C functions may leave garbage in R0.
+	XOR R0, R0, R0
+
+	// Restore LR/CR from non-volatile registers
+	MOVD R20, LR
+	MOVW R21, CR
+	RET

+ 72 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_riscv64.s

@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
+
+//go:build !cgo && linux
+
+#include "textflag.h"
+#include "go_asm.h"
+
+// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions.
+// X5 is used as temporary register.
+
+TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16
+	MOV  X10, 8(SP)
+	MOV  X11, 16(SP)
+	MOV  ·x_cgo_init_call(SB), X5
+	MOV  (X5), X5
+	CALL X5
+	RET
+
+TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8
+	MOV  X10, 8(SP)
+	MOV  ·x_cgo_thread_start_call(SB), X5
+	MOV  (X5), X5
+	CALL X5
+	RET
+
+TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8
+	MOV  X10, 8(SP)
+	MOV  ·x_cgo_setenv_call(SB), X5
+	MOV  (X5), X5
+	CALL X5
+	RET
+
+TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8
+	MOV  X10, 8(SP)
+	MOV  ·x_cgo_unsetenv_call(SB), X5
+	MOV  (X5), X5
+	CALL X5
+	RET
+
+TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_notify_runtime_init_done(SB)
+	RET
+
+TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
+	CALL ·x_cgo_bindm(SB)
+	RET
+
+// func setg_trampoline(setg uintptr, g uintptr)
+TEXT ·setg_trampoline(SB), NOSPLIT, $0
+	MOV  gp+8(FP), X10
+	MOV  setg+0(FP), X5
+	CALL X5
+	RET
+
+TEXT threadentry_trampoline(SB), NOSPLIT, $16
+	MOV  X10, 8(SP)
+	MOV  ·threadentry_call(SB), X5
+	MOV  (X5), X5
+	CALL X5
+	RET
+
+TEXT ·call5(SB), NOSPLIT, $0-48
+	MOV  fn+0(FP), X5
+	MOV  a1+8(FP), X10
+	MOV  a2+16(FP), X11
+	MOV  a3+24(FP), X12
+	MOV  a4+32(FP), X13
+	MOV  a5+40(FP), X14
+	CALL X5
+	MOV  X10, ret+48(FP)
+	RET

+ 165 - 0
v4/vendor/github.com/ebitengine/purego/internal/fakecgo/zsymbols.go

@@ -0,0 +1,165 @@
+// Code generated by 'go generate' with gen.go. DO NOT EDIT.
+
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
+
+//go:build !cgo && (darwin || freebsd || linux || netbsd)
+
+package fakecgo
+
+import (
+	"syscall"
+	"unsafe"
+)
+
+//go:nosplit
+//go:norace
+func malloc(size uintptr) unsafe.Pointer {
+	ret := call5(mallocABI0, uintptr(size), 0, 0, 0, 0)
+	// this indirection is to avoid go vet complaining about possible misuse of unsafe.Pointer
+	return *(*unsafe.Pointer)(unsafe.Pointer(&ret))
+}
+
+//go:nosplit
+//go:norace
+func free(ptr unsafe.Pointer) {
+	call5(freeABI0, uintptr(ptr), 0, 0, 0, 0)
+}
+
+//go:nosplit
+//go:norace
+func setenv(name *byte, value *byte, overwrite int32) int32 {
+	return int32(call5(setenvABI0, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), uintptr(overwrite), 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func unsetenv(name *byte) int32 {
+	return int32(call5(unsetenvABI0, uintptr(unsafe.Pointer(name)), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func sigfillset(set *sigset_t) int32 {
+	return int32(call5(sigfillsetABI0, uintptr(unsafe.Pointer(set)), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func nanosleep(ts *syscall.Timespec, rem *syscall.Timespec) int32 {
+	return int32(call5(nanosleepABI0, uintptr(unsafe.Pointer(ts)), uintptr(unsafe.Pointer(rem)), 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func abort() {
+	call5(abortABI0, 0, 0, 0, 0, 0)
+}
+
+//go:nosplit
+//go:norace
+func pthread_attr_init(attr *pthread_attr_t) int32 {
+	return int32(call5(pthread_attr_initABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_create(thread *pthread_t, attr *pthread_attr_t, start unsafe.Pointer, arg unsafe.Pointer) int32 {
+	return int32(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(start), uintptr(arg), 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_detach(thread pthread_t) int32 {
+	return int32(call5(pthread_detachABI0, uintptr(thread), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_sigmask(how sighow, ign *sigset_t, oset *sigset_t) int32 {
+	return int32(call5(pthread_sigmaskABI0, uintptr(how), uintptr(unsafe.Pointer(ign)), uintptr(unsafe.Pointer(oset)), 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_mutex_lock(mutex *pthread_mutex_t) int32 {
+	return int32(call5(pthread_mutex_lockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_mutex_unlock(mutex *pthread_mutex_t) int32 {
+	return int32(call5(pthread_mutex_unlockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_cond_broadcast(cond *pthread_cond_t) int32 {
+	return int32(call5(pthread_cond_broadcastABI0, uintptr(unsafe.Pointer(cond)), 0, 0, 0, 0))
+}
+
+//go:nosplit
+//go:norace
+func pthread_setspecific(key pthread_key_t, value unsafe.Pointer) int32 {
+	return int32(call5(pthread_setspecificABI0, uintptr(key), uintptr(value), 0, 0, 0))
+}
+
+//go:linkname _malloc _malloc
+var _malloc uint8
+var mallocABI0 = uintptr(unsafe.Pointer(&_malloc))
+
+//go:linkname _free _free
+var _free uint8
+var freeABI0 = uintptr(unsafe.Pointer(&_free))
+
+//go:linkname _setenv _setenv
+var _setenv uint8
+var setenvABI0 = uintptr(unsafe.Pointer(&_setenv))
+
+//go:linkname _unsetenv _unsetenv
+var _unsetenv uint8
+var unsetenvABI0 = uintptr(unsafe.Pointer(&_unsetenv))
+
+//go:linkname _sigfillset _sigfillset
+var _sigfillset uint8
+var sigfillsetABI0 = uintptr(unsafe.Pointer(&_sigfillset))
+
+//go:linkname _nanosleep _nanosleep
+var _nanosleep uint8
+var nanosleepABI0 = uintptr(unsafe.Pointer(&_nanosleep))
+
+//go:linkname _abort _abort
+var _abort uint8
+var abortABI0 = uintptr(unsafe.Pointer(&_abort))
+
+//go:linkname _pthread_attr_init _pthread_attr_init
+var _pthread_attr_init uint8
+var pthread_attr_initABI0 = uintptr(unsafe.Pointer(&_pthread_attr_init))
+
+//go:linkname _pthread_create _pthread_create
+var _pthread_create uint8
+var pthread_createABI0 = uintptr(unsafe.Pointer(&_pthread_create))
+
+//go:linkname _pthread_detach _pthread_detach
+var _pthread_detach uint8
+var pthread_detachABI0 = uintptr(unsafe.Pointer(&_pthread_detach))
+
+//go:linkname _pthread_sigmask _pthread_sigmask
+var _pthread_sigmask uint8
+var pthread_sigmaskABI0 = uintptr(unsafe.Pointer(&_pthread_sigmask))
+
+//go:linkname _pthread_mutex_lock _pthread_mutex_lock
+var _pthread_mutex_lock uint8
+var pthread_mutex_lockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_lock))
+
+//go:linkname _pthread_mutex_unlock _pthread_mutex_unlock
+var _pthread_mutex_unlock uint8
+var pthread_mutex_unlockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_unlock))
+
+//go:linkname _pthread_cond_broadcast _pthread_cond_broadcast
+var _pthread_cond_broadcast uint8
+var pthread_cond_broadcastABI0 = uintptr(unsafe.Pointer(&_pthread_cond_broadcast))
+
+//go:linkname _pthread_setspecific _pthread_setspecific
+var _pthread_setspecific uint8
+var pthread_setspecificABI0 = uintptr(unsafe.Pointer(&_pthread_setspecific))

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio