modernc.org/z@v1.7.4/lib/z_windows_arm64.go (about) 1 // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib\z_windows_arm64.go -pkgname z -trace-translation-units C:\Users\jnml\AppData\Local\Temp\go-generate-2743941486\cdb.json libz.a', DO NOT EDIT. 2 3 package z 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 11 "modernc.org/libc" 12 "modernc.org/libc/sys/types" 13 ) 14 15 var _ = math.Pi 16 var _ reflect.Kind 17 var _ atomic.Value 18 var _ unsafe.Pointer 19 var _ *libc.TLS 20 var _ types.Size_t 21 22 const ( 23 BASE = 65521 24 CHAR_BIT = 8 25 CHAR_MAX = 127 26 CHAR_MIN = -128 27 DEF_MEM_LEVEL = 8 28 DEF_WBITS = 15 29 DUMMYSTRUCTNAME = 0 30 DUMMYSTRUCTNAME1 = 0 31 DUMMYSTRUCTNAME2 = 0 32 DUMMYSTRUCTNAME3 = 0 33 DUMMYSTRUCTNAME4 = 0 34 DUMMYSTRUCTNAME5 = 0 35 DUMMYUNIONNAME = 0 36 DUMMYUNIONNAME1 = 0 37 DUMMYUNIONNAME2 = 0 38 DUMMYUNIONNAME3 = 0 39 DUMMYUNIONNAME4 = 0 40 DUMMYUNIONNAME5 = 0 41 DUMMYUNIONNAME6 = 0 42 DUMMYUNIONNAME7 = 0 43 DUMMYUNIONNAME8 = 0 44 DUMMYUNIONNAME9 = 0 45 DYN_TREES = 2 46 EXIT_FAILURE = 1 47 EXIT_SUCCESS = 0 48 FAR = 0 49 HAVE_MEMCPY = 0 50 INT_MAX = 2147483647 51 INT_MIN = -2147483648 52 LLONG_MAX = 9223372036854775807 53 LLONG_MIN = -9223372036854775808 54 LONG_LONG_MAX = 9223372036854775807 55 LONG_LONG_MIN = -9223372036854775808 56 LONG_MAX = 2147483647 57 LONG_MIN = -2147483648 58 MAX_MATCH = 258 59 MAX_MEM_LEVEL = 9 60 MAX_WBITS = 15 61 MB_LEN_MAX = 1 62 MINGW_DDK_H = 0 63 MINGW_HAS_DDK_H = 1 64 MINGW_HAS_SECURE_API = 1 65 MINGW_SDK_INIT = 0 66 MIN_MATCH = 3 67 NMAX = 5552 68 OS_CODE = 10 69 PRESET_DICT = 0x20 70 RAND_MAX = 0x7fff 71 SCHAR_MAX = 127 72 SCHAR_MIN = -128 73 SEEK_CUR = 1 74 SEEK_END = 2 75 SEEK_SET = 0 76 SHRT_MAX = 32767 77 SHRT_MIN = -32768 78 STATIC_TREES = 1 79 STDC = 0 80 STDC99 = 0 81 STORED_BLOCK = 0 82 UCHAR_MAX = 255 83 UINT_MAX = 4294967295 84 ULLONG_MAX = 18446744073709551615 85 ULONG_LONG_MAX = 18446744073709551615 86 ULONG_MAX = 4294967295 87 UNALIGNED = 0 88 USE___UUIDOF = 0 89 USHRT_MAX = 65535 90 WIN32 = 1 91 WIN64 = 1 92 WINNT = 1 93 ZCONF_H = 0 94 ZEXPORT = 0 95 ZEXPORTVA = 0 96 ZLIB_H = 0 97 ZLIB_INTERNAL = 0 98 ZLIB_VERNUM = 0x12b0 99 ZLIB_VERSION = "1.2.11" 100 ZLIB_VER_MAJOR = 1 101 ZLIB_VER_MINOR = 2 102 ZLIB_VER_REVISION = 11 103 ZLIB_VER_SUBREVISION = 0 104 ZUTIL_H = 0 105 Z_ASCII = 1 106 Z_BEST_COMPRESSION = 9 107 Z_BEST_SPEED = 1 108 Z_BINARY = 0 109 Z_BLOCK = 5 110 Z_BUF_ERROR = -5 111 Z_DATA_ERROR = -3 112 Z_DEFAULT_COMPRESSION = -1 113 Z_DEFAULT_STRATEGY = 0 114 Z_DEFLATED = 8 115 Z_ERRNO = -1 116 Z_FILTERED = 1 117 Z_FINISH = 4 118 Z_FIXED = 4 119 Z_FULL_FLUSH = 3 120 Z_HUFFMAN_ONLY = 2 121 Z_MEM_ERROR = -4 122 Z_NEED_DICT = 2 123 Z_NO_COMPRESSION = 0 124 Z_NO_FLUSH = 0 125 Z_NULL = 0 126 Z_OK = 0 127 Z_PARTIAL_FLUSH = 1 128 Z_RLE = 3 129 Z_STREAM_END = 1 130 Z_STREAM_ERROR = -2 131 Z_SYNC_FLUSH = 2 132 Z_TEXT = 1 133 Z_TREES = 6 134 Z_UNKNOWN = 2 135 Z_VERSION_ERROR = -6 136 X_AGLOBAL = 0 137 X_ALLOCA_S_HEAP_MARKER = 0xDDDD 138 X_ALLOCA_S_MARKER_SIZE = 16 139 X_ALLOCA_S_STACK_MARKER = 0xCCCC 140 X_ALLOCA_S_THRESHOLD = 1024 141 X_ANONYMOUS_STRUCT = 0 142 X_ANONYMOUS_UNION = 0 143 X_ARGMAX = 100 144 X_ARM64_ = 1 145 X_CALL_REPORTFAULT = 0x2 146 X_CONST_RETURN = 0 147 X_CRTNOALIAS = 0 148 X_CRTRESTRICT = 0 149 X_CRT_ABS_DEFINED = 0 150 X_CRT_ALGO_DEFINED = 0 151 X_CRT_ALLOCATION_DEFINED = 0 152 X_CRT_ALTERNATIVE_IMPORTED = 0 153 X_CRT_ATOF_DEFINED = 0 154 X_CRT_DOUBLE_DEC = 0 155 X_CRT_ERRNO_DEFINED = 0 156 X_CRT_MANAGED_HEAP_DEPRECATE = 0 157 X_CRT_MEMORY_DEFINED = 0 158 X_CRT_PACKING = 8 159 X_CRT_PERROR_DEFINED = 0 160 X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 161 X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 162 X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 163 X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 164 X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 165 X_CRT_SWAB_DEFINED = 0 166 X_CRT_SYSTEM_DEFINED = 0 167 X_CRT_TERMINATE_DEFINED = 0 168 X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 169 X_CRT_WPERROR_DEFINED = 0 170 X_CRT_WSYSTEM_DEFINED = 0 171 X_CVTBUFSIZE = 349 172 X_DEV_T_DEFINED = 0 173 X_DIV_T_DEFINED = 0 174 X_DLL = 0 175 X_ERRCODE_DEFINED = 0 176 X_FILE_OFFSET_BITS = 64 177 X_FILE_OFFSET_BITS_SET_OFFT = 0 178 X_FREEA_INLINE = 0 179 X_FREEENTRY = 0 180 X_GCC_LIMITS_H_ = 0 181 X_HEAPBADBEGIN = -3 182 X_HEAPBADNODE = -4 183 X_HEAPBADPTR = -6 184 X_HEAPEMPTY = -1 185 X_HEAPEND = -5 186 X_HEAPINFO_DEFINED = 0 187 X_HEAPOK = -2 188 X_HEAP_MAXREQ = 0xFFFFFFFFFFFFFFE0 189 X_INC_CORECRT = 0 190 X_INC_CORECRT_WSTDLIB = 0 191 X_INC_CRTDEFS = 0 192 X_INC_CRTDEFS_MACRO = 0 193 X_INC_MINGW_SECAPI = 0 194 X_INC_STDLIB = 0 195 X_INC_STDLIB_S = 0 196 X_INC_STRING = 0 197 X_INC_STRING_S = 0 198 X_INC_TYPES = 0 199 X_INC_VADEFS = 0 200 X_INC__MINGW_H = 0 201 X_INO_T_DEFINED = 0 202 X_INT128_DEFINED = 0 203 X_INTPTR_T_DEFINED = 0 204 X_MALLOC_H_ = 0 205 X_MAX_DIR = 256 206 X_MAX_DRIVE = 3 207 X_MAX_ENV = 32767 208 X_MAX_EXT = 256 209 X_MAX_FNAME = 256 210 X_MAX_PATH = 260 211 X_MAX_WAIT_MALLOC_CRT = 60000 212 X_MODE_T_ = 0 213 X_MT = 0 214 X_M_ARM64 = 1 215 X_NLSCMPERROR = 2147483647 216 X_NLSCMP_DEFINED = 0 217 X_OFF64_T_DEFINED = 0 218 X_OFF_T_ = 0 219 X_OFF_T_DEFINED = 0 220 X_ONEXIT_T_DEFINED = 0 221 X_OUT_TO_DEFAULT = 0 222 X_OUT_TO_MSGBOX = 2 223 X_OUT_TO_STDERR = 1 224 X_PGLOBAL = 0 225 X_PID_T_ = 0 226 X_PTRDIFF_T = 0 227 X_PTRDIFF_T_ = 0 228 X_PTRDIFF_T_DEFINED = 0 229 X_QSORT_S_DEFINED = 0 230 X_REPORT_ERRMODE = 3 231 X_RSIZE_T_DEFINED = 0 232 X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD 233 X_SIGSET_T_ = 0 234 X_SIZE_T = 0 235 X_SIZE_T_DEFINED = 0 236 X_SSIZE_T_DEFINED = 0 237 X_TAGLC_ID_DEFINED = 0 238 X_THREADLOCALEINFO = 0 239 X_TIME32_T_DEFINED = 0 240 X_TIME64_T_DEFINED = 0 241 X_TIMESPEC_DEFINED = 0 242 X_TIME_T_DEFINED = 0 243 X_UCRT = 0 244 X_UINTPTR_T_DEFINED = 0 245 X_USEDENTRY = 1 246 X_VA_LIST = 0 247 X_VA_LIST_DEFINED = 0 248 X_W64 = 0 249 X_WCHAR_T = 0 250 X_WCHAR_T_DEFINED = 0 251 X_WCTYPE_T_DEFINED = 0 252 X_WConst_return = 0 253 X_WIN32 = 1 254 X_WIN32_WINNT = 0x601 255 X_WIN64 = 1 256 X_WINT_T = 0 257 X_WRITE_ABORT_MSG = 0x1 258 X_WSTDLIBP_DEFINED = 0 259 X_WSTDLIB_DEFINED = 0 260 X_WSTRING_DEFINED = 0 261 X_WSTRING_S_DEFINED = 0 262 Z_const = 0 263 BYFOUR = 0 264 GF2_DIM = 32 265 TBLS = 8 266 BL_CODES = 19 267 BUSY_STATE = 113 268 Buf_size = 16 269 COMMENT_STATE = 91 270 DEFLATE_H = 0 271 D_CODES = 30 272 EXTRA_STATE = 69 273 FINISH_STATE = 666 274 GZIP = 0 275 GZIP_STATE = 57 276 HCRC_STATE = 103 277 HEAP_SIZE = 573 278 INIT_STATE = 42 279 LENGTH_CODES = 29 280 LITERALS = 256 281 L_CODES = 286 282 MAX_BITS = 15 283 MAX_STORED = 65535 284 MIN_LOOKAHEAD = 262 285 NAME_STATE = 73 286 NIL = 0 287 TOO_FAR = 4096 288 WIN_INIT = 258 289 BUFSIZ = 512 290 COPY1 = 1 291 E2BIG = 7 292 EACCES = 13 293 EADDRINUSE = 100 294 EADDRNOTAVAIL = 101 295 EAFNOSUPPORT = 102 296 EAGAIN = 11 297 EALREADY = 103 298 EBADF = 9 299 EBADMSG = 104 300 EBUSY = 16 301 ECANCELED = 105 302 ECHILD = 10 303 ECONNABORTED = 106 304 ECONNREFUSED = 107 305 ECONNRESET = 108 306 EDEADLK = 36 307 EDEADLOCK = 36 308 EDESTADDRREQ = 109 309 EDOM = 33 310 EEXIST = 17 311 EFAULT = 14 312 EFBIG = 27 313 EHOSTUNREACH = 110 314 EIDRM = 111 315 EILSEQ = 42 316 EINPROGRESS = 112 317 EINTR = 4 318 EINVAL = 22 319 EIO = 5 320 EISCONN = 113 321 EISDIR = 21 322 ELOOP = 114 323 EMFILE = 24 324 EMLINK = 31 325 EMSGSIZE = 115 326 ENAMETOOLONG = 38 327 ENETDOWN = 116 328 ENETRESET = 117 329 ENETUNREACH = 118 330 ENFILE = 23 331 ENOBUFS = 119 332 ENODATA = 120 333 ENODEV = 19 334 ENOENT = 2 335 ENOEXEC = 8 336 ENOFILE = 2 337 ENOLCK = 39 338 ENOLINK = 121 339 ENOMEM = 12 340 ENOMSG = 122 341 ENOPROTOOPT = 123 342 ENOSPC = 28 343 ENOSR = 124 344 ENOSTR = 125 345 ENOSYS = 40 346 ENOTCONN = 126 347 ENOTDIR = 20 348 ENOTEMPTY = 41 349 ENOTRECOVERABLE = 127 350 ENOTSOCK = 128 351 ENOTSUP = 129 352 ENOTTY = 25 353 ENXIO = 6 354 EOF = -1 355 EOPNOTSUPP = 130 356 EOVERFLOW = 132 357 EOWNERDEAD = 133 358 EPERM = 1 359 EPIPE = 32 360 EPROTO = 134 361 EPROTONOSUPPORT = 135 362 EPROTOTYPE = 136 363 ERANGE = 34 364 EROFS = 30 365 ESPIPE = 29 366 ESRCH = 3 367 ETIME = 137 368 ETIMEDOUT = 138 369 ETXTBSY = 139 370 EWOULDBLOCK = 140 371 EXDEV = 18 372 FILENAME_MAX = 260 373 FOPEN_MAX = 20 374 F_OK = 0 375 GZBUFSIZE = 8192 376 GZ_APPEND = 1 377 GZ_NONE = 0 378 GZ_READ = 7247 379 GZ_WRITE = 31153 380 HAVE_VSNPRINTF = 0 381 LOOK = 0 382 O_ACCMODE = 3 383 O_APPEND = 8 384 O_BINARY = 32768 385 O_CREAT = 256 386 O_EXCL = 1024 387 O_NOINHERIT = 128 388 O_RANDOM = 16 389 O_RAW = 32768 390 O_RDONLY = 0 391 O_RDWR = 2 392 O_SEQUENTIAL = 32 393 O_TEMPORARY = 64 394 O_TEXT = 16384 395 O_TRUNC = 512 396 O_WRONLY = 1 397 R_OK = 4 398 STDERR_FILENO = 2 399 STDIN_FILENO = 0 400 STDOUT_FILENO = 1 401 STRUNCATE = 80 402 SYS_OPEN = 20 403 TMP_MAX = 32767 404 TMP_MAX_S = 32767 405 WIDECHAR = 0 406 W_OK = 2 407 X_OK = 1 408 X_A_ARCH = 0x20 409 X_A_HIDDEN = 0x02 410 X_A_NORMAL = 0x00 411 X_A_RDONLY = 0x01 412 X_A_SUBDIR = 0x10 413 X_A_SYSTEM = 0x04 414 X_CRT_DIRECTORY_DEFINED = 0 415 X_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS = 4 416 X_CRT_INTERNAL_LOCAL_SCANF_OPTIONS = 2 417 X_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY = 0x0008 418 X_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS = 0x0010 419 X_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION = 0x0001 420 X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS = 0x0004 421 X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR = 0x0002 422 X_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY = 0x0004 423 X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS = 0x0002 424 X_CRT_INTERNAL_SCANF_SECURECRT = 0x0001 425 X_FILE_DEFINED = 0 426 X_FILE_OFFSET_BITS_SET_FSEEKO = 0 427 X_FILE_OFFSET_BITS_SET_FTELLO = 0 428 X_FILE_OFFSET_BITS_SET_LSEEK = 0 429 X_FINDDATA_T_DEFINED = 0 430 X_FPOS_T_DEFINED = 0 431 X_FSIZE_T_DEFINED = 0 432 X_INC_ERRNO = 0 433 X_INC_FCNTL = 0 434 X_INC_STDIO = 0 435 X_INC_STDIO_S = 0 436 X_INC_SWPRINTF_INL = 0 437 X_IOB_ENTRIES = 20 438 X_IOFBF = 0x0000 439 X_IOLBF = 0x0040 440 X_IONBF = 0x0004 441 X_IO_H_ = 0 442 X_NFILE = 512 443 X_NSTREAM_ = 512 444 X_OLD_P_OVERLAY = 2 445 X_O_ACCMODE = 3 446 X_O_APPEND = 0x0008 447 X_O_BINARY = 0x8000 448 X_O_CREAT = 0x0100 449 X_O_EXCL = 0x0400 450 X_O_NOINHERIT = 0x0080 451 X_O_RANDOM = 0x0010 452 X_O_RAW = 32768 453 X_O_RDONLY = 0x0000 454 X_O_RDWR = 0x0002 455 X_O_SEQUENTIAL = 0x0020 456 X_O_SHORT_LIVED = 0x1000 457 X_O_TEMPORARY = 0x0040 458 X_O_TEXT = 0x4000 459 X_O_TRUNC = 0x0200 460 X_O_U16TEXT = 0x20000 461 X_O_U8TEXT = 0x40000 462 X_O_WRONLY = 0x0001 463 X_O_WTEXT = 0x10000 464 X_POSIX_SOURCE = 0 465 X_P_DETACH = 4 466 X_P_NOWAIT = 1 467 X_P_NOWAITO = 3 468 X_P_OVERLAY = 2 469 X_P_WAIT = 0 470 X_P_tmpdir = "\\" 471 X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 472 X_SPAWNV_DEFINED = 0 473 X_STDIO_CONFIG_DEFINED = 0 474 X_STDIO_DEFINED = 0 475 X_STDIO_S_DEFINED = 0 476 X_STDSTREAM_DEFINED = 0 477 X_SYS_OPEN = 20 478 X_TWO_DIGIT_EXPONENT = 0x1 479 X_WAIT_CHILD = 0 480 X_WAIT_GRANDCHILD = 1 481 X_WFINDDATA_T_DEFINED = 0 482 X_WIO_DEFINED = 0 483 X_WSPAWN_DEFINED = 0 484 X_WSTDIO_DEFINED = 0 485 X_WSTDIO_S_DEFINED = 0 486 ENOUGH = 1444 487 ENOUGH_DISTS = 592 488 ENOUGH_LENS = 852 489 GUNZIP = 0 490 MAXBITS = 15 491 DIST_CODE_LEN = 512 492 END_BLOCK = 256 493 MAX_BL_BITS = 7 494 REPZ_11_138 = 18 495 REPZ_3_10 = 17 496 REP_3_6 = 16 497 SMALLEST = 1 498 ) 499 500 // 501 // If you use the zlib library in a product, an acknowledgment is welcome 502 // in the documentation of your product. If for some reason you cannot 503 // include such an acknowledgment, I would appreciate that you keep this 504 // copyright string in the executable of your product. 505 // 506 507 // =========================================================================== 508 // Function prototypes. 509 const ( /* deflate.c:66:1: */ 510 Need_more = 0 // block not completed, need more input or more output 511 Block_done = 1 // block flush performed 512 Finish_started = 2 // finish started, need only more output at next deflate 513 Finish_done = 3 514 ) 515 516 // inflate.h -- internal inflate state definition 517 // Copyright (C) 1995-2016 Mark Adler 518 // For conditions of distribution and use, see copyright notice in zlib.h 519 520 // WARNING: this file should *not* be used by applications. It is 521 // part of the implementation of the compression library and is 522 // subject to change. Applications should only use zlib.h. 523 // 524 525 // define NO_GZIP when compiling if you want to disable gzip header and 526 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 527 // the crc code when it is not needed. For shared libraries, gzip decoding 528 // should be left enabled. 529 530 // Possible inflate modes between inflate() calls 531 const ( /* inflate.h:20:1: */ 532 HEAD = 16180 // i: waiting for magic header 533 FLAGS = 16181 // i: waiting for method and flags (gzip) 534 TIME = 16182 // i: waiting for modification time (gzip) 535 OS = 16183 // i: waiting for extra flags and operating system (gzip) 536 EXLEN = 16184 // i: waiting for extra length (gzip) 537 EXTRA = 16185 // i: waiting for extra bytes (gzip) 538 NAME = 16186 // i: waiting for end of file name (gzip) 539 COMMENT = 16187 // i: waiting for end of comment (gzip) 540 HCRC = 16188 // i: waiting for header crc (gzip) 541 DICTID = 16189 // i: waiting for dictionary check value 542 DICT = 16190 // waiting for inflateSetDictionary() call 543 TYPE = 16191 // i: waiting for type bits, including last-flag bit 544 TYPEDO = 16192 // i: same, but skip check to exit inflate on new block 545 STORED = 16193 // i: waiting for stored size (length and complement) 546 COPY_ = 16194 // i/o: same as COPY below, but only first time in 547 COPY = 16195 // i/o: waiting for input or output to copy stored block 548 TABLE = 16196 // i: waiting for dynamic block table lengths 549 LENLENS = 16197 // i: waiting for code length code lengths 550 CODELENS = 16198 // i: waiting for length/lit and distance code lengths 551 LEN_ = 16199 // i: same as LEN below, but only first time in 552 LEN = 16200 // i: waiting for length/lit/eob code 553 LENEXT = 16201 // i: waiting for length extra bits 554 DIST = 16202 // i: waiting for distance code 555 DISTEXT = 16203 // i: waiting for distance extra bits 556 MATCH = 16204 // o: waiting for output space to copy string 557 LIT = 16205 // o: waiting for output space to write literal 558 CHECK = 16206 // i: waiting for 32-bit check value 559 LENGTH = 16207 // i: waiting for 32-bit length (gzip) 560 DONE = 16208 // finished check, done -- remain here until reset 561 BAD = 16209 // got a data error -- remain here until reset 562 MEM = 16210 // got an inflate() memory error -- remain here until reset 563 SYNC = 16211 564 ) 565 566 // op values as set by inflate_table(): 567 // 00000000 - literal 568 // 0000tttt - table link, tttt != 0 is the number of table index bits 569 // 0001eeee - length or distance, eeee is the number of extra bits 570 // 01100000 - end of block 571 // 01000000 - invalid code 572 // 573 574 // Maximum size of the dynamic table. The maximum number of code structures is 575 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 576 // codes. These values were found by exhaustive searches using the program 577 // examples/enough.c found in the zlib distribtution. The arguments to that 578 // program are the number of symbols, the initial root table size, and the 579 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 580 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 581 // The initial root table size (9 or 6) is found in the fifth argument of the 582 // inflate_table() calls in inflate.c and infback.c. If the root table size is 583 // changed, then these maximum sizes would be need to be recalculated and 584 // updated. 585 586 // Type of code to build for inflate_table() 587 const ( /* inftrees.h:54:1: */ 588 CODES = 0 589 LENS = 1 590 DISTS = 2 591 ) 592 593 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 594 595 type Size_t = uint64 /* <builtin>:9:23 */ 596 597 type Wchar_t = uint16 /* <builtin>:15:24 */ 598 599 type X__int128_t = struct { 600 Flo int64 601 Fhi int64 602 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 603 type X__uint128_t = struct { 604 Flo uint64 605 Fhi uint64 606 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 607 608 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 609 type X__float128 = float64 /* <builtin>:47:21 */ 610 611 type Va_list = X__builtin_va_list /* <builtin>:50:27 */ 612 613 // ===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---=== 614 // 615 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 616 // See https://llvm.org/LICENSE.txt for license information. 617 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 618 // 619 //===-----------------------------------------------------------------------=== 620 621 // Define 'max_align_t' to match the GCC definition. 622 type Max_align_t = struct { 623 F__clang_max_align_nonce1 int64 624 F__clang_max_align_nonce2 float64 625 } /* __stddef_max_align_t.h:24:3 */ 626 627 // Some C libraries expect to see a wint_t here. Others (notably MinGW) will use 628 // __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t 629 630 type Z_size_t = Size_t /* zconf.h:248:21 */ 631 632 // Maximum value for memLevel in deflateInit2 633 634 // Maximum value for windowBits in deflateInit2 and inflateInit2. 635 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 636 // created by gzip. (Files created by minigzip can still be extracted by 637 // gzip.) 638 639 // The memory requirements for deflate are (in bytes): 640 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 641 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 642 // plus a few kilobytes for small objects. For example, if you want to reduce 643 // the default memory requirements from 256K to 128K, compile with 644 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 645 // Of course this will generally degrade compression (there's no free lunch). 646 // 647 // The memory requirements for inflate are (in bytes) 1 << windowBits 648 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 649 // for small objects. 650 651 // Type declarations 652 653 // The following definitions for FAR are needed only for MSDOS mixed 654 // model programming (small or medium model with some far allocations). 655 // This was tested only with MSC; for other MSDOS compilers you may have 656 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 657 // just define FAR to be empty. 658 659 // If building or using zlib as a DLL, define ZLIB_DLL. 660 // This is not mandatory, but it offers a little performance increase. 661 // If building or using zlib with the WINAPI/WINAPIV calling convention, 662 // define ZLIB_WINAPI. 663 // Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. 664 665 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 666 type UInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 667 type ULong = uint32 /* zconf.h:394:24 */ // 32 bits or more 668 669 type Bytef = Byte /* zconf.h:400:22 */ 670 type Charf = int8 /* zconf.h:402:19 */ 671 type Intf = int32 /* zconf.h:403:19 */ 672 type UIntf = UInt /* zconf.h:404:19 */ 673 type ULongf = ULong /* zconf.h:405:19 */ 674 675 type Voidpc = uintptr /* zconf.h:408:23 */ 676 type Voidpf = uintptr /* zconf.h:409:23 */ 677 type Voidp = uintptr /* zconf.h:410:23 */ 678 679 //===---- limits.h - Standard header for integer sizes --------------------===* * 680 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 681 // See https://llvm.org/LICENSE.txt for license information. 682 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 683 // 684 // \*===----------------------------------------------------------------------=== 685 686 // The system's limits.h may, in turn, try to #include_next GCC's limits.h. 687 // Avert this #include_next madness. 688 689 // System headers include a number of constants from POSIX in <limits.h>. 690 // Include it if we're hosted. 691 692 // Many system headers try to "help us out" by defining these. No really, we 693 // know how big each datatype is. 694 695 // C90/99 5.2.4.2.1 696 697 // C2x 5.2.4.2.1 698 // FIXME: This is using the placeholder dates Clang produces for these macros 699 // in C2x mode; switch to the correct values once they've been published. 700 701 // C99 5.2.4.2.1: Added long long. 702 // C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>. 703 // 704 705 // LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad 706 // that we don't have something like #pragma poison that could be used to 707 // deprecate a macro - the code should just use LLONG_MAX and friends. 708 // 709 710 type Z_crc_t = uint32 /* zconf.h:429:17 */ 711 712 // * 713 // This file has no copyright assigned and is placed in the Public Domain. 714 // This file is part of the mingw-w64 runtime package. 715 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 716 717 // * 718 // This file has no copyright assigned and is placed in the Public Domain. 719 // This file is part of the mingw-w64 runtime package. 720 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 721 722 // * 723 // This file has no copyright assigned and is placed in the Public Domain. 724 // This file is part of the mingw-w64 runtime package. 725 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 726 727 // * 728 // This file has no copyright assigned and is placed in the Public Domain. 729 // This file is part of the mingw-w64 runtime package. 730 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 731 732 // * 733 // This file has no copyright assigned and is placed in the Public Domain. 734 // This file is part of the mingw-w64 runtime package. 735 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 736 737 // This macro holds an monotonic increasing value, which indicates 738 // a specific fix/patch is present on trunk. This value isn't related to 739 // minor/major version-macros. It is increased on demand, if a big 740 // fix was applied to trunk. This macro gets just increased on trunk. For 741 // other branches its value won't be modified. 742 743 // mingw.org's version macros: these make gcc to define 744 // MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global 745 // and the __mingwthr_key_dtor() function from the MinGW 746 // CRT in its private gthr-win32.h header. 747 748 // Set VC specific compiler target macros. 749 750 // MS does not prefix symbols by underscores for 64-bit. 751 // As we have to support older gcc version, which are using underscores 752 // as symbol prefix for x64, we have to check here for the user label 753 // prefix defined by gcc. 754 755 // Special case nameless struct/union. 756 757 // MinGW-w64 has some additional C99 printf/scanf feature support. 758 // So we add some helper macros to ease recognition of them. 759 760 // If _FORTIFY_SOURCE is enabled, some inline functions may use 761 // __builtin_va_arg_pack(). GCC may report an error if the address 762 // of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. 763 764 // Enable workaround for ABI incompatibility on affected platforms 765 766 // * 767 // This file has no copyright assigned and is placed in the Public Domain. 768 // This file is part of the mingw-w64 runtime package. 769 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 770 771 // http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx 772 // Templates won't work in C, will break if secure API is not enabled, disabled 773 774 // https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true 775 // fallback on default implementation if we can't know the size of the destination 776 777 // Include _cygwin.h if we're building a Cygwin application. 778 779 // Target specific macro replacement for type "long". In the Windows API, 780 // the type long is always 32 bit, even if the target is 64 bit (LLP64). 781 // On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right 782 // sized definitions and declarations, all usage of type long in the Windows 783 // headers have to be replaced by the below defined macro __LONG32. 784 785 // C/C++ specific language defines. 786 787 // Note the extern. This is needed to work around GCC's 788 // limitations in handling dllimport attribute. 789 790 // Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's 791 // variadiac macro facility, because variadic macros cause syntax 792 // errors with --traditional-cpp. 793 794 // High byte is the major version, low byte is the minor. 795 796 // Allow both 0x1400 and 0xE00 to identify UCRT 797 798 // ===-------- vadefs.h ---------------------------------------------------=== 799 // 800 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 801 // See https://llvm.org/LICENSE.txt for license information. 802 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 803 // 804 //===-----------------------------------------------------------------------=== 805 806 // Only include this if we are aiming for MSVC compatibility. 807 // * 808 // This file has no copyright assigned and is placed in the Public Domain. 809 // This file is part of the mingw-w64 runtime package. 810 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 811 812 // * 813 // This file has no copyright assigned and is placed in the Public Domain. 814 // This file is part of the mingw-w64 runtime package. 815 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 816 817 // for backward compatibility 818 819 type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ 820 821 type Ssize_t = int64 /* corecrt.h:45:35 */ 822 823 type Rsize_t = Size_t /* corecrt.h:52:16 */ 824 825 type Intptr_t = int64 /* corecrt.h:62:35 */ 826 827 type Uintptr_t = uint64 /* corecrt.h:75:44 */ 828 829 type Wint_t = uint16 /* corecrt.h:106:24 */ 830 type Wctype_t = uint16 /* corecrt.h:107:24 */ 831 832 type Errno_t = int32 /* corecrt.h:113:13 */ 833 834 type X__time32_t = int32 /* corecrt.h:118:14 */ 835 836 type X__time64_t = int64 /* corecrt.h:123:35 */ 837 838 type Time_t = X__time64_t /* corecrt.h:138:20 */ 839 840 type Threadlocaleinfostruct = struct { 841 F_locale_pctype uintptr 842 F_locale_mb_cur_max int32 843 F_locale_lc_codepage uint32 844 } /* corecrt.h:430:1 */ 845 846 type Pthreadlocinfo = uintptr /* corecrt.h:432:39 */ 847 type Pthreadmbcinfo = uintptr /* corecrt.h:433:36 */ 848 849 type Localeinfo_struct = struct { 850 Flocinfo Pthreadlocinfo 851 Fmbcinfo Pthreadmbcinfo 852 } /* corecrt.h:436:9 */ 853 854 type X_locale_tstruct = Localeinfo_struct /* corecrt.h:439:3 */ 855 type X_locale_t = uintptr /* corecrt.h:439:19 */ 856 857 type TagLC_ID = struct { 858 FwLanguage uint16 859 FwCountry uint16 860 FwCodePage uint16 861 } /* corecrt.h:443:9 */ 862 863 type LC_ID = TagLC_ID /* corecrt.h:447:3 */ 864 type LPLC_ID = uintptr /* corecrt.h:447:9 */ 865 866 type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:482:3 */ 867 868 type X_ino_t = uint16 /* types.h:43:24 */ 869 type Ino_t = uint16 /* types.h:45:24 */ 870 871 type X_dev_t = uint32 /* types.h:51:22 */ 872 type Dev_t = uint32 /* types.h:53:22 */ 873 874 type X_pid_t = int64 /* types.h:63:17 */ 875 876 type Pid_t = X_pid_t /* types.h:68:16 */ 877 878 type X_mode_t = uint16 /* types.h:74:24 */ 879 880 type Mode_t = X_mode_t /* types.h:77:17 */ 881 882 type X_off_t = int32 /* _mingw_off_t.h:5:16 */ 883 type Off32_t = int32 /* _mingw_off_t.h:7:16 */ 884 885 type X_off64_t = int64 /* _mingw_off_t.h:13:39 */ 886 type Off64_t = int64 /* _mingw_off_t.h:15:39 */ 887 888 type Off_t = Off64_t /* _mingw_off_t.h:24:17 */ 889 890 type Useconds_t = uint32 /* types.h:84:22 */ 891 892 type Timespec = struct { 893 Ftv_sec Time_t 894 Ftv_nsec int32 895 F__ccgo_pad1 [4]byte 896 } /* types.h:89:1 */ 897 898 type Itimerspec = struct { 899 Fit_interval struct { 900 Ftv_sec Time_t 901 Ftv_nsec int32 902 F__ccgo_pad1 [4]byte 903 } 904 Fit_value struct { 905 Ftv_sec Time_t 906 Ftv_nsec int32 907 F__ccgo_pad1 [4]byte 908 } 909 } /* types.h:94:1 */ 910 911 type X_sigset_t = uint64 /* types.h:104:28 */ 912 913 // GCC always defines __va_copy, but does not define va_copy unless in c99 mode 914 // or -ansi is not specified, since it was not part of C90. 915 916 // ===---- stddef.h - Basic type definitions --------------------------------=== 917 // 918 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 919 // See https://llvm.org/LICENSE.txt for license information. 920 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 921 // 922 //===-----------------------------------------------------------------------=== 923 924 // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 925 // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 926 // though the former does not conform to the LFS document), but considering 927 // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 928 // equivalently requesting no 64-bit operations 929 930 // MVS linker does not support external names larger than 8 bytes 931 932 // 933 // The 'zlib' compression library provides in-memory compression and 934 // decompression functions, including integrity checks of the uncompressed data. 935 // This version of the library supports only one compression method (deflation) 936 // but other algorithms will be added later and will have the same stream 937 // interface. 938 // 939 // Compression can be done in a single step if the buffers are large enough, 940 // or can be done by repeated calls of the compression function. In the latter 941 // case, the application must provide more input and/or consume the output 942 // (providing more output space) before each call. 943 // 944 // The compressed data format used by default by the in-memory functions is 945 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 946 // around a deflate stream, which is itself documented in RFC 1951. 947 // 948 // The library also supports reading and writing files in gzip (.gz) format 949 // with an interface similar to that of stdio using the functions that start 950 // with "gz". The gzip format is different from the zlib format. gzip is a 951 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 952 // 953 // This library can optionally read and write gzip and raw deflate streams in 954 // memory as well. 955 // 956 // The zlib format was designed to be compact and fast for use in memory 957 // and on communications channels. The gzip format was designed for single- 958 // file compression on file systems, has a larger header than zlib to maintain 959 // directory information, and uses a different, slower check method than zlib. 960 // 961 // The library does not install any signal handler. The decoder checks 962 // the consistency of the compressed data, so the library should never crash 963 // even in the case of corrupted input. 964 965 type Alloc_func = uintptr /* zlib.h:81:16 */ 966 type Free_func = uintptr /* zlib.h:82:16 */ 967 968 type Internal_state = struct { 969 Fstrm Z_streamp 970 Fstatus int32 971 F__ccgo_pad1 [4]byte 972 Fpending_buf uintptr 973 Fpending_buf_size Ulg 974 F__ccgo_pad2 [4]byte 975 Fpending_out uintptr 976 Fpending Ulg 977 Fwrap int32 978 Fgzhead Gz_headerp 979 Fgzindex Ulg 980 Fmethod Byte 981 F__ccgo_pad3 [3]byte 982 Flast_flush int32 983 Fw_size UInt 984 Fw_bits UInt 985 Fw_mask UInt 986 Fwindow uintptr 987 Fwindow_size Ulg 988 F__ccgo_pad4 [4]byte 989 Fprev uintptr 990 Fhead uintptr 991 Fins_h UInt 992 Fhash_size UInt 993 Fhash_bits UInt 994 Fhash_mask UInt 995 Fhash_shift UInt 996 Fblock_start int32 997 Fmatch_length UInt 998 Fprev_match IPos 999 Fmatch_available int32 1000 Fstrstart UInt 1001 Fmatch_start UInt 1002 Flookahead UInt 1003 Fprev_length UInt 1004 Fmax_chain_length UInt 1005 Fmax_lazy_match UInt 1006 Flevel int32 1007 Fstrategy int32 1008 Fgood_match UInt 1009 Fnice_match int32 1010 Fdyn_ltree [573]struct { 1011 Ffc struct{ Ffreq Ush } 1012 Fdl struct{ Fdad Ush } 1013 } 1014 Fdyn_dtree [61]struct { 1015 Ffc struct{ Ffreq Ush } 1016 Fdl struct{ Fdad Ush } 1017 } 1018 Fbl_tree [39]struct { 1019 Ffc struct{ Ffreq Ush } 1020 Fdl struct{ Fdad Ush } 1021 } 1022 Fl_desc struct { 1023 Fdyn_tree uintptr 1024 Fmax_code int32 1025 F__ccgo_pad1 [4]byte 1026 Fstat_desc uintptr 1027 } 1028 Fd_desc struct { 1029 Fdyn_tree uintptr 1030 Fmax_code int32 1031 F__ccgo_pad1 [4]byte 1032 Fstat_desc uintptr 1033 } 1034 Fbl_desc struct { 1035 Fdyn_tree uintptr 1036 Fmax_code int32 1037 F__ccgo_pad1 [4]byte 1038 Fstat_desc uintptr 1039 } 1040 Fbl_count [16]Ush 1041 Fheap [573]int32 1042 Fheap_len int32 1043 Fheap_max int32 1044 Fdepth [573]Uch 1045 F__ccgo_pad5 [7]byte 1046 Fl_buf uintptr 1047 Flit_bufsize UInt 1048 Flast_lit UInt 1049 Fd_buf uintptr 1050 Fopt_len Ulg 1051 Fstatic_len Ulg 1052 Fmatches UInt 1053 Finsert UInt 1054 Fbi_buf Ush 1055 F__ccgo_pad6 [2]byte 1056 Fbi_valid int32 1057 Fhigh_water Ulg 1058 F__ccgo_pad7 [4]byte 1059 } /* zlib.h:84:1 */ 1060 1061 type Z_stream_s = struct { 1062 Fnext_in uintptr 1063 Favail_in UInt 1064 Ftotal_in ULong 1065 Fnext_out uintptr 1066 Favail_out UInt 1067 Ftotal_out ULong 1068 Fmsg uintptr 1069 Fstate uintptr 1070 Fzalloc Alloc_func 1071 Fzfree Free_func 1072 Fopaque Voidpf 1073 Fdata_type int32 1074 Fadler ULong 1075 Freserved ULong 1076 F__ccgo_pad1 [4]byte 1077 } /* zlib.h:86:9 */ 1078 1079 type Z_stream = Z_stream_s /* zlib.h:106:3 */ 1080 1081 type Z_streamp = uintptr /* zlib.h:108:22 */ 1082 1083 // 1084 // gzip header information passed to and from zlib routines. See RFC 1952 1085 // for more details on the meanings of these fields. 1086 type Gz_header_s = struct { 1087 Ftext int32 1088 Ftime ULong 1089 Fxflags int32 1090 Fos int32 1091 Fextra uintptr 1092 Fextra_len UInt 1093 Fextra_max UInt 1094 Fname uintptr 1095 Fname_max UInt 1096 F__ccgo_pad1 [4]byte 1097 Fcomment uintptr 1098 Fcomm_max UInt 1099 Fhcrc int32 1100 Fdone int32 1101 F__ccgo_pad2 [4]byte 1102 } /* zlib.h:114:9 */ 1103 1104 // 1105 // gzip header information passed to and from zlib routines. See RFC 1952 1106 // for more details on the meanings of these fields. 1107 type Gz_header = Gz_header_s /* zlib.h:129:3 */ 1108 1109 type Gz_headerp = uintptr /* zlib.h:131:23 */ 1110 // 1111 // inflateGetHeader() requests that gzip header information be stored in the 1112 // provided gz_header structure. inflateGetHeader() may be called after 1113 // inflateInit2() or inflateReset(), and before the first call of inflate(). 1114 // As inflate() processes the gzip stream, head->done is zero until the header 1115 // is completed, at which time head->done is set to one. If a zlib stream is 1116 // being decoded, then head->done is set to -1 to indicate that there will be 1117 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 1118 // used to force inflate() to return immediately after header processing is 1119 // complete and before any actual data is decompressed. 1120 // 1121 // The text, time, xflags, and os fields are filled in with the gzip header 1122 // contents. hcrc is set to true if there is a header CRC. (The header CRC 1123 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 1124 // contains the maximum number of bytes to write to extra. Once done is true, 1125 // extra_len contains the actual extra field length, and extra contains the 1126 // extra field, or that field truncated if extra_max is less than extra_len. 1127 // If name is not Z_NULL, then up to name_max characters are written there, 1128 // terminated with a zero unless the length is greater than name_max. If 1129 // comment is not Z_NULL, then up to comm_max characters are written there, 1130 // terminated with a zero unless the length is greater than comm_max. When any 1131 // of extra, name, or comment are not Z_NULL and the respective field is not 1132 // present in the header, then that field is set to Z_NULL to signal its 1133 // absence. This allows the use of deflateSetHeader() with the returned 1134 // structure to duplicate the header. However if those fields are set to 1135 // allocated memory, then the application will need to save those pointers 1136 // elsewhere so that they can be eventually freed. 1137 // 1138 // If inflateGetHeader is not used, then the header information is simply 1139 // discarded. The header is always checked for validity, including the header 1140 // CRC if present. inflateReset() will reset the process to discard the header 1141 // information. The application would need to call inflateGetHeader() again to 1142 // retrieve the header from the next gzip stream. 1143 // 1144 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 1145 // stream state was inconsistent. 1146 1147 // 1148 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 1149 // unsigned char FAR *window)); 1150 // 1151 // Initialize the internal stream state for decompression using inflateBack() 1152 // calls. The fields zalloc, zfree and opaque in strm must be initialized 1153 // before the call. If zalloc and zfree are Z_NULL, then the default library- 1154 // derived memory allocation routines are used. windowBits is the base two 1155 // logarithm of the window size, in the range 8..15. window is a caller 1156 // supplied buffer of that size. Except for special applications where it is 1157 // assured that deflate was used with small window sizes, windowBits must be 15 1158 // and a 32K byte window must be supplied to be able to decompress general 1159 // deflate streams. 1160 // 1161 // See inflateBack() for the usage of these routines. 1162 // 1163 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 1164 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 1165 // allocated, or Z_VERSION_ERROR if the version of the library does not match 1166 // the version of the header file. 1167 1168 type In_func = uintptr /* zlib.h:1092:18 */ 1169 type Out_func = uintptr /* zlib.h:1094:13 */ 1170 // 1171 // Same as uncompress, except that sourceLen is a pointer, where the 1172 // length of the source is *sourceLen. On return, *sourceLen is the number of 1173 // source bytes consumed. 1174 1175 // gzip file access functions 1176 1177 // 1178 // This library supports reading and writing files in gzip (.gz) format with 1179 // an interface similar to that of stdio, using the functions that start with 1180 // "gz". The gzip format is different from the zlib format. gzip is a gzip 1181 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 1182 1183 type GzFile_s = struct { 1184 Fhave uint32 1185 F__ccgo_pad1 [4]byte 1186 Fnext uintptr 1187 Fpos int32 1188 F__ccgo_pad2 [4]byte 1189 } /* zlib.h:1300:9 */ 1190 1191 // 1192 // Same as uncompress, except that sourceLen is a pointer, where the 1193 // length of the source is *sourceLen. On return, *sourceLen is the number of 1194 // source bytes consumed. 1195 1196 // gzip file access functions 1197 1198 // 1199 // This library supports reading and writing files in gzip (.gz) format with 1200 // an interface similar to that of stdio, using the functions that start with 1201 // "gz". The gzip format is different from the zlib format. gzip is a gzip 1202 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 1203 1204 type GzFile = uintptr /* zlib.h:1300:25 */ 1205 1206 //===---- limits.h - Standard header for integer sizes --------------------===* * 1207 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 1208 // See https://llvm.org/LICENSE.txt for license information. 1209 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 1210 // 1211 // \*===----------------------------------------------------------------------=== 1212 1213 type X_onexit_t = uintptr /* stdlib.h:50:15 */ 1214 1215 type X_div_t = struct { 1216 Fquot int32 1217 Frem int32 1218 } /* stdlib.h:60:11 */ 1219 1220 type Div_t = X_div_t /* stdlib.h:63:5 */ 1221 1222 type X_ldiv_t = struct { 1223 Fquot int32 1224 Frem int32 1225 } /* stdlib.h:65:11 */ 1226 1227 type Ldiv_t = X_ldiv_t /* stdlib.h:68:5 */ 1228 1229 type X_LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:77:5 */ 1230 1231 type X_CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:84:5 */ 1232 1233 type X_CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:88:5 */ 1234 1235 type X_LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:95:5 */ 1236 1237 type X_LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:102:5 */ 1238 1239 type X_purecall_handler = uintptr /* stdlib.h:143:16 */ 1240 1241 type X_invalid_parameter_handler = uintptr /* stdlib.h:148:16 */ 1242 1243 type Lldiv_t = struct { 1244 Fquot int64 1245 Frem int64 1246 } /* stdlib.h:724:61 */ 1247 1248 // * 1249 // This file has no copyright assigned and is placed in the Public Domain. 1250 // This file is part of the mingw-w64 runtime package. 1251 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 1252 1253 // * 1254 // This file has no copyright assigned and is placed in the Public Domain. 1255 // This file is part of the mingw-w64 runtime package. 1256 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 1257 1258 // Return codes for _heapwalk() 1259 1260 // Values for _heapinfo.useflag 1261 1262 // The structure used to walk through the heap with _heapwalk. 1263 type X_heapinfo = struct { 1264 F_pentry uintptr 1265 F_size Size_t 1266 F_useflag int32 1267 F__ccgo_pad1 [4]byte 1268 } /* malloc.h:46:11 */ 1269 1270 // * 1271 // This file has no copyright assigned and is placed in the Public Domain. 1272 // This file is part of the mingw-w64 runtime package. 1273 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 1274 1275 // * 1276 // This file has no copyright assigned and is placed in the Public Domain. 1277 // This file is part of the mingw-w64 runtime package. 1278 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 1279 1280 // Return codes for _heapwalk() 1281 1282 // Values for _heapinfo.useflag 1283 1284 // The structure used to walk through the heap with _heapwalk. 1285 type X_HEAPINFO = X_heapinfo /* malloc.h:50:5 */ 1286 1287 // since "static" is used to mean two completely different things in C, we 1288 // define "local" for the non-static meaning of "static", for readability 1289 // (compile with -Dlocal if your debugger can't find static symbols) 1290 1291 type Uch = uint8 /* zutil.h:43:24 */ 1292 type Uchf = Uch /* zutil.h:44:17 */ 1293 type Ush = uint16 /* zutil.h:45:24 */ 1294 type Ushf = Ush /* zutil.h:46:17 */ 1295 type Ulg = uint32 /* zutil.h:47:24 */ 1296 1297 // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 1298 1299 // use NO_DIVIDE if your processor does not do division in hardware -- 1300 // try it both ways to see which is faster 1301 1302 // ========================================================================= 1303 func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */ 1304 var sum2 uint32 1305 var n uint32 1306 1307 // split Adler-32 into component sums 1308 sum2 = adler >> 16 & ULong(0xffff) 1309 adler = adler & ULong(0xffff) 1310 1311 // in case user likes doing a byte at a time, keep it fast 1312 if len == uint64(1) { 1313 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf))) 1314 if adler >= BASE { 1315 adler = adler - BASE 1316 } 1317 sum2 = sum2 + adler 1318 if sum2 >= BASE { 1319 sum2 = sum2 - BASE 1320 } 1321 return adler | sum2<<16 1322 } 1323 1324 // initial Adler-32 value (deferred check for len == 1 speed) 1325 if buf == uintptr(Z_NULL) { 1326 return ULong(1) 1327 } 1328 1329 // in case short lengths are provided, keep it somewhat fast 1330 if len < uint64(16) { 1331 for libc.PostDecUint64(&len, 1) != 0 { 1332 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))) 1333 sum2 = sum2 + adler 1334 } 1335 if adler >= BASE { 1336 adler = adler - BASE 1337 } 1338 sum2 = sum2 % BASE // only added so many BASE's 1339 return adler | sum2<<16 1340 } 1341 1342 // do length NMAX blocks -- requires just one modulo operation 1343 for len >= uint64(NMAX) { 1344 len = len - uint64(NMAX) 1345 n = uint32(NMAX / 16) // NMAX is divisible by 16 1346 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 1347 { 1348 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf))) 1349 sum2 = sum2 + adler 1350 } 1351 { 1352 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1))) 1353 sum2 = sum2 + adler 1354 } 1355 1356 { 1357 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2))) 1358 sum2 = sum2 + adler 1359 } 1360 { 1361 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3))) 1362 sum2 = sum2 + adler 1363 } 1364 1365 { 1366 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4))) 1367 sum2 = sum2 + adler 1368 } 1369 { 1370 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5))) 1371 sum2 = sum2 + adler 1372 } 1373 1374 { 1375 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6))) 1376 sum2 = sum2 + adler 1377 } 1378 { 1379 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7))) 1380 sum2 = sum2 + adler 1381 } 1382 1383 { 1384 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8))) 1385 sum2 = sum2 + adler 1386 } 1387 { 1388 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9))) 1389 sum2 = sum2 + adler 1390 } 1391 1392 { 1393 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10))) 1394 sum2 = sum2 + adler 1395 } 1396 { 1397 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11))) 1398 sum2 = sum2 + adler 1399 } 1400 1401 { 1402 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12))) 1403 sum2 = sum2 + adler 1404 } 1405 { 1406 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13))) 1407 sum2 = sum2 + adler 1408 } 1409 1410 { 1411 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14))) 1412 sum2 = sum2 + adler 1413 } 1414 { 1415 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15))) 1416 sum2 = sum2 + adler 1417 } 1418 1419 // 16 sums unrolled 1420 buf += uintptr(16) 1421 } 1422 adler = adler % BASE 1423 sum2 = sum2 % BASE 1424 } 1425 1426 // do remaining bytes (less than NMAX, still just one modulo) 1427 if len != 0 { // avoid modulos if none remaining 1428 for len >= uint64(16) { 1429 len = len - uint64(16) 1430 { 1431 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf))) 1432 sum2 = sum2 + adler 1433 } 1434 { 1435 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1))) 1436 sum2 = sum2 + adler 1437 } 1438 1439 { 1440 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2))) 1441 sum2 = sum2 + adler 1442 } 1443 { 1444 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3))) 1445 sum2 = sum2 + adler 1446 } 1447 1448 { 1449 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4))) 1450 sum2 = sum2 + adler 1451 } 1452 { 1453 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5))) 1454 sum2 = sum2 + adler 1455 } 1456 1457 { 1458 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6))) 1459 sum2 = sum2 + adler 1460 } 1461 { 1462 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7))) 1463 sum2 = sum2 + adler 1464 } 1465 1466 { 1467 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8))) 1468 sum2 = sum2 + adler 1469 } 1470 { 1471 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9))) 1472 sum2 = sum2 + adler 1473 } 1474 1475 { 1476 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10))) 1477 sum2 = sum2 + adler 1478 } 1479 { 1480 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11))) 1481 sum2 = sum2 + adler 1482 } 1483 1484 { 1485 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12))) 1486 sum2 = sum2 + adler 1487 } 1488 { 1489 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13))) 1490 sum2 = sum2 + adler 1491 } 1492 1493 { 1494 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14))) 1495 sum2 = sum2 + adler 1496 } 1497 { 1498 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15))) 1499 sum2 = sum2 + adler 1500 } 1501 1502 buf += uintptr(16) 1503 } 1504 for libc.PostDecUint64(&len, 1) != 0 { 1505 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))) 1506 sum2 = sum2 + adler 1507 } 1508 adler = adler % BASE 1509 sum2 = sum2 % BASE 1510 } 1511 1512 // return recombined sums 1513 return adler | sum2<<16 1514 } 1515 1516 // ========================================================================= 1517 func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */ 1518 return Xadler32_z(tls, adler, buf, uint64(len)) 1519 } 1520 1521 // ========================================================================= 1522 func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 int32) ULong { /* adler32.c:143:13: */ 1523 var sum1 uint32 1524 var sum2 uint32 1525 var rem uint32 1526 1527 // for negative len, return invalid adler32 as a clue for debugging 1528 if len2 < 0 { 1529 return 0xffffffff 1530 } 1531 1532 // the derivation of this formula is left as an exercise for the reader 1533 len2 = int32(uint32(len2) % BASE) // assumes len2 >= 0 1534 rem = uint32(len2) 1535 sum1 = adler1 & ULong(0xffff) 1536 sum2 = uint32(rem) * sum1 1537 sum2 = sum2 % BASE 1538 sum1 = sum1 + (adler2&ULong(0xffff) + BASE - ULong(1)) 1539 sum2 = sum2 + (adler1>>16&ULong(0xffff) + adler2>>16&ULong(0xffff) + BASE - ULong(rem)) 1540 if sum1 >= BASE { 1541 sum1 = sum1 - BASE 1542 } 1543 if sum1 >= BASE { 1544 sum1 = sum1 - BASE 1545 } 1546 if sum2 >= uint32(BASE)<<1 { 1547 sum2 = sum2 - uint32(BASE)<<1 1548 } 1549 if sum2 >= BASE { 1550 sum2 = sum2 - BASE 1551 } 1552 return sum1 | sum2<<16 1553 } 1554 1555 // ========================================================================= 1556 func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 int32) ULong { /* adler32.c:172:15: */ 1557 return adler32_combine_(tls, adler1, adler2, len2) 1558 } 1559 1560 func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 int32) ULong { /* adler32.c:180:15: */ 1561 return adler32_combine_(tls, adler1, adler2, len2) 1562 } 1563 1564 // =========================================================================== 1565 // Compresses the source buffer into the destination buffer. The level 1566 // parameter has the same meaning as in deflateInit. sourceLen is the byte 1567 // length of the source buffer. Upon entry, destLen is the total size of the 1568 // destination buffer, which must be at least 0.1% larger than sourceLen plus 1569 // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 1570 // 1571 // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 1572 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, 1573 // Z_STREAM_ERROR if the level parameter is invalid. 1574 func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */ 1575 bp := tls.Alloc(88) 1576 defer tls.Free(88) 1577 1578 // var stream Z_stream at bp, 88 1579 1580 var err int32 1581 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 1582 var left ULong 1583 1584 left = *(*ULongf)(unsafe.Pointer(destLen)) 1585 *(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0) 1586 1587 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0) 1588 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0) 1589 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0) 1590 1591 err = XdeflateInit_(tls, bp, level, ts, int32(unsafe.Sizeof(Z_stream{}))) 1592 if err != Z_OK { 1593 return err 1594 } 1595 1596 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest 1597 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0) 1598 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source 1599 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0) 1600 1601 for __ccgo := true; __ccgo; __ccgo = err == Z_OK { 1602 if (*Z_stream)(unsafe.Pointer(bp)).Favail_out == UInt(0) { 1603 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 { 1604 if left > ULong(max) { 1605 return max 1606 } 1607 return UInt(left) 1608 }() 1609 left = left - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_out) 1610 } 1611 if (*Z_stream)(unsafe.Pointer(bp)).Favail_in == UInt(0) { 1612 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 { 1613 if sourceLen > ULong(max) { 1614 return max 1615 } 1616 return UInt(sourceLen) 1617 }() 1618 sourceLen = sourceLen - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_in) 1619 } 1620 err = Xdeflate(tls, bp, func() int32 { 1621 if sourceLen != 0 { 1622 return Z_NO_FLUSH 1623 } 1624 return Z_FINISH 1625 }()) 1626 } 1627 1628 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out 1629 XdeflateEnd(tls, bp) 1630 if err == Z_STREAM_END { 1631 return Z_OK 1632 } 1633 return err 1634 } 1635 1636 // =========================================================================== 1637 func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */ 1638 return Xcompress2(tls, dest, destLen, source, sourceLen, -1) 1639 } 1640 1641 // =========================================================================== 1642 // If the default memLevel or windowBits for deflateInit() is changed, then 1643 // this function needs to be updated. 1644 // 1645 func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */ 1646 return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13) 1647 } 1648 1649 // ======================================================================== 1650 // Tables of CRC-32s of all single-byte values, made by make_crc_table(). 1651 // crc32.h -- tables for rapid CRC calculation 1652 // Generated automatically by crc32.c 1653 1654 var crc_table = [8][256]Z_crc_t{ 1655 { 1656 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 1657 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 1658 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 1659 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 1660 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 1661 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 1662 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 1663 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 1664 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 1665 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 1666 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 1667 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 1668 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 1669 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 1670 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 1671 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 1672 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 1673 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 1674 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 1675 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 1676 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 1677 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 1678 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 1679 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 1680 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 1681 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 1682 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 1683 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 1684 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 1685 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 1686 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 1687 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 1688 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 1689 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 1690 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 1691 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 1692 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 1693 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 1694 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 1695 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 1696 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 1697 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 1698 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 1699 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 1700 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 1701 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 1702 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 1703 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 1704 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 1705 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 1706 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 1707 0x2d02ef8d, 1708 }, 1709 { 1710 0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, 1711 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, 1712 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, 1713 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, 1714 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, 1715 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, 1716 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, 1717 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, 1718 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, 1719 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, 1720 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, 1721 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, 1722 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, 1723 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, 1724 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, 1725 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, 1726 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, 1727 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, 1728 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, 1729 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, 1730 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, 1731 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, 1732 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, 1733 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, 1734 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, 1735 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, 1736 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, 1737 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, 1738 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, 1739 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, 1740 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, 1741 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, 1742 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, 1743 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, 1744 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, 1745 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, 1746 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, 1747 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, 1748 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, 1749 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, 1750 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, 1751 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, 1752 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, 1753 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, 1754 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, 1755 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, 1756 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, 1757 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, 1758 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, 1759 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, 1760 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, 1761 0x9324fd72, 1762 }, 1763 { 1764 0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, 1765 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, 1766 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, 1767 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, 1768 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, 1769 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, 1770 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, 1771 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, 1772 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, 1773 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, 1774 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, 1775 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, 1776 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, 1777 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, 1778 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, 1779 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, 1780 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, 1781 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, 1782 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, 1783 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, 1784 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, 1785 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, 1786 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, 1787 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, 1788 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, 1789 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, 1790 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, 1791 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, 1792 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, 1793 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, 1794 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, 1795 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, 1796 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, 1797 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, 1798 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, 1799 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, 1800 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, 1801 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, 1802 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, 1803 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, 1804 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, 1805 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, 1806 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, 1807 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, 1808 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, 1809 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, 1810 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, 1811 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, 1812 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, 1813 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, 1814 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, 1815 0xbe9834ed, 1816 }, 1817 { 1818 0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, 1819 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, 1820 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, 1821 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, 1822 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, 1823 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, 1824 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, 1825 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, 1826 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, 1827 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, 1828 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, 1829 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, 1830 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, 1831 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, 1832 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, 1833 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, 1834 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, 1835 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, 1836 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, 1837 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, 1838 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, 1839 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, 1840 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, 1841 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, 1842 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, 1843 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, 1844 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, 1845 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, 1846 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, 1847 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, 1848 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, 1849 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, 1850 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, 1851 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, 1852 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, 1853 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, 1854 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, 1855 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, 1856 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, 1857 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, 1858 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, 1859 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, 1860 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, 1861 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, 1862 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, 1863 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, 1864 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, 1865 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, 1866 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, 1867 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, 1868 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, 1869 0xde0506f1, 1870 }, 1871 { 1872 0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, 1873 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, 1874 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, 1875 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, 1876 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, 1877 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, 1878 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, 1879 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, 1880 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, 1881 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, 1882 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, 1883 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, 1884 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, 1885 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, 1886 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, 1887 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, 1888 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, 1889 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, 1890 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, 1891 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, 1892 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, 1893 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, 1894 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, 1895 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, 1896 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, 1897 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, 1898 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, 1899 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, 1900 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, 1901 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, 1902 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, 1903 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, 1904 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, 1905 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, 1906 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, 1907 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, 1908 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, 1909 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, 1910 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, 1911 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, 1912 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, 1913 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, 1914 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, 1915 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, 1916 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, 1917 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, 1918 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, 1919 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, 1920 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, 1921 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, 1922 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, 1923 0x8def022d, 1924 }, 1925 { 1926 0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64, 1927 0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1, 1928 0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e, 1929 0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61, 1930 0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82, 1931 0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff, 1932 0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7, 1933 0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da, 1934 0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139, 1935 0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6, 1936 0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89, 1937 0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c, 1938 0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0, 1939 0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d, 1940 0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a, 1941 0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177, 1942 0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de, 1943 0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b, 1944 0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824, 1945 0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e, 1946 0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad, 1947 0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0, 1948 0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d, 1949 0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60, 1950 0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83, 1951 0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822, 1952 0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d, 1953 0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8, 1954 0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171, 1955 0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c, 1956 0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b, 1957 0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6, 1958 0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca, 1959 0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f, 1960 0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430, 1961 0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf, 1962 0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c, 1963 0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51, 1964 0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9, 1965 0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84, 1966 0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67, 1967 0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398, 1968 0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7, 1969 0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62, 1970 0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e, 1971 0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923, 1972 0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4, 1973 0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9, 1974 0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070, 1975 0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5, 1976 0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a, 1977 0x72fd2493, 1978 }, 1979 { 1980 0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907, 1981 0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f, 1982 0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a, 1983 0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e, 1984 0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512, 1985 0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14, 1986 0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b, 1987 0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d, 1988 0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731, 1989 0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925, 1990 0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620, 1991 0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28, 1992 0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70, 1993 0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176, 1994 0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d, 1995 0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b, 1996 0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b, 1997 0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63, 1998 0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266, 1999 0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a, 2000 0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446, 2001 0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40, 2002 0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557, 2003 0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51, 2004 0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d, 2005 0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0, 2006 0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5, 2007 0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed, 2008 0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd, 2009 0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb, 2010 0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0, 2011 0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6, 2012 0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de, 2013 0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6, 2014 0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3, 2015 0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7, 2016 0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb, 2017 0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd, 2018 0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92, 2019 0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094, 2020 0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598, 2021 0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c, 2022 0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489, 2023 0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81, 2024 0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9, 2025 0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af, 2026 0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4, 2027 0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2, 2028 0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2, 2029 0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba, 2030 0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf, 2031 0xed3498be, 2032 }, 2033 { 2034 0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f, 2035 0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d, 2036 0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0, 2037 0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42, 2038 0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95, 2039 0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2, 2040 0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a, 2041 0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d, 2042 0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea, 2043 0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748, 2044 0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5, 2045 0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27, 2046 0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b, 2047 0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac, 2048 0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4, 2049 0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3, 2050 0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44, 2051 0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6, 2052 0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b, 2053 0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329, 2054 0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe, 2055 0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9, 2056 0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1, 2057 0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6, 2058 0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921, 2059 0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555, 2060 0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8, 2061 0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a, 2062 0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd, 2063 0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a, 2064 0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2, 2065 0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5, 2066 0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2, 2067 0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330, 2068 0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad, 2069 0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f, 2070 0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8, 2071 0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef, 2072 0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc, 2073 0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb, 2074 0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c, 2075 0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e, 2076 0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03, 2077 0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1, 2078 0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6, 2079 0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1, 2080 0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9, 2081 0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e, 2082 0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409, 2083 0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb, 2084 0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966, 2085 0xf10605de, 2086 }, 2087 } /* crc32.h:5:25 */ 2088 2089 // ========================================================================= 2090 // This function can be used by asm versions of crc32() 2091 func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */ 2092 return uintptr(uintptr(unsafe.Pointer(&crc_table))) 2093 } 2094 2095 // ========================================================================= 2096 2097 // ========================================================================= 2098 func Xcrc32_z(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:202:23: */ 2099 bp := tls.Alloc(4) 2100 defer tls.Free(4) 2101 2102 if buf == uintptr(Z_NULL) { 2103 return 0 2104 } 2105 2106 if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) { 2107 // var endian Z_crc_t at bp, 4 2108 2109 *(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1) 2110 if *(*uint8)(unsafe.Pointer(bp)) != 0 { 2111 return crc32_little(tls, crc, buf, len) 2112 } else { 2113 return crc32_big(tls, crc, buf, len) 2114 } 2115 } 2116 crc = crc ^ 0xffffffff 2117 for len >= uint64(8) { 2118 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2119 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2120 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2121 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2122 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2123 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2124 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2125 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2126 len = len - uint64(8) 2127 } 2128 if len != 0 { 2129 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint64(&len, 1) != 0 { 2130 crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8 2131 } 2132 } 2133 return crc ^ 0xffffffff 2134 } 2135 2136 // ========================================================================= 2137 func Xcrc32(tls *libc.TLS, crc uint32, buf uintptr, len UInt) uint32 { /* crc32.c:237:23: */ 2138 return Xcrc32_z(tls, crc, buf, uint64(len)) 2139 } 2140 2141 // 2142 // This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit 2143 // integer pointer type. This violates the strict aliasing rule, where a 2144 // compiler can assume, for optimization purposes, that two pointers to 2145 // fundamentally different types won't ever point to the same memory. This can 2146 // manifest as a problem only if one of the pointers is written to. This code 2147 // only reads from those pointers. So long as this code remains isolated in 2148 // this compilation unit, there won't be a problem. For this reason, this code 2149 // should not be copied and pasted into a compilation unit in which other code 2150 // writes to the buffer that is passed to these routines. 2151 // 2152 2153 // ========================================================================= 2154 2155 // ========================================================================= 2156 func crc32_little(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:266:21: */ 2157 var c Z_crc_t 2158 var buf4 uintptr 2159 2160 c = Z_crc_t(crc) 2161 c = ^c 2162 for len != 0 && Ptrdiff_t(buf)&int64(3) != 0 { 2163 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((c^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&Z_crc_t(0xff))*4)) ^ c>>8 2164 len-- 2165 } 2166 2167 buf4 = buf 2168 for len >= uint64(32) { 2169 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2170 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2171 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2172 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2173 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2174 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2175 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2176 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2177 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2178 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2179 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2180 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2181 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2182 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2183 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2184 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2185 len = len - uint64(32) 2186 } 2187 for len >= uint64(4) { 2188 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2189 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4)) 2190 len = len - uint64(4) 2191 } 2192 buf = buf4 2193 2194 if len != 0 { 2195 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint64(&len, 1) != 0 { 2196 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((c^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&Z_crc_t(0xff))*4)) ^ c>>8 2197 } 2198 } 2199 c = ^c 2200 return uint32(c) 2201 } 2202 2203 // ========================================================================= 2204 2205 // ========================================================================= 2206 func crc32_big(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:306:21: */ 2207 var c Z_crc_t 2208 var buf4 uintptr 2209 2210 c = Z_crc_t(crc)>>24&Z_crc_t(0xff) + Z_crc_t(crc)>>8&Z_crc_t(0xff00) + Z_crc_t(crc)&Z_crc_t(0xff00)<<8 + Z_crc_t(crc)&Z_crc_t(0xff)<<24 2211 c = ^c 2212 for len != 0 && Ptrdiff_t(buf)&int64(3) != 0 { 2213 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c>>24^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))*4)) ^ c<<8 2214 len-- 2215 } 2216 2217 buf4 = buf 2218 for len >= uint64(32) { 2219 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2220 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2221 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2222 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2223 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2224 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2225 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2226 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2227 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2228 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2229 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2230 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2231 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2232 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2233 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2234 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2235 len = len - uint64(32) 2236 } 2237 for len >= uint64(4) { 2238 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 2239 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4)) 2240 len = len - uint64(4) 2241 } 2242 buf = buf4 2243 2244 if len != 0 { 2245 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint64(&len, 1) != 0 { 2246 c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c>>24^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))*4)) ^ c<<8 2247 } 2248 } 2249 c = ^c 2250 return uint32(c>>24&Z_crc_t(0xff) + c>>8&Z_crc_t(0xff00) + c&Z_crc_t(0xff00)<<8 + c&Z_crc_t(0xff)<<24) 2251 } 2252 2253 // ========================================================================= 2254 func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint32) uint32 { /* crc32.c:344:21: */ 2255 var sum uint32 2256 2257 sum = uint32(0) 2258 for vec != 0 { 2259 if vec&uint32(1) != 0 { 2260 sum = sum ^ *(*uint32)(unsafe.Pointer(mat)) 2261 } 2262 vec >>= 1 2263 mat += 4 2264 } 2265 return sum 2266 } 2267 2268 // ========================================================================= 2269 func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */ 2270 var n int32 2271 2272 for n = 0; n < GF2_DIM; n++ { 2273 *(*uint32)(unsafe.Pointer(square + uintptr(n)*4)) = gf2_matrix_times(tls, mat, *(*uint32)(unsafe.Pointer(mat + uintptr(n)*4))) 2274 } 2275 } 2276 2277 // ========================================================================= 2278 func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 int32) ULong { /* crc32.c:372:13: */ 2279 bp := tls.Alloc(256) 2280 defer tls.Free(256) 2281 2282 var n int32 2283 var row uint32 2284 // var even [32]uint32 at bp+128, 128 2285 // even-power-of-two zeros operator 2286 // var odd [32]uint32 at bp, 128 2287 // odd-power-of-two zeros operator 2288 2289 // degenerate case (also disallow negative lengths) 2290 if len2 <= 0 { 2291 return crc1 2292 } 2293 2294 // put operator for one zero bit in odd 2295 *(*uint32)(unsafe.Pointer(bp)) = 0xedb88320 // CRC-32 polynomial 2296 row = uint32(1) 2297 for n = 1; n < GF2_DIM; n++ { 2298 *(*uint32)(unsafe.Pointer(bp + uintptr(n)*4)) = row 2299 row <<= 1 2300 } 2301 2302 // put operator for two zero bits in even 2303 gf2_matrix_square(tls, bp+128, bp) 2304 2305 // put operator for four zero bits in odd 2306 gf2_matrix_square(tls, bp, bp+128) 2307 2308 // apply len2 zeros to crc1 (first square will put the operator for one 2309 // zero byte, eight zero bits, in even) 2310 for __ccgo := true; __ccgo; __ccgo = len2 != 0 { 2311 // apply zeros operator for this bit of len2 2312 gf2_matrix_square(tls, bp+128, bp) 2313 if len2&1 != 0 { 2314 crc1 = gf2_matrix_times(tls, bp+128, crc1) 2315 } 2316 len2 >>= 1 2317 2318 // if no more bits set, then done 2319 if len2 == 0 { 2320 break 2321 } 2322 2323 // another iteration of the loop with odd and even swapped 2324 gf2_matrix_square(tls, bp, bp+128) 2325 if len2&1 != 0 { 2326 crc1 = gf2_matrix_times(tls, bp, crc1) 2327 } 2328 len2 >>= 1 2329 2330 // if no more bits set, then done 2331 } 2332 2333 // return combined crc 2334 crc1 = crc1 ^ crc2 2335 return crc1 2336 } 2337 2338 // ========================================================================= 2339 func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 int32) ULong { /* crc32.c:428:15: */ 2340 return crc32_combine_(tls, crc1, crc2, len2) 2341 } 2342 2343 func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 int32) ULong { /* crc32.c:436:15: */ 2344 return crc32_combine_(tls, crc1, crc2, len2) 2345 } 2346 2347 // Reverse the bytes in a 32-bit value 2348 2349 // define NO_GZIP when compiling if you want to disable gzip header and 2350 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 2351 // the crc code when it is not needed. For shared libraries, gzip encoding 2352 // should be left enabled. 2353 2354 // =========================================================================== 2355 // Internal compression state. 2356 2357 // number of length codes, not counting the special END_BLOCK code 2358 2359 // number of literal bytes 0..255 2360 2361 // number of Literal or Length codes, including the END_BLOCK code 2362 2363 // number of distance codes 2364 2365 // number of codes used to transfer the bit lengths 2366 2367 // maximum heap size 2368 2369 // All codes must not exceed MAX_BITS bits 2370 2371 // size of bit buffer in bi_buf 2372 2373 // Stream status 2374 2375 // Data structure describing a single value and its code string. 2376 type Ct_data_s = struct { 2377 Ffc struct{ Ffreq Ush } 2378 Fdl struct{ Fdad Ush } 2379 } /* zlib.h:84:1 */ 2380 2381 // Reverse the bytes in a 32-bit value 2382 2383 // define NO_GZIP when compiling if you want to disable gzip header and 2384 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 2385 // the crc code when it is not needed. For shared libraries, gzip encoding 2386 // should be left enabled. 2387 2388 // =========================================================================== 2389 // Internal compression state. 2390 2391 // number of length codes, not counting the special END_BLOCK code 2392 2393 // number of literal bytes 0..255 2394 2395 // number of Literal or Length codes, including the END_BLOCK code 2396 2397 // number of distance codes 2398 2399 // number of codes used to transfer the bit lengths 2400 2401 // maximum heap size 2402 2403 // All codes must not exceed MAX_BITS bits 2404 2405 // size of bit buffer in bi_buf 2406 2407 // Stream status 2408 2409 // Data structure describing a single value and its code string. 2410 type Ct_data = Ct_data_s /* deflate.h:77:7 */ 2411 2412 type Static_tree_desc_s = struct { 2413 Fstatic_tree uintptr 2414 Fextra_bits uintptr 2415 Fextra_base int32 2416 Felems int32 2417 Fmax_length int32 2418 F__ccgo_pad1 [4]byte 2419 } /* deflate.h:84:9 */ 2420 2421 type Tree_desc_s = struct { 2422 Fdyn_tree uintptr 2423 Fmax_code int32 2424 F__ccgo_pad1 [4]byte 2425 Fstat_desc uintptr 2426 } /* zlib.h:84:1 */ 2427 2428 type Tree_desc = Tree_desc_s /* deflate.h:90:7 */ 2429 2430 type Pos = Ush /* deflate.h:92:13 */ 2431 type Posf = Pos /* deflate.h:93:17 */ 2432 type IPos = uint32 /* deflate.h:94:18 */ 2433 2434 // A Pos is an index in the character window. We use short instead of int to 2435 // save space in the various tables. IPos is used only for parameter passing. 2436 2437 type Deflate_state = Internal_state /* deflate.h:276:7 */ 2438 2439 var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7)) /* deflate.c:54:12 */ 2440 // 2441 // If you use the zlib library in a product, an acknowledgment is welcome 2442 // in the documentation of your product. If for some reason you cannot 2443 // include such an acknowledgment, I would appreciate that you keep this 2444 // copyright string in the executable of your product. 2445 // 2446 2447 // =========================================================================== 2448 // Function prototypes. 2449 type Block_state = uint32 /* deflate.c:71:3 */ 2450 2451 type Compress_func = uintptr /* deflate.c:73:21 */ 2452 2453 // =========================================================================== 2454 // Local data 2455 2456 // Tail of hash chains 2457 2458 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 2459 2460 // Values for max_lazy_match, good_match and max_chain_length, depending on 2461 // the desired pack level (0..9). The values given below have been tuned to 2462 // exclude worst case performance for pathological files. Better values may be 2463 // found for specific files. 2464 type Config_s = struct { 2465 Fgood_length Ush 2466 Fmax_lazy Ush 2467 Fnice_length Ush 2468 Fmax_chain Ush 2469 Ffunc Compress_func 2470 } /* deflate.c:120:9 */ 2471 2472 // =========================================================================== 2473 // Local data 2474 2475 // Tail of hash chains 2476 2477 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 2478 2479 // Values for max_lazy_match, good_match and max_chain_length, depending on 2480 // the desired pack level (0..9). The values given below have been tuned to 2481 // exclude worst case performance for pathological files. Better values may be 2482 // found for specific files. 2483 type Config = Config_s /* deflate.c:126:3 */ 2484 2485 var configuration_table = [10]Config{ 2486 // good lazy nice chain 2487 /* 0 */ {Ffunc: 0}, // store only 2488 /* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches 2489 /* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0}, 2490 /* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 2491 2492 /* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches 2493 /* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 2494 /* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0}, 2495 /* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0}, 2496 /* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0}, 2497 /* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */ 2498 2499 // max compression 2500 2501 // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 2502 // For deflate_fast() (levels <= 3) good is ignored and lazy has a different 2503 // meaning. 2504 2505 // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH 2506 2507 // =========================================================================== 2508 // Update a hash value with the given input byte 2509 // IN assertion: all calls to UPDATE_HASH are made with consecutive input 2510 // characters, so that a running hash key can be computed from the previous 2511 // key instead of complete recalculation each time. 2512 2513 // =========================================================================== 2514 // Insert string str in the dictionary and set match_head to the previous head 2515 // of the hash chain (the most recent string with same hash key). Return 2516 // the previous length of the hash chain. 2517 // If this file is compiled with -DFASTEST, the compression level is forced 2518 // to 1, and no hash chains are maintained. 2519 // IN assertion: all calls to INSERT_STRING are made with consecutive input 2520 // characters and the first MIN_MATCH bytes of str are valid (except for 2521 // the last MIN_MATCH-1 bytes of the input file). 2522 2523 // =========================================================================== 2524 // Initialize the hash table (avoiding 64K overflow for 16 bit systems). 2525 // prev[] will be initialized on the fly. 2526 2527 // =========================================================================== 2528 // Slide the hash table when sliding the window down (could be avoided with 32 2529 // bit values at the expense of memory usage). We slide even when level == 0 to 2530 // keep the hash table consistent if we switch back to level > 0 later. 2531 func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */ 2532 var n uint32 2533 var m uint32 2534 var p uintptr 2535 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 2536 2537 n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size 2538 p = (*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2 2539 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 2540 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 2541 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 2542 if m >= wsize { 2543 return uint16(m - wsize) 2544 } 2545 return uint16(NIL) 2546 }() 2547 } 2548 n = wsize 2549 p = (*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2 2550 for __ccgo1 := true; __ccgo1; __ccgo1 = libc.PreDecUint32(&n, 1) != 0 { 2551 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 2552 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 2553 if m >= wsize { 2554 return uint16(m - wsize) 2555 } 2556 return uint16(NIL) 2557 }() 2558 // If n is not on any hash chain, prev[n] is garbage but 2559 // its value will never be used. 2560 } 2561 } 2562 2563 // ========================================================================= 2564 func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */ 2565 return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, 2566 Z_DEFAULT_STRATEGY, version, stream_size) 2567 // To do: ignore strm->next_in if we use it as window 2568 } 2569 2570 // ========================================================================= 2571 func XdeflateInit2_(tls *libc.TLS, strm Z_streamp, level int32, method int32, windowBits int32, memLevel int32, strategy int32, version uintptr, stream_size int32) int32 { /* deflate.c:240:13: */ 2572 var s uintptr 2573 var wrap int32 = 1 2574 var overlay uintptr 2575 // We overlay pending_buf and d_buf+l_buf. This works since the average 2576 // output size for (length,distance) codes is <= 24 bits. 2577 2578 if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]) || uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{})) { 2579 return -6 2580 } 2581 if strm == uintptr(Z_NULL) { 2582 return -2 2583 } 2584 2585 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 2586 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 2587 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 2588 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 2589 }{Xzcalloc})) 2590 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 2591 } 2592 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 2593 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 2594 f func(*libc.TLS, Voidpf, Voidpf) 2595 }{Xzcfree})) 2596 } 2597 2598 if level == -1 { 2599 level = 6 2600 } 2601 2602 if windowBits < 0 { // suppress zlib wrapper 2603 wrap = 0 2604 windowBits = -windowBits 2605 } else if windowBits > 15 { 2606 wrap = 2 // write gzip wrapper instead 2607 windowBits = windowBits - 16 2608 } 2609 if memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED || windowBits == 8 && wrap != 1 { 2610 return -2 2611 } 2612 if windowBits == 8 { 2613 windowBits = 9 2614 } // until 256-byte window bug fixed 2615 s = (*struct { 2616 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 2617 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Deflate_state{}))) 2618 if s == uintptr(Z_NULL) { 2619 return -4 2620 } 2621 (*Z_stream)(unsafe.Pointer(strm)).Fstate = s 2622 (*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm 2623 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset() 2624 2625 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 2626 (*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL) 2627 (*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits) 2628 (*Deflate_state)(unsafe.Pointer(s)).Fw_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits) 2629 (*Deflate_state)(unsafe.Pointer(s)).Fw_mask = (*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1) 2630 2631 (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = UInt(memLevel) + UInt(7) 2632 (*Deflate_state)(unsafe.Pointer(s)).Fhash_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits) 2633 (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1) 2634 (*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH) - UInt(1)) / UInt(MIN_MATCH) 2635 2636 (*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct { 2637 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 2638 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, uint32(uint64(2)*uint64(unsafe.Sizeof(Byte(0))))) 2639 (*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct { 2640 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 2641 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, uint32(unsafe.Sizeof(Pos(0)))) 2642 (*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct { 2643 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 2644 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fhash_size, uint32(unsafe.Sizeof(Pos(0)))) 2645 2646 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg(0) // nothing written to s->window yet 2647 2648 (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = UInt(int32(1) << (memLevel + 6)) // 16K elements by default 2649 2650 overlay = (*struct { 2651 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 2652 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize, uint32(uint64(unsafe.Sizeof(Ush(0)))+uint64(2))) 2653 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay 2654 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = Ulg(uint64(Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2))) 2655 2656 if (*Deflate_state)(unsafe.Pointer(s)).Fwindow == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fprev == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fhead == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf == uintptr(Z_NULL) { 2657 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 2658 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -4] 2659 XdeflateEnd(tls, strm) 2660 return -4 2661 } 2662 (*Deflate_state)(unsafe.Pointer(s)).Fd_buf = overlay + uintptr(uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0))))*2 2663 (*Deflate_state)(unsafe.Pointer(s)).Fl_buf = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((uint64(1)+uint64(unsafe.Sizeof(Ush(0))))*uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)) 2664 2665 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 2666 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 2667 (*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method) 2668 2669 return XdeflateReset(tls, strm) 2670 } 2671 2672 var my_version = *(*[7]int8)(unsafe.Pointer(ts)) /* deflate.c:253:23 */ 2673 2674 // ========================================================================= 2675 // Check for a valid deflate stream state. Return 0 if ok, 1 if not. 2676 func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */ 2677 var s uintptr 2678 if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 2679 return 1 2680 } 2681 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2682 if s == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fstrm != strm || (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != GZIP_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != EXTRA_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != NAME_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != COMMENT_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != HCRC_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != BUSY_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != FINISH_STATE { 2683 return 1 2684 } 2685 return 0 2686 } 2687 2688 // ========================================================================= 2689 func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */ 2690 var s uintptr 2691 var str UInt 2692 var n UInt 2693 var wrap int32 2694 var avail uint32 2695 var next uintptr 2696 2697 if deflateStateCheck(tls, strm) != 0 || dictionary == uintptr(Z_NULL) { 2698 return -2 2699 } 2700 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2701 wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap 2702 if wrap == 2 || wrap == 1 && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0 { 2703 return -2 2704 } 2705 2706 // when using zlib wrappers, compute Adler-32 for provided dictionary 2707 if wrap == 1 { 2708 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) 2709 } 2710 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf 2711 2712 // if dictionary would fill window, just replace the history 2713 if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 2714 if wrap == 0 { // already empty otherwise 2715 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 2716 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0)))) 2717 2718 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 2719 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 2720 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 2721 } 2722 dictionary += uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size) // use the tail 2723 dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 2724 } 2725 2726 // insert dictionary into window and hash 2727 avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 2728 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 2729 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength 2730 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary 2731 fill_window(tls, s) 2732 for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 2733 str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 2734 n = (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH-1) 2735 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 2736 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+UInt(MIN_MATCH)-UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 2737 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(str&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) 2738 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 2739 str++ 2740 } 2741 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str 2742 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(MIN_MATCH - 1) 2743 fill_window(tls, s) 2744 } 2745 *(*UInt)(unsafe.Pointer(s + 148)) += (*Deflate_state)(unsafe.Pointer(s)).Flookahead 2746 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 2747 (*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 2748 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 2749 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+160, UInt(MIN_MATCH-1)) 2750 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 2751 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 2752 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail 2753 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 2754 return Z_OK 2755 } 2756 2757 // ========================================================================= 2758 func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */ 2759 var s uintptr 2760 var len UInt 2761 2762 if deflateStateCheck(tls, strm) != 0 { 2763 return -2 2764 } 2765 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2766 len = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead 2767 if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 2768 len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 2769 } 2770 if dictionary != uintptr(Z_NULL) && len != 0 { 2771 libc.Xmemcpy(tls, dictionary, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead)-uintptr(len), uint64(len)) 2772 } 2773 if dictLength != uintptr(Z_NULL) { 2774 *(*UInt)(unsafe.Pointer(dictLength)) = len 2775 } 2776 return Z_OK 2777 } 2778 2779 // ========================================================================= 2780 func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */ 2781 var s uintptr 2782 2783 if deflateStateCheck(tls, strm) != 0 { 2784 return -2 2785 } 2786 2787 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+28, ULong(0)) 2788 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically 2789 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN 2790 2791 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2792 (*Deflate_state)(unsafe.Pointer(s)).Fpending = Ulg(0) 2793 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 2794 2795 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 { 2796 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH); 2797 } 2798 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 { 2799 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 2800 return GZIP_STATE 2801 } 2802 return func() int32 { 2803 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 { 2804 return INIT_STATE 2805 } 2806 return BUSY_STATE 2807 }() 2808 }() 2809 (*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint32 { 2810 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 2811 return Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 2812 } 2813 return Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 2814 }() 2815 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH 2816 2817 X_tr_init(tls, s) 2818 2819 return Z_OK 2820 } 2821 2822 // ========================================================================= 2823 func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */ 2824 var ret int32 2825 2826 ret = XdeflateResetKeep(tls, strm) 2827 if ret == Z_OK { 2828 lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 2829 } 2830 return ret 2831 } 2832 2833 // ========================================================================= 2834 func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */ 2835 if deflateStateCheck(tls, strm) != 0 || (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2 { 2836 return -2 2837 } 2838 (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head 2839 return Z_OK 2840 } 2841 2842 // ========================================================================= 2843 func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */ 2844 if deflateStateCheck(tls, strm) != 0 { 2845 return -2 2846 } 2847 if pending != uintptr(Z_NULL) { 2848 *(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) 2849 } 2850 if bits != uintptr(Z_NULL) { 2851 *(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid 2852 } 2853 return Z_OK 2854 } 2855 2856 // ========================================================================= 2857 func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */ 2858 var s uintptr 2859 var put int32 2860 2861 if deflateStateCheck(tls, strm) != 0 { 2862 return -2 2863 } 2864 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2865 if (*Deflate_state)(unsafe.Pointer(s)).Fd_buf < (*Deflate_state)(unsafe.Pointer(s)).Fpending_out+uintptr(int32(Buf_size+7)>>3) { 2866 return -5 2867 } 2868 for __ccgo := true; __ccgo; __ccgo = bits != 0 { 2869 put = Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid 2870 if put > bits { 2871 put = bits 2872 } 2873 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(value & (int32(1)<<put - 1) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 2874 *(*int32)(unsafe.Pointer(s + 5908)) += put 2875 X_tr_flush_bits(tls, s) 2876 value >>= put 2877 bits = bits - put 2878 } 2879 return Z_OK 2880 } 2881 2882 // ========================================================================= 2883 func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */ 2884 var s uintptr 2885 var func1 Compress_func 2886 2887 if deflateStateCheck(tls, strm) != 0 { 2888 return -2 2889 } 2890 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2891 2892 if level == -1 { 2893 level = 6 2894 } 2895 if level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED { 2896 return -2 2897 } 2898 func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc 2899 2900 if (strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy || func1 != configuration_table[level].Ffunc) && (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0 { 2901 // Flush the last buffer: 2902 var err int32 = Xdeflate(tls, strm, Z_BLOCK) 2903 if err == -2 { 2904 return err 2905 } 2906 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 2907 return -5 2908 } 2909 } 2910 if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level { 2911 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 && (*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0) { 2912 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) { 2913 slide_hash(tls, s) 2914 } else { 2915 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 2916 } 2917 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0)))) 2918 2919 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0) 2920 } 2921 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 2922 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy) 2923 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length) 2924 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length) 2925 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain) 2926 } 2927 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 2928 return Z_OK 2929 } 2930 2931 // ========================================================================= 2932 func XdeflateTune(tls *libc.TLS, strm Z_streamp, good_length int32, max_lazy int32, nice_length int32, max_chain int32) int32 { /* deflate.c:617:13: */ 2933 var s uintptr 2934 2935 if deflateStateCheck(tls, strm) != 0 { 2936 return -2 2937 } 2938 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2939 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length) 2940 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy) 2941 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length 2942 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain) 2943 return Z_OK 2944 } 2945 2946 // ========================================================================= 2947 // For the default windowBits of 15 and memLevel of 8, this function returns 2948 // a close to exact, as well as small, upper bound on the compressed size. 2949 // They are coded as constants here for a reason--if the #define's are 2950 // changed, then this function needs to be changed as well. The return 2951 // value for 15 and 8 only works for those exact settings. 2952 // 2953 // For any setting other than those defaults for windowBits and memLevel, 2954 // the value returned is a conservative worst case for the maximum expansion 2955 // resulting from using fixed blocks instead of stored blocks, which deflate 2956 // can emit on compressed data for some combinations of the parameters. 2957 // 2958 // This function could be more sophisticated to provide closer upper bounds for 2959 // every combination of windowBits and memLevel. But even the conservative 2960 // upper bound of about 14% expansion does not seem onerous for output buffer 2961 // allocation. 2962 func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */ 2963 var s uintptr 2964 var complen ULong 2965 var wraplen ULong 2966 2967 // conservative upper bound for compressed data 2968 complen = sourceLen + (sourceLen+ULong(7))>>3 + (sourceLen+ULong(63))>>6 + ULong(5) 2969 2970 // if can't get parameters, return conservative bound plus zlib wrapper 2971 if deflateStateCheck(tls, strm) != 0 { 2972 return complen + ULong(6) 2973 } 2974 2975 // compute wrapper length 2976 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 2977 switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap { 2978 case 0: // raw deflate 2979 wraplen = ULong(0) 2980 break 2981 case 1: // zlib wrapper 2982 wraplen = ULong(6 + func() int32 { 2983 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { 2984 return 4 2985 } 2986 return 0 2987 }()) 2988 break 2989 case 2: // gzip wrapper 2990 wraplen = ULong(18) 2991 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header 2992 var str uintptr 2993 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 2994 wraplen = wraplen + ULong(UInt(2)+(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len) 2995 } 2996 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname 2997 if str != uintptr(Z_NULL) { 2998 for __ccgo := true; __ccgo; __ccgo = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 2999 wraplen++ 3000 } 3001 } 3002 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment 3003 if str != uintptr(Z_NULL) { 3004 for __ccgo1 := true; __ccgo1; __ccgo1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 3005 wraplen++ 3006 } 3007 } 3008 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 3009 wraplen = wraplen + ULong(2) 3010 } 3011 } 3012 break 3013 default: // for compiler happiness 3014 wraplen = ULong(6) 3015 } 3016 3017 // if not default parameters, return conservative bound 3018 if (*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15) || (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != UInt(8+7) { 3019 return complen + wraplen 3020 } 3021 3022 // default settings: return tight bound for that case 3023 return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13) - ULong(6) + wraplen 3024 } 3025 3026 // ========================================================================= 3027 // Put a short in the pending buffer. The 16-bit value is put in MSB order. 3028 // IN assertion: the stream state is correct and there is enough room in 3029 // pending_buf. 3030 func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */ 3031 { 3032 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b >> 8) 3033 } 3034 3035 { 3036 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b & UInt(0xff)) 3037 } 3038 3039 } 3040 3041 // ========================================================================= 3042 // Flush as much pending output as possible. All deflate() output, except for 3043 // some deflate_stored() output, goes through this function so some 3044 // applications may wish to modify it to avoid allocating a large 3045 // strm->next_out buffer and copying into it. (See also read_buf()). 3046 func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */ 3047 var len uint32 3048 var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate 3049 3050 X_tr_flush_bits(tls, s) 3051 len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending) 3052 if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out { 3053 len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 3054 } 3055 if len == uint32(0) { 3056 return 3057 } 3058 3059 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len)) 3060 *(*uintptr)(unsafe.Pointer(strm + 16)) += uintptr(len) 3061 *(*uintptr)(unsafe.Pointer(s + 32)) += uintptr(len) 3062 *(*ULong)(unsafe.Pointer(strm + 28)) += ULong(len) 3063 *(*UInt)(unsafe.Pointer(strm + 24)) -= len 3064 *(*Ulg)(unsafe.Pointer(s + 40)) -= Ulg(len) 3065 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == Ulg(0) { 3066 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 3067 } 3068 } 3069 3070 // =========================================================================== 3071 // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. 3072 3073 // ========================================================================= 3074 func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */ 3075 var old_flush int32 // value of flush param for previous deflate call 3076 var s uintptr 3077 3078 if deflateStateCheck(tls, strm) != 0 || flush > Z_BLOCK || flush < 0 { 3079 return -2 3080 } 3081 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 3082 3083 if (*Z_stream)(unsafe.Pointer(strm)).Fnext_out == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) && (*Z_stream)(unsafe.Pointer(strm)).Fnext_in == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && flush != Z_FINISH { 3084 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -2]; return -2 }() 3085 } 3086 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 3087 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }() 3088 } 3089 3090 old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush 3091 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush 3092 3093 // Flush as much pending output as possible 3094 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3095 flush_pending(tls, strm) 3096 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 3097 // Since avail_out is 0, deflate will be called again with 3098 // more output space, but possibly with both pending and 3099 // avail_in equal to zero. There won't be anything to do, 3100 // but this is not an error situation so make sure we 3101 // return OK instead of BUF_ERROR at next call of deflate: 3102 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3103 return Z_OK 3104 } 3105 3106 // Make sure there is something to do and avoid duplicate consecutive 3107 // flushes. For repeated and useless calls with Z_FINISH, we keep 3108 // returning Z_STREAM_END instead of Z_BUF_ERROR. 3109 } else if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && flush*2-func() int32 { 3110 if flush > 4 { 3111 return 9 3112 } 3113 return 0 3114 }() <= old_flush*2-func() int32 { 3115 if old_flush > 4 { 3116 return 9 3117 } 3118 return 0 3119 }() && flush != Z_FINISH { 3120 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }() 3121 } 3122 3123 // User must not provide more input after the first FINISH: 3124 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) { 3125 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }() 3126 } 3127 3128 // Write the header 3129 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE { 3130 // zlib header 3131 var header UInt = (UInt(Z_DEFLATED) + ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits-UInt(8))<<4) << 8 3132 var level_flags UInt 3133 3134 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 { 3135 level_flags = UInt(0) 3136 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 { 3137 level_flags = UInt(1) 3138 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 { 3139 level_flags = UInt(2) 3140 } else { 3141 level_flags = UInt(3) 3142 } 3143 header = header | level_flags<<6 3144 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 3145 header = header | UInt(PRESET_DICT) 3146 } 3147 header = header + (UInt(31) - header%UInt(31)) 3148 3149 putShortMSB(tls, s, header) 3150 3151 // Save the adler32 of the preset dictionary: 3152 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 3153 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16)) 3154 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff))) 3155 } 3156 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 3157 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 3158 3159 // Compression must start with an empty pending buffer 3160 flush_pending(tls, strm) 3161 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3162 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3163 return Z_OK 3164 } 3165 } 3166 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE { 3167 // gzip header 3168 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 3169 { 3170 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31) 3171 } 3172 3173 { 3174 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139) 3175 } 3176 3177 { 3178 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8) 3179 } 3180 3181 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) { 3182 { 3183 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 3184 } 3185 3186 { 3187 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 3188 } 3189 3190 { 3191 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 3192 } 3193 3194 { 3195 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 3196 } 3197 3198 { 3199 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 3200 } 3201 3202 { 3203 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 3204 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 3205 return uint8(2) 3206 } 3207 return func() uint8 { 3208 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 { 3209 return uint8(4) 3210 } 3211 return uint8(0) 3212 }() 3213 }() 3214 } 3215 3216 { 3217 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE) 3218 } 3219 3220 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 3221 3222 // Compression must start with an empty pending buffer 3223 flush_pending(tls, strm) 3224 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3225 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3226 return Z_OK 3227 } 3228 } else { 3229 { 3230 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(func() int32 { 3231 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { 3232 return 1 3233 } 3234 return 0 3235 }() + func() int32 { 3236 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 3237 return 2 3238 } 3239 return 0 3240 }() + func() int32 { 3241 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) { 3242 return 0 3243 } 3244 return 4 3245 }() + func() int32 { 3246 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) { 3247 return 0 3248 } 3249 return 8 3250 }() + func() int32 { 3251 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) { 3252 return 0 3253 } 3254 return 16 3255 }()) 3256 } 3257 3258 { 3259 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & ULong(0xff)) 3260 } 3261 3262 { 3263 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8 & ULong(0xff)) 3264 } 3265 3266 { 3267 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16 & ULong(0xff)) 3268 } 3269 3270 { 3271 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24 & ULong(0xff)) 3272 } 3273 3274 { 3275 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 3276 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 3277 return uint8(2) 3278 } 3279 return func() uint8 { 3280 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 { 3281 return uint8(4) 3282 } 3283 return uint8(0) 3284 }() 3285 }() 3286 } 3287 3288 { 3289 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff) 3290 } 3291 3292 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 3293 { 3294 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff)) 3295 } 3296 3297 { 3298 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8 & UInt(0xff)) 3299 } 3300 3301 } 3302 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 3303 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf, 3304 uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)) 3305 } 3306 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0) 3307 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE 3308 } 3309 } 3310 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE { 3311 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 3312 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 3313 var left UInt = UInt(Ulg((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len&UInt(0xffff)) - (*Deflate_state)(unsafe.Pointer(s)).Fgzindex) 3314 for (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(left) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 3315 var copy UInt = UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending) 3316 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), 3317 (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(copy)) 3318 (*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size 3319 for __ccgo := true; __ccgo; __ccgo = 0 != 0 { 3320 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 3321 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg)) 3322 } 3323 } 3324 *(*Ulg)(unsafe.Pointer(s + 56)) += Ulg(copy) 3325 flush_pending(tls, strm) 3326 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3327 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3328 return Z_OK 3329 } 3330 beg = Ulg(0) 3331 left = left - copy 3332 } 3333 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), 3334 (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(left)) 3335 *(*Ulg)(unsafe.Pointer(s + 40)) += Ulg(left) 3336 for __ccgo1 := true; __ccgo1; __ccgo1 = 0 != 0 { 3337 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 3338 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg)) 3339 } 3340 } 3341 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0) 3342 } 3343 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE 3344 } 3345 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE { 3346 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) { 3347 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 3348 var val int32 3349 for __ccgo2 := true; __ccgo2; __ccgo2 = val != 0 { 3350 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 3351 for __ccgo3 := true; __ccgo3; __ccgo3 = 0 != 0 { 3352 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 3353 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg)) 3354 } 3355 } 3356 flush_pending(tls, strm) 3357 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3358 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3359 return Z_OK 3360 } 3361 beg = Ulg(0) 3362 } 3363 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 3364 { 3365 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 3366 } 3367 3368 } 3369 for __ccgo4 := true; __ccgo4; __ccgo4 = 0 != 0 { 3370 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 3371 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg)) 3372 } 3373 } 3374 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0) 3375 } 3376 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE 3377 } 3378 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE { 3379 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) { 3380 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 3381 var val int32 3382 for __ccgo5 := true; __ccgo5; __ccgo5 = val != 0 { 3383 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 3384 for __ccgo6 := true; __ccgo6; __ccgo6 = 0 != 0 { 3385 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 3386 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg)) 3387 } 3388 } 3389 flush_pending(tls, strm) 3390 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3391 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3392 return Z_OK 3393 } 3394 beg = Ulg(0) 3395 } 3396 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 3397 { 3398 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 3399 } 3400 3401 } 3402 for __ccgo7 := true; __ccgo7; __ccgo7 = 0 != 0 { 3403 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 3404 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg)) 3405 } 3406 } 3407 } 3408 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE 3409 } 3410 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE { 3411 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 3412 if (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(2) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 3413 flush_pending(tls, strm) 3414 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3415 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3416 return Z_OK 3417 } 3418 } 3419 { 3420 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff)) 3421 } 3422 3423 { 3424 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8 & ULong(0xff)) 3425 } 3426 3427 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 3428 } 3429 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 3430 3431 // Compression must start with an empty pending buffer 3432 flush_pending(tls, strm) 3433 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3434 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 3435 return Z_OK 3436 } 3437 } 3438 3439 // Start a new block or continue the current one. 3440 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != UInt(0) || flush != Z_NO_FLUSH && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != FINISH_STATE { 3441 var bstate Block_state 3442 3443 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 { 3444 bstate = deflate_stored(tls, s, flush) 3445 } else { 3446 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY { 3447 bstate = deflate_huff(tls, s, flush) 3448 } else { 3449 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE { 3450 bstate = deflate_rle(tls, s, flush) 3451 } else { 3452 bstate = (*struct { 3453 f func(*libc.TLS, uintptr, int32) Block_state 3454 })(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush) 3455 } 3456 } 3457 } 3458 3459 if bstate == Finish_started || bstate == Finish_done { 3460 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 3461 } 3462 if bstate == Need_more || bstate == Finish_started { 3463 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 3464 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above 3465 } 3466 return Z_OK 3467 // If flush != Z_NO_FLUSH && avail_out == 0, the next call 3468 // of deflate should use the same flush parameter to make sure 3469 // that the flush is complete. So we don't have to output an 3470 // empty block here, this will be done at next call. This also 3471 // ensures that for a very small output buffer, we emit at most 3472 // one empty block. 3473 } 3474 if bstate == Block_done { 3475 if flush == Z_PARTIAL_FLUSH { 3476 X_tr_align(tls, s) 3477 } else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH 3478 X_tr_stored_block(tls, s, uintptr(0), uint32(0), 0) 3479 // For a full flush, this empty block will be recognized 3480 // as a special marker by inflate_sync(). 3481 if flush == Z_FULL_FLUSH { 3482 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 3483 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0)))) 3484 // forget history 3485 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 3486 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 3487 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 3488 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 3489 } 3490 } 3491 } 3492 flush_pending(tls, strm) 3493 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 3494 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above 3495 return Z_OK 3496 } 3497 } 3498 } 3499 3500 if flush != Z_FINISH { 3501 return Z_OK 3502 } 3503 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { 3504 return Z_STREAM_END 3505 } 3506 3507 // Write the trailer 3508 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 3509 { 3510 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff)) 3511 } 3512 3513 { 3514 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8 & ULong(0xff)) 3515 } 3516 3517 { 3518 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16 & ULong(0xff)) 3519 } 3520 3521 { 3522 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24 & ULong(0xff)) 3523 } 3524 3525 { 3526 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & ULong(0xff)) 3527 } 3528 3529 { 3530 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8 & ULong(0xff)) 3531 } 3532 3533 { 3534 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16 & ULong(0xff)) 3535 } 3536 3537 { 3538 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24 & ULong(0xff)) 3539 } 3540 3541 } else { 3542 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16)) 3543 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff))) 3544 } 3545 flush_pending(tls, strm) 3546 // If avail_out is zero, the application will call deflate again 3547 // to flush the rest. 3548 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 { 3549 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap 3550 } // write the trailer only once! 3551 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 3552 return Z_OK 3553 } 3554 return Z_STREAM_END 3555 } 3556 3557 // ========================================================================= 3558 func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */ 3559 var status int32 3560 3561 if deflateStateCheck(tls, strm) != 0 { 3562 return -2 3563 } 3564 3565 status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus 3566 3567 /* Deallocate in reverse order of allocations: */ 3568 { 3569 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { 3570 (*struct { 3571 f func(*libc.TLS, Voidpf, Voidpf) 3572 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf) 3573 } 3574 } 3575 3576 { 3577 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { 3578 (*struct { 3579 f func(*libc.TLS, Voidpf, Voidpf) 3580 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead) 3581 } 3582 } 3583 3584 { 3585 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { 3586 (*struct { 3587 f func(*libc.TLS, Voidpf, Voidpf) 3588 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev) 3589 } 3590 } 3591 3592 { 3593 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { 3594 (*struct { 3595 f func(*libc.TLS, Voidpf, Voidpf) 3596 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow) 3597 } 3598 } 3599 3600 (*struct { 3601 f func(*libc.TLS, Voidpf, Voidpf) 3602 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 3603 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 3604 3605 if status == BUSY_STATE { 3606 return -3 3607 } 3608 return Z_OK 3609 } 3610 3611 // ========================================================================= 3612 // Copy the source state to the destination state. 3613 // To simplify the source, this is not supported for 16-bit MSDOS (which 3614 // doesn't have enough memory anyway to duplicate compression states). 3615 func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */ 3616 var ds uintptr 3617 var ss uintptr 3618 var overlay uintptr 3619 3620 if deflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) { 3621 return -2 3622 } 3623 3624 ss = (*Z_stream)(unsafe.Pointer(source)).Fstate 3625 3626 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 3627 3628 ds = (*struct { 3629 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 3630 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Deflate_state{}))) 3631 if ds == uintptr(Z_NULL) { 3632 return -4 3633 } 3634 (*Z_stream)(unsafe.Pointer(dest)).Fstate = ds 3635 libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{}))) 3636 (*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest 3637 3638 (*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct { 3639 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 3640 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(uint64(2)*uint64(unsafe.Sizeof(Byte(0))))) 3641 (*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct { 3642 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 3643 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(unsafe.Sizeof(Pos(0)))) 3644 (*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct { 3645 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 3646 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fhash_size, uint32(unsafe.Sizeof(Pos(0)))) 3647 overlay = (*struct { 3648 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 3649 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize, uint32(uint64(unsafe.Sizeof(Ush(0)))+uint64(2))) 3650 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay 3651 3652 if (*Deflate_state)(unsafe.Pointer(ds)).Fwindow == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(ds)).Fprev == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(ds)).Fhead == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf == uintptr(Z_NULL) { 3653 XdeflateEnd(tls, dest) 3654 return -4 3655 } 3656 // following zmemcpy do not work for 16-bit MSDOS 3657 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fwindow, (*Deflate_state)(unsafe.Pointer(ss)).Fwindow, uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size*UInt(2))*uint64(unsafe.Sizeof(Byte(0)))) 3658 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fprev, (*Deflate_state)(unsafe.Pointer(ss)).Fprev, uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size)*uint64(unsafe.Sizeof(Pos(0)))) 3659 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fhead, (*Deflate_state)(unsafe.Pointer(ss)).Fhead, uint64((*Deflate_state)(unsafe.Pointer(ds)).Fhash_size)*uint64(unsafe.Sizeof(Pos(0)))) 3660 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf, uint64(UInt((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf_size))) 3661 3662 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_out = (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_out)-int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf))/1) 3663 (*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = overlay + uintptr(uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0))))*2 3664 (*Deflate_state)(unsafe.Pointer(ds)).Fl_buf = (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((uint64(1)+uint64(unsafe.Sizeof(Ush(0))))*uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)) 3665 3666 (*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 188 /* &.dyn_ltree */ 3667 (*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2480 /* &.dyn_dtree */ 3668 (*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2724 /* &.bl_tree */ 3669 3670 return Z_OK 3671 } 3672 3673 // =========================================================================== 3674 // Read a new buffer from the current input stream, update the adler32 3675 // and total number of bytes read. All deflate() input goes through 3676 // this function so some applications may wish to modify it to avoid 3677 // allocating a large strm->next_in buffer and copying from it. 3678 // (See also flush_pending()). 3679 func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */ 3680 var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 3681 3682 if len > size { 3683 len = size 3684 } 3685 if len == uint32(0) { 3686 return uint32(0) 3687 } 3688 3689 *(*UInt)(unsafe.Pointer(strm + 8)) -= len 3690 3691 libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len)) 3692 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 { 3693 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 3694 } else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 { 3695 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 3696 } 3697 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(len) 3698 *(*ULong)(unsafe.Pointer(strm + 12)) += ULong(len) 3699 3700 return len 3701 } 3702 3703 // =========================================================================== 3704 // Initialize the "longest match" routines for a new zlib stream 3705 func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */ 3706 (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = Ulg(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 3707 3708 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 3709 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0)))) 3710 3711 // Set the default configuration parameters: 3712 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) 3713 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) 3714 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) 3715 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) 3716 3717 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 3718 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 3719 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 3720 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 3721 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+160, UInt(MIN_MATCH-1)) 3722 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 3723 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0) 3724 } 3725 3726 // =========================================================================== 3727 // Set match_start to the longest match starting at the given string and 3728 // return its length. Matches shorter or equal to prev_length are discarded, 3729 // in which case the result is equal to prev_length and match_start is 3730 // garbage. 3731 // IN assertions: cur_match is the head of the hash chain for the current 3732 // string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 3733 // OUT assertion: the match length is not greater than s->lookahead. 3734 // For 80x86 and 680x0, an optimized version will be provided in match.asm or 3735 // match.S. The code will be functionally equivalent. 3736 func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */ 3737 var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length // max hash chain length 3738 var scan uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) // current string 3739 var match uintptr // matched string 3740 var len int32 // length of current match 3741 var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length) // best match length so far 3742 var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match // stop if match long enough 3743 var limit IPos 3744 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) { 3745 limit = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(MAX_MATCH+MIN_MATCH+1)) 3746 } else { 3747 limit = uint32(NIL) 3748 } 3749 // Stop when cur_match becomes <= limit. To simplify the code, 3750 // we prevent matches with the string of window index 0. 3751 var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev 3752 var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask 3753 3754 var strend uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH) 3755 var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1))) 3756 var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 3757 3758 // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 3759 // It is easy to get rid of this optimization if necessary. 3760 3761 // Do not waste too much time if we already have a good match: 3762 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match { 3763 chain_length >>= 2 3764 } 3765 // Do not look for matches beyond the end of the input. This is necessary 3766 // to make deflate deterministic. 3767 if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 3768 nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 3769 } 3770 3771 for __ccgo := true; __ccgo; __ccgo = libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr(cur_match&wmask)*2)))) > limit && 3772 libc.PreDecUint32(&chain_length, 1) != uint32(0) { 3773 3774 match = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match) 3775 3776 // Skip to next match if the match length cannot increase 3777 // or if the match length is less than 2. Note that the checks below 3778 // for insufficient lookahead only occur occasionally for performance 3779 // reasons. Therefore uninitialized memory will be accessed, and 3780 // conditional jumps will be made that depend on those values. 3781 // However the length of the match is limited to the lookahead, so 3782 // the output of deflate is not affected by the uninitialized values. 3783 3784 if int32(*(*Bytef)(unsafe.Pointer(match + uintptr(best_len)))) != int32(scan_end) || int32(*(*Bytef)(unsafe.Pointer(match + uintptr(best_len-1)))) != int32(scan_end1) || int32(*(*Bytef)(unsafe.Pointer(match))) != int32(*(*Bytef)(unsafe.Pointer(scan))) || int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) != int32(*(*Bytef)(unsafe.Pointer(scan + 1))) { 3785 continue 3786 } 3787 3788 // The check at best_len-1 can be removed because it will be made 3789 // again later. (This heuristic is not always a win.) 3790 // It is not necessary to compare scan[2] and match[2] since they 3791 // are always equal when the other bytes match, given that 3792 // the hash keys are equal and that HASH_BITS >= 8. 3793 scan += uintptr(2) 3794 match++ 3795 3796 // We check for insufficient lookahead only every 8th comparison; 3797 // the 256th check will be made at strstart+258. 3798 for __ccgo1 := true; __ccgo1; __ccgo1 = int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && scan < strend { 3799 } 3800 3801 len = MAX_MATCH - int32((int64(strend)-int64(scan))/1) 3802 scan = strend - uintptr(MAX_MATCH) 3803 3804 if len > best_len { 3805 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match 3806 best_len = len 3807 if len >= nice_match { 3808 break 3809 } 3810 scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1))) 3811 scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 3812 } 3813 } 3814 3815 if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 3816 return UInt(best_len) 3817 } 3818 return (*Deflate_state)(unsafe.Pointer(s)).Flookahead 3819 } 3820 3821 // =========================================================================== 3822 // Fill the window when the lookahead becomes insufficient. 3823 // Updates strstart and lookahead. 3824 // 3825 // IN assertion: lookahead < MIN_LOOKAHEAD 3826 // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD 3827 // At least one byte has been read, or avail_in == 0; reads are 3828 // performed for at least two bytes (required for the zip translate_eol 3829 // option -- not supported here). 3830 func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */ 3831 var n uint32 3832 var more uint32 // Amount of free space at the end of the window. 3833 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 3834 3835 for __ccgo := true; __ccgo; __ccgo = (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in != UInt(0) { 3836 more = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) 3837 3838 // Deal with !@#$% 64K limit: 3839 if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) { 3840 if more == uint32(0) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0) && (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 3841 more = wsize 3842 3843 } else if more == libc.Uint32(libc.Uint32FromInt32(-1)) { 3844 // Very unlikely, but possible on 16 bit machine if 3845 // strstart == 0 && lookahead == 1 (input done a byte at time) 3846 more-- 3847 } 3848 } 3849 3850 // If the window is almost full and there is insufficient lookahead, 3851 // move the upper half to the lower one to make room in the upper half. 3852 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= wsize+((*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1)) { 3853 3854 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(wsize), uint64(wsize-more)) 3855 *(*UInt)(unsafe.Pointer(s + 152)) -= wsize 3856 *(*UInt)(unsafe.Pointer(s + 148)) -= wsize // we now have strstart >= MAX_DIST 3857 *(*int32)(unsafe.Pointer(s + 132)) -= int32(wsize) 3858 slide_hash(tls, s) 3859 more = more + wsize 3860 } 3861 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) { 3862 break 3863 } 3864 3865 // If there was no sliding: 3866 // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && 3867 // more == window_size - lookahead - strstart 3868 // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) 3869 // => more >= window_size - 2*WSIZE + 2 3870 // In the BIG_MEM or MMAP case (not yet supported), 3871 // window_size == input_size + MIN_LOOKAHEAD && 3872 // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. 3873 // Otherwise, window_size == 2*WSIZE so more >= 2. 3874 // If there was sliding, more >= WSIZE. So in all cases, more >= 2. 3875 3876 n = read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead), more) 3877 *(*UInt)(unsafe.Pointer(s + 156)) += n 3878 3879 // Initialize the hash value now that we have some input: 3880 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert >= UInt(MIN_MATCH) { 3881 var str UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert 3882 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) 3883 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 3884 for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 { 3885 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+UInt(MIN_MATCH)-UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 3886 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(str&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) 3887 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 3888 str++ 3889 (*Deflate_state)(unsafe.Pointer(s)).Finsert-- 3890 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert < UInt(MIN_MATCH) { 3891 break 3892 } 3893 } 3894 } 3895 // If the whole input has less than MIN_MATCH bytes, ins_h is garbage, 3896 // but this is not important since only literal bytes will be emitted. 3897 3898 } 3899 3900 // If the WIN_INIT bytes after the end of the current data have never been 3901 // written, then zero those bytes in order to avoid memory check reports of 3902 // the use of uninitialized (or uninitialised as Julian writes) bytes by 3903 // the longest match routines. Update the high water mark for the next 3904 // time through here. WIN_INIT is set to MAX_MATCH since the longest match 3905 // routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. 3906 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size { 3907 var curr Ulg = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 3908 var init1 Ulg 3909 3910 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { 3911 // Previous high water mark below current data -- zero WIN_INIT 3912 // bytes or up to end of window, whichever is less. 3913 init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr 3914 if init1 > Ulg(MAX_MATCH) { 3915 init1 = Ulg(MAX_MATCH) 3916 } 3917 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(curr), 0, uint64(uint32(init1))) 3918 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = curr + init1 3919 } else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr+Ulg(MAX_MATCH) { 3920 // High water mark at or above current data, but below current data 3921 // plus WIN_INIT -- zero out to current data plus WIN_INIT, or up 3922 // to end of window, whichever is less. 3923 init1 = curr + Ulg(MAX_MATCH) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water 3924 if init1 > (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water { 3925 init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water 3926 } 3927 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water), 0, uint64(uint32(init1))) 3928 *(*Ulg)(unsafe.Pointer(s + 5912)) += init1 3929 } 3930 } 3931 3932 } 3933 3934 // =========================================================================== 3935 // Flush the current block, with given end-of-file flag. 3936 // IN assertion: strstart is set to the end of the current match. 3937 3938 // Same but force premature exit if necessary. 3939 3940 // Maximum stored block length in deflate format (not including header). 3941 3942 // Minimum of a and b. 3943 3944 // =========================================================================== 3945 // Copy without compression as much as possible from the input stream, return 3946 // the current block state. 3947 // 3948 // In case deflateParams() is used to later switch to a non-zero compression 3949 // level, s->matches (otherwise unused when storing) keeps track of the number 3950 // of hash table slides to perform. If s->matches is 1, then one hash table 3951 // slide will be done when switching. If s->matches is 2, the maximum value 3952 // allowed here, then the hash table will be cleared, since two or more slides 3953 // is the same as a clear. 3954 // 3955 // deflate_stored() is written to minimize the number of times an input byte is 3956 // copied. It is most efficient with large input and output buffers, which 3957 // maximizes the opportunites to have a single copy from next_in to next_out. 3958 func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */ 3959 // Smallest worthy block size when not flushing or finishing. By default 3960 // this is 32K. This can be as small as 507 bytes for memLevel == 1. For 3961 // large input and output buffers, the stored block size will be larger. 3962 var min_block uint32 = func() uint32 { 3963 if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(5) > Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 3964 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 3965 } 3966 return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(5)) 3967 }() 3968 3969 // Copy as many min_block or larger stored blocks directly to next_out as 3970 // possible. If flushing, copy the remaining available input to next_out as 3971 // stored blocks, if there is enough space. 3972 var len uint32 3973 var left uint32 3974 var have uint32 3975 var last uint32 = uint32(0) 3976 var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 3977 for __ccgo := true; __ccgo; __ccgo = last == uint32(0) { 3978 // Set len to the maximum size block that we can copy directly with the 3979 // available input data and output space. Set left to how much of that 3980 // would be copied from what's left in the window. 3981 len = uint32(MAX_STORED) // maximum deflate stored block length 3982 have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes 3983 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header 3984 break 3985 } 3986 // maximum stored block length that will fit in avail_out: 3987 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have 3988 left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window 3989 if Ulg(len) > Ulg(left)+Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) { 3990 len = left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 3991 } // limit len to the input 3992 if len > have { 3993 len = have 3994 } // limit len to the output 3995 3996 // If the stored block would be less than min_block in length, or if 3997 // unable to copy all of the available input when flushing, then try 3998 // copying to the window and the pending buffer instead. Also don't 3999 // write an empty block when flushing -- deflate() does that. 4000 if len < min_block && (len == uint32(0) && flush != Z_FINISH || flush == Z_NO_FLUSH || len != left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) { 4001 break 4002 } 4003 4004 // Make a dummy stored block in pending to get the header bytes, 4005 // including any pending bits. This also updates the debugging counts. 4006 if flush == Z_FINISH && len == left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 4007 last = uint32(1) 4008 } else { 4009 last = uint32(0) 4010 } 4011 X_tr_stored_block(tls, s, uintptr(0), uint32(0), int32(last)) 4012 4013 // Replace the lengths in the dummy stored block with len. 4014 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(4)))) = Bytef(len) 4015 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(3)))) = Bytef(len >> 8) 4016 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(2)))) = Bytef(^len) 4017 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(1)))) = Bytef(^len >> 8) 4018 4019 // Write the stored block header bytes. 4020 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4021 4022 // Copy uncompressed bytes from the window to next_out. 4023 if left != 0 { 4024 if left > len { 4025 left = len 4026 } 4027 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint64(left)) 4028 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) += uintptr(left) 4029 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24)) -= left 4030 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 28)) += ULong(left) 4031 *(*int32)(unsafe.Pointer(s + 132)) += int32(uint32(left)) 4032 len = len - left 4033 } 4034 4035 // Copy uncompressed bytes directly from next_in to next_out, updating 4036 // the check value. 4037 if len != 0 { 4038 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len) 4039 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) += uintptr(len) 4040 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24)) -= len 4041 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 28)) += ULong(len) 4042 } 4043 } 4044 4045 // Update the sliding window with the last s->w_size bytes of the copied 4046 // data, or append all of the copied data to the existing window if less 4047 // than s->w_size bytes were copied. Also update the number of bytes to 4048 // insert in the hash tables, in the event that deflateParams() switches to 4049 // a non-zero compression level. 4050 used = used - (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in // number of input bytes directly copied 4051 if used != 0 { 4052 // If any input was used, then no unused input remains in the window, 4053 // therefore s->block_start == s->strstart. 4054 if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history 4055 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash 4056 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 4057 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4058 } else { 4059 if (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) <= Ulg(used) { 4060 // Slide the window down. 4061 *(*UInt)(unsafe.Pointer(s + 148)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4062 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) 4063 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 4064 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 4065 } // add a pending slide_hash() 4066 } 4067 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr(used), uint64(used)) 4068 *(*UInt)(unsafe.Pointer(s + 148)) += used 4069 } 4070 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4071 *(*UInt)(unsafe.Pointer(s + 5900)) += func() uint32 { 4072 if used > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-(*Deflate_state)(unsafe.Pointer(s)).Finsert { 4073 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert 4074 } 4075 return used 4076 }() 4077 } 4078 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 4079 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4080 } 4081 4082 // If the last block was written to next_out, then done. 4083 if last != 0 { 4084 return Finish_done 4085 } 4086 4087 // If flushing and all input has been consumed, then done. 4088 if flush != Z_NO_FLUSH && flush != Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start { 4089 return Block_done 4090 } 4091 4092 // Fill the window with any remaining input. 4093 have = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - Ulg(1)) 4094 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have && (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int32((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 4095 // Slide the window down. 4096 *(*int32)(unsafe.Pointer(s + 132)) -= int32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 4097 *(*UInt)(unsafe.Pointer(s + 148)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4098 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) 4099 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 4100 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 4101 } // add a pending slide_hash() 4102 have = have + (*Deflate_state)(unsafe.Pointer(s)).Fw_size // more space now 4103 } 4104 if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 4105 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 4106 } 4107 if have != 0 { 4108 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), have) 4109 *(*UInt)(unsafe.Pointer(s + 148)) += have 4110 } 4111 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 4112 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4113 } 4114 4115 // There was not enough avail_out to write a complete worthy or flushed 4116 // stored block to next_out. Write a stored block to pending instead, if we 4117 // have enough input for a worthy block, or if flushing and there is enough 4118 // room for the remaining input as a stored block in the pending buffer. 4119 have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes 4120 // maximum stored block length that will fit in pending: 4121 have = func() uint32 { 4122 if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(have) > Ulg(MAX_STORED) { 4123 return uint32(MAX_STORED) 4124 } 4125 return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) 4126 }() 4127 min_block = func() uint32 { 4128 if have > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 4129 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4130 } 4131 return have 4132 }() 4133 left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4134 if left >= min_block || (left != 0 || flush == Z_FINISH) && flush != Z_NO_FLUSH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && left <= have { 4135 len = func() uint32 { 4136 if left > have { 4137 return have 4138 } 4139 return left 4140 }() 4141 if flush == Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && len == left { 4142 last = uint32(1) 4143 } else { 4144 last = uint32(0) 4145 } 4146 X_tr_stored_block(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint32(len), int32(last)) 4147 *(*int32)(unsafe.Pointer(s + 132)) += int32(uint32(len)) 4148 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4149 } 4150 4151 // We've done all we can with the available input and output. 4152 if last != 0 { 4153 return Finish_started 4154 } 4155 return Need_more 4156 } 4157 4158 // =========================================================================== 4159 // Compress as much as possible from the input stream, return the current 4160 // block state. 4161 // This function does not perform lazy evaluation of matches and inserts 4162 // new strings in the dictionary only for unmatched strings or for short 4163 // matches. It is used only for the fast compression options. 4164 func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */ 4165 var hash_head IPos // head of the hash chain 4166 var bflush int32 // set if current block must be flushed 4167 4168 for { 4169 // Make sure that we always have enough lookahead, except 4170 // at the end of the input file. We need MAX_MATCH bytes 4171 // for the next match, plus MIN_MATCH bytes to insert the 4172 // string following the next match. 4173 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) { 4174 fill_window(tls, s) 4175 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH { 4176 return Need_more 4177 } 4178 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 4179 break 4180 } // flush the current block 4181 } 4182 4183 // Insert the string window[strstart .. strstart+2] in the 4184 // dictionary, and set hash_head to the head of the hash chain: 4185 hash_head = IPos(NIL) 4186 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 4187 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 4188 hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)))) 4189 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4190 } 4191 4192 // Find the longest match, discarding those <= prev_length. 4193 // At this point we have always match_length < MIN_MATCH 4194 if hash_head != IPos(NIL) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart-hash_head <= (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) { 4195 // To simplify the code, we prevent matches with the string 4196 // of window index 0 (in particular we have to avoid a match 4197 // of the string with itself at the start of the input file). 4198 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 4199 // longest_match() sets match_start 4200 } 4201 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 4202 4203 { 4204 var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH)) 4205 var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start) 4206 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 4207 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 4208 dist-- 4209 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++ 4210 *(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 { 4211 if int32(dist) < 256 { 4212 return int32(X_dist_code[dist]) 4213 } 4214 return int32(X_dist_code[256+int32(dist)>>7]) 4215 }())*4))++ 4216 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4217 } 4218 4219 *(*UInt)(unsafe.Pointer(s + 156)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 4220 4221 // Insert new strings in the hash table only if the match length 4222 // is not too large. This saves time but degrades compression. 4223 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match && (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 4224 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table 4225 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0) { 4226 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4227 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 4228 hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)))) 4229 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4230 // strstart never exceeds WSIZE-MAX_MATCH, so there are 4231 // always MIN_MATCH bytes ahead. 4232 } 4233 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4234 } else { 4235 *(*UInt)(unsafe.Pointer(s + 148)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 4236 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 4237 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))) 4238 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 4239 // If lookahead < MIN_MATCH, ins_h is garbage, but it does not 4240 // matter since it will be recomputed at next deflate call. 4241 } 4242 } else { 4243 // No match, output a literal byte 4244 4245 { 4246 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 4247 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 4248 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 4249 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++ 4250 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4251 } 4252 4253 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 4254 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4255 } 4256 if bflush != 0 { 4257 { 4258 X_tr_flush_block(tls, s, func() uintptr { 4259 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4260 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4261 } 4262 return uintptr(Z_NULL) 4263 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4264 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4265 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4266 } 4267 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4268 if 0 != 0 { 4269 return Finish_started 4270 } 4271 return Need_more 4272 } 4273 } 4274 4275 } 4276 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 4277 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) { 4278 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 4279 } 4280 return uint32(MIN_MATCH - 1) 4281 }() 4282 if flush == Z_FINISH { 4283 { 4284 { 4285 X_tr_flush_block(tls, s, func() uintptr { 4286 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4287 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4288 } 4289 return uintptr(Z_NULL) 4290 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 4291 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4292 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4293 } 4294 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4295 if 1 != 0 { 4296 return Finish_started 4297 } 4298 return Need_more 4299 } 4300 } 4301 4302 return Finish_done 4303 } 4304 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 4305 { 4306 X_tr_flush_block(tls, s, func() uintptr { 4307 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4308 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4309 } 4310 return uintptr(Z_NULL) 4311 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4312 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4313 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4314 } 4315 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4316 if 0 != 0 { 4317 return Finish_started 4318 } 4319 return Need_more 4320 } 4321 } 4322 4323 return Block_done 4324 } 4325 4326 // =========================================================================== 4327 // Same as above, but achieves better compression. We use a lazy 4328 // evaluation for matches: a match is finally adopted only if there is 4329 // no better match at the next window position. 4330 func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */ 4331 var hash_head IPos // head of hash chain 4332 var bflush int32 // set if current block must be flushed 4333 4334 // Process the input block. 4335 for { 4336 // Make sure that we always have enough lookahead, except 4337 // at the end of the input file. We need MAX_MATCH bytes 4338 // for the next match, plus MIN_MATCH bytes to insert the 4339 // string following the next match. 4340 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) { 4341 fill_window(tls, s) 4342 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH { 4343 return Need_more 4344 } 4345 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 4346 break 4347 } // flush the current block 4348 } 4349 4350 // Insert the string window[strstart .. strstart+2] in the 4351 // dictionary, and set hash_head to the head of the hash chain: 4352 hash_head = IPos(NIL) 4353 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 4354 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 4355 hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)))) 4356 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4357 } 4358 4359 // Find the longest match, discarding those <= prev_length. 4360 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 4361 (*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start 4362 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1) 4363 4364 if hash_head != IPos(NIL) && (*Deflate_state)(unsafe.Pointer(s)).Fprev_length < (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart-hash_head <= (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) { 4365 // To simplify the code, we prevent matches with the string 4366 // of window index 0 (in particular we have to avoid a match 4367 // of the string with itself at the start of the input file). 4368 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 4369 // longest_match() sets match_start 4370 4371 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED || 4372 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length == UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart-(*Deflate_state)(unsafe.Pointer(s)).Fmatch_start > UInt(TOO_FAR)) { 4373 4374 // If prev_match is also MIN_MATCH, match_start is garbage 4375 // but we will ignore the current match anyway. 4376 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1) 4377 } 4378 } 4379 // If there was a match at the previous step and the current 4380 // match is not better, output the previous match: 4381 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length { 4382 var max_insert UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH) 4383 // Do not insert strings in hash table beyond this. 4384 4385 { 4386 var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH)) 4387 var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match) 4388 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 4389 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 4390 dist-- 4391 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++ 4392 *(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 { 4393 if int32(dist) < 256 { 4394 return int32(X_dist_code[dist]) 4395 } 4396 return int32(X_dist_code[256+int32(dist)>>7]) 4397 }())*4))++ 4398 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4399 } 4400 4401 // Insert in hash table all strings up to the end of the match. 4402 // strstart-1 and strstart are already inserted. If there is not 4403 // enough lookahead, the last two strings are not inserted in 4404 // the hash table. 4405 *(*UInt)(unsafe.Pointer(s + 156)) -= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1) 4406 *(*UInt)(unsafe.Pointer(s + 160)) -= UInt(2) 4407 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0) { 4408 if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert { 4409 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask 4410 hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)))) 4411 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4412 } 4413 } 4414 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 4415 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1) 4416 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4417 4418 if bflush != 0 { 4419 { 4420 X_tr_flush_block(tls, s, func() uintptr { 4421 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4422 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4423 } 4424 return uintptr(Z_NULL) 4425 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4426 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4427 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4428 } 4429 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4430 if 0 != 0 { 4431 return Finish_started 4432 } 4433 return Need_more 4434 } 4435 } 4436 4437 } else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 4438 // If there was no match at the previous position, output a 4439 // single literal. If there was a match but the current match 4440 // is longer, truncate the previous match to a single literal. 4441 4442 { 4443 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1)))) 4444 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 4445 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 4446 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++ 4447 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4448 } 4449 4450 if bflush != 0 { 4451 { 4452 X_tr_flush_block(tls, s, func() uintptr { 4453 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4454 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4455 } 4456 return uintptr(Z_NULL) 4457 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4458 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4459 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4460 } 4461 4462 } 4463 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4464 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 4465 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4466 return Need_more 4467 } 4468 } else { 4469 // There is no previous match to compare with, wait for 4470 // the next step to decide. 4471 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1 4472 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4473 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 4474 } 4475 } 4476 4477 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 4478 4479 { 4480 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1)))) 4481 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 4482 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 4483 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++ 4484 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4485 } 4486 4487 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 4488 } 4489 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 4490 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) { 4491 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 4492 } 4493 return uint32(MIN_MATCH - 1) 4494 }() 4495 if flush == Z_FINISH { 4496 { 4497 { 4498 X_tr_flush_block(tls, s, func() uintptr { 4499 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4500 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4501 } 4502 return uintptr(Z_NULL) 4503 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 4504 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4505 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4506 } 4507 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4508 if 1 != 0 { 4509 return Finish_started 4510 } 4511 return Need_more 4512 } 4513 } 4514 4515 return Finish_done 4516 } 4517 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 4518 { 4519 X_tr_flush_block(tls, s, func() uintptr { 4520 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4521 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4522 } 4523 return uintptr(Z_NULL) 4524 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4525 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4526 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4527 } 4528 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4529 if 0 != 0 { 4530 return Finish_started 4531 } 4532 return Need_more 4533 } 4534 } 4535 4536 return Block_done 4537 } 4538 4539 // =========================================================================== 4540 // For Z_RLE, simply look for runs of bytes, generate matches only of distance 4541 // one. Do not maintain a hash table. (It will be regenerated if this run of 4542 // deflate switches away from Z_RLE.) 4543 func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */ 4544 var bflush int32 // set if current block must be flushed 4545 var prev UInt // byte at distance one to match 4546 var scan uintptr 4547 var strend uintptr // scan goes up to strend for length of run 4548 4549 for { 4550 // Make sure that we always have enough lookahead, except 4551 // at the end of the input file. We need MAX_MATCH bytes 4552 // for the longest run, plus one for the unrolled loop. 4553 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) { 4554 fill_window(tls, s) 4555 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) && flush == Z_NO_FLUSH { 4556 return Need_more 4557 } 4558 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 4559 break 4560 } // flush the current block 4561 } 4562 4563 // See how many times the previous byte repeats 4564 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 4565 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0) { 4566 scan = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uintptr(1) 4567 prev = UInt(*(*Bytef)(unsafe.Pointer(scan))) 4568 if prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) { 4569 strend = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH) 4570 for __ccgo := true; __ccgo; __ccgo = prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && scan < strend { 4571 } 4572 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MAX_MATCH) - UInt((int64(strend)-int64(scan))/1) 4573 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 4574 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 4575 } 4576 } 4577 4578 } 4579 4580 // Emit match if have run of MIN_MATCH or longer, else emit literal 4581 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 4582 4583 { 4584 var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH)) 4585 var dist Ush = Ush(1) 4586 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 4587 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 4588 dist-- 4589 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++ 4590 *(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 { 4591 if int32(dist) < 256 { 4592 return int32(X_dist_code[dist]) 4593 } 4594 return int32(X_dist_code[256+int32(dist)>>7]) 4595 }())*4))++ 4596 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4597 } 4598 4599 *(*UInt)(unsafe.Pointer(s + 156)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 4600 *(*UInt)(unsafe.Pointer(s + 148)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 4601 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 4602 } else { 4603 // No match, output a literal byte 4604 4605 { 4606 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 4607 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 4608 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 4609 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++ 4610 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4611 } 4612 4613 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 4614 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4615 } 4616 if bflush != 0 { 4617 { 4618 X_tr_flush_block(tls, s, func() uintptr { 4619 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4620 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4621 } 4622 return uintptr(Z_NULL) 4623 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4624 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4625 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4626 } 4627 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4628 if 0 != 0 { 4629 return Finish_started 4630 } 4631 return Need_more 4632 } 4633 } 4634 4635 } 4636 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 4637 if flush == Z_FINISH { 4638 { 4639 { 4640 X_tr_flush_block(tls, s, func() uintptr { 4641 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4642 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4643 } 4644 return uintptr(Z_NULL) 4645 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 4646 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4647 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4648 } 4649 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4650 if 1 != 0 { 4651 return Finish_started 4652 } 4653 return Need_more 4654 } 4655 } 4656 4657 return Finish_done 4658 } 4659 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 4660 { 4661 X_tr_flush_block(tls, s, func() uintptr { 4662 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4663 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4664 } 4665 return uintptr(Z_NULL) 4666 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4667 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4668 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4669 } 4670 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4671 if 0 != 0 { 4672 return Finish_started 4673 } 4674 return Need_more 4675 } 4676 } 4677 4678 return Block_done 4679 } 4680 4681 // =========================================================================== 4682 // For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. 4683 // (It will be regenerated if this run of deflate switches away from Huffman.) 4684 func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */ 4685 var bflush int32 // set if current block must be flushed 4686 4687 for { 4688 // Make sure that we have a literal to write. 4689 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 4690 fill_window(tls, s) 4691 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 4692 if flush == Z_NO_FLUSH { 4693 return Need_more 4694 } 4695 break // flush the current block 4696 } 4697 } 4698 4699 // Output a literal byte 4700 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 4701 4702 { 4703 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 4704 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 4705 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 4706 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++ 4707 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 4708 } 4709 4710 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 4711 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 4712 if bflush != 0 { 4713 { 4714 X_tr_flush_block(tls, s, func() uintptr { 4715 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4716 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4717 } 4718 return uintptr(Z_NULL) 4719 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4720 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4721 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4722 } 4723 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4724 if 0 != 0 { 4725 return Finish_started 4726 } 4727 return Need_more 4728 } 4729 } 4730 4731 } 4732 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 4733 if flush == Z_FINISH { 4734 { 4735 { 4736 X_tr_flush_block(tls, s, func() uintptr { 4737 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4738 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4739 } 4740 return uintptr(Z_NULL) 4741 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 4742 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4743 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4744 } 4745 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4746 if 1 != 0 { 4747 return Finish_started 4748 } 4749 return Need_more 4750 } 4751 } 4752 4753 return Finish_done 4754 } 4755 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 4756 { 4757 X_tr_flush_block(tls, s, func() uintptr { 4758 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 4759 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 4760 } 4761 return uintptr(Z_NULL) 4762 }(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 4763 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4764 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 4765 } 4766 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 4767 if 0 != 0 { 4768 return Finish_started 4769 } 4770 return Need_more 4771 } 4772 } 4773 4774 return Block_done 4775 } 4776 4777 type X_iobuf = struct{ F_Placeholder uintptr } /* stdio.h:33:3 */ 4778 4779 type FILE = X_iobuf /* stdio.h:47:25 */ 4780 4781 type Fpos_t = int64 /* stdio.h:115:37 */ 4782 4783 func vsnwprintf(tls *libc.TLS, s uintptr, n Size_t, format uintptr, arg Va_list) int32 { /* stdio.h:1321:15: */ 4784 var __ret int32 = libc.X__stdio_common_vswprintf(tls, X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS, s, n, format, uintptr(0), arg) 4785 if __ret < 0 { 4786 return -1 4787 } 4788 return __ret 4789 4790 } 4791 4792 // * 4793 // This file has no copyright assigned and is placed in the Public Domain. 4794 // This file is part of the mingw-w64 runtime package. 4795 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 4796 4797 // ===-------- vadefs.h ---------------------------------------------------=== 4798 // 4799 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4800 // See https://llvm.org/LICENSE.txt for license information. 4801 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 4802 // 4803 //===-----------------------------------------------------------------------=== 4804 4805 // Only include this if we are aiming for MSVC compatibility. 4806 // * 4807 // This file has no copyright assigned and is placed in the Public Domain. 4808 // This file is part of the mingw-w64 runtime package. 4809 // No warranty is given; refer to the file DISCLAIMER.PD within this package. 4810 4811 func vswprintf(tls *libc.TLS, __stream uintptr, __count Size_t, __format uintptr, __local_argv X__builtin_va_list) int32 { /* swprintf.inl:27:5: */ 4812 return vsnwprintf(tls, __stream, __count, __format, __local_argv) 4813 } 4814 4815 func _vfscanf_s_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:40:27: */ 4816 return libc.X__stdio_common_vfscanf(tls, X_CRT_INTERNAL_SCANF_SECURECRT, _File, _Format, _Locale, _ArgList) 4817 4818 } 4819 4820 func _vfscanf_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:85:27: */ 4821 return libc.X__stdio_common_vfscanf(tls, uint64(0), _File, _Format, _Locale, _ArgList) 4822 4823 } 4824 4825 func _vsscanf_s_l(tls *libc.TLS, _Src uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:108:27: */ 4826 return libc.X__stdio_common_vsscanf(tls, X_CRT_INTERNAL_SCANF_SECURECRT, _Src, libc.Uint64(libc.Uint64FromInt32(-1)), _Format, _Locale, _ArgList) 4827 4828 } 4829 4830 func _vsscanf_l(tls *libc.TLS, _Src uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:135:27: */ 4831 return libc.X__stdio_common_vsscanf(tls, uint64(0), _Src, libc.Uint64(libc.Uint64FromInt32(-1)), _Format, _Locale, _ArgList) 4832 4833 } 4834 4835 func _vfprintf_s_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:181:27: */ 4836 return libc.X__stdio_common_vfprintf_s(tls, uint64(0), _File, _Format, _Locale, _ArgList) 4837 4838 } 4839 4840 func _vsnprintf_c_l(tls *libc.TLS, _DstBuf uintptr, _MaxCount Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:234:27: */ 4841 return libc.X__stdio_common_vsprintf(tls, uint64(0), _DstBuf, _MaxCount, _Format, _Locale, _ArgList) 4842 4843 } 4844 4845 func _vsnprintf_s_l(tls *libc.TLS, _DstBuf uintptr, _DstSize Size_t, _MaxCount Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:261:27: */ 4846 return libc.X__stdio_common_vsnprintf_s(tls, uint64(0), _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList) 4847 4848 } 4849 4850 func _vsprintf_s_l(tls *libc.TLS, _DstBuf uintptr, _DstSize Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:292:27: */ 4851 return libc.X__stdio_common_vsprintf_s(tls, uint64(0), _DstBuf, _DstSize, _Format, _Locale, _ArgList) 4852 4853 } 4854 4855 func _vfprintf_p_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:319:27: */ 4856 return libc.X__stdio_common_vfprintf_p(tls, uint64(0), _File, _Format, _Locale, _ArgList) 4857 4858 } 4859 4860 func _vsprintf_p_l(tls *libc.TLS, _DstBuf uintptr, _MaxCount Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:372:27: */ 4861 return libc.X__stdio_common_vsprintf_p(tls, uint64(0), _DstBuf, _MaxCount, _Format, _Locale, _ArgList) 4862 4863 } 4864 4865 func _vscprintf_p_l(tls *libc.TLS, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:399:27: */ 4866 return libc.X__stdio_common_vsprintf_p(tls, X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, uintptr(0), uint64(0), _Format, _Locale, _ArgList) 4867 4868 } 4869 4870 func _vfprintf_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:426:27: */ 4871 return libc.X__stdio_common_vfprintf(tls, uint64(0), _File, _Format, _Locale, _ArgList) 4872 4873 } 4874 4875 func _vsnprintf_l(tls *libc.TLS, _DstBuf uintptr, _MaxCount Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:453:27: */ 4876 return libc.X__stdio_common_vsprintf(tls, X_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _DstBuf, _MaxCount, _Format, _Locale, _ArgList) 4877 4878 } 4879 4880 func _vsprintf_l(tls *libc.TLS, _DstBuf uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:466:27: */ 4881 return _vsnprintf_l(tls, _DstBuf, libc.Uint64(libc.Uint64FromInt32(-1)), _Format, _Locale, _ArgList) 4882 4883 } 4884 4885 func _vscprintf_l(tls *libc.TLS, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:480:27: */ 4886 return libc.X__stdio_common_vsprintf(tls, X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, uintptr(0), uint64(0), _Format, _Locale, _ArgList) 4887 4888 } 4889 4890 func _vfwscanf_s_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:588:27: */ 4891 return libc.X__stdio_common_vfwscanf(tls, X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS|X_CRT_INTERNAL_SCANF_SECURECRT, _File, _Format, _Locale, _ArgList) 4892 4893 } 4894 4895 func _vswscanf_s_l(tls *libc.TLS, _Src uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:633:27: */ 4896 return libc.X__stdio_common_vswscanf(tls, X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS|X_CRT_INTERNAL_SCANF_SECURECRT, _Src, libc.Uint64(libc.Uint64FromInt32(-1)), _Format, _Locale, _ArgList) 4897 4898 } 4899 4900 func _vsnwscanf_s_l(tls *libc.TLS, _Src uintptr, _MaxCount Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:656:27: */ 4901 return libc.X__stdio_common_vswscanf(tls, X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS|X_CRT_INTERNAL_SCANF_SECURECRT, _Src, _MaxCount, _Format, _Locale, _ArgList) 4902 4903 } 4904 4905 func _vfwprintf_s_l(tls *libc.TLS, _File uintptr, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:679:27: */ 4906 return libc.X__stdio_common_vfwprintf_s(tls, X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS, _File, _Format, _Locale, _ArgList) 4907 4908 } 4909 4910 func _vswprintf_s_l(tls *libc.TLS, _DstBuf uintptr, _DstSize Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:732:27: */ 4911 return libc.X__stdio_common_vswprintf_s(tls, X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS, _DstBuf, _DstSize, _Format, _Locale, _ArgList) 4912 4913 } 4914 4915 func _vsnwprintf_s_l(tls *libc.TLS, _DstBuf uintptr, _DstSize Size_t, _MaxCount Size_t, _Format uintptr, _Locale X_locale_t, _ArgList Va_list) int32 { /* stdio_s.h:759:27: */ 4916 return libc.X__stdio_common_vsnwprintf_s(tls, X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS, _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList) 4917 4918 } 4919 4920 type X_fsize_t = uint32 /* io.h:29:25 */ 4921 4922 type X_finddata32_t = struct { 4923 Fattrib uint32 4924 Ftime_create X__time32_t 4925 Ftime_access X__time32_t 4926 Ftime_write X__time32_t 4927 Fsize X_fsize_t 4928 Fname [260]int8 4929 } /* io.h:35:3 */ 4930 4931 type X_finddata32i64_t = struct { 4932 Fattrib uint32 4933 Ftime_create X__time32_t 4934 Ftime_access X__time32_t 4935 Ftime_write X__time32_t 4936 Fsize int64 4937 Fname [260]int8 4938 F__ccgo_pad1 [4]byte 4939 } /* io.h:44:3 */ 4940 4941 type X_finddata64i32_t = struct { 4942 Fattrib uint32 4943 F__ccgo_pad1 [4]byte 4944 Ftime_create X__time64_t 4945 Ftime_access X__time64_t 4946 Ftime_write X__time64_t 4947 Fsize X_fsize_t 4948 Fname [260]int8 4949 } /* io.h:53:3 */ 4950 4951 type X__finddata64_t = struct { 4952 Fattrib uint32 4953 F__ccgo_pad1 [4]byte 4954 Ftime_create X__time64_t 4955 Ftime_access X__time64_t 4956 Ftime_write X__time64_t 4957 Fsize int64 4958 Fname [260]int8 4959 F__ccgo_pad2 [4]byte 4960 } /* io.h:62:3 */ 4961 4962 type X_wfinddata32_t = struct { 4963 Fattrib uint32 4964 Ftime_create X__time32_t 4965 Ftime_access X__time32_t 4966 Ftime_write X__time32_t 4967 Fsize X_fsize_t 4968 Fname [260]Wchar_t 4969 } /* io.h:94:3 */ 4970 4971 type X_wfinddata32i64_t = struct { 4972 Fattrib uint32 4973 Ftime_create X__time32_t 4974 Ftime_access X__time32_t 4975 Ftime_write X__time32_t 4976 Fsize int64 4977 Fname [260]Wchar_t 4978 } /* io.h:103:3 */ 4979 4980 type X_wfinddata64i32_t = struct { 4981 Fattrib uint32 4982 F__ccgo_pad1 [4]byte 4983 Ftime_create X__time64_t 4984 Ftime_access X__time64_t 4985 Ftime_write X__time64_t 4986 Fsize X_fsize_t 4987 Fname [260]Wchar_t 4988 F__ccgo_pad2 [4]byte 4989 } /* io.h:112:3 */ 4990 4991 type X_wfinddata64_t = struct { 4992 Fattrib uint32 4993 F__ccgo_pad1 [4]byte 4994 Ftime_create X__time64_t 4995 Ftime_access X__time64_t 4996 Ftime_write X__time64_t 4997 Fsize int64 4998 Fname [260]Wchar_t 4999 } /* io.h:121:3 */ 5000 5001 // default memLevel 5002 5003 // default i/o buffer size -- double this for output when reading (this and 5004 // twice this must be able to fit in an unsigned type) 5005 5006 // gzip modes, also provide a little integrity check on the passed structure 5007 5008 // values for gz_state how 5009 5010 // internal gzip file state data structure 5011 type Gz_state = struct { 5012 Fx GzFile_s 5013 Fmode int32 5014 Ffd int32 5015 Fpath uintptr 5016 Fsize uint32 5017 Fwant uint32 5018 Fin uintptr 5019 Fout uintptr 5020 Fdirect int32 5021 Fhow int32 5022 Fstart int32 5023 Feof int32 5024 Fpast int32 5025 Flevel int32 5026 Fstrategy int32 5027 Fskip int32 5028 Fseek int32 5029 Ferr int32 5030 Fmsg uintptr 5031 Fstrm Z_stream 5032 } /* gzguts.h:201:3 */ 5033 type Gz_statep = uintptr /* gzguts.h:202:22 */ 5034 5035 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 5036 // value -- needed when comparing unsigned to z_off64_t, which is signed 5037 // (possible z_off64_t types off_t, off64_t, and long are all signed) 5038 5039 // gzclose() is in a separate file so that it is linked in only if it is used. 5040 // That way the other gzclose functions can be used instead to avoid linking in 5041 // unneeded compression or decompression routines. 5042 func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */ 5043 var state Gz_statep 5044 5045 if file == uintptr(0) { 5046 return -2 5047 } 5048 state = file 5049 5050 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5051 return Xgzclose_r(tls, file) 5052 } 5053 return Xgzclose_w(tls, file) 5054 } 5055 5056 // Reset gzip file state 5057 func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */ 5058 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) // no output data available 5059 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ... 5060 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 // not at end of file 5061 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 // have not read past end yet 5062 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header 5063 } 5064 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 // no seek request pending 5065 Xgz_error(tls, state, Z_OK, uintptr(0)) // clear error 5066 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = 0 // no uncompressed data yet 5067 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet 5068 } 5069 5070 // Open a gzip file either by name or file descriptor. 5071 func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */ 5072 bp := tls.Alloc(24) 5073 defer tls.Free(24) 5074 5075 var state Gz_statep 5076 var len Z_size_t 5077 var oflag int32 5078 var exclusive int32 = 0 5079 5080 // check input 5081 if path == uintptr(0) { 5082 return uintptr(0) 5083 } 5084 5085 // allocate gzFile structure to return 5086 state = libc.Xmalloc(tls, uint64(unsafe.Sizeof(Gz_state{}))) 5087 if state == uintptr(0) { 5088 return uintptr(0) 5089 } 5090 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) // no buffers allocated yet 5091 (*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size 5092 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) // no error message yet 5093 5094 // interpret mode 5095 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE 5096 (*Gz_state)(unsafe.Pointer(state)).Flevel = -1 5097 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY 5098 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 5099 for *(*int8)(unsafe.Pointer(mode)) != 0 { 5100 if int32(*(*int8)(unsafe.Pointer(mode))) >= '0' && int32(*(*int8)(unsafe.Pointer(mode))) <= '9' { 5101 (*Gz_state)(unsafe.Pointer(state)).Flevel = int32(*(*int8)(unsafe.Pointer(mode))) - '0' 5102 } else { 5103 switch int32(*(*int8)(unsafe.Pointer(mode))) { 5104 case 'r': 5105 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ 5106 break 5107 fallthrough 5108 case 'w': 5109 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE 5110 break 5111 fallthrough 5112 case 'a': 5113 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND 5114 break 5115 fallthrough 5116 case '+': // can't read and write at the same time 5117 libc.Xfree(tls, state) 5118 return uintptr(0) 5119 fallthrough 5120 case 'b': // ignore -- will request binary anyway 5121 break 5122 fallthrough 5123 case 'x': 5124 exclusive = 1 5125 break 5126 fallthrough 5127 case 'f': 5128 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED 5129 break 5130 fallthrough 5131 case 'h': 5132 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY 5133 break 5134 fallthrough 5135 case 'R': 5136 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE 5137 break 5138 fallthrough 5139 case 'F': 5140 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED 5141 break 5142 fallthrough 5143 case 'T': 5144 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 5145 break 5146 fallthrough 5147 default: // could consider as an error, but just ignore 5148 5149 } 5150 } 5151 mode++ 5152 } 5153 5154 // must provide an "r", "w", or "a" 5155 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE { 5156 libc.Xfree(tls, state) 5157 return uintptr(0) 5158 } 5159 5160 // can't force transparent read 5161 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5162 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 5163 libc.Xfree(tls, state) 5164 return uintptr(0) 5165 } 5166 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file 5167 } 5168 5169 // save the path name for error messages 5170 if fd == -2 { 5171 len = libc.Xwcstombs(tls, uintptr(0), path, uint64(0)) 5172 if len == libc.Uint64(libc.Uint64FromInt32(-1)) { 5173 len = uint64(0) 5174 } 5175 } else { 5176 len = libc.Xstrlen(tls, path) 5177 } 5178 (*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, len+uint64(1)) 5179 if (*Gz_state)(unsafe.Pointer(state)).Fpath == uintptr(0) { 5180 libc.Xfree(tls, state) 5181 return uintptr(0) 5182 } 5183 if fd == -2 { 5184 if len != 0 { 5185 libc.Xwcstombs(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, path, len+uint64(1)) 5186 } else { 5187 *(*int8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fpath)) = int8(0) 5188 } 5189 } else { 5190 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, len+uint64(1), ts+76, libc.VaList(bp, path)) 5191 } 5192 5193 // compute the flags for open() 5194 oflag = X_O_BINARY | func() int32 { 5195 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5196 return X_O_RDONLY 5197 } 5198 return X_O_WRONLY | X_O_CREAT | func() int32 { 5199 if exclusive != 0 { 5200 return X_O_EXCL 5201 } 5202 return 0 5203 }() | func() int32 { 5204 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE { 5205 return X_O_TRUNC 5206 } 5207 return X_O_APPEND 5208 }() 5209 }() 5210 5211 // open the file with the appropriate flags (or just use fd) 5212 (*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 { 5213 if fd > -1 { 5214 return fd 5215 } 5216 return func() int32 { 5217 if fd == -2 { 5218 return libc.X_wopen(tls, path, oflag, libc.VaList(bp+16, 0666)) 5219 } 5220 return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666)) 5221 }() 5222 }() 5223 if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 { 5224 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 5225 libc.Xfree(tls, state) 5226 return uintptr(0) 5227 } 5228 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND { 5229 libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct 5230 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE // simplify later checks 5231 } 5232 5233 // save the current position for rewinding (only if reading) 5234 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5235 (*Gz_state)(unsafe.Pointer(state)).Fstart = int32(libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)) 5236 if (*Gz_state)(unsafe.Pointer(state)).Fstart == -1 { 5237 (*Gz_state)(unsafe.Pointer(state)).Fstart = 0 5238 } 5239 } 5240 5241 // initialize stream 5242 gz_reset(tls, state) 5243 5244 // return stream 5245 return state 5246 } 5247 5248 // -- see zlib.h -- 5249 func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */ 5250 return gz_open(tls, path, -1, mode) 5251 } 5252 5253 // -- see zlib.h -- 5254 func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */ 5255 return gz_open(tls, path, -1, mode) 5256 } 5257 5258 // -- see zlib.h -- 5259 func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */ 5260 bp := tls.Alloc(8) 5261 defer tls.Free(8) 5262 5263 var path uintptr // identifier for error messages 5264 var gz GzFile 5265 5266 if fd == -1 || libc.AssignUintptr(&path, libc.Xmalloc(tls, uint64(7)+uint64(3)*uint64(unsafe.Sizeof(int32(0))))) == uintptr(0) { 5267 return uintptr(0) 5268 } 5269 libc.Xsnprintf(tls, path, uint64(7)+uint64(3)*uint64(unsafe.Sizeof(int32(0))), ts+79, libc.VaList(bp, fd)) 5270 gz = gz_open(tls, path, fd, mode) 5271 libc.Xfree(tls, path) 5272 return gz 5273 } 5274 5275 // -- see zlib.h -- 5276 func Xgzopen_w(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:307:16: */ 5277 return gz_open(tls, path, -2, mode) 5278 } 5279 5280 // -- see zlib.h -- 5281 func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */ 5282 var state Gz_statep 5283 5284 // get internal structure and check integrity 5285 if file == uintptr(0) { 5286 return -1 5287 } 5288 state = file 5289 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5290 return -1 5291 } 5292 5293 // make sure we haven't already allocated memory 5294 if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { 5295 return -1 5296 } 5297 5298 // check and set requested size 5299 if size<<1 < size { 5300 return -1 5301 } // need to be able to double it 5302 if size < uint32(2) { 5303 size = uint32(2) 5304 } // need two bytes to check magic header 5305 (*Gz_state)(unsafe.Pointer(state)).Fwant = size 5306 return 0 5307 } 5308 5309 // -- see zlib.h -- 5310 func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */ 5311 var state Gz_statep 5312 5313 // get internal structure 5314 if file == uintptr(0) { 5315 return -1 5316 } 5317 state = file 5318 5319 // check that we're reading and that there's no error 5320 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 5321 return -1 5322 } 5323 5324 // back up and start over 5325 if libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64((*Gz_state)(unsafe.Pointer(state)).Fstart), SEEK_SET) == int64(-1) { 5326 return -1 5327 } 5328 gz_reset(tls, state) 5329 return 0 5330 } 5331 5332 // -- see zlib.h -- 5333 func Xgzseek64(tls *libc.TLS, file GzFile, offset int32, whence int32) int32 { /* gzlib.c:366:19: */ 5334 var n uint32 5335 var ret int32 5336 var state Gz_statep 5337 5338 // get internal structure and check integrity 5339 if file == uintptr(0) { 5340 return -1 5341 } 5342 state = file 5343 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5344 return -1 5345 } 5346 5347 // check that there's no error 5348 if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 5349 return -1 5350 } 5351 5352 // can only seek from start or relative to current position 5353 if whence != SEEK_SET && whence != SEEK_CUR { 5354 return -1 5355 } 5356 5357 // normalize offset to a SEEK_CUR specification 5358 if whence == SEEK_SET { 5359 offset = offset - (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 5360 } else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 5361 offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fskip 5362 } 5363 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 5364 5365 // if within raw area while reading, just go there 5366 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 && (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos+offset >= 0 { 5367 ret = int32(libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(uint32(offset)-uint32((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)), SEEK_CUR)) 5368 if ret == -1 { 5369 return -1 5370 } 5371 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 5372 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 5373 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 5374 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 5375 Xgz_error(tls, state, Z_OK, uintptr(0)) 5376 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 5377 *(*int32)(unsafe.Pointer(state + 16)) += offset 5378 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 5379 } 5380 5381 // calculate skip amount, rewinding if needed for back seek when reading 5382 if offset < 0 { 5383 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards 5384 return -1 5385 } 5386 offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 5387 if offset < 0 { // before start of file! 5388 return -1 5389 } 5390 if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset 5391 return -1 5392 } 5393 } 5394 5395 // if reading, skip what's in output buffer (one less gzgetc() check) 5396 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5397 if uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(int32(0))) && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > uint32(2147483647) || int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset { 5398 n = uint32(offset) 5399 } else { 5400 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 5401 } 5402 *(*uint32)(unsafe.Pointer(state)) -= n 5403 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(n) 5404 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(n)) 5405 offset = int32(uint32(offset) - uint32(n)) 5406 } 5407 5408 // request skip (if not zero) 5409 if offset != 0 { 5410 (*Gz_state)(unsafe.Pointer(state)).Fseek = 1 5411 (*Gz_state)(unsafe.Pointer(state)).Fskip = offset 5412 } 5413 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset 5414 } 5415 5416 // -- see zlib.h -- 5417 func Xgzseek(tls *libc.TLS, file GzFile, offset int32, whence int32) int32 { /* gzlib.c:443:17: */ 5418 var ret int32 5419 5420 ret = Xgzseek64(tls, file, offset, whence) 5421 if ret == ret { 5422 return ret 5423 } 5424 return -1 5425 } 5426 5427 // -- see zlib.h -- 5428 func Xgztell64(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:455:19: */ 5429 var state Gz_statep 5430 5431 // get internal structure and check integrity 5432 if file == uintptr(0) { 5433 return -1 5434 } 5435 state = file 5436 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5437 return -1 5438 } 5439 5440 // return position 5441 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + func() int32 { 5442 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 5443 return (*Gz_state)(unsafe.Pointer(state)).Fskip 5444 } 5445 return 0 5446 }() 5447 } 5448 5449 // -- see zlib.h -- 5450 func Xgztell(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:472:17: */ 5451 var ret int32 5452 5453 ret = Xgztell64(tls, file) 5454 if ret == ret { 5455 return ret 5456 } 5457 return -1 5458 } 5459 5460 // -- see zlib.h -- 5461 func Xgzoffset64(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:482:19: */ 5462 var offset int32 5463 var state Gz_statep 5464 5465 // get internal structure and check integrity 5466 if file == uintptr(0) { 5467 return -1 5468 } 5469 state = file 5470 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5471 return -1 5472 } 5473 5474 // compute and return effective offset in file 5475 offset = int32(libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)) 5476 if offset == -1 { 5477 return -1 5478 } 5479 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading 5480 offset = int32(uint32(offset) - uint32((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) 5481 } // don't count buffered input 5482 return offset 5483 } 5484 5485 // -- see zlib.h -- 5486 func Xgzoffset(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:505:17: */ 5487 var ret int32 5488 5489 ret = Xgzoffset64(tls, file) 5490 if ret == ret { 5491 return ret 5492 } 5493 return -1 5494 } 5495 5496 // -- see zlib.h -- 5497 func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */ 5498 var state Gz_statep 5499 5500 // get internal structure and check integrity 5501 if file == uintptr(0) { 5502 return 0 5503 } 5504 state = file 5505 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5506 return 0 5507 } 5508 5509 // return end-of-file state 5510 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5511 return (*Gz_state)(unsafe.Pointer(state)).Fpast 5512 } 5513 return 0 5514 } 5515 5516 // -- see zlib.h -- 5517 func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */ 5518 var state Gz_statep 5519 5520 // get internal structure and check integrity 5521 if file == uintptr(0) { 5522 return uintptr(0) 5523 } 5524 state = file 5525 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5526 return uintptr(0) 5527 } 5528 5529 // return error information 5530 if errnum != uintptr(0) { 5531 *(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr 5532 } 5533 if (*Gz_state)(unsafe.Pointer(state)).Ferr == -4 { 5534 return ts + 87 /* "out of memory" */ 5535 } 5536 return func() uintptr { 5537 if (*Gz_state)(unsafe.Pointer(state)).Fmsg == uintptr(0) { 5538 return ts + 101 5539 } 5540 return (*Gz_state)(unsafe.Pointer(state)).Fmsg 5541 }() 5542 } 5543 5544 // -- see zlib.h -- 5545 func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */ 5546 var state Gz_statep 5547 5548 // get internal structure and check integrity 5549 if file == uintptr(0) { 5550 return 5551 } 5552 state = file 5553 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 5554 return 5555 } 5556 5557 // clear error and end-of-file 5558 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 5559 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 5560 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 5561 } 5562 Xgz_error(tls, state, Z_OK, uintptr(0)) 5563 } 5564 5565 // Create an error message in allocated memory and set state->err and 5566 // state->msg accordingly. Free any previous error message already there. Do 5567 // not try to free or allocate space if the error is Z_MEM_ERROR (out of 5568 // memory). Simply save the error message as a static string. If there is an 5569 // allocation failure constructing the error message, then convert the error to 5570 // out of memory. 5571 func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */ 5572 bp := tls.Alloc(24) 5573 defer tls.Free(24) 5574 5575 // free previously allocated message and clear 5576 if (*Gz_state)(unsafe.Pointer(state)).Fmsg != uintptr(0) { 5577 if (*Gz_state)(unsafe.Pointer(state)).Ferr != -4 { 5578 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg) 5579 } 5580 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) 5581 } 5582 5583 // if fatal, set state->x.have to 0 so that the gzgetc() macro fails 5584 if err != Z_OK && err != -5 { 5585 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 5586 } 5587 5588 // set error code, and if no message, then done 5589 (*Gz_state)(unsafe.Pointer(state)).Ferr = err 5590 if msg == uintptr(0) { 5591 return 5592 } 5593 5594 // for an out of memory error, return literal string when requested 5595 if err == -4 { 5596 return 5597 } 5598 5599 // construct error message with path 5600 if libc.AssignPtrUintptr(state+104, libc.Xmalloc(tls, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+uint64(3))) == uintptr(0) { 5601 (*Gz_state)(unsafe.Pointer(state)).Ferr = -4 5602 return 5603 } 5604 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+uint64(3), 5605 ts+102, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109, msg)) 5606 } 5607 5608 // Use read() to load a buffer -- return -1 on error, otherwise 0. Read from 5609 // state->fd, and update state->eof, state->err, and state->msg as appropriate. 5610 // This function needs to loop on read(), since read() is not guaranteed to 5611 // read the number of bytes requested, depending on the type of descriptor. 5612 func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */ 5613 var ret int32 5614 var get uint32 5615 var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1) 5616 5617 *(*uint32)(unsafe.Pointer(have)) = uint32(0) 5618 for __ccgo := true; __ccgo; __ccgo = *(*uint32)(unsafe.Pointer(have)) < len { 5619 get = len - *(*uint32)(unsafe.Pointer(have)) 5620 if get > max { 5621 get = max 5622 } 5623 ret = libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, buf+uintptr(*(*uint32)(unsafe.Pointer(have))), get) 5624 if ret <= 0 { 5625 break 5626 } 5627 *(*uint32)(unsafe.Pointer(have)) += uint32(ret) 5628 } 5629 if ret < 0 { 5630 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X_errno(tls))))) 5631 return -1 5632 } 5633 if ret == 0 { 5634 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 5635 } 5636 return 0 5637 } 5638 5639 // Load up input buffer and set eof flag if last data loaded -- return -1 on 5640 // error, 0 otherwise. Note that the eof flag is set when the end of the input 5641 // file is reached, even though there may be unused data in the buffer. Once 5642 // that data has been used, no more attempts will be made to read the file. 5643 // If strm->avail_in != 0, then the current data is moved to the beginning of 5644 // the input buffer, and then the remainder of the buffer is loaded with the 5645 // available data from the input file. 5646 func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */ 5647 bp := tls.Alloc(4) 5648 defer tls.Free(4) 5649 5650 // var got uint32 at bp, 4 5651 5652 var strm Z_streamp = state + 112 5653 5654 if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 5655 return -1 5656 } 5657 if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 { 5658 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start 5659 var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin 5660 var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 5661 var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 5662 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 5663 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) 5664 } 5665 } 5666 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in), 5667 (*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in, bp) == -1 { 5668 return -1 5669 } 5670 *(*UInt)(unsafe.Pointer(strm + 8)) += *(*uint32)(unsafe.Pointer(bp)) 5671 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 5672 } 5673 return 0 5674 } 5675 5676 // Look for gzip header, set up for inflate or copy. state->x.have must be 0. 5677 // If this is the first time in, allocate required memory. state->how will be 5678 // left unchanged if there is no more input data available, will be set to COPY 5679 // if there is no gzip header and direct copying will be performed, or it will 5680 // be set to GZIP for decompression. If direct copying, then leftover input 5681 // data from the input buffer will be copied to the output buffer. In that 5682 // case, all further file reads will be directly to either the output buffer or 5683 // a user buffer. If decompressing, the inflate state will be initialized. 5684 // gz_look() will return 0 on success or -1 on failure. 5685 func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */ 5686 var strm Z_streamp = state + 112 5687 5688 // allocate read buffers and inflate memory 5689 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { 5690 // allocate buffers 5691 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 5692 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant<<1)) 5693 if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) || (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) { 5694 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 5695 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 5696 Xgz_error(tls, state, -4, ts+87) 5697 return -1 5698 } 5699 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 5700 5701 // allocate inflate memory 5702 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL) 5703 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL) 5704 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL) 5705 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 5706 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL) 5707 if XinflateInit2_(tls, state+112, 15+16, ts, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK { // gunzip 5708 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 5709 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 5710 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) 5711 Xgz_error(tls, state, -4, ts+87) 5712 return -1 5713 } 5714 } 5715 5716 // get at least the magic bytes in the input buffer 5717 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) { 5718 if gz_avail(tls, state) == -1 { 5719 return -1 5720 } 5721 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 5722 return 0 5723 } 5724 } 5725 5726 // look for gzip magic bytes -- if there, do gzip decoding (note: there is 5727 // a logical dilemma here when considering the case of a partially written 5728 // gzip file, to wit, if a single 31 byte is written, then we cannot tell 5729 // whether this is a single-byte file, or just a partially written gzip 5730 // file -- for here we assume that if a gzip file is being written, then 5731 // the header will be written in a single operation, so that reading a 5732 // single byte is sufficient indication that it is not a gzip file) 5733 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > UInt(1) && int32(*(*Bytef)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fnext_in))) == 31 && int32(*(*Bytef)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fnext_in + 1))) == 139 { 5734 XinflateReset(tls, strm) 5735 (*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2 5736 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 5737 return 0 5738 } 5739 5740 // no gzip header -- if we were decoding gzip before, then this is trailing 5741 // garbage. Ignore the trailing garbage and finish. 5742 if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 { 5743 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 5744 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 5745 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 5746 return 0 5747 } 5748 5749 // doing raw i/o, copy any leftover input to output -- this assumes that 5750 // the output buffer is larger than the input buffer, which also assures 5751 // space for gzungetc() 5752 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 5753 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 5754 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64((*Z_stream)(unsafe.Pointer(strm)).Favail_in)) 5755 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 5756 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 5757 } 5758 (*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1 5759 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 5760 return 0 5761 } 5762 5763 // Decompress from input to the provided next_out and avail_out in the state. 5764 // On return, state->x.have and state->x.next point to the just decompressed 5765 // data. If the gzip stream completes, state->how is reset to LOOK to look for 5766 // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 5767 // on success, -1 on failure. 5768 func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */ 5769 var ret int32 = Z_OK 5770 var had uint32 5771 var strm Z_streamp = state + 112 5772 5773 // fill output buffer up to end of deflate stream 5774 had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 5775 for __ccgo := true; __ccgo; __ccgo = (*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0 && ret != Z_STREAM_END { 5776 // get more input for inflate() 5777 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && gz_avail(tls, state) == -1 { 5778 return -1 5779 } 5780 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 5781 Xgz_error(tls, state, -5, ts+112) 5782 break 5783 } 5784 5785 // decompress and handle errors 5786 ret = Xinflate(tls, strm, Z_NO_FLUSH) 5787 if ret == -2 || ret == Z_NEED_DICT { 5788 Xgz_error(tls, state, -2, 5789 ts+135) 5790 return -1 5791 } 5792 if ret == -4 { 5793 Xgz_error(tls, state, -4, ts+87) 5794 return -1 5795 } 5796 if ret == -3 { // deflate stream invalid 5797 Xgz_error(tls, state, -3, 5798 func() uintptr { 5799 if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == uintptr(0) { 5800 return ts + 174 /* "compressed data ..." */ 5801 } 5802 return (*Z_stream)(unsafe.Pointer(strm)).Fmsg 5803 }()) 5804 return -1 5805 } 5806 } 5807 5808 // update available output 5809 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out 5810 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) 5811 5812 // if the gzip stream completed successfully, look for another 5813 if ret == Z_STREAM_END { 5814 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK 5815 } 5816 5817 // good decompression 5818 return 0 5819 } 5820 5821 // Fetch data and put it in the output buffer. Assumes state->x.have is 0. 5822 // Data is either copied from the input file or decompressed from the input 5823 // file depending on state->how. If state->how is LOOK, then a gzip header is 5824 // looked for to determine whether to copy or decompress. Returns -1 on error, 5825 // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the 5826 // end of the input file has been reached and all data has been processed. 5827 func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */ 5828 var strm Z_streamp = state + 112 5829 5830 for __ccgo := true; __ccgo; __ccgo = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && (!((*Gz_state)(unsafe.Pointer(state)).Feof != 0) || (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) { 5831 switch (*Gz_state)(unsafe.Pointer(state)).Fhow { 5832 case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP 5833 if gz_look(tls, state) == -1 { 5834 return -1 5835 } 5836 if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK { 5837 return 0 5838 } 5839 break 5840 case COPY1: // -> COPY 5841 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, (*Gz_state)(unsafe.Pointer(state)).Fsize<<1, state) == 5842 -1 { 5843 return -1 5844 } 5845 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 5846 return 0 5847 case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream) 5848 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize << 1 5849 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 5850 if gz_decomp(tls, state) == -1 { 5851 return -1 5852 } 5853 } 5854 } 5855 return 0 5856 } 5857 5858 // Skip len uncompressed bytes of output. Return -1 on error, 0 on success. 5859 func gz_skip(tls *libc.TLS, state Gz_statep, len int32) int32 { /* gzread.c:259:11: */ 5860 var n uint32 5861 5862 // skip over len bytes or reach end-of-file, whichever comes first 5863 for len != 0 { 5864 // skip over whatever is in output buffer 5865 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 5866 if uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(int32(0))) && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > uint32(2147483647) || int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len { 5867 n = uint32(len) 5868 } else { 5869 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 5870 } 5871 *(*uint32)(unsafe.Pointer(state)) -= n 5872 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(n) 5873 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(n)) 5874 len = int32(uint32(len) - uint32(n)) 5875 } else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 5876 break 5877 } else { 5878 // get more output, looking for header if required 5879 if gz_fetch(tls, state) == -1 { 5880 return -1 5881 } 5882 } 5883 } 5884 return 0 5885 } 5886 5887 // Read len bytes into buf from file, or less than len up to the end of the 5888 // input. Return the number of bytes read. If zero is returned, either the 5889 // end of file was reached, or there was an error. state->err must be 5890 // consulted in that case to determine which. 5891 func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */ 5892 bp := tls.Alloc(4) 5893 defer tls.Free(4) 5894 5895 var got Z_size_t 5896 // var n uint32 at bp, 4 5897 5898 // if len is zero, avoid unnecessary operations 5899 if len == uint64(0) { 5900 return uint64(0) 5901 } 5902 5903 // process a skip request 5904 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 5905 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 5906 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 5907 return uint64(0) 5908 } 5909 } 5910 5911 // get len bytes to buf, or less than len if at the end 5912 got = uint64(0) 5913 for __ccgo := true; __ccgo; __ccgo = len != 0 { 5914 // set n to the maximum amount of len that fits in an unsigned int 5915 *(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1) 5916 if Z_size_t(*(*uint32)(unsafe.Pointer(bp))) > len { 5917 *(*uint32)(unsafe.Pointer(bp /* n */)) = uint32(len) 5918 } 5919 5920 // first just try copying data from the output buffer 5921 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 5922 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp)) { 5923 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 5924 } 5925 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp /* n */)))) 5926 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(*(*uint32)(unsafe.Pointer(bp))) 5927 *(*uint32)(unsafe.Pointer(state)) -= *(*uint32)(unsafe.Pointer(bp)) 5928 } else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 5929 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end 5930 break 5931 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK || *(*uint32)(unsafe.Pointer(bp)) < (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 { 5932 // get more output, looking for header if required 5933 if gz_fetch(tls, state) == -1 { 5934 return uint64(0) 5935 } 5936 continue // no progress yet -- go back to copy above 5937 // the copy above assures that we will leave with space in the 5938 // output buffer, allowing at least one gzungetc() to succeed 5939 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly 5940 if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp)), bp) == -1 { 5941 return uint64(0) 5942 } 5943 } else { // state->how == GZIP 5944 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */)) 5945 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf 5946 if gz_decomp(tls, state) == -1 { 5947 return uint64(0) 5948 } 5949 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 5950 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 5951 } 5952 5953 // update progress 5954 len = len - Z_size_t(*(*uint32)(unsafe.Pointer(bp))) 5955 buf = buf + uintptr(*(*uint32)(unsafe.Pointer(bp))) 5956 got = got + Z_size_t(*(*uint32)(unsafe.Pointer(bp))) 5957 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(*(*uint32)(unsafe.Pointer(bp)))) 5958 } 5959 5960 // return number of bytes read into user buffer 5961 return got 5962 } 5963 5964 // -- see zlib.h -- 5965 func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */ 5966 var state Gz_statep 5967 5968 // get internal structure 5969 if file == uintptr(0) { 5970 return -1 5971 } 5972 state = file 5973 5974 // check that we're reading and that there's no (serious) error 5975 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 5976 return -1 5977 } 5978 5979 // since an int is returned, make sure len fits in one, otherwise return 5980 // with an error (this avoids a flaw in the interface) 5981 if int32(len) < 0 { 5982 Xgz_error(tls, state, -2, ts+196) 5983 return -1 5984 } 5985 5986 // read len or fewer bytes to buf 5987 len = uint32(gz_read(tls, state, buf, uint64(len))) 5988 5989 // check for an error 5990 if len == uint32(0) && (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 5991 return -1 5992 } 5993 5994 // return the number of bytes read (this is assured to fit in an int) 5995 return int32(len) 5996 } 5997 5998 // -- see zlib.h -- 5999 func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */ 6000 var len Z_size_t 6001 var state Gz_statep 6002 6003 // get internal structure 6004 if file == uintptr(0) { 6005 return uint64(0) 6006 } 6007 state = file 6008 6009 // check that we're reading and that there's no (serious) error 6010 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 6011 return uint64(0) 6012 } 6013 6014 // compute bytes to read -- error on overflow 6015 len = nitems * size 6016 if size != 0 && len/size != nitems { 6017 Xgz_error(tls, state, -2, ts+227) 6018 return uint64(0) 6019 } 6020 6021 // read len or fewer bytes to buf, return the number of full items read 6022 if len != 0 { 6023 return gz_read(tls, state, buf, len) / size 6024 } 6025 return uint64(0) 6026 } 6027 6028 // -- see zlib.h -- 6029 func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */ 6030 bp := tls.Alloc(1) 6031 defer tls.Free(1) 6032 6033 var ret int32 6034 // var buf [1]uint8 at bp, 1 6035 6036 var state Gz_statep 6037 6038 // get internal structure 6039 if file == uintptr(0) { 6040 return -1 6041 } 6042 state = file 6043 6044 // check that we're reading and that there's no (serious) error 6045 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 6046 return -1 6047 } 6048 6049 // try output buffer (no need to check for skip request) 6050 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 6051 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave-- 6052 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 6053 return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, 1)))) 6054 } 6055 6056 // nothing there -- try gz_read() 6057 ret = int32(gz_read(tls, state, bp, uint64(1))) 6058 if ret < 1 { 6059 return -1 6060 } 6061 return int32(*(*uint8)(unsafe.Pointer(bp))) 6062 } 6063 6064 func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */ 6065 return Xgzgetc(tls, file) 6066 } 6067 6068 // -- see zlib.h -- 6069 func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */ 6070 var state Gz_statep 6071 6072 // get internal structure 6073 if file == uintptr(0) { 6074 return -1 6075 } 6076 state = file 6077 6078 // check that we're reading and that there's no (serious) error 6079 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 6080 return -1 6081 } 6082 6083 // process a skip request 6084 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6085 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6086 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6087 return -1 6088 } 6089 } 6090 6091 // can't push EOF 6092 if c < 0 { 6093 return -1 6094 } 6095 6096 // if output buffer empty, put byte at end (allows more pushing) 6097 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 6098 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) 6099 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1) - uintptr(1) 6100 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 6101 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 6102 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 6103 return c 6104 } 6105 6106 // if no room, give up (must have already done a gzungetc()) 6107 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 { 6108 Xgz_error(tls, state, -3, ts+260) 6109 return -1 6110 } 6111 6112 // slide output data if needed and insert byte before existing data 6113 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout { 6114 var src uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) 6115 var dest uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1) 6116 for src > (*Gz_state)(unsafe.Pointer(state)).Fout { 6117 *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1))) 6118 } 6119 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest 6120 } 6121 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++ 6122 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext-- 6123 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 6124 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 6125 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 6126 return c 6127 } 6128 6129 // -- see zlib.h -- 6130 func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */ 6131 var left uint32 6132 var n uint32 6133 var str uintptr 6134 var eol uintptr 6135 var state Gz_statep 6136 6137 // check parameters and get internal structure 6138 if file == uintptr(0) || buf == uintptr(0) || len < 1 { 6139 return uintptr(0) 6140 } 6141 state = file 6142 6143 // check that we're reading and that there's no (serious) error 6144 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 6145 return uintptr(0) 6146 } 6147 6148 // process a skip request 6149 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6150 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6151 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6152 return uintptr(0) 6153 } 6154 } 6155 6156 // copy output bytes up to new line or len - 1, whichever comes first -- 6157 // append a terminating zero to the string (we don't check for a zero in 6158 // the contents, let the user worry about that) 6159 str = buf 6160 left = uint32(len) - uint32(1) 6161 if left != 0 { 6162 for __ccgo := true; __ccgo; __ccgo = left != 0 && eol == uintptr(0) { 6163 // assure that something is in the output buffer 6164 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && gz_fetch(tls, state) == -1 { 6165 return uintptr(0) 6166 } // error 6167 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file 6168 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end 6169 break // return what we have 6170 } 6171 6172 // look for end-of-line in current output buffer 6173 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left { 6174 n = left 6175 } else { 6176 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 6177 } 6178 eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', uint64(n)) 6179 if eol != uintptr(0) { 6180 n = uint32((int64(eol)-int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1) + uint32(1) 6181 } 6182 6183 // copy through end-of-line, or remainder if not found 6184 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n)) 6185 *(*uint32)(unsafe.Pointer(state)) -= n 6186 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(n) 6187 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(n)) 6188 left = left - n 6189 buf += uintptr(n) 6190 } 6191 } 6192 6193 // return terminated string, or if nothing, end of file 6194 if buf == str { 6195 return uintptr(0) 6196 } 6197 *(*int8)(unsafe.Pointer(buf)) = int8(0) 6198 return str 6199 } 6200 6201 // -- see zlib.h -- 6202 func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */ 6203 var state Gz_statep 6204 6205 // get internal structure 6206 if file == uintptr(0) { 6207 return 0 6208 } 6209 state = file 6210 6211 // if the state is not known, but we can find out, then do so (this is 6212 // mainly for right after a gzopen() or gzdopen()) 6213 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 6214 gz_look(tls, state) 6215 } 6216 6217 // return 1 if transparent, 0 if processing a gzip stream 6218 return (*Gz_state)(unsafe.Pointer(state)).Fdirect 6219 } 6220 6221 // -- see zlib.h -- 6222 func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */ 6223 var ret int32 6224 var err int32 6225 var state Gz_statep 6226 6227 // get internal structure 6228 if file == uintptr(0) { 6229 return -2 6230 } 6231 state = file 6232 6233 // check that we're reading 6234 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { 6235 return -2 6236 } 6237 6238 // free memory and close file 6239 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 6240 XinflateEnd(tls, state+112) 6241 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 6242 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 6243 } 6244 if (*Gz_state)(unsafe.Pointer(state)).Ferr == -5 { 6245 err = -5 6246 } else { 6247 err = Z_OK 6248 } 6249 Xgz_error(tls, state, Z_OK, uintptr(0)) 6250 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 6251 ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) 6252 libc.Xfree(tls, state) 6253 if ret != 0 { 6254 return -1 6255 } 6256 return err 6257 } 6258 6259 // Initialize state for writing a gzip file. Mark initialization by setting 6260 // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on 6261 // success. 6262 func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */ 6263 var ret int32 6264 var strm Z_streamp = state + 112 6265 6266 // allocate input buffer (double size for gzprintf) 6267 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant<<1)) 6268 if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) { 6269 Xgz_error(tls, state, -4, ts+87) 6270 return -1 6271 } 6272 6273 // only need output buffer and deflate state if compressing 6274 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 6275 // allocate output buffer 6276 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 6277 if (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) { 6278 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 6279 Xgz_error(tls, state, -4, ts+87) 6280 return -1 6281 } 6282 6283 // allocate deflate memory, set up for gzip compression 6284 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL) 6285 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL) 6286 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL) 6287 ret = XdeflateInit2_(tls, strm, (*Gz_state)(unsafe.Pointer(state)).Flevel, Z_DEFLATED, MAX_WBITS+16, DEF_MEM_LEVEL, (*Gz_state)(unsafe.Pointer(state)).Fstrategy, ts, int32(unsafe.Sizeof(Z_stream{}))) 6288 if ret != Z_OK { 6289 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 6290 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 6291 Xgz_error(tls, state, -4, ts+87) 6292 return -1 6293 } 6294 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0) 6295 } 6296 6297 // mark state as initialized 6298 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 6299 6300 // initialize write buffer if compressing 6301 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 6302 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 6303 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 6304 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 6305 } 6306 return 0 6307 } 6308 6309 // Compress whatever is at avail_in and next_in and write to the output file. 6310 // Return -1 if there is an error writing to the output file or if gz_init() 6311 // fails to allocate memory, otherwise 0. flush is assumed to be a valid 6312 // deflate() flush value. If flush is Z_FINISH, then the deflate() state is 6313 // reset to start a new gzip stream. If gz->direct is true, then simply write 6314 // to the output file without compressing, and ignore flush. 6315 func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */ 6316 var ret int32 6317 var writ int32 6318 var have uint32 6319 var put uint32 6320 var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1) 6321 var strm Z_streamp = state + 112 6322 6323 // allocate memory if this is the first time through 6324 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 { 6325 return -1 6326 } 6327 6328 // write directly if requested 6329 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 6330 for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 6331 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max { 6332 put = max 6333 } else { 6334 put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6335 } 6336 writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, put) 6337 if writ < 0 { 6338 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X_errno(tls))))) 6339 return -1 6340 } 6341 *(*UInt)(unsafe.Pointer(strm + 8)) -= uint32(writ) 6342 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(writ) 6343 } 6344 return 0 6345 } 6346 6347 // run deflate() on provided input until it produces no more output 6348 ret = Z_OK 6349 for __ccgo := true; __ccgo; __ccgo = have != 0 { 6350 // write out current buffer contents if full, or if flushing, but if 6351 // doing Z_FINISH then don't write until we get to Z_STREAM_END 6352 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) || flush != Z_NO_FLUSH && (flush != Z_FINISH || ret == Z_STREAM_END) { 6353 for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext { 6354 if (int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out)-int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1 > int64(int32(max)) { 6355 put = max 6356 } else { 6357 put = uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) 6358 } 6359 writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, put) 6360 if writ < 0 { 6361 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X_errno(tls))))) 6362 return -1 6363 } 6364 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(writ) 6365 } 6366 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6367 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 6368 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 6369 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 6370 } 6371 } 6372 6373 // compress 6374 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 6375 ret = Xdeflate(tls, strm, flush) 6376 if ret == -2 { 6377 Xgz_error(tls, state, -2, 6378 ts+291) 6379 return -1 6380 } 6381 have = have - (*Z_stream)(unsafe.Pointer(strm)).Favail_out 6382 } 6383 6384 // if that completed a deflate stream, allow another to start 6385 if flush == Z_FINISH { 6386 XdeflateReset(tls, strm) 6387 } 6388 6389 // all done, no errors 6390 return 0 6391 } 6392 6393 // Compress len zeros to output. Return -1 on a write error or memory 6394 // allocation failure by gz_comp(), or 0 on success. 6395 func gz_zero(tls *libc.TLS, state Gz_statep, len int32) int32 { /* gzwrite.c:145:11: */ 6396 var first int32 6397 var n uint32 6398 var strm Z_streamp = state + 112 6399 6400 // consume whatever's left in the input buffer 6401 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 { 6402 return -1 6403 } 6404 6405 // compress len zeros (len guaranteed > 0) 6406 first = 1 6407 for len != 0 { 6408 if uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(int32(0))) && (*Gz_state)(unsafe.Pointer(state)).Fsize > uint32(2147483647) || int32((*Gz_state)(unsafe.Pointer(state)).Fsize) > len { 6409 n = uint32(len) 6410 } else { 6411 n = (*Gz_state)(unsafe.Pointer(state)).Fsize 6412 } 6413 if first != 0 { 6414 libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n)) 6415 first = 0 6416 } 6417 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = n 6418 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 6419 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(n)) 6420 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 6421 return -1 6422 } 6423 len = int32(uint32(len) - uint32(n)) 6424 } 6425 return 0 6426 } 6427 6428 // Write len bytes from buf to file. Return the number of bytes written. If 6429 // the returned value is less than len, then there was an error. 6430 func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */ 6431 var put Z_size_t = len 6432 6433 // if len is zero, avoid unnecessary operations 6434 if len == uint64(0) { 6435 return uint64(0) 6436 } 6437 6438 // allocate memory if this is the first time through 6439 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 { 6440 return uint64(0) 6441 } 6442 6443 // check for seek request 6444 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6445 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6446 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6447 return uint64(0) 6448 } 6449 } 6450 6451 // for small len, copy to input buffer, otherwise compress directly 6452 if len < Z_size_t((*Gz_state)(unsafe.Pointer(state)).Fsize) { 6453 // copy to input buffer, compress when full 6454 for __ccgo := true; __ccgo; __ccgo = len != 0 { 6455 var have uint32 6456 var copy uint32 6457 6458 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 6459 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 6460 } 6461 have = uint32((int64((*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in+uintptr((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1) 6462 copy = (*Gz_state)(unsafe.Pointer(state)).Fsize - have 6463 if Z_size_t(copy) > len { 6464 copy = uint32(len) 6465 } 6466 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr(have), buf, uint64(copy)) 6467 *(*UInt)(unsafe.Pointer(state + 112 + 8)) += copy 6468 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(copy)) 6469 buf = buf + uintptr(copy) 6470 len = len - Z_size_t(copy) 6471 if len != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 { 6472 return uint64(0) 6473 } 6474 } 6475 } else { 6476 // consume whatever's left in the input buffer 6477 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 { 6478 return uint64(0) 6479 } 6480 6481 // directly compress user buffer to file 6482 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf 6483 for __ccgo1 := true; __ccgo1; __ccgo1 = len != 0 { 6484 var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1)) 6485 if Z_size_t(n) > len { 6486 n = uint32(len) 6487 } 6488 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n 6489 *(*int32)(unsafe.Pointer(state + 16)) += int32(uint32(n)) 6490 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 6491 return uint64(0) 6492 } 6493 len = len - Z_size_t(n) 6494 } 6495 } 6496 6497 // input was all buffered or compressed 6498 return put 6499 } 6500 6501 // -- see zlib.h -- 6502 func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */ 6503 var state Gz_statep 6504 6505 // get internal structure 6506 if file == uintptr(0) { 6507 return 0 6508 } 6509 state = file 6510 6511 // check that we're writing and that there's no error 6512 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6513 return 0 6514 } 6515 6516 // since an int is returned, make sure len fits in one, otherwise return 6517 // with an error (this avoids a flaw in the interface) 6518 if int32(len) < 0 { 6519 Xgz_error(tls, state, -3, ts+330) 6520 return 0 6521 } 6522 6523 // write len bytes from buf (the return value will fit in an int) 6524 return int32(gz_write(tls, state, buf, uint64(len))) 6525 } 6526 6527 // -- see zlib.h -- 6528 func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */ 6529 var len Z_size_t 6530 var state Gz_statep 6531 6532 // get internal structure 6533 if file == uintptr(0) { 6534 return uint64(0) 6535 } 6536 state = file 6537 6538 // check that we're writing and that there's no error 6539 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6540 return uint64(0) 6541 } 6542 6543 // compute bytes to read -- error on overflow 6544 len = nitems * size 6545 if size != 0 && len/size != nitems { 6546 Xgz_error(tls, state, -2, ts+227) 6547 return uint64(0) 6548 } 6549 6550 // write len bytes to buf, return the number of full items written 6551 if len != 0 { 6552 return gz_write(tls, state, buf, len) / size 6553 } 6554 return uint64(0) 6555 } 6556 6557 // -- see zlib.h -- 6558 func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */ 6559 bp := tls.Alloc(1) 6560 defer tls.Free(1) 6561 6562 var have uint32 6563 // var buf [1]uint8 at bp, 1 6564 6565 var state Gz_statep 6566 var strm Z_streamp 6567 6568 // get internal structure 6569 if file == uintptr(0) { 6570 return -1 6571 } 6572 state = file 6573 strm = state + 112 6574 6575 // check that we're writing and that there's no error 6576 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6577 return -1 6578 } 6579 6580 // check for seek request 6581 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6582 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6583 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6584 return -1 6585 } 6586 } 6587 6588 // try writing to input buffer for speed (state->size == 0 if buffer not 6589 // initialized) 6590 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 6591 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 6592 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 6593 } 6594 have = uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_in+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1) 6595 if have < (*Gz_state)(unsafe.Pointer(state)).Fsize { 6596 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c) 6597 (*Z_stream)(unsafe.Pointer(strm)).Favail_in++ 6598 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 6599 return c & 0xff 6600 } 6601 } 6602 6603 // no room in buffer or not initialized, use gz_write() 6604 *(*uint8)(unsafe.Pointer(bp)) = uint8(c) 6605 if gz_write(tls, state, bp, uint64(1)) != uint64(1) { 6606 return -1 6607 } 6608 return c & 0xff 6609 } 6610 6611 // -- see zlib.h -- 6612 func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */ 6613 var ret int32 6614 var len Z_size_t 6615 var state Gz_statep 6616 6617 // get internal structure 6618 if file == uintptr(0) { 6619 return -1 6620 } 6621 state = file 6622 6623 // check that we're writing and that there's no error 6624 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6625 return -1 6626 } 6627 6628 // write string 6629 len = libc.Xstrlen(tls, str) 6630 ret = int32(gz_write(tls, state, str, len)) 6631 if ret == 0 && len != uint64(0) { 6632 return -1 6633 } 6634 return ret 6635 } 6636 6637 // ===---- stdarg.h - Variable argument handling ----------------------------=== 6638 // 6639 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 6640 // See https://llvm.org/LICENSE.txt for license information. 6641 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6642 // 6643 //===-----------------------------------------------------------------------=== 6644 6645 // -- see zlib.h -- 6646 func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */ 6647 var len int32 6648 var left uint32 6649 var next uintptr 6650 var state Gz_statep 6651 var strm Z_streamp 6652 6653 // get internal structure 6654 if file == uintptr(0) { 6655 return -2 6656 } 6657 state = file 6658 strm = state + 112 6659 6660 // check that we're writing and that there's no error 6661 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6662 return -2 6663 } 6664 6665 // make sure we have some buffer space 6666 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 { 6667 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6668 } 6669 6670 // check for seek request 6671 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6672 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6673 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6674 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6675 } 6676 } 6677 6678 // do the printf() into the input buffer, put length in len -- the input 6679 // buffer is double-sized just for this function, so there is guaranteed to 6680 // be state->size bytes available after the current contents 6681 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 6682 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 6683 } 6684 next = (*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_in)-int64((*Gz_state)(unsafe.Pointer(state)).Fin))/1) + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in) 6685 *(*int8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1)))) = int8(0) 6686 len = libc.Xvsnprintf(tls, next, uint64((*Gz_state)(unsafe.Pointer(state)).Fsize), format, va) 6687 6688 // check that printf() results fit in buffer 6689 if len == 0 || uint32(len) >= (*Gz_state)(unsafe.Pointer(state)).Fsize || int32(*(*int8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1))))) != 0 { 6690 return 0 6691 } 6692 6693 // update buffer and position, compress first half if past that 6694 *(*UInt)(unsafe.Pointer(strm + 8)) += uint32(len) 6695 *(*int32)(unsafe.Pointer(state + 16)) += int32(len) 6696 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize { 6697 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize 6698 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize 6699 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 6700 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6701 } 6702 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize), uint64(left)) 6703 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 6704 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = left 6705 } 6706 return len 6707 } 6708 6709 func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */ 6710 var va1 Va_list 6711 _ = va1 6712 var ret int32 6713 6714 va1 = va 6715 ret = Xgzvprintf(tls, file, format, va1) 6716 _ = va1 6717 return ret 6718 } 6719 6720 // -- see zlib.h -- 6721 func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */ 6722 var state Gz_statep 6723 6724 // get internal structure 6725 if file == uintptr(0) { 6726 return -2 6727 } 6728 state = file 6729 6730 // check that we're writing and that there's no error 6731 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6732 return -2 6733 } 6734 6735 // check flush parameter 6736 if flush < 0 || flush > Z_FINISH { 6737 return -2 6738 } 6739 6740 // check for seek request 6741 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6742 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6743 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6744 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6745 } 6746 } 6747 6748 // compress remaining data with requested flush 6749 gz_comp(tls, state, flush) 6750 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6751 } 6752 6753 // -- see zlib.h -- 6754 func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */ 6755 var state Gz_statep 6756 var strm Z_streamp 6757 6758 // get internal structure 6759 if file == uintptr(0) { 6760 return -2 6761 } 6762 state = file 6763 strm = state + 112 6764 6765 // check that we're writing and that there's no error 6766 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 6767 return -2 6768 } 6769 6770 // if no change is requested, then do nothing 6771 if level == (*Gz_state)(unsafe.Pointer(state)).Flevel && strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy { 6772 return Z_OK 6773 } 6774 6775 // check for seek request 6776 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6777 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6778 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6779 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6780 } 6781 } 6782 6783 // change compression parameters for subsequent input 6784 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 6785 // flush previous input with previous parameters before changing 6786 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_BLOCK) == -1 { 6787 return (*Gz_state)(unsafe.Pointer(state)).Ferr 6788 } 6789 XdeflateParams(tls, strm, level, strategy) 6790 } 6791 (*Gz_state)(unsafe.Pointer(state)).Flevel = level 6792 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy 6793 return Z_OK 6794 } 6795 6796 // -- see zlib.h -- 6797 func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */ 6798 var ret int32 = Z_OK 6799 var state Gz_statep 6800 6801 // get internal structure 6802 if file == uintptr(0) { 6803 return -2 6804 } 6805 state = file 6806 6807 // check that we're writing 6808 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6809 return -2 6810 } 6811 6812 // check for seek request 6813 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6814 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6815 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 6816 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 6817 } 6818 } 6819 6820 // flush, free memory, and close file 6821 if gz_comp(tls, state, Z_FINISH) == -1 { 6822 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 6823 } 6824 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 6825 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 6826 XdeflateEnd(tls, state+112) 6827 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 6828 } 6829 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 6830 } 6831 Xgz_error(tls, state, Z_OK, uintptr(0)) 6832 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 6833 if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 { 6834 ret = -1 6835 } 6836 libc.Xfree(tls, state) 6837 return ret 6838 } 6839 6840 // Reverse the bytes in a 32-bit value 6841 6842 // inftrees.h -- header to use inftrees.c 6843 // Copyright (C) 1995-2005, 2010 Mark Adler 6844 // For conditions of distribution and use, see copyright notice in zlib.h 6845 6846 // WARNING: this file should *not* be used by applications. It is 6847 // part of the implementation of the compression library and is 6848 // subject to change. Applications should only use zlib.h. 6849 // 6850 6851 // Structure for decoding tables. Each entry provides either the 6852 // information needed to do the operation requested by the code that 6853 // indexed that table entry, or it provides a pointer to another 6854 // table that indexes more bits of the code. op indicates whether 6855 // the entry is a pointer to another table, a literal, a length or 6856 // distance, an end-of-block, or an invalid code. For a table 6857 // pointer, the low four bits of op is the number of index bits of 6858 // that table. For a length or distance, the low four bits of op 6859 // is the number of extra bits to get after the code. bits is 6860 // the number of bits in this code or part of the code to drop off 6861 // of the bit buffer. val is the actual byte to output in the case 6862 // of a literal, the base length or distance, or the offset from 6863 // the current table to the next table. Each entry is four bytes. 6864 type Code = struct { 6865 Fop uint8 6866 Fbits uint8 6867 Fval uint16 6868 } /* inftrees.h:28:3 */ 6869 6870 // op values as set by inflate_table(): 6871 // 00000000 - literal 6872 // 0000tttt - table link, tttt != 0 is the number of table index bits 6873 // 0001eeee - length or distance, eeee is the number of extra bits 6874 // 01100000 - end of block 6875 // 01000000 - invalid code 6876 // 6877 6878 // Maximum size of the dynamic table. The maximum number of code structures is 6879 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 6880 // codes. These values were found by exhaustive searches using the program 6881 // examples/enough.c found in the zlib distribtution. The arguments to that 6882 // program are the number of symbols, the initial root table size, and the 6883 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 6884 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 6885 // The initial root table size (9 or 6) is found in the fifth argument of the 6886 // inflate_table() calls in inflate.c and infback.c. If the root table size is 6887 // changed, then these maximum sizes would be need to be recalculated and 6888 // updated. 6889 6890 // Type of code to build for inflate_table() 6891 type Codetype = uint32 /* inftrees.h:58:3 */ 6892 // inflate.h -- internal inflate state definition 6893 // Copyright (C) 1995-2016 Mark Adler 6894 // For conditions of distribution and use, see copyright notice in zlib.h 6895 6896 // WARNING: this file should *not* be used by applications. It is 6897 // part of the implementation of the compression library and is 6898 // subject to change. Applications should only use zlib.h. 6899 // 6900 6901 // define NO_GZIP when compiling if you want to disable gzip header and 6902 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 6903 // the crc code when it is not needed. For shared libraries, gzip decoding 6904 // should be left enabled. 6905 6906 // Possible inflate modes between inflate() calls 6907 type Inflate_mode = uint32 /* inflate.h:53:3 */ 6908 6909 // 6910 // State transitions between above modes - 6911 // 6912 // (most modes can go to BAD or MEM on error -- not shown for clarity) 6913 // 6914 // Process header: 6915 // HEAD -> (gzip) or (zlib) or (raw) 6916 // (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> 6917 // HCRC -> TYPE 6918 // (zlib) -> DICTID or TYPE 6919 // DICTID -> DICT -> TYPE 6920 // (raw) -> TYPEDO 6921 // Read deflate blocks: 6922 // TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK 6923 // STORED -> COPY_ -> COPY -> TYPE 6924 // TABLE -> LENLENS -> CODELENS -> LEN_ 6925 // LEN_ -> LEN 6926 // Read deflate codes in fixed or dynamic block: 6927 // LEN -> LENEXT or LIT or TYPE 6928 // LENEXT -> DIST -> DISTEXT -> MATCH -> LEN 6929 // LIT -> LEN 6930 // Process trailer: 6931 // CHECK -> LENGTH -> DONE 6932 // 6933 6934 // State maintained between inflate() calls -- approximately 7K bytes, not 6935 // including the allocated sliding window, which is up to 32K bytes. 6936 type Inflate_state = struct { 6937 Fstrm Z_streamp 6938 Fmode Inflate_mode 6939 Flast int32 6940 Fwrap int32 6941 Fhavedict int32 6942 Fflags int32 6943 Fdmax uint32 6944 Fcheck uint32 6945 Ftotal uint32 6946 Fhead Gz_headerp 6947 Fwbits uint32 6948 Fwsize uint32 6949 Fwhave uint32 6950 Fwnext uint32 6951 Fwindow uintptr 6952 Fhold uint32 6953 Fbits uint32 6954 Flength uint32 6955 Foffset uint32 6956 Fextra uint32 6957 F__ccgo_pad1 [4]byte 6958 Flencode uintptr 6959 Fdistcode uintptr 6960 Flenbits uint32 6961 Fdistbits uint32 6962 Fncode uint32 6963 Fnlen uint32 6964 Fndist uint32 6965 Fhave uint32 6966 Fnext uintptr 6967 Flens [320]uint16 6968 Fwork [288]uint16 6969 Fcodes [1444]Code 6970 Fsane int32 6971 Fback int32 6972 Fwas uint32 6973 F__ccgo_pad2 [4]byte 6974 } /* inflate.h:82:1 */ 6975 6976 // 6977 // strm provides memory allocation functions in zalloc and zfree, or 6978 // Z_NULL to use the library memory allocation functions. 6979 // 6980 // windowBits is in the range 8..15, and window is a user-supplied 6981 // window and output buffer that is 2**windowBits bytes. 6982 // 6983 func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */ 6984 var state uintptr 6985 6986 if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) { 6987 return -6 6988 } 6989 if strm == uintptr(Z_NULL) || window == uintptr(Z_NULL) || windowBits < 8 || windowBits > 15 { 6990 return -2 6991 } 6992 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 6993 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 6994 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 6995 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 6996 }{Xzcalloc})) 6997 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 6998 } 6999 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 7000 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 7001 f func(*libc.TLS, Voidpf, Voidpf) 7002 }{Xzcfree})) 7003 } 7004 state = (*struct { 7005 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 7006 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{}))) 7007 if state == uintptr(Z_NULL) { 7008 return -4 7009 } 7010 7011 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 7012 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 7013 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits) 7014 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << windowBits 7015 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = window 7016 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 7017 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 7018 return Z_OK 7019 } 7020 7021 // 7022 // Return state with length and distance decoding tables and index sizes set to 7023 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 7024 // If BUILDFIXED is defined, then instead this routine builds the tables the 7025 // first time it's called, and returns those tables the first time and 7026 // thereafter. This reduces the size of the code by about 2K bytes, in 7027 // exchange for a little execution time. However, BUILDFIXED should not be 7028 // used for threaded applications, since the rewriting of the tables and virgin 7029 // may not be thread-safe. 7030 // 7031 func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */ 7032 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix)) 7033 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 7034 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix)) 7035 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 7036 } 7037 7038 var lenfix = [512]Code{ 7039 {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)}, {Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)}, 7040 {Fbits: uint8(9), Fval: uint16(192)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)}, {Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(160)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)}, 7041 {Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(224)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(144)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, 7042 {Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(208)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(176)}, 7043 {Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)}, {Fbits: uint8(9), Fval: uint16(240)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)}, 7044 {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)}, {Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(200)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)}, 7045 {Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(168)}, {Fbits: uint8(8), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(232)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, 7046 {Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(152)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(216)}, 7047 {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)}, {Fbits: uint8(9), Fval: uint16(184)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)}, 7048 {Fbits: uint8(9), Fval: uint16(248)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)}, {Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)}, 7049 {Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(196)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(164)}, {Fbits: uint8(8), Fval: uint16(2)}, 7050 {Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(228)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(148)}, 7051 {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)}, {Fbits: uint8(9), Fval: uint16(212)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)}, 7052 {Fbits: uint8(9), Fval: uint16(180)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)}, {Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(244)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)}, 7053 {Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(204)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, 7054 {Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(172)}, {Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(236)}, 7055 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)}, {Fbits: uint8(9), Fval: uint16(156)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)}, 7056 {Fbits: uint8(9), Fval: uint16(220)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)}, {Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(188)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)}, 7057 {Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(252)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, 7058 {Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(194)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(162)}, 7059 {Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)}, {Fbits: uint8(9), Fval: uint16(226)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)}, 7060 {Fbits: uint8(9), Fval: uint16(146)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)}, {Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(210)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)}, 7061 {Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(178)}, {Fbits: uint8(8), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(242)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, 7062 {Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(202)}, 7063 {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)}, {Fbits: uint8(9), Fval: uint16(170)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)}, 7064 {Fbits: uint8(9), Fval: uint16(234)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)}, {Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(154)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)}, 7065 {Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(218)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(186)}, {Fbits: uint8(8), Fval: uint16(13)}, 7066 {Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(250)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)}, 7067 {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)}, {Fbits: uint8(9), Fval: uint16(198)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)}, 7068 {Fbits: uint8(9), Fval: uint16(166)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)}, {Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(230)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)}, 7069 {Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(150)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(214)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, 7070 {Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(182)}, {Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(246)}, 7071 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)}, 7072 {Fbits: uint8(9), Fval: uint16(206)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)}, {Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(174)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)}, 7073 {Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(238)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(158)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, 7074 {Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(222)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(190)}, 7075 {Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)}, {Fbits: uint8(9), Fval: uint16(254)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)}, 7076 {Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)}, {Fbits: uint8(9), Fval: uint16(193)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)}, 7077 {Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(161)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)}, {Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(225)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, 7078 {Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(145)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(209)}, 7079 {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(177)}, {Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)}, 7080 {Fbits: uint8(9), Fval: uint16(241)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)}, 7081 {Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(201)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)}, {Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(169)}, {Fbits: uint8(8), Fval: uint16(4)}, 7082 {Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(233)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(153)}, 7083 {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(217)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)}, 7084 {Fbits: uint8(9), Fval: uint16(185)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)}, {Fbits: uint8(9), Fval: uint16(249)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)}, 7085 {Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)}, {Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(197)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, 7086 {Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(165)}, {Fbits: uint8(8), Fval: uint16(2)}, {Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(229)}, 7087 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(149)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)}, 7088 {Fbits: uint8(9), Fval: uint16(213)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)}, {Fbits: uint8(9), Fval: uint16(181)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)}, 7089 {Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(245)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)}, {Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, 7090 {Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(205)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(173)}, 7091 {Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(237)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)}, 7092 {Fbits: uint8(9), Fval: uint16(157)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)}, {Fbits: uint8(9), Fval: uint16(221)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)}, 7093 {Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(189)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)}, {Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(253)}, {Fop: uint8(96), Fbits: uint8(7)}, 7094 {Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(195)}, 7095 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(163)}, {Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)}, 7096 {Fbits: uint8(9), Fval: uint16(227)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)}, {Fbits: uint8(9), Fval: uint16(147)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)}, 7097 {Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(211)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)}, {Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(179)}, {Fbits: uint8(8), Fval: uint16(9)}, 7098 {Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(243)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)}, 7099 {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(203)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)}, 7100 {Fbits: uint8(9), Fval: uint16(171)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)}, {Fbits: uint8(9), Fval: uint16(235)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)}, 7101 {Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(155)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)}, {Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(219)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, 7102 {Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(187)}, {Fbits: uint8(8), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(251)}, 7103 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)}, 7104 {Fbits: uint8(9), Fval: uint16(199)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)}, {Fbits: uint8(9), Fval: uint16(167)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)}, 7105 {Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(231)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)}, {Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(151)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, 7106 {Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(215)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(183)}, 7107 {Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(247)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)}, 7108 {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)}, {Fbits: uint8(9), Fval: uint16(207)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)}, 7109 {Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(175)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)}, {Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(239)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, 7110 {Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(159)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(223)}, 7111 {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(191)}, {Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)}, 7112 {Fbits: uint8(9), Fval: uint16(255)}, 7113 } /* inffixed.h:10:23 */ 7114 var distfix = [32]Code{ 7115 {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(1)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(257)}, {Fop: uint8(19), Fbits: uint8(5), Fval: uint16(17)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(4097)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(5)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1025)}, 7116 {Fop: uint8(21), Fbits: uint8(5), Fval: uint16(65)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(16385)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(3)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(513)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(33)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(8193)}, 7117 {Fop: uint8(18), Fbits: uint8(5), Fval: uint16(9)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(2049)}, {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(129)}, {Fop: uint8(64), Fbits: uint8(5)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(2)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(385)}, 7118 {Fop: uint8(19), Fbits: uint8(5), Fval: uint16(25)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(6145)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(7)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1537)}, {Fop: uint8(21), Fbits: uint8(5), Fval: uint16(97)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(24577)}, 7119 {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(4)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(769)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(49)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(12289)}, {Fop: uint8(18), Fbits: uint8(5), Fval: uint16(13)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(3073)}, 7120 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 7121 } /* inffixed.h:87:23 */ 7122 7123 // Macros for inflateBack(): 7124 7125 // Load returned state from inflate_fast() 7126 7127 // Set state from registers for inflate_fast() 7128 7129 // Clear the input bit accumulator 7130 7131 // Assure that some input is available. If input is requested, but denied, 7132 // then return a Z_BUF_ERROR from inflateBack(). 7133 7134 // Get a byte of input into the bit accumulator, or return from inflateBack() 7135 // with an error if there is no input available. 7136 7137 // Assure that there are at least n bits in the bit accumulator. If there is 7138 // not enough available input to do that, then return from inflateBack() with 7139 // an error. 7140 7141 // Return the low n bits of the bit accumulator (n < 16) 7142 7143 // Remove n bits from the bit accumulator 7144 7145 // Remove zero to seven bits as needed to go to a byte boundary 7146 7147 // Assure that some output space is available, by writing out the window 7148 // if it's full. If the write fails, return from inflateBack() with a 7149 // Z_BUF_ERROR. 7150 7151 // 7152 // strm provides the memory allocation functions and window buffer on input, 7153 // and provides information on the unused input on return. For Z_DATA_ERROR 7154 // returns, strm will also provide an error message. 7155 // 7156 // in() and out() are the call-back input and output functions. When 7157 // inflateBack() needs more input, it calls in(). When inflateBack() has 7158 // filled the window with output, or when it completes with data in the 7159 // window, it calls out() to write out the data. The application must not 7160 // change the provided input until in() is called again or inflateBack() 7161 // returns. The application must not change the window/output buffer until 7162 // inflateBack() returns. 7163 // 7164 // in() and out() are called with a descriptor parameter provided in the 7165 // inflateBack() call. This parameter can be a structure that provides the 7166 // information required to do the read or write, as well as accumulated 7167 // information on the input and output such as totals and check values. 7168 // 7169 // in() should return zero on failure. out() should return non-zero on 7170 // failure. If either in() or out() fails, than inflateBack() returns a 7171 // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it 7172 // was in() or out() that caused in the error. Otherwise, inflateBack() 7173 // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format 7174 // error, or Z_MEM_ERROR if it could not allocate memory for the state. 7175 // inflateBack() can also return Z_STREAM_ERROR if the input parameters 7176 // are not correct, i.e. strm is Z_NULL or the state was not initialized. 7177 // 7178 func XinflateBack(tls *libc.TLS, strm Z_streamp, in In_func, in_desc uintptr, out Out_func, out_desc uintptr) int32 { /* infback.c:250:13: */ 7179 bp := tls.Alloc(8) 7180 defer tls.Free(8) 7181 7182 var state uintptr 7183 // var next uintptr at bp, 8 7184 // next input 7185 var put uintptr // next output 7186 var have uint32 7187 var left uint32 // available input and output 7188 var hold uint32 // bit buffer 7189 var bits uint32 // bits in bit buffer 7190 var copy uint32 // number of stored or match bytes to copy 7191 var from uintptr // where to copy match bytes from 7192 var here Code // current decoding table entry 7193 var last Code // parent table entry 7194 var len uint32 // length to copy for repeats, bits to drop 7195 var ret int32 7196 7197 // Check that the strm exists and that the state was initialized 7198 if !(strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL)) { 7199 goto __1 7200 } 7201 return -2 7202 __1: 7203 ; 7204 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 7205 7206 // Reset the state 7207 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 7208 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 7209 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 7210 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 7211 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 7212 if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(Z_NULL) { 7213 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 7214 } else { 7215 have = uint32(0) 7216 } 7217 hold = uint32(0) 7218 bits = uint32(0) 7219 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 7220 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 7221 7222 // Inflate until end of block marked as last 7223 __2: 7224 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 7225 case TYPE: 7226 goto __6 7227 7228 case STORED: 7229 goto __7 7230 7231 case TABLE: 7232 goto __8 7233 7234 case LEN: 7235 goto __9 7236 7237 case DONE: 7238 goto __10 7239 7240 case BAD: 7241 goto __11 7242 7243 default: 7244 goto __12 7245 } 7246 goto __5 7247 __6: 7248 // determine and dispatch block type 7249 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 7250 goto __13 7251 } 7252 __14: 7253 hold >>= bits & uint32(7) 7254 bits = bits - bits&uint32(7) 7255 goto __15 7256 __15: 7257 if 0 != 0 { 7258 goto __14 7259 } 7260 goto __16 7261 __16: 7262 ; 7263 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 7264 goto __5 7265 __13: 7266 ; 7267 __17: 7268 __20: 7269 if !(bits < uint32(3)) { 7270 goto __21 7271 } 7272 __22: 7273 __25: 7274 if !(have == uint32(0)) { 7275 goto __28 7276 } 7277 have = (*struct { 7278 f func(*libc.TLS, uintptr, uintptr) uint32 7279 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7280 if !(have == uint32(0)) { 7281 goto __29 7282 } 7283 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7284 ret = -5 7285 goto inf_leave 7286 __29: 7287 ; 7288 __28: 7289 ; 7290 goto __26 7291 __26: 7292 if 0 != 0 { 7293 goto __25 7294 } 7295 goto __27 7296 __27: 7297 ; 7298 have-- 7299 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7300 bits = bits + uint32(8) 7301 goto __23 7302 __23: 7303 if 0 != 0 { 7304 goto __22 7305 } 7306 goto __24 7307 __24: 7308 ; 7309 goto __20 7310 __21: 7311 ; 7312 goto __18 7313 __18: 7314 if 0 != 0 { 7315 goto __17 7316 } 7317 goto __19 7318 __19: 7319 ; 7320 (*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1))) 7321 __30: 7322 hold >>= 1 7323 bits = bits - uint32(1) 7324 goto __31 7325 __31: 7326 if 0 != 0 { 7327 goto __30 7328 } 7329 goto __32 7330 __32: 7331 ; 7332 switch uint32(hold) & (uint32(1)<<2 - uint32(1)) { 7333 case uint32(0): 7334 goto __34 7335 case uint32(1): 7336 goto __35 7337 case uint32(2): 7338 goto __36 7339 case uint32(3): 7340 goto __37 7341 } 7342 goto __33 7343 __34: // stored block 7344 ; 7345 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 7346 goto __33 7347 __35: // fixed block 7348 fixedtables(tls, state) 7349 7350 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes 7351 goto __33 7352 __36: // dynamic block 7353 ; 7354 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 7355 goto __33 7356 __37: 7357 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 7358 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 7359 __33: 7360 ; 7361 __38: 7362 hold >>= 2 7363 bits = bits - uint32(2) 7364 goto __39 7365 __39: 7366 if 0 != 0 { 7367 goto __38 7368 } 7369 goto __40 7370 __40: 7371 ; 7372 goto __5 7373 7374 __7: 7375 // get and verify stored block length 7376 __41: 7377 hold >>= bits & uint32(7) 7378 bits = bits - bits&uint32(7) 7379 goto __42 7380 __42: 7381 if 0 != 0 { 7382 goto __41 7383 } 7384 goto __43 7385 __43: 7386 ; // go to byte boundary 7387 __44: 7388 __47: 7389 if !(bits < uint32(32)) { 7390 goto __48 7391 } 7392 __49: 7393 __52: 7394 if !(have == uint32(0)) { 7395 goto __55 7396 } 7397 have = (*struct { 7398 f func(*libc.TLS, uintptr, uintptr) uint32 7399 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7400 if !(have == uint32(0)) { 7401 goto __56 7402 } 7403 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7404 ret = -5 7405 goto inf_leave 7406 __56: 7407 ; 7408 __55: 7409 ; 7410 goto __53 7411 __53: 7412 if 0 != 0 { 7413 goto __52 7414 } 7415 goto __54 7416 __54: 7417 ; 7418 have-- 7419 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7420 bits = bits + uint32(8) 7421 goto __50 7422 __50: 7423 if 0 != 0 { 7424 goto __49 7425 } 7426 goto __51 7427 __51: 7428 ; 7429 goto __47 7430 __48: 7431 ; 7432 goto __45 7433 __45: 7434 if 0 != 0 { 7435 goto __44 7436 } 7437 goto __46 7438 __46: 7439 ; 7440 if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) { 7441 goto __57 7442 } 7443 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 7444 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 7445 goto __5 7446 __57: 7447 ; 7448 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff) 7449 7450 __58: 7451 hold = uint32(0) 7452 bits = uint32(0) 7453 goto __59 7454 __59: 7455 if 0 != 0 { 7456 goto __58 7457 } 7458 goto __60 7459 __60: 7460 ; 7461 7462 // copy stored block from input to output 7463 __61: 7464 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) { 7465 goto __62 7466 } 7467 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 7468 __63: 7469 if !(have == uint32(0)) { 7470 goto __66 7471 } 7472 have = (*struct { 7473 f func(*libc.TLS, uintptr, uintptr) uint32 7474 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7475 if !(have == uint32(0)) { 7476 goto __67 7477 } 7478 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7479 ret = -5 7480 goto inf_leave 7481 __67: 7482 ; 7483 __66: 7484 ; 7485 goto __64 7486 __64: 7487 if 0 != 0 { 7488 goto __63 7489 } 7490 goto __65 7491 __65: 7492 ; 7493 __68: 7494 if !(left == uint32(0)) { 7495 goto __71 7496 } 7497 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 7498 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 7499 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 7500 if !((*struct { 7501 f func(*libc.TLS, uintptr, uintptr, uint32) int32 7502 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 7503 goto __72 7504 } 7505 ret = -5 7506 goto inf_leave 7507 __72: 7508 ; 7509 __71: 7510 ; 7511 goto __69 7512 __69: 7513 if 0 != 0 { 7514 goto __68 7515 } 7516 goto __70 7517 __70: 7518 ; 7519 if !(copy > have) { 7520 goto __73 7521 } 7522 copy = have 7523 __73: 7524 ; 7525 if !(copy > left) { 7526 goto __74 7527 } 7528 copy = left 7529 __74: 7530 ; 7531 libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy)) 7532 have = have - copy 7533 *(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy) 7534 left = left - copy 7535 put += uintptr(copy) 7536 *(*uint32)(unsafe.Pointer(state + 80)) -= copy 7537 goto __61 7538 __62: 7539 ; 7540 7541 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 7542 goto __5 7543 7544 __8: 7545 // get dynamic table entries descriptor 7546 __75: 7547 __78: 7548 if !(bits < uint32(14)) { 7549 goto __79 7550 } 7551 __80: 7552 __83: 7553 if !(have == uint32(0)) { 7554 goto __86 7555 } 7556 have = (*struct { 7557 f func(*libc.TLS, uintptr, uintptr) uint32 7558 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7559 if !(have == uint32(0)) { 7560 goto __87 7561 } 7562 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7563 ret = -5 7564 goto inf_leave 7565 __87: 7566 ; 7567 __86: 7568 ; 7569 goto __84 7570 __84: 7571 if 0 != 0 { 7572 goto __83 7573 } 7574 goto __85 7575 __85: 7576 ; 7577 have-- 7578 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7579 bits = bits + uint32(8) 7580 goto __81 7581 __81: 7582 if 0 != 0 { 7583 goto __80 7584 } 7585 goto __82 7586 __82: 7587 ; 7588 goto __78 7589 __79: 7590 ; 7591 goto __76 7592 __76: 7593 if 0 != 0 { 7594 goto __75 7595 } 7596 goto __77 7597 __77: 7598 ; 7599 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257) 7600 __88: 7601 hold >>= 5 7602 bits = bits - uint32(5) 7603 goto __89 7604 __89: 7605 if 0 != 0 { 7606 goto __88 7607 } 7608 goto __90 7609 __90: 7610 ; 7611 (*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1) 7612 __91: 7613 hold >>= 5 7614 bits = bits - uint32(5) 7615 goto __92 7616 __92: 7617 if 0 != 0 { 7618 goto __91 7619 } 7620 goto __93 7621 __93: 7622 ; 7623 (*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4) 7624 __94: 7625 hold >>= 4 7626 bits = bits - uint32(4) 7627 goto __95 7628 __95: 7629 if 0 != 0 { 7630 goto __94 7631 } 7632 goto __96 7633 __96: 7634 ; 7635 if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) { 7636 goto __97 7637 } 7638 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 7639 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 7640 goto __5 7641 __97: 7642 ; 7643 7644 // get code length code lengths (not a typo) 7645 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 7646 __98: 7647 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 7648 goto __99 7649 } 7650 __100: 7651 __103: 7652 if !(bits < uint32(3)) { 7653 goto __104 7654 } 7655 __105: 7656 __108: 7657 if !(have == uint32(0)) { 7658 goto __111 7659 } 7660 have = (*struct { 7661 f func(*libc.TLS, uintptr, uintptr) uint32 7662 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7663 if !(have == uint32(0)) { 7664 goto __112 7665 } 7666 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7667 ret = -5 7668 goto inf_leave 7669 __112: 7670 ; 7671 __111: 7672 ; 7673 goto __109 7674 __109: 7675 if 0 != 0 { 7676 goto __108 7677 } 7678 goto __110 7679 __110: 7680 ; 7681 have-- 7682 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7683 bits = bits + uint32(8) 7684 goto __106 7685 __106: 7686 if 0 != 0 { 7687 goto __105 7688 } 7689 goto __107 7690 __107: 7691 ; 7692 goto __103 7693 __104: 7694 ; 7695 goto __101 7696 __101: 7697 if 0 != 0 { 7698 goto __100 7699 } 7700 goto __102 7701 __102: 7702 ; 7703 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1))) 7704 __113: 7705 hold >>= 3 7706 bits = bits - uint32(3) 7707 goto __114 7708 __114: 7709 if 0 != 0 { 7710 goto __113 7711 } 7712 goto __115 7713 __115: 7714 ; 7715 goto __98 7716 __99: 7717 ; 7718 __116: 7719 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 7720 goto __117 7721 } 7722 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 7723 goto __116 7724 __117: 7725 ; 7726 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */ 7727 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 7728 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 7729 ret = Xinflate_table(tls, CODES, state+144, uint32(19), state+136, 7730 state+112, state+784) 7731 if !(ret != 0) { 7732 goto __118 7733 } 7734 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 7735 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 7736 goto __5 7737 __118: 7738 ; 7739 7740 // get length and distance code code lengths 7741 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 7742 __119: 7743 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 7744 goto __120 7745 } 7746 __121: 7747 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 7748 if !(uint32(here.Fbits) <= bits) { 7749 goto __124 7750 } 7751 goto __123 7752 __124: 7753 ; 7754 __125: 7755 __128: 7756 if !(have == uint32(0)) { 7757 goto __131 7758 } 7759 have = (*struct { 7760 f func(*libc.TLS, uintptr, uintptr) uint32 7761 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7762 if !(have == uint32(0)) { 7763 goto __132 7764 } 7765 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7766 ret = -5 7767 goto inf_leave 7768 __132: 7769 ; 7770 __131: 7771 ; 7772 goto __129 7773 __129: 7774 if 0 != 0 { 7775 goto __128 7776 } 7777 goto __130 7778 __130: 7779 ; 7780 have-- 7781 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7782 bits = bits + uint32(8) 7783 goto __126 7784 __126: 7785 if 0 != 0 { 7786 goto __125 7787 } 7788 goto __127 7789 __127: 7790 ; 7791 goto __122 7792 __122: 7793 goto __121 7794 goto __123 7795 __123: 7796 ; 7797 if !(int32(here.Fval) < 16) { 7798 goto __133 7799 } 7800 __135: 7801 hold >>= int32(here.Fbits) 7802 bits = bits - uint32(here.Fbits) 7803 goto __136 7804 __136: 7805 if 0 != 0 { 7806 goto __135 7807 } 7808 goto __137 7809 __137: 7810 ; 7811 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 7812 goto __134 7813 __133: 7814 if !(int32(here.Fval) == 16) { 7815 goto __138 7816 } 7817 __140: 7818 __143: 7819 if !(bits < uint32(int32(here.Fbits)+2)) { 7820 goto __144 7821 } 7822 __145: 7823 __148: 7824 if !(have == uint32(0)) { 7825 goto __151 7826 } 7827 have = (*struct { 7828 f func(*libc.TLS, uintptr, uintptr) uint32 7829 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7830 if !(have == uint32(0)) { 7831 goto __152 7832 } 7833 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7834 ret = -5 7835 goto inf_leave 7836 __152: 7837 ; 7838 __151: 7839 ; 7840 goto __149 7841 __149: 7842 if 0 != 0 { 7843 goto __148 7844 } 7845 goto __150 7846 __150: 7847 ; 7848 have-- 7849 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7850 bits = bits + uint32(8) 7851 goto __146 7852 __146: 7853 if 0 != 0 { 7854 goto __145 7855 } 7856 goto __147 7857 __147: 7858 ; 7859 goto __143 7860 __144: 7861 ; 7862 goto __141 7863 __141: 7864 if 0 != 0 { 7865 goto __140 7866 } 7867 goto __142 7868 __142: 7869 ; 7870 __153: 7871 hold >>= int32(here.Fbits) 7872 bits = bits - uint32(here.Fbits) 7873 goto __154 7874 __154: 7875 if 0 != 0 { 7876 goto __153 7877 } 7878 goto __155 7879 __155: 7880 ; 7881 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 7882 goto __156 7883 } 7884 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 7885 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 7886 goto __120 7887 __156: 7888 ; 7889 len = uint32(*(*uint16)(unsafe.Pointer(state + 144 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2))) 7890 copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1)) 7891 __157: 7892 hold >>= 2 7893 bits = bits - uint32(2) 7894 goto __158 7895 __158: 7896 if 0 != 0 { 7897 goto __157 7898 } 7899 goto __159 7900 __159: 7901 ; 7902 goto __139 7903 __138: 7904 if !(int32(here.Fval) == 17) { 7905 goto __160 7906 } 7907 __162: 7908 __165: 7909 if !(bits < uint32(int32(here.Fbits)+3)) { 7910 goto __166 7911 } 7912 __167: 7913 __170: 7914 if !(have == uint32(0)) { 7915 goto __173 7916 } 7917 have = (*struct { 7918 f func(*libc.TLS, uintptr, uintptr) uint32 7919 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7920 if !(have == uint32(0)) { 7921 goto __174 7922 } 7923 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 7924 ret = -5 7925 goto inf_leave 7926 __174: 7927 ; 7928 __173: 7929 ; 7930 goto __171 7931 __171: 7932 if 0 != 0 { 7933 goto __170 7934 } 7935 goto __172 7936 __172: 7937 ; 7938 have-- 7939 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 7940 bits = bits + uint32(8) 7941 goto __168 7942 __168: 7943 if 0 != 0 { 7944 goto __167 7945 } 7946 goto __169 7947 __169: 7948 ; 7949 goto __165 7950 __166: 7951 ; 7952 goto __163 7953 __163: 7954 if 0 != 0 { 7955 goto __162 7956 } 7957 goto __164 7958 __164: 7959 ; 7960 __175: 7961 hold >>= int32(here.Fbits) 7962 bits = bits - uint32(here.Fbits) 7963 goto __176 7964 __176: 7965 if 0 != 0 { 7966 goto __175 7967 } 7968 goto __177 7969 __177: 7970 ; 7971 len = uint32(0) 7972 copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1)) 7973 __178: 7974 hold >>= 3 7975 bits = bits - uint32(3) 7976 goto __179 7977 __179: 7978 if 0 != 0 { 7979 goto __178 7980 } 7981 goto __180 7982 __180: 7983 ; 7984 goto __161 7985 __160: 7986 __181: 7987 __184: 7988 if !(bits < uint32(int32(here.Fbits)+7)) { 7989 goto __185 7990 } 7991 __186: 7992 __189: 7993 if !(have == uint32(0)) { 7994 goto __192 7995 } 7996 have = (*struct { 7997 f func(*libc.TLS, uintptr, uintptr) uint32 7998 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 7999 if !(have == uint32(0)) { 8000 goto __193 8001 } 8002 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8003 ret = -5 8004 goto inf_leave 8005 __193: 8006 ; 8007 __192: 8008 ; 8009 goto __190 8010 __190: 8011 if 0 != 0 { 8012 goto __189 8013 } 8014 goto __191 8015 __191: 8016 ; 8017 have-- 8018 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8019 bits = bits + uint32(8) 8020 goto __187 8021 __187: 8022 if 0 != 0 { 8023 goto __186 8024 } 8025 goto __188 8026 __188: 8027 ; 8028 goto __184 8029 __185: 8030 ; 8031 goto __182 8032 __182: 8033 if 0 != 0 { 8034 goto __181 8035 } 8036 goto __183 8037 __183: 8038 ; 8039 __194: 8040 hold >>= int32(here.Fbits) 8041 bits = bits - uint32(here.Fbits) 8042 goto __195 8043 __195: 8044 if 0 != 0 { 8045 goto __194 8046 } 8047 goto __196 8048 __196: 8049 ; 8050 len = uint32(0) 8051 copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1)) 8052 __197: 8053 hold >>= 7 8054 bits = bits - uint32(7) 8055 goto __198 8056 __198: 8057 if 0 != 0 { 8058 goto __197 8059 } 8060 goto __199 8061 __199: 8062 ; 8063 __161: 8064 ; 8065 __139: 8066 ; 8067 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 8068 goto __200 8069 } 8070 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 8071 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8072 goto __120 8073 __200: 8074 ; 8075 __201: 8076 if !(libc.PostDecUint32(©, 1) != 0) { 8077 goto __202 8078 } 8079 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 8080 goto __201 8081 __202: 8082 ; 8083 __134: 8084 ; 8085 goto __119 8086 __120: 8087 ; 8088 8089 // handle error breaks in while 8090 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 8091 goto __203 8092 } 8093 goto __5 8094 __203: 8095 ; 8096 8097 // check for end-of-block code (better have one) 8098 if !(int32(*(*uint16)(unsafe.Pointer(state + 144 + 256*2))) == 0) { 8099 goto __204 8100 } 8101 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 8102 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8103 goto __5 8104 __204: 8105 ; 8106 8107 // build code tables -- note: do not change the lenbits or distbits 8108 // values here (9 and 6) without reading the comments in inftrees.h 8109 // concerning the ENOUGH constants, which depend on those values 8110 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */ 8111 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 8112 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 8113 ret = Xinflate_table(tls, LENS, state+144, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+136, 8114 state+112, state+784) 8115 if !(ret != 0) { 8116 goto __205 8117 } 8118 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 8119 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8120 goto __5 8121 __205: 8122 ; 8123 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 8124 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 8125 ret = Xinflate_table(tls, DISTS, state+144+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist, 8126 state+136, state+116, state+784) 8127 if !(ret != 0) { 8128 goto __206 8129 } 8130 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 8131 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8132 goto __5 8133 __206: 8134 ; 8135 8136 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 8137 8138 __9: 8139 // use inflate_fast() if we have enough input and output 8140 if !(have >= uint32(6) && left >= uint32(258)) { 8141 goto __207 8142 } 8143 __208: 8144 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 8145 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 8146 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 8147 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 8148 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 8149 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 8150 goto __209 8151 __209: 8152 if 0 != 0 { 8153 goto __208 8154 } 8155 goto __210 8156 __210: 8157 ; 8158 if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 8159 goto __211 8160 } 8161 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - left 8162 __211: 8163 ; 8164 Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 8165 __212: 8166 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 8167 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 8168 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 8169 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 8170 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 8171 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 8172 goto __213 8173 __213: 8174 if 0 != 0 { 8175 goto __212 8176 } 8177 goto __214 8178 __214: 8179 ; 8180 goto __5 8181 __207: 8182 ; 8183 8184 // get a literal, length, or end-of-block code 8185 __215: 8186 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 8187 if !(uint32(here.Fbits) <= bits) { 8188 goto __218 8189 } 8190 goto __217 8191 __218: 8192 ; 8193 __219: 8194 __222: 8195 if !(have == uint32(0)) { 8196 goto __225 8197 } 8198 have = (*struct { 8199 f func(*libc.TLS, uintptr, uintptr) uint32 8200 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8201 if !(have == uint32(0)) { 8202 goto __226 8203 } 8204 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8205 ret = -5 8206 goto inf_leave 8207 __226: 8208 ; 8209 __225: 8210 ; 8211 goto __223 8212 __223: 8213 if 0 != 0 { 8214 goto __222 8215 } 8216 goto __224 8217 __224: 8218 ; 8219 have-- 8220 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8221 bits = bits + uint32(8) 8222 goto __220 8223 __220: 8224 if 0 != 0 { 8225 goto __219 8226 } 8227 goto __221 8228 __221: 8229 ; 8230 goto __216 8231 __216: 8232 goto __215 8233 goto __217 8234 __217: 8235 ; 8236 if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) { 8237 goto __227 8238 } 8239 last = here 8240 __228: 8241 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4)) 8242 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 8243 goto __231 8244 } 8245 goto __230 8246 __231: 8247 ; 8248 __232: 8249 __235: 8250 if !(have == uint32(0)) { 8251 goto __238 8252 } 8253 have = (*struct { 8254 f func(*libc.TLS, uintptr, uintptr) uint32 8255 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8256 if !(have == uint32(0)) { 8257 goto __239 8258 } 8259 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8260 ret = -5 8261 goto inf_leave 8262 __239: 8263 ; 8264 __238: 8265 ; 8266 goto __236 8267 __236: 8268 if 0 != 0 { 8269 goto __235 8270 } 8271 goto __237 8272 __237: 8273 ; 8274 have-- 8275 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8276 bits = bits + uint32(8) 8277 goto __233 8278 __233: 8279 if 0 != 0 { 8280 goto __232 8281 } 8282 goto __234 8283 __234: 8284 ; 8285 goto __229 8286 __229: 8287 goto __228 8288 goto __230 8289 __230: 8290 ; 8291 __240: 8292 hold >>= int32(last.Fbits) 8293 bits = bits - uint32(last.Fbits) 8294 goto __241 8295 __241: 8296 if 0 != 0 { 8297 goto __240 8298 } 8299 goto __242 8300 __242: 8301 ; 8302 __227: 8303 ; 8304 __243: 8305 hold >>= int32(here.Fbits) 8306 bits = bits - uint32(here.Fbits) 8307 goto __244 8308 __244: 8309 if 0 != 0 { 8310 goto __243 8311 } 8312 goto __245 8313 __245: 8314 ; 8315 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 8316 8317 // process literal 8318 if !(int32(here.Fop) == 0) { 8319 goto __246 8320 } 8321 8322 __247: 8323 if !(left == uint32(0)) { 8324 goto __250 8325 } 8326 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 8327 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 8328 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 8329 if !((*struct { 8330 f func(*libc.TLS, uintptr, uintptr, uint32) int32 8331 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 8332 goto __251 8333 } 8334 ret = -5 8335 goto inf_leave 8336 __251: 8337 ; 8338 __250: 8339 ; 8340 goto __248 8341 __248: 8342 if 0 != 0 { 8343 goto __247 8344 } 8345 goto __249 8346 __249: 8347 ; 8348 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 8349 left-- 8350 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 8351 goto __5 8352 __246: 8353 ; 8354 8355 // process end of block 8356 if !(int32(here.Fop)&32 != 0) { 8357 goto __252 8358 } 8359 8360 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 8361 goto __5 8362 __252: 8363 ; 8364 8365 // invalid code 8366 if !(int32(here.Fop)&64 != 0) { 8367 goto __253 8368 } 8369 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 8370 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8371 goto __5 8372 __253: 8373 ; 8374 8375 // length code -- get extra bits, if any 8376 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 8377 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 8378 goto __254 8379 } 8380 __255: 8381 __258: 8382 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 8383 goto __259 8384 } 8385 __260: 8386 __263: 8387 if !(have == uint32(0)) { 8388 goto __266 8389 } 8390 have = (*struct { 8391 f func(*libc.TLS, uintptr, uintptr) uint32 8392 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8393 if !(have == uint32(0)) { 8394 goto __267 8395 } 8396 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8397 ret = -5 8398 goto inf_leave 8399 __267: 8400 ; 8401 __266: 8402 ; 8403 goto __264 8404 __264: 8405 if 0 != 0 { 8406 goto __263 8407 } 8408 goto __265 8409 __265: 8410 ; 8411 have-- 8412 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8413 bits = bits + uint32(8) 8414 goto __261 8415 __261: 8416 if 0 != 0 { 8417 goto __260 8418 } 8419 goto __262 8420 __262: 8421 ; 8422 goto __258 8423 __259: 8424 ; 8425 goto __256 8426 __256: 8427 if 0 != 0 { 8428 goto __255 8429 } 8430 goto __257 8431 __257: 8432 ; 8433 *(*uint32)(unsafe.Pointer(state + 80)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 8434 __268: 8435 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 8436 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 8437 goto __269 8438 __269: 8439 if 0 != 0 { 8440 goto __268 8441 } 8442 goto __270 8443 __270: 8444 ; 8445 __254: 8446 ; 8447 8448 // get distance code 8449 __271: 8450 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4)) 8451 if !(uint32(here.Fbits) <= bits) { 8452 goto __274 8453 } 8454 goto __273 8455 __274: 8456 ; 8457 __275: 8458 __278: 8459 if !(have == uint32(0)) { 8460 goto __281 8461 } 8462 have = (*struct { 8463 f func(*libc.TLS, uintptr, uintptr) uint32 8464 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8465 if !(have == uint32(0)) { 8466 goto __282 8467 } 8468 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8469 ret = -5 8470 goto inf_leave 8471 __282: 8472 ; 8473 __281: 8474 ; 8475 goto __279 8476 __279: 8477 if 0 != 0 { 8478 goto __278 8479 } 8480 goto __280 8481 __280: 8482 ; 8483 have-- 8484 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8485 bits = bits + uint32(8) 8486 goto __276 8487 __276: 8488 if 0 != 0 { 8489 goto __275 8490 } 8491 goto __277 8492 __277: 8493 ; 8494 goto __272 8495 __272: 8496 goto __271 8497 goto __273 8498 __273: 8499 ; 8500 if !(int32(here.Fop)&0xf0 == 0) { 8501 goto __283 8502 } 8503 last = here 8504 __284: 8505 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4)) 8506 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 8507 goto __287 8508 } 8509 goto __286 8510 __287: 8511 ; 8512 __288: 8513 __291: 8514 if !(have == uint32(0)) { 8515 goto __294 8516 } 8517 have = (*struct { 8518 f func(*libc.TLS, uintptr, uintptr) uint32 8519 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8520 if !(have == uint32(0)) { 8521 goto __295 8522 } 8523 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8524 ret = -5 8525 goto inf_leave 8526 __295: 8527 ; 8528 __294: 8529 ; 8530 goto __292 8531 __292: 8532 if 0 != 0 { 8533 goto __291 8534 } 8535 goto __293 8536 __293: 8537 ; 8538 have-- 8539 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8540 bits = bits + uint32(8) 8541 goto __289 8542 __289: 8543 if 0 != 0 { 8544 goto __288 8545 } 8546 goto __290 8547 __290: 8548 ; 8549 goto __285 8550 __285: 8551 goto __284 8552 goto __286 8553 __286: 8554 ; 8555 __296: 8556 hold >>= int32(last.Fbits) 8557 bits = bits - uint32(last.Fbits) 8558 goto __297 8559 __297: 8560 if 0 != 0 { 8561 goto __296 8562 } 8563 goto __298 8564 __298: 8565 ; 8566 __283: 8567 ; 8568 __299: 8569 hold >>= int32(here.Fbits) 8570 bits = bits - uint32(here.Fbits) 8571 goto __300 8572 __300: 8573 if 0 != 0 { 8574 goto __299 8575 } 8576 goto __301 8577 __301: 8578 ; 8579 if !(int32(here.Fop)&64 != 0) { 8580 goto __302 8581 } 8582 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 8583 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8584 goto __5 8585 __302: 8586 ; 8587 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 8588 8589 // get distance extra bits, if any 8590 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 8591 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 8592 goto __303 8593 } 8594 __304: 8595 __307: 8596 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 8597 goto __308 8598 } 8599 __309: 8600 __312: 8601 if !(have == uint32(0)) { 8602 goto __315 8603 } 8604 have = (*struct { 8605 f func(*libc.TLS, uintptr, uintptr) uint32 8606 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8607 if !(have == uint32(0)) { 8608 goto __316 8609 } 8610 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8611 ret = -5 8612 goto inf_leave 8613 __316: 8614 ; 8615 __315: 8616 ; 8617 goto __313 8618 __313: 8619 if 0 != 0 { 8620 goto __312 8621 } 8622 goto __314 8623 __314: 8624 ; 8625 have-- 8626 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8627 bits = bits + uint32(8) 8628 goto __310 8629 __310: 8630 if 0 != 0 { 8631 goto __309 8632 } 8633 goto __311 8634 __311: 8635 ; 8636 goto __307 8637 __308: 8638 ; 8639 goto __305 8640 __305: 8641 if 0 != 0 { 8642 goto __304 8643 } 8644 goto __306 8645 __306: 8646 ; 8647 *(*uint32)(unsafe.Pointer(state + 84)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 8648 __317: 8649 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 8650 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 8651 goto __318 8652 __318: 8653 if 0 != 0 { 8654 goto __317 8655 } 8656 goto __319 8657 __319: 8658 ; 8659 __303: 8660 ; 8661 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > (*Inflate_state)(unsafe.Pointer(state)).Fwsize-func() uint32 { 8662 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 8663 return left 8664 } 8665 return uint32(0) 8666 }()) { 8667 goto __320 8668 } 8669 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 8670 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8671 goto __5 8672 __320: 8673 ; 8674 8675 // copy match from window to output 8676 __321: 8677 __324: 8678 if !(left == uint32(0)) { 8679 goto __327 8680 } 8681 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 8682 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 8683 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 8684 if !((*struct { 8685 f func(*libc.TLS, uintptr, uintptr, uint32) int32 8686 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 8687 goto __328 8688 } 8689 ret = -5 8690 goto inf_leave 8691 __328: 8692 ; 8693 __327: 8694 ; 8695 goto __325 8696 __325: 8697 if 0 != 0 { 8698 goto __324 8699 } 8700 goto __326 8701 __326: 8702 ; 8703 copy = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset 8704 if !(copy < left) { 8705 goto __329 8706 } 8707 from = put + uintptr(copy) 8708 copy = left - copy 8709 goto __330 8710 __329: 8711 from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset) 8712 copy = left 8713 __330: 8714 ; 8715 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 8716 goto __331 8717 } 8718 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 8719 __331: 8720 ; 8721 *(*uint32)(unsafe.Pointer(state + 80)) -= copy 8722 left = left - copy 8723 __332: 8724 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 8725 goto __333 8726 __333: 8727 if libc.PreDecUint32(©, 1) != 0 { 8728 goto __332 8729 } 8730 goto __334 8731 __334: 8732 ; 8733 goto __322 8734 __322: 8735 if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { 8736 goto __321 8737 } 8738 goto __323 8739 __323: 8740 ; 8741 goto __5 8742 8743 __10: 8744 // inflate stream terminated properly -- write leftover output 8745 ret = Z_STREAM_END 8746 if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 8747 goto __335 8748 } 8749 if !((*struct { 8750 f func(*libc.TLS, uintptr, uintptr, uint32) int32 8751 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwsize-left) != 0) { 8752 goto __336 8753 } 8754 ret = -5 8755 __336: 8756 ; 8757 __335: 8758 ; 8759 goto inf_leave 8760 8761 __11: 8762 ret = -3 8763 goto inf_leave 8764 8765 __12: // can't happen, but makes compilers happy 8766 ret = -2 8767 goto inf_leave 8768 __5: 8769 ; 8770 goto __3 8771 __3: 8772 goto __2 8773 goto __4 8774 __4: 8775 ; 8776 8777 // Return unused input 8778 inf_leave: 8779 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 8780 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 8781 return ret 8782 } 8783 8784 var order = // permutation of code lengths 8785 [19]uint16{uint16(16), uint16(17), uint16(18), uint16(0), uint16(8), uint16(7), uint16(9), uint16(6), uint16(10), uint16(5), uint16(11), uint16(4), uint16(12), uint16(3), uint16(13), uint16(2), uint16(14), uint16(1), uint16(15)} /* infback.c:269:33 */ 8786 8787 func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */ 8788 if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 8789 return -2 8790 } 8791 (*struct { 8792 f func(*libc.TLS, Voidpf, Voidpf) 8793 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 8794 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 8795 8796 return Z_OK 8797 } 8798 8799 // 8800 // Decode literal, length, and distance codes and write out the resulting 8801 // literal and match bytes until either not enough input or output is 8802 // available, an end-of-block is encountered, or a data error is encountered. 8803 // When large enough input and output buffers are supplied to inflate(), for 8804 // example, a 16K input buffer and a 64K output buffer, more than 95% of the 8805 // inflate execution time is spent in this routine. 8806 // 8807 // Entry assumptions: 8808 // 8809 // state->mode == LEN 8810 // strm->avail_in >= 6 8811 // strm->avail_out >= 258 8812 // start >= strm->avail_out 8813 // state->bits < 8 8814 // 8815 // On return, state->mode is one of: 8816 // 8817 // LEN -- ran out of enough output space or enough available input 8818 // TYPE -- reached end of block code, inflate() to interpret next block 8819 // BAD -- error in block data 8820 // 8821 // Notes: 8822 // 8823 // - The maximum input bits used by a length/distance pair is 15 bits for the 8824 // length code, 5 bits for the length extra, 15 bits for the distance code, 8825 // and 13 bits for the distance extra. This totals 48 bits, or six bytes. 8826 // Therefore if strm->avail_in >= 6, then there is enough input to avoid 8827 // checking for available input while decoding. 8828 // 8829 // - The maximum bytes that a single length/distance pair can output is 258 8830 // bytes, which is the maximum length that can be coded. inflate_fast() 8831 // requires strm->avail_out >= 258 for each loop to avoid checking for 8832 // output space. 8833 // 8834 func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */ 8835 var state uintptr 8836 var in uintptr // local strm->next_in 8837 var last uintptr // have enough input while in < last 8838 var out uintptr // local strm->next_out 8839 var beg uintptr // inflate()'s initial strm->next_out 8840 var end uintptr // while out < end, enough space available 8841 var wsize uint32 // window size or zero if not using window 8842 var whave uint32 // valid bytes in the window 8843 var wnext uint32 // window write index 8844 var window uintptr // allocated sliding window, if wsize != 0 8845 var hold uint32 // local strm->hold 8846 var bits uint32 // local strm->bits 8847 var lcode uintptr // local strm->lencode 8848 var dcode uintptr // local strm->distcode 8849 var lmask uint32 // mask for first level of length codes 8850 var dmask uint32 // mask for first level of distance codes 8851 var here Code // retrieved table entry 8852 var op uint32 // code bits, operation, extra bits, or 8853 // window position, window bytes to copy 8854 var len uint32 // match length, unused bytes 8855 var dist uint32 // match distance 8856 var from uintptr // where to copy match from 8857 8858 // copy state to local variables 8859 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 8860 in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 8861 last = in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in-UInt(5)) 8862 out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 8863 beg = out - uintptr(start-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) 8864 end = out + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_out-UInt(257)) 8865 wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 8866 whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 8867 wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext 8868 window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 8869 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 8870 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 8871 lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode 8872 dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode 8873 lmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits - uint32(1) 8874 dmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits - uint32(1) 8875 8876 // decode literals and length/distances until end-of-block or not enough 8877 // input data or output space 8878 __1: 8879 if !(bits < uint32(15)) { 8880 goto __4 8881 } 8882 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8883 bits = bits + uint32(8) 8884 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8885 bits = bits + uint32(8) 8886 __4: 8887 ; 8888 here = *(*Code)(unsafe.Pointer(lcode + uintptr(hold&uint32(lmask))*4)) 8889 dolen: 8890 op = uint32(here.Fbits) 8891 hold >>= op 8892 bits = bits - op 8893 op = uint32(here.Fop) 8894 if !(op == uint32(0)) { 8895 goto __5 8896 } // literal 8897 8898 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval) 8899 goto __6 8900 __5: 8901 if !(op&uint32(16) != 0) { 8902 goto __7 8903 } // length base 8904 len = uint32(here.Fval) 8905 op = op & uint32(15) // number of extra bits 8906 if !(op != 0) { 8907 goto __9 8908 } 8909 if !(bits < op) { 8910 goto __10 8911 } 8912 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8913 bits = bits + uint32(8) 8914 __10: 8915 ; 8916 len = len + uint32(hold)&(uint32(1)<<op-uint32(1)) 8917 hold >>= op 8918 bits = bits - op 8919 __9: 8920 ; 8921 8922 if !(bits < uint32(15)) { 8923 goto __11 8924 } 8925 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8926 bits = bits + uint32(8) 8927 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8928 bits = bits + uint32(8) 8929 __11: 8930 ; 8931 here = *(*Code)(unsafe.Pointer(dcode + uintptr(hold&uint32(dmask))*4)) 8932 dodist: 8933 op = uint32(here.Fbits) 8934 hold >>= op 8935 bits = bits - op 8936 op = uint32(here.Fop) 8937 if !(op&uint32(16) != 0) { 8938 goto __12 8939 } // distance base 8940 dist = uint32(here.Fval) 8941 op = op & uint32(15) // number of extra bits 8942 if !(bits < op) { 8943 goto __14 8944 } 8945 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8946 bits = bits + uint32(8) 8947 if !(bits < op) { 8948 goto __15 8949 } 8950 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 8951 bits = bits + uint32(8) 8952 __15: 8953 ; 8954 __14: 8955 ; 8956 dist = dist + uint32(hold)&(uint32(1)<<op-uint32(1)) 8957 hold >>= op 8958 bits = bits - op 8959 8960 op = uint32((int64(out) - int64(beg)) / 1) // max distance in output 8961 if !(dist > op) { 8962 goto __16 8963 } // see if copy from window 8964 op = dist - op // distance back in window 8965 if !(op > whave) { 8966 goto __18 8967 } 8968 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 8969 goto __19 8970 } 8971 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 8972 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8973 goto __3 8974 __19: 8975 ; 8976 __18: 8977 ; 8978 from = window 8979 if !(wnext == uint32(0)) { 8980 goto __20 8981 } // very common case 8982 from += uintptr(wsize - op) 8983 if !(op < len) { 8984 goto __22 8985 } // some from window 8986 len = len - op 8987 __23: 8988 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 8989 goto __24 8990 __24: 8991 if libc.PreDecUint32(&op, 1) != 0 { 8992 goto __23 8993 } 8994 goto __25 8995 __25: 8996 ; 8997 from = out - uintptr(dist) // rest from output 8998 __22: 8999 ; 9000 goto __21 9001 __20: 9002 if !(wnext < op) { 9003 goto __26 9004 } // wrap around window 9005 from += uintptr(wsize + wnext - op) 9006 op = op - wnext 9007 if !(op < len) { 9008 goto __28 9009 } // some from end of window 9010 len = len - op 9011 __29: 9012 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9013 goto __30 9014 __30: 9015 if libc.PreDecUint32(&op, 1) != 0 { 9016 goto __29 9017 } 9018 goto __31 9019 __31: 9020 ; 9021 from = window 9022 if !(wnext < len) { 9023 goto __32 9024 } // some from start of window 9025 op = wnext 9026 len = len - op 9027 __33: 9028 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9029 goto __34 9030 __34: 9031 if libc.PreDecUint32(&op, 1) != 0 { 9032 goto __33 9033 } 9034 goto __35 9035 __35: 9036 ; 9037 from = out - uintptr(dist) // rest from output 9038 __32: 9039 ; 9040 __28: 9041 ; 9042 goto __27 9043 __26: // contiguous in window 9044 from += uintptr(wnext - op) 9045 if !(op < len) { 9046 goto __36 9047 } // some from window 9048 len = len - op 9049 __37: 9050 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9051 goto __38 9052 __38: 9053 if libc.PreDecUint32(&op, 1) != 0 { 9054 goto __37 9055 } 9056 goto __39 9057 __39: 9058 ; 9059 from = out - uintptr(dist) // rest from output 9060 __36: 9061 ; 9062 __27: 9063 ; 9064 __21: 9065 ; 9066 __40: 9067 if !(len > uint32(2)) { 9068 goto __41 9069 } 9070 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9071 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9072 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9073 len = len - uint32(3) 9074 goto __40 9075 __41: 9076 ; 9077 if !(len != 0) { 9078 goto __42 9079 } 9080 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9081 if !(len > uint32(1)) { 9082 goto __43 9083 } 9084 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9085 __43: 9086 ; 9087 __42: 9088 ; 9089 goto __17 9090 __16: 9091 from = out - uintptr(dist) // copy direct from output 9092 __44: // minimum length is three 9093 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9094 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9095 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9096 len = len - uint32(3) 9097 goto __45 9098 __45: 9099 if len > uint32(2) { 9100 goto __44 9101 } 9102 goto __46 9103 __46: 9104 ; 9105 if !(len != 0) { 9106 goto __47 9107 } 9108 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9109 if !(len > uint32(1)) { 9110 goto __48 9111 } 9112 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 9113 __48: 9114 ; 9115 __47: 9116 ; 9117 __17: 9118 ; 9119 goto __13 9120 __12: 9121 if !(op&uint32(64) == uint32(0)) { 9122 goto __49 9123 } // 2nd level distance code 9124 here = *(*Code)(unsafe.Pointer(dcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4)) 9125 goto dodist 9126 goto __50 9127 __49: 9128 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 9129 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9130 goto __3 9131 __50: 9132 ; 9133 __13: 9134 ; 9135 goto __8 9136 __7: 9137 if !(op&uint32(64) == uint32(0)) { 9138 goto __51 9139 } // 2nd level length code 9140 here = *(*Code)(unsafe.Pointer(lcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4)) 9141 goto dolen 9142 goto __52 9143 __51: 9144 if !(op&uint32(32) != 0) { 9145 goto __53 9146 } // end-of-block 9147 9148 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 9149 goto __3 9150 goto __54 9151 __53: 9152 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 9153 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9154 goto __3 9155 __54: 9156 ; 9157 __52: 9158 ; 9159 __8: 9160 ; 9161 __6: 9162 ; 9163 goto __2 9164 __2: 9165 if in < last && out < end { 9166 goto __1 9167 } 9168 goto __3 9169 __3: 9170 ; 9171 9172 // return unused bytes (on entry, bits < 8, so in won't go too far back) 9173 len = bits >> 3 9174 in -= uintptr(len) 9175 bits = bits - len<<3 9176 hold = hold & uint32(uint32(1)<<bits-uint32(1)) 9177 9178 // update state and return 9179 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in 9180 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out 9181 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 { 9182 if in < last { 9183 return uint32(int64(5) + (int64(last)-int64(in))/1) 9184 } 9185 return uint32(int64(5) - (int64(in)-int64(last))/1) 9186 }() 9187 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 { 9188 if out < end { 9189 return uint32(int64(257) + (int64(end)-int64(out))/1) 9190 } 9191 return uint32(int64(257) - (int64(out)-int64(end))/1) 9192 }() 9193 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 9194 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 9195 return 9196 } 9197 9198 // 9199 // inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): 9200 // - Using bit fields for code structure 9201 // - Different op definition to avoid & for extra bits (do & for table bits) 9202 // - Three separate decoding do-loops for direct, window, and wnext == 0 9203 // - Special case for distance > 1 copies to do overlapped load and store copy 9204 // - Explicit branch predictions (based on measured branch probabilities) 9205 // - Deferring match copy and interspersed it with decoding subsequent codes 9206 // - Swapping literal/length else 9207 // - Swapping window/direct else 9208 // - Larger unrolled copy loops (three is about right) 9209 // - Moving len -= 3 statement into middle of loop 9210 // 9211 9212 func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */ 9213 var state uintptr 9214 if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 9215 return 1 9216 } 9217 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9218 if state == uintptr(Z_NULL) || (*Inflate_state)(unsafe.Pointer(state)).Fstrm != strm || (*Inflate_state)(unsafe.Pointer(state)).Fmode < HEAD || (*Inflate_state)(unsafe.Pointer(state)).Fmode > SYNC { 9219 return 1 9220 } 9221 return 0 9222 } 9223 9224 func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */ 9225 var state uintptr 9226 9227 if inflateStateCheck(tls, strm) != 0 { 9228 return -2 9229 } 9230 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9231 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+28, libc.AssignPtrUint32(state+36, uint32(0))) 9232 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 9233 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite 9234 (*Z_stream)(unsafe.Pointer(strm)).Fadler = ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) 9235 } 9236 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD 9237 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 9238 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0 9239 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 9240 (*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL) 9241 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0) 9242 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 9243 (*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+104, libc.AssignPtrUintptr(state+136, state+1360 /* &.codes */)) 9244 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 9245 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 9246 9247 return Z_OK 9248 } 9249 9250 func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */ 9251 var state uintptr 9252 9253 if inflateStateCheck(tls, strm) != 0 { 9254 return -2 9255 } 9256 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9257 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) 9258 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 9259 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 9260 return XinflateResetKeep(tls, strm) 9261 } 9262 9263 func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */ 9264 var wrap int32 9265 var state uintptr 9266 9267 // get the state 9268 if inflateStateCheck(tls, strm) != 0 { 9269 return -2 9270 } 9271 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9272 9273 // extract wrap request from windowBits parameter 9274 if windowBits < 0 { 9275 wrap = 0 9276 windowBits = -windowBits 9277 } else { 9278 wrap = windowBits>>4 + 5 9279 if windowBits < 48 { 9280 windowBits = windowBits & 15 9281 } 9282 } 9283 9284 // set number of window bits, free window if different 9285 if windowBits != 0 && (windowBits < 8 || windowBits > 15) { 9286 return -2 9287 } 9288 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits) { 9289 (*struct { 9290 f func(*libc.TLS, Voidpf, Voidpf) 9291 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 9292 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 9293 } 9294 9295 // update state and reset the rest of it 9296 (*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap 9297 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits) 9298 return XinflateReset(tls, strm) 9299 } 9300 9301 func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */ 9302 var ret int32 9303 var state uintptr 9304 9305 if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) { 9306 return -6 9307 } 9308 if strm == uintptr(Z_NULL) { 9309 return -2 9310 } 9311 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 9312 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 9313 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 9314 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 9315 }{Xzcalloc})) 9316 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 9317 } 9318 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 9319 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 9320 f func(*libc.TLS, Voidpf, Voidpf) 9321 }{Xzcfree})) 9322 } 9323 state = (*struct { 9324 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 9325 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{}))) 9326 if state == uintptr(Z_NULL) { 9327 return -4 9328 } 9329 9330 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 9331 (*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm 9332 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 9333 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2() 9334 ret = XinflateReset2(tls, strm, windowBits) 9335 if ret != Z_OK { 9336 (*struct { 9337 f func(*libc.TLS, Voidpf, Voidpf) 9338 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state) 9339 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 9340 } 9341 return ret 9342 } 9343 9344 func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */ 9345 return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size) 9346 } 9347 9348 func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */ 9349 var state uintptr 9350 9351 if inflateStateCheck(tls, strm) != 0 { 9352 return -2 9353 } 9354 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9355 if bits < 0 { 9356 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0) 9357 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 9358 return Z_OK 9359 } 9360 if bits > 16 || (*Inflate_state)(unsafe.Pointer(state)).Fbits+UInt(bits) > uint32(32) { 9361 return -2 9362 } 9363 value = int32(int32(value) & (int32(1)<<bits - 1)) 9364 *(*uint32)(unsafe.Pointer(state + 72)) += uint32(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits) 9365 *(*uint32)(unsafe.Pointer(state + 76)) += UInt(bits) 9366 return Z_OK 9367 } 9368 9369 // 9370 // Return state with length and distance decoding tables and index sizes set to 9371 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 9372 // If BUILDFIXED is defined, then instead this routine builds the tables the 9373 // first time it's called, and returns those tables the first time and 9374 // thereafter. This reduces the size of the code by about 2K bytes, in 9375 // exchange for a little execution time. However, BUILDFIXED should not be 9376 // used for threaded applications, since the rewriting of the tables and virgin 9377 // may not be thread-safe. 9378 // 9379 func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */ 9380 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1)) 9381 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 9382 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1)) 9383 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 9384 } 9385 9386 var lenfix1 = [512]Code{ 9387 {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)}, {Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)}, 9388 {Fbits: uint8(9), Fval: uint16(192)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)}, {Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(160)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)}, 9389 {Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(224)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(144)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, 9390 {Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(208)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(176)}, 9391 {Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)}, {Fbits: uint8(9), Fval: uint16(240)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)}, 9392 {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)}, {Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(200)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)}, 9393 {Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(168)}, {Fbits: uint8(8), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(232)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, 9394 {Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(152)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(216)}, 9395 {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)}, {Fbits: uint8(9), Fval: uint16(184)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)}, 9396 {Fbits: uint8(9), Fval: uint16(248)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)}, {Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)}, 9397 {Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(196)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(164)}, {Fbits: uint8(8), Fval: uint16(2)}, 9398 {Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(228)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(148)}, 9399 {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)}, {Fbits: uint8(9), Fval: uint16(212)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)}, 9400 {Fbits: uint8(9), Fval: uint16(180)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)}, {Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(244)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)}, 9401 {Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(204)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, 9402 {Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(172)}, {Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(236)}, 9403 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)}, {Fbits: uint8(9), Fval: uint16(156)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)}, 9404 {Fbits: uint8(9), Fval: uint16(220)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)}, {Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(188)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)}, 9405 {Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(252)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, 9406 {Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(194)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(162)}, 9407 {Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)}, {Fbits: uint8(9), Fval: uint16(226)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)}, 9408 {Fbits: uint8(9), Fval: uint16(146)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)}, {Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(210)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)}, 9409 {Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(178)}, {Fbits: uint8(8), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(242)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, 9410 {Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(202)}, 9411 {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)}, {Fbits: uint8(9), Fval: uint16(170)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)}, 9412 {Fbits: uint8(9), Fval: uint16(234)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)}, {Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(154)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)}, 9413 {Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(218)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(186)}, {Fbits: uint8(8), Fval: uint16(13)}, 9414 {Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(250)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)}, 9415 {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)}, {Fbits: uint8(9), Fval: uint16(198)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)}, 9416 {Fbits: uint8(9), Fval: uint16(166)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)}, {Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(230)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)}, 9417 {Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(150)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(214)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, 9418 {Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(182)}, {Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(246)}, 9419 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)}, 9420 {Fbits: uint8(9), Fval: uint16(206)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)}, {Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(174)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)}, 9421 {Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(238)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(158)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, 9422 {Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(222)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(190)}, 9423 {Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)}, {Fbits: uint8(9), Fval: uint16(254)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)}, 9424 {Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)}, {Fbits: uint8(9), Fval: uint16(193)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)}, 9425 {Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(161)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)}, {Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(225)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, 9426 {Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(145)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(209)}, 9427 {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(177)}, {Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)}, 9428 {Fbits: uint8(9), Fval: uint16(241)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)}, 9429 {Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(201)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)}, {Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(169)}, {Fbits: uint8(8), Fval: uint16(4)}, 9430 {Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(233)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(153)}, 9431 {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(217)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)}, 9432 {Fbits: uint8(9), Fval: uint16(185)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)}, {Fbits: uint8(9), Fval: uint16(249)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)}, 9433 {Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)}, {Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(197)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, 9434 {Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(165)}, {Fbits: uint8(8), Fval: uint16(2)}, {Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(229)}, 9435 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(149)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)}, 9436 {Fbits: uint8(9), Fval: uint16(213)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)}, {Fbits: uint8(9), Fval: uint16(181)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)}, 9437 {Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(245)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)}, {Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, 9438 {Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(205)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(173)}, 9439 {Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(237)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)}, 9440 {Fbits: uint8(9), Fval: uint16(157)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)}, {Fbits: uint8(9), Fval: uint16(221)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)}, 9441 {Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(189)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)}, {Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(253)}, {Fop: uint8(96), Fbits: uint8(7)}, 9442 {Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(195)}, 9443 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(163)}, {Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)}, 9444 {Fbits: uint8(9), Fval: uint16(227)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)}, {Fbits: uint8(9), Fval: uint16(147)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)}, 9445 {Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(211)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)}, {Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(179)}, {Fbits: uint8(8), Fval: uint16(9)}, 9446 {Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(243)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)}, 9447 {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(203)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)}, 9448 {Fbits: uint8(9), Fval: uint16(171)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)}, {Fbits: uint8(9), Fval: uint16(235)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)}, 9449 {Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(155)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)}, {Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(219)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, 9450 {Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(187)}, {Fbits: uint8(8), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(251)}, 9451 {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)}, 9452 {Fbits: uint8(9), Fval: uint16(199)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)}, {Fbits: uint8(9), Fval: uint16(167)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)}, 9453 {Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(231)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)}, {Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(151)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, 9454 {Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(215)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(183)}, 9455 {Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(247)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)}, 9456 {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)}, {Fbits: uint8(9), Fval: uint16(207)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)}, 9457 {Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(175)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)}, {Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(239)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, 9458 {Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(159)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(223)}, 9459 {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(191)}, {Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)}, 9460 {Fbits: uint8(9), Fval: uint16(255)}, 9461 } /* inffixed.h:10:23 */ 9462 var distfix1 = [32]Code{ 9463 {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(1)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(257)}, {Fop: uint8(19), Fbits: uint8(5), Fval: uint16(17)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(4097)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(5)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1025)}, 9464 {Fop: uint8(21), Fbits: uint8(5), Fval: uint16(65)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(16385)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(3)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(513)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(33)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(8193)}, 9465 {Fop: uint8(18), Fbits: uint8(5), Fval: uint16(9)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(2049)}, {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(129)}, {Fop: uint8(64), Fbits: uint8(5)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(2)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(385)}, 9466 {Fop: uint8(19), Fbits: uint8(5), Fval: uint16(25)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(6145)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(7)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1537)}, {Fop: uint8(21), Fbits: uint8(5), Fval: uint16(97)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(24577)}, 9467 {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(4)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(769)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(49)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(12289)}, {Fop: uint8(18), Fbits: uint8(5), Fval: uint16(13)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(3073)}, 9468 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 9469 } /* inffixed.h:87:23 */ 9470 9471 // 9472 // Update the window with the last wsize (normally 32K) bytes written before 9473 // returning. If window does not exist yet, create it. This is only called 9474 // when a window is already in use, or when output has been written during this 9475 // inflate call, but the end of the deflate stream has not been reached yet. 9476 // It is also called to create a window for dictionary data when a dictionary 9477 // is loaded. 9478 // 9479 // Providing output buffers larger than 32K to inflate() should provide a speed 9480 // advantage, since only the last 32K of output is copied to the sliding window 9481 // upon return from inflate(), and since all distances after the first 32K of 9482 // output will fall in the output data, making match copies simpler and faster. 9483 // The advantage may be dependent on the size of the processor's data caches. 9484 // 9485 func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */ 9486 var state uintptr 9487 var dist uint32 9488 9489 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9490 9491 // if it hasn't been done already, allocate space for the window 9492 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 9493 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct { 9494 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 9495 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fwbits, uint32(unsafe.Sizeof(uint8(0)))) 9496 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 9497 return 1 9498 } 9499 } 9500 9501 // if window not in use yet, initialize 9502 if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) { 9503 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits 9504 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 9505 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 9506 } 9507 9508 // copy state->wsize or less output bytes into the circular window 9509 if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 9510 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize)) 9511 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 9512 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 9513 } else { 9514 dist = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext 9515 if dist > copy { 9516 dist = copy 9517 } 9518 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), end-uintptr(copy), uint64(dist)) 9519 copy = copy - dist 9520 if copy != 0 { 9521 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr(copy), uint64(copy)) 9522 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy 9523 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 9524 } else { 9525 *(*uint32)(unsafe.Pointer(state + 60)) += dist 9526 if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 9527 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 9528 } 9529 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 9530 *(*uint32)(unsafe.Pointer(state + 56)) += dist 9531 } 9532 } 9533 } 9534 return 0 9535 } 9536 9537 // Macros for inflate(): 9538 9539 // check function to use adler32() for zlib or crc32() for gzip 9540 9541 // check macros for header crc 9542 9543 // Load registers with state in inflate() for speed 9544 9545 // Restore state from registers in inflate() 9546 9547 // Clear the input bit accumulator 9548 9549 // Get a byte of input into the bit accumulator, or return from inflate() 9550 // if there is no input available. 9551 9552 // Assure that there are at least n bits in the bit accumulator. If there is 9553 // not enough available input to do that, then return from inflate(). 9554 9555 // Return the low n bits of the bit accumulator (n < 16) 9556 9557 // Remove n bits from the bit accumulator 9558 9559 // Remove zero to seven bits as needed to go to a byte boundary 9560 9561 // 9562 // inflate() uses a state machine to process as much input data and generate as 9563 // much output data as possible before returning. The state machine is 9564 // structured roughly as follows: 9565 // 9566 // for (;;) switch (state) { 9567 // ... 9568 // case STATEn: 9569 // if (not enough input data or output space to make progress) 9570 // return; 9571 // ... make progress ... 9572 // state = STATEm; 9573 // break; 9574 // ... 9575 // } 9576 // 9577 // so when inflate() is called again, the same case is attempted again, and 9578 // if the appropriate resources are provided, the machine proceeds to the 9579 // next state. The NEEDBITS() macro is usually the way the state evaluates 9580 // whether it can proceed or should return. NEEDBITS() does the return if 9581 // the requested bits are not available. The typical use of the BITS macros 9582 // is: 9583 // 9584 // NEEDBITS(n); 9585 // ... do something with BITS(n) ... 9586 // DROPBITS(n); 9587 // 9588 // where NEEDBITS(n) either returns from inflate() if there isn't enough 9589 // input left to load n bits into the accumulator, or it continues. BITS(n) 9590 // gives the low n bits in the accumulator. When done, DROPBITS(n) drops 9591 // the low n bits off the accumulator. INITBITS() clears the accumulator 9592 // and sets the number of available bits to zero. BYTEBITS() discards just 9593 // enough bits to put the accumulator on a byte boundary. After BYTEBITS() 9594 // and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. 9595 // 9596 // NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return 9597 // if there is no input available. The decoding of variable length codes uses 9598 // PULLBYTE() directly in order to pull just enough bytes to decode the next 9599 // code, and no more. 9600 // 9601 // Some states loop until they get enough input, making sure that enough 9602 // state information is maintained to continue the loop where it left off 9603 // if NEEDBITS() returns in the loop. For example, want, need, and keep 9604 // would all have to actually be part of the saved state in case NEEDBITS() 9605 // returns: 9606 // 9607 // case STATEw: 9608 // while (want < need) { 9609 // NEEDBITS(n); 9610 // keep[want++] = BITS(n); 9611 // DROPBITS(n); 9612 // } 9613 // state = STATEx; 9614 // case STATEx: 9615 // 9616 // As shown above, if the next state is also the next case, then the break 9617 // is omitted. 9618 // 9619 // A state may also return if there is not enough output space available to 9620 // complete that state. Those states are copying stored data, writing a 9621 // literal byte, and copying a matching string. 9622 // 9623 // When returning, a "goto inf_leave" is used to update the total counters, 9624 // update the check value, and determine whether any progress has been made 9625 // during that inflate() call in order to return the proper return code. 9626 // Progress is defined as a change in either strm->avail_in or strm->avail_out. 9627 // When there is a window, goto inf_leave will update the window with the last 9628 // output written. If a goto inf_leave occurs in the middle of decompression 9629 // and there is no window currently, goto inf_leave will create one and copy 9630 // output to the window for the next call of inflate(). 9631 // 9632 // In this implementation, the flush parameter of inflate() only affects the 9633 // return code (per zlib.h). inflate() always writes as much as possible to 9634 // strm->next_out, given the space available and the provided input--the effect 9635 // documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers 9636 // the allocation of and copying into a sliding window until necessary, which 9637 // provides the effect documented in zlib.h for Z_FINISH when the entire input 9638 // stream available. So the only thing the flush parameter actually does is: 9639 // when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it 9640 // will return Z_BUF_ERROR if it has not reached the end of the stream. 9641 // 9642 9643 func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */ 9644 bp := tls.Alloc(4) 9645 defer tls.Free(4) 9646 9647 var state uintptr 9648 var next uintptr // next input 9649 var put uintptr // next output 9650 var have uint32 9651 var left uint32 // available input and output 9652 var hold uint32 // bit buffer 9653 var bits uint32 // bits in bit buffer 9654 var in uint32 9655 var out uint32 // save starting available input and output 9656 var copy uint32 // number of stored or match bytes to copy 9657 var from uintptr // where to copy match bytes from 9658 var here Code // current decoding table entry 9659 var last Code // parent table entry 9660 var len uint32 // length to copy for repeats, bits to drop 9661 var ret int32 // return code 9662 // var hbuf [4]uint8 at bp, 4 9663 9664 if !(inflateStateCheck(tls, strm) != 0 || (*Z_stream)(unsafe.Pointer(strm)).Fnext_out == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fnext_in == uintptr(Z_NULL) && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) { 9665 goto __1 9666 } 9667 return -2 9668 __1: 9669 ; 9670 9671 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9672 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 9673 goto __2 9674 } 9675 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 9676 __2: 9677 ; // skip check 9678 __3: 9679 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 9680 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9681 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 9682 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9683 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 9684 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 9685 goto __4 9686 __4: 9687 if 0 != 0 { 9688 goto __3 9689 } 9690 goto __5 9691 __5: 9692 ; 9693 in = have 9694 out = left 9695 ret = Z_OK 9696 __6: 9697 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 9698 case HEAD: 9699 goto __10 9700 case FLAGS: 9701 goto __11 9702 case TIME: 9703 goto __12 9704 case OS: 9705 goto __13 9706 case EXLEN: 9707 goto __14 9708 case EXTRA: 9709 goto __15 9710 case NAME: 9711 goto __16 9712 case COMMENT: 9713 goto __17 9714 case HCRC: 9715 goto __18 9716 case DICTID: 9717 goto __19 9718 case DICT: 9719 goto __20 9720 case TYPE: 9721 goto __21 9722 case TYPEDO: 9723 goto __22 9724 case STORED: 9725 goto __23 9726 case COPY_: 9727 goto __24 9728 case COPY: 9729 goto __25 9730 case TABLE: 9731 goto __26 9732 case LENLENS: 9733 goto __27 9734 case CODELENS: 9735 goto __28 9736 case LEN_: 9737 goto __29 9738 case LEN: 9739 goto __30 9740 case LENEXT: 9741 goto __31 9742 case DIST: 9743 goto __32 9744 case DISTEXT: 9745 goto __33 9746 case MATCH: 9747 goto __34 9748 case LIT: 9749 goto __35 9750 case CHECK: 9751 goto __36 9752 case LENGTH: 9753 goto __37 9754 case DONE: 9755 goto __38 9756 case BAD: 9757 goto __39 9758 case MEM: 9759 goto __40 9760 case SYNC: 9761 goto __41 9762 default: 9763 goto __42 9764 } 9765 goto __9 9766 __10: 9767 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) { 9768 goto __43 9769 } 9770 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 9771 goto __9 9772 __43: 9773 ; 9774 __44: 9775 __47: 9776 if !(bits < uint32(16)) { 9777 goto __48 9778 } 9779 __49: 9780 if !(have == uint32(0)) { 9781 goto __52 9782 } 9783 goto inf_leave 9784 __52: 9785 ; 9786 have-- 9787 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 9788 bits = bits + uint32(8) 9789 goto __50 9790 __50: 9791 if 0 != 0 { 9792 goto __49 9793 } 9794 goto __51 9795 __51: 9796 ; 9797 goto __47 9798 __48: 9799 ; 9800 goto __45 9801 __45: 9802 if 0 != 0 { 9803 goto __44 9804 } 9805 goto __46 9806 __46: 9807 ; 9808 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 != 0 && hold == uint32(0x8b1f)) { 9809 goto __53 9810 } // gzip header 9811 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 9812 goto __54 9813 } 9814 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) 9815 __54: 9816 ; 9817 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 9818 __55: 9819 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 9820 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 9821 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 9822 goto __56 9823 __56: 9824 if 0 != 0 { 9825 goto __55 9826 } 9827 goto __57 9828 __57: 9829 ; 9830 __58: 9831 hold = uint32(0) 9832 bits = uint32(0) 9833 goto __59 9834 __59: 9835 if 0 != 0 { 9836 goto __58 9837 } 9838 goto __60 9839 __60: 9840 ; 9841 (*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS 9842 goto __9 9843 __53: 9844 ; 9845 (*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header 9846 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 9847 goto __61 9848 } 9849 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1 9850 __61: 9851 ; 9852 if !(!((*Inflate_state)(unsafe.Pointer(state)).Fwrap&1 != 0) || (uint32(uint32(hold)&(uint32(1)<<8-uint32(1))<<8)+hold>>8)%uint32(31) != 0) { 9853 goto __62 9854 } 9855 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */ 9856 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9857 goto __9 9858 __62: 9859 ; 9860 if !(uint32(hold)&(uint32(1)<<4-uint32(1)) != uint32(Z_DEFLATED)) { 9861 goto __63 9862 } 9863 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 9864 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9865 goto __9 9866 __63: 9867 ; 9868 __64: 9869 hold >>= 4 9870 bits = bits - uint32(4) 9871 goto __65 9872 __65: 9873 if 0 != 0 { 9874 goto __64 9875 } 9876 goto __66 9877 __66: 9878 ; 9879 len = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(8) 9880 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 9881 goto __67 9882 } 9883 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = len 9884 __67: 9885 ; 9886 if !(len > uint32(15) || len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits) { 9887 goto __68 9888 } 9889 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */ 9890 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9891 goto __9 9892 __68: 9893 ; 9894 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = uint32(1) << len 9895 9896 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))) 9897 (*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 { 9898 if hold&uint32(0x200) != 0 { 9899 return DICTID 9900 } 9901 return TYPE 9902 }() 9903 __69: 9904 hold = uint32(0) 9905 bits = uint32(0) 9906 goto __70 9907 __70: 9908 if 0 != 0 { 9909 goto __69 9910 } 9911 goto __71 9912 __71: 9913 ; 9914 goto __9 9915 __11: 9916 __72: 9917 __75: 9918 if !(bits < uint32(16)) { 9919 goto __76 9920 } 9921 __77: 9922 if !(have == uint32(0)) { 9923 goto __80 9924 } 9925 goto inf_leave 9926 __80: 9927 ; 9928 have-- 9929 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 9930 bits = bits + uint32(8) 9931 goto __78 9932 __78: 9933 if 0 != 0 { 9934 goto __77 9935 } 9936 goto __79 9937 __79: 9938 ; 9939 goto __75 9940 __76: 9941 ; 9942 goto __73 9943 __73: 9944 if 0 != 0 { 9945 goto __72 9946 } 9947 goto __74 9948 __74: 9949 ; 9950 (*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold) 9951 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xff != Z_DEFLATED) { 9952 goto __81 9953 } 9954 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 9955 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9956 goto __9 9957 __81: 9958 ; 9959 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xe000 != 0) { 9960 goto __82 9961 } 9962 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */ 9963 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9964 goto __9 9965 __82: 9966 ; 9967 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 9968 goto __83 9969 } 9970 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = int32(hold >> 8 & uint32(1)) 9971 __83: 9972 ; 9973 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 9974 goto __84 9975 } 9976 __85: 9977 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 9978 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 9979 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 9980 goto __86 9981 __86: 9982 if 0 != 0 { 9983 goto __85 9984 } 9985 goto __87 9986 __87: 9987 ; 9988 __84: 9989 ; 9990 __88: 9991 hold = uint32(0) 9992 bits = uint32(0) 9993 goto __89 9994 __89: 9995 if 0 != 0 { 9996 goto __88 9997 } 9998 goto __90 9999 __90: 10000 ; 10001 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME 10002 __12: 10003 __91: 10004 __94: 10005 if !(bits < uint32(32)) { 10006 goto __95 10007 } 10008 __96: 10009 if !(have == uint32(0)) { 10010 goto __99 10011 } 10012 goto inf_leave 10013 __99: 10014 ; 10015 have-- 10016 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10017 bits = bits + uint32(8) 10018 goto __97 10019 __97: 10020 if 0 != 0 { 10021 goto __96 10022 } 10023 goto __98 10024 __98: 10025 ; 10026 goto __94 10027 __95: 10028 ; 10029 goto __92 10030 __92: 10031 if 0 != 0 { 10032 goto __91 10033 } 10034 goto __93 10035 __93: 10036 ; 10037 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10038 goto __100 10039 } 10040 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold 10041 __100: 10042 ; 10043 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 10044 goto __101 10045 } 10046 __102: 10047 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 10048 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 10049 *(*uint8)(unsafe.Pointer(bp + 2)) = uint8(hold >> 16) 10050 *(*uint8)(unsafe.Pointer(bp + 3)) = uint8(hold >> 24) 10051 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(4)) 10052 goto __103 10053 __103: 10054 if 0 != 0 { 10055 goto __102 10056 } 10057 goto __104 10058 __104: 10059 ; 10060 __101: 10061 ; 10062 __105: 10063 hold = uint32(0) 10064 bits = uint32(0) 10065 goto __106 10066 __106: 10067 if 0 != 0 { 10068 goto __105 10069 } 10070 goto __107 10071 __107: 10072 ; 10073 (*Inflate_state)(unsafe.Pointer(state)).Fmode = OS 10074 __13: 10075 __108: 10076 __111: 10077 if !(bits < uint32(16)) { 10078 goto __112 10079 } 10080 __113: 10081 if !(have == uint32(0)) { 10082 goto __116 10083 } 10084 goto inf_leave 10085 __116: 10086 ; 10087 have-- 10088 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10089 bits = bits + uint32(8) 10090 goto __114 10091 __114: 10092 if 0 != 0 { 10093 goto __113 10094 } 10095 goto __115 10096 __115: 10097 ; 10098 goto __111 10099 __112: 10100 ; 10101 goto __109 10102 __109: 10103 if 0 != 0 { 10104 goto __108 10105 } 10106 goto __110 10107 __110: 10108 ; 10109 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10110 goto __117 10111 } 10112 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = int32(hold & uint32(0xff)) 10113 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = int32(hold >> 8) 10114 __117: 10115 ; 10116 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 10117 goto __118 10118 } 10119 __119: 10120 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 10121 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 10122 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 10123 goto __120 10124 __120: 10125 if 0 != 0 { 10126 goto __119 10127 } 10128 goto __121 10129 __121: 10130 ; 10131 __118: 10132 ; 10133 __122: 10134 hold = uint32(0) 10135 bits = uint32(0) 10136 goto __123 10137 __123: 10138 if 0 != 0 { 10139 goto __122 10140 } 10141 goto __124 10142 __124: 10143 ; 10144 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN 10145 __14: 10146 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) { 10147 goto __125 10148 } 10149 __127: 10150 __130: 10151 if !(bits < uint32(16)) { 10152 goto __131 10153 } 10154 __132: 10155 if !(have == uint32(0)) { 10156 goto __135 10157 } 10158 goto inf_leave 10159 __135: 10160 ; 10161 have-- 10162 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10163 bits = bits + uint32(8) 10164 goto __133 10165 __133: 10166 if 0 != 0 { 10167 goto __132 10168 } 10169 goto __134 10170 __134: 10171 ; 10172 goto __130 10173 __131: 10174 ; 10175 goto __128 10176 __128: 10177 if 0 != 0 { 10178 goto __127 10179 } 10180 goto __129 10181 __129: 10182 ; 10183 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) 10184 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10185 goto __136 10186 } 10187 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) 10188 __136: 10189 ; 10190 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 10191 goto __137 10192 } 10193 __138: 10194 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 10195 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 10196 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 10197 goto __139 10198 __139: 10199 if 0 != 0 { 10200 goto __138 10201 } 10202 goto __140 10203 __140: 10204 ; 10205 __137: 10206 ; 10207 __141: 10208 hold = uint32(0) 10209 bits = uint32(0) 10210 goto __142 10211 __142: 10212 if 0 != 0 { 10213 goto __141 10214 } 10215 goto __143 10216 __143: 10217 ; 10218 goto __126 10219 __125: 10220 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10221 goto __144 10222 } 10223 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL) 10224 __144: 10225 ; 10226 __126: 10227 ; 10228 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA 10229 __15: 10230 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) { 10231 goto __145 10232 } 10233 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 10234 if !(copy > have) { 10235 goto __146 10236 } 10237 copy = have 10238 __146: 10239 ; 10240 if !(copy != 0) { 10241 goto __147 10242 } 10243 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL)) { 10244 goto __148 10245 } 10246 len = (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength 10247 libc.Xmemcpy(tls, (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra+uintptr(len), next, 10248 func() uint64 { 10249 if len+copy > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { 10250 return uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len) 10251 } 10252 return uint64(copy) 10253 }()) 10254 __148: 10255 ; 10256 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 10257 goto __149 10258 } 10259 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 10260 __149: 10261 ; 10262 have = have - copy 10263 next += uintptr(copy) 10264 *(*uint32)(unsafe.Pointer(state + 80)) -= copy 10265 __147: 10266 ; 10267 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) { 10268 goto __150 10269 } 10270 goto inf_leave 10271 __150: 10272 ; 10273 __145: 10274 ; 10275 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 10276 (*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME 10277 __16: 10278 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0800 != 0) { 10279 goto __151 10280 } 10281 if !(have == uint32(0)) { 10282 goto __153 10283 } 10284 goto inf_leave 10285 __153: 10286 ; 10287 copy = uint32(0) 10288 __154: 10289 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 10290 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Flength < (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname_max) { 10291 goto __157 10292 } 10293 *(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Flength, 1)))) = Bytef(len) 10294 __157: 10295 ; 10296 goto __155 10297 __155: 10298 if len != 0 && copy < have { 10299 goto __154 10300 } 10301 goto __156 10302 __156: 10303 ; 10304 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 10305 goto __158 10306 } 10307 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 10308 __158: 10309 ; 10310 have = have - copy 10311 next += uintptr(copy) 10312 if !(len != 0) { 10313 goto __159 10314 } 10315 goto inf_leave 10316 __159: 10317 ; 10318 goto __152 10319 __151: 10320 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10321 goto __160 10322 } 10323 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL) 10324 __160: 10325 ; 10326 __152: 10327 ; 10328 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 10329 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT 10330 __17: 10331 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x1000 != 0) { 10332 goto __161 10333 } 10334 if !(have == uint32(0)) { 10335 goto __163 10336 } 10337 goto inf_leave 10338 __163: 10339 ; 10340 copy = uint32(0) 10341 __164: 10342 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 10343 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Flength < (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomm_max) { 10344 goto __167 10345 } 10346 *(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Flength, 1)))) = Bytef(len) 10347 __167: 10348 ; 10349 goto __165 10350 __165: 10351 if len != 0 && copy < have { 10352 goto __164 10353 } 10354 goto __166 10355 __166: 10356 ; 10357 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 10358 goto __168 10359 } 10360 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 10361 __168: 10362 ; 10363 have = have - copy 10364 next += uintptr(copy) 10365 if !(len != 0) { 10366 goto __169 10367 } 10368 goto inf_leave 10369 __169: 10370 ; 10371 goto __162 10372 __161: 10373 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10374 goto __170 10375 } 10376 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL) 10377 __170: 10378 ; 10379 __162: 10380 ; 10381 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC 10382 __18: 10383 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0) { 10384 goto __171 10385 } 10386 __172: 10387 __175: 10388 if !(bits < uint32(16)) { 10389 goto __176 10390 } 10391 __177: 10392 if !(have == uint32(0)) { 10393 goto __180 10394 } 10395 goto inf_leave 10396 __180: 10397 ; 10398 have-- 10399 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10400 bits = bits + uint32(8) 10401 goto __178 10402 __178: 10403 if 0 != 0 { 10404 goto __177 10405 } 10406 goto __179 10407 __179: 10408 ; 10409 goto __175 10410 __176: 10411 ; 10412 goto __173 10413 __173: 10414 if 0 != 0 { 10415 goto __172 10416 } 10417 goto __174 10418 __174: 10419 ; 10420 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && hold != (*Inflate_state)(unsafe.Pointer(state)).Fcheck&uint32(0xffff)) { 10421 goto __181 10422 } 10423 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */ 10424 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10425 goto __9 10426 __181: 10427 ; 10428 __182: 10429 hold = uint32(0) 10430 bits = uint32(0) 10431 goto __183 10432 __183: 10433 if 0 != 0 { 10434 goto __182 10435 } 10436 goto __184 10437 __184: 10438 ; 10439 __171: 10440 ; 10441 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 10442 goto __185 10443 } 10444 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9 & 1 10445 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1 10446 __185: 10447 ; 10448 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))) 10449 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10450 goto __9 10451 __19: 10452 __186: 10453 __189: 10454 if !(bits < uint32(32)) { 10455 goto __190 10456 } 10457 __191: 10458 if !(have == uint32(0)) { 10459 goto __194 10460 } 10461 goto inf_leave 10462 __194: 10463 ; 10464 have-- 10465 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10466 bits = bits + uint32(8) 10467 goto __192 10468 __192: 10469 if 0 != 0 { 10470 goto __191 10471 } 10472 goto __193 10473 __193: 10474 ; 10475 goto __189 10476 __190: 10477 ; 10478 goto __187 10479 __187: 10480 if 0 != 0 { 10481 goto __186 10482 } 10483 goto __188 10484 __188: 10485 ; 10486 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, hold>>24&uint32(0xff)+hold>>8&uint32(0xff00)+hold&uint32(0xff00)<<8+hold&uint32(0xff)<<24) 10487 __195: 10488 hold = uint32(0) 10489 bits = uint32(0) 10490 goto __196 10491 __196: 10492 if 0 != 0 { 10493 goto __195 10494 } 10495 goto __197 10496 __197: 10497 ; 10498 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT 10499 __20: 10500 if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) { 10501 goto __198 10502 } 10503 __199: 10504 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 10505 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 10506 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 10507 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 10508 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 10509 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 10510 goto __200 10511 __200: 10512 if 0 != 0 { 10513 goto __199 10514 } 10515 goto __201 10516 __201: 10517 ; 10518 return Z_NEED_DICT 10519 __198: 10520 ; 10521 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))) 10522 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10523 __21: 10524 if !(flush == Z_BLOCK || flush == Z_TREES) { 10525 goto __202 10526 } 10527 goto inf_leave 10528 __202: 10529 ; 10530 __22: 10531 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 10532 goto __203 10533 } 10534 __204: 10535 hold >>= bits & uint32(7) 10536 bits = bits - bits&uint32(7) 10537 goto __205 10538 __205: 10539 if 0 != 0 { 10540 goto __204 10541 } 10542 goto __206 10543 __206: 10544 ; 10545 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK 10546 goto __9 10547 __203: 10548 ; 10549 __207: 10550 __210: 10551 if !(bits < uint32(3)) { 10552 goto __211 10553 } 10554 __212: 10555 if !(have == uint32(0)) { 10556 goto __215 10557 } 10558 goto inf_leave 10559 __215: 10560 ; 10561 have-- 10562 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10563 bits = bits + uint32(8) 10564 goto __213 10565 __213: 10566 if 0 != 0 { 10567 goto __212 10568 } 10569 goto __214 10570 __214: 10571 ; 10572 goto __210 10573 __211: 10574 ; 10575 goto __208 10576 __208: 10577 if 0 != 0 { 10578 goto __207 10579 } 10580 goto __209 10581 __209: 10582 ; 10583 (*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1))) 10584 __216: 10585 hold >>= 1 10586 bits = bits - uint32(1) 10587 goto __217 10588 __217: 10589 if 0 != 0 { 10590 goto __216 10591 } 10592 goto __218 10593 __218: 10594 ; 10595 switch uint32(hold) & (uint32(1)<<2 - uint32(1)) { 10596 case uint32(0): 10597 goto __220 10598 case uint32(1): 10599 goto __221 10600 case uint32(2): 10601 goto __222 10602 case uint32(3): 10603 goto __223 10604 } 10605 goto __219 10606 __220: // stored block 10607 ; 10608 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 10609 goto __219 10610 __221: // fixed block 10611 fixedtables1(tls, state) 10612 10613 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes 10614 if !(flush == Z_TREES) { 10615 goto __224 10616 } 10617 __225: 10618 hold >>= 2 10619 bits = bits - uint32(2) 10620 goto __226 10621 __226: 10622 if 0 != 0 { 10623 goto __225 10624 } 10625 goto __227 10626 __227: 10627 ; 10628 goto inf_leave 10629 __224: 10630 ; 10631 goto __219 10632 __222: // dynamic block 10633 ; 10634 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 10635 goto __219 10636 __223: 10637 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 10638 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10639 __219: 10640 ; 10641 __228: 10642 hold >>= 2 10643 bits = bits - uint32(2) 10644 goto __229 10645 __229: 10646 if 0 != 0 { 10647 goto __228 10648 } 10649 goto __230 10650 __230: 10651 ; 10652 goto __9 10653 __23: 10654 __231: 10655 hold >>= bits & uint32(7) 10656 bits = bits - bits&uint32(7) 10657 goto __232 10658 __232: 10659 if 0 != 0 { 10660 goto __231 10661 } 10662 goto __233 10663 __233: 10664 ; // go to byte boundary 10665 __234: 10666 __237: 10667 if !(bits < uint32(32)) { 10668 goto __238 10669 } 10670 __239: 10671 if !(have == uint32(0)) { 10672 goto __242 10673 } 10674 goto inf_leave 10675 __242: 10676 ; 10677 have-- 10678 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10679 bits = bits + uint32(8) 10680 goto __240 10681 __240: 10682 if 0 != 0 { 10683 goto __239 10684 } 10685 goto __241 10686 __241: 10687 ; 10688 goto __237 10689 __238: 10690 ; 10691 goto __235 10692 __235: 10693 if 0 != 0 { 10694 goto __234 10695 } 10696 goto __236 10697 __236: 10698 ; 10699 if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) { 10700 goto __243 10701 } 10702 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 10703 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10704 goto __9 10705 __243: 10706 ; 10707 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff) 10708 10709 __244: 10710 hold = uint32(0) 10711 bits = uint32(0) 10712 goto __245 10713 __245: 10714 if 0 != 0 { 10715 goto __244 10716 } 10717 goto __246 10718 __246: 10719 ; 10720 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_ 10721 if !(flush == Z_TREES) { 10722 goto __247 10723 } 10724 goto inf_leave 10725 __247: 10726 ; 10727 __24: 10728 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY 10729 __25: 10730 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 10731 if !(copy != 0) { 10732 goto __248 10733 } 10734 if !(copy > have) { 10735 goto __249 10736 } 10737 copy = have 10738 __249: 10739 ; 10740 if !(copy > left) { 10741 goto __250 10742 } 10743 copy = left 10744 __250: 10745 ; 10746 if !(copy == uint32(0)) { 10747 goto __251 10748 } 10749 goto inf_leave 10750 __251: 10751 ; 10752 libc.Xmemcpy(tls, put, next, uint64(copy)) 10753 have = have - copy 10754 next += uintptr(copy) 10755 left = left - copy 10756 put += uintptr(copy) 10757 *(*uint32)(unsafe.Pointer(state + 80)) -= copy 10758 goto __9 10759 __248: 10760 ; 10761 10762 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10763 goto __9 10764 __26: 10765 __252: 10766 __255: 10767 if !(bits < uint32(14)) { 10768 goto __256 10769 } 10770 __257: 10771 if !(have == uint32(0)) { 10772 goto __260 10773 } 10774 goto inf_leave 10775 __260: 10776 ; 10777 have-- 10778 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10779 bits = bits + uint32(8) 10780 goto __258 10781 __258: 10782 if 0 != 0 { 10783 goto __257 10784 } 10785 goto __259 10786 __259: 10787 ; 10788 goto __255 10789 __256: 10790 ; 10791 goto __253 10792 __253: 10793 if 0 != 0 { 10794 goto __252 10795 } 10796 goto __254 10797 __254: 10798 ; 10799 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257) 10800 __261: 10801 hold >>= 5 10802 bits = bits - uint32(5) 10803 goto __262 10804 __262: 10805 if 0 != 0 { 10806 goto __261 10807 } 10808 goto __263 10809 __263: 10810 ; 10811 (*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1) 10812 __264: 10813 hold >>= 5 10814 bits = bits - uint32(5) 10815 goto __265 10816 __265: 10817 if 0 != 0 { 10818 goto __264 10819 } 10820 goto __266 10821 __266: 10822 ; 10823 (*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4) 10824 __267: 10825 hold >>= 4 10826 bits = bits - uint32(4) 10827 goto __268 10828 __268: 10829 if 0 != 0 { 10830 goto __267 10831 } 10832 goto __269 10833 __269: 10834 ; 10835 if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) { 10836 goto __270 10837 } 10838 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 10839 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10840 goto __9 10841 __270: 10842 ; 10843 10844 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 10845 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS 10846 __27: 10847 __271: 10848 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 10849 goto __272 10850 } 10851 __273: 10852 __276: 10853 if !(bits < uint32(3)) { 10854 goto __277 10855 } 10856 __278: 10857 if !(have == uint32(0)) { 10858 goto __281 10859 } 10860 goto inf_leave 10861 __281: 10862 ; 10863 have-- 10864 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10865 bits = bits + uint32(8) 10866 goto __279 10867 __279: 10868 if 0 != 0 { 10869 goto __278 10870 } 10871 goto __280 10872 __280: 10873 ; 10874 goto __276 10875 __277: 10876 ; 10877 goto __274 10878 __274: 10879 if 0 != 0 { 10880 goto __273 10881 } 10882 goto __275 10883 __275: 10884 ; 10885 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1))) 10886 __282: 10887 hold >>= 3 10888 bits = bits - uint32(3) 10889 goto __283 10890 __283: 10891 if 0 != 0 { 10892 goto __282 10893 } 10894 goto __284 10895 __284: 10896 ; 10897 goto __271 10898 __272: 10899 ; 10900 __285: 10901 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 10902 goto __286 10903 } 10904 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 10905 goto __285 10906 __286: 10907 ; 10908 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */ 10909 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 10910 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 10911 ret = Xinflate_table(tls, CODES, state+144, uint32(19), state+136, 10912 state+112, state+784) 10913 if !(ret != 0) { 10914 goto __287 10915 } 10916 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 10917 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10918 goto __9 10919 __287: 10920 ; 10921 10922 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 10923 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS 10924 __28: 10925 __288: 10926 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 10927 goto __289 10928 } 10929 __290: 10930 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 10931 if !(uint32(here.Fbits) <= bits) { 10932 goto __293 10933 } 10934 goto __292 10935 __293: 10936 ; 10937 __294: 10938 if !(have == uint32(0)) { 10939 goto __297 10940 } 10941 goto inf_leave 10942 __297: 10943 ; 10944 have-- 10945 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10946 bits = bits + uint32(8) 10947 goto __295 10948 __295: 10949 if 0 != 0 { 10950 goto __294 10951 } 10952 goto __296 10953 __296: 10954 ; 10955 goto __291 10956 __291: 10957 goto __290 10958 goto __292 10959 __292: 10960 ; 10961 if !(int32(here.Fval) < 16) { 10962 goto __298 10963 } 10964 __300: 10965 hold >>= int32(here.Fbits) 10966 bits = bits - uint32(here.Fbits) 10967 goto __301 10968 __301: 10969 if 0 != 0 { 10970 goto __300 10971 } 10972 goto __302 10973 __302: 10974 ; 10975 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 10976 goto __299 10977 __298: 10978 if !(int32(here.Fval) == 16) { 10979 goto __303 10980 } 10981 __305: 10982 __308: 10983 if !(bits < uint32(int32(here.Fbits)+2)) { 10984 goto __309 10985 } 10986 __310: 10987 if !(have == uint32(0)) { 10988 goto __313 10989 } 10990 goto inf_leave 10991 __313: 10992 ; 10993 have-- 10994 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 10995 bits = bits + uint32(8) 10996 goto __311 10997 __311: 10998 if 0 != 0 { 10999 goto __310 11000 } 11001 goto __312 11002 __312: 11003 ; 11004 goto __308 11005 __309: 11006 ; 11007 goto __306 11008 __306: 11009 if 0 != 0 { 11010 goto __305 11011 } 11012 goto __307 11013 __307: 11014 ; 11015 __314: 11016 hold >>= int32(here.Fbits) 11017 bits = bits - uint32(here.Fbits) 11018 goto __315 11019 __315: 11020 if 0 != 0 { 11021 goto __314 11022 } 11023 goto __316 11024 __316: 11025 ; 11026 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 11027 goto __317 11028 } 11029 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11030 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11031 goto __289 11032 __317: 11033 ; 11034 len = uint32(*(*uint16)(unsafe.Pointer(state + 144 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2))) 11035 copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1)) 11036 __318: 11037 hold >>= 2 11038 bits = bits - uint32(2) 11039 goto __319 11040 __319: 11041 if 0 != 0 { 11042 goto __318 11043 } 11044 goto __320 11045 __320: 11046 ; 11047 goto __304 11048 __303: 11049 if !(int32(here.Fval) == 17) { 11050 goto __321 11051 } 11052 __323: 11053 __326: 11054 if !(bits < uint32(int32(here.Fbits)+3)) { 11055 goto __327 11056 } 11057 __328: 11058 if !(have == uint32(0)) { 11059 goto __331 11060 } 11061 goto inf_leave 11062 __331: 11063 ; 11064 have-- 11065 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11066 bits = bits + uint32(8) 11067 goto __329 11068 __329: 11069 if 0 != 0 { 11070 goto __328 11071 } 11072 goto __330 11073 __330: 11074 ; 11075 goto __326 11076 __327: 11077 ; 11078 goto __324 11079 __324: 11080 if 0 != 0 { 11081 goto __323 11082 } 11083 goto __325 11084 __325: 11085 ; 11086 __332: 11087 hold >>= int32(here.Fbits) 11088 bits = bits - uint32(here.Fbits) 11089 goto __333 11090 __333: 11091 if 0 != 0 { 11092 goto __332 11093 } 11094 goto __334 11095 __334: 11096 ; 11097 len = uint32(0) 11098 copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1)) 11099 __335: 11100 hold >>= 3 11101 bits = bits - uint32(3) 11102 goto __336 11103 __336: 11104 if 0 != 0 { 11105 goto __335 11106 } 11107 goto __337 11108 __337: 11109 ; 11110 goto __322 11111 __321: 11112 __338: 11113 __341: 11114 if !(bits < uint32(int32(here.Fbits)+7)) { 11115 goto __342 11116 } 11117 __343: 11118 if !(have == uint32(0)) { 11119 goto __346 11120 } 11121 goto inf_leave 11122 __346: 11123 ; 11124 have-- 11125 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11126 bits = bits + uint32(8) 11127 goto __344 11128 __344: 11129 if 0 != 0 { 11130 goto __343 11131 } 11132 goto __345 11133 __345: 11134 ; 11135 goto __341 11136 __342: 11137 ; 11138 goto __339 11139 __339: 11140 if 0 != 0 { 11141 goto __338 11142 } 11143 goto __340 11144 __340: 11145 ; 11146 __347: 11147 hold >>= int32(here.Fbits) 11148 bits = bits - uint32(here.Fbits) 11149 goto __348 11150 __348: 11151 if 0 != 0 { 11152 goto __347 11153 } 11154 goto __349 11155 __349: 11156 ; 11157 len = uint32(0) 11158 copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1)) 11159 __350: 11160 hold >>= 7 11161 bits = bits - uint32(7) 11162 goto __351 11163 __351: 11164 if 0 != 0 { 11165 goto __350 11166 } 11167 goto __352 11168 __352: 11169 ; 11170 __322: 11171 ; 11172 __304: 11173 ; 11174 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 11175 goto __353 11176 } 11177 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11178 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11179 goto __289 11180 __353: 11181 ; 11182 __354: 11183 if !(libc.PostDecUint32(©, 1) != 0) { 11184 goto __355 11185 } 11186 *(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 11187 goto __354 11188 __355: 11189 ; 11190 __299: 11191 ; 11192 goto __288 11193 __289: 11194 ; 11195 11196 // handle error breaks in while 11197 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 11198 goto __356 11199 } 11200 goto __9 11201 __356: 11202 ; 11203 11204 // check for end-of-block code (better have one) 11205 if !(int32(*(*uint16)(unsafe.Pointer(state + 144 + 256*2))) == 0) { 11206 goto __357 11207 } 11208 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 11209 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11210 goto __9 11211 __357: 11212 ; 11213 11214 // build code tables -- note: do not change the lenbits or distbits 11215 // values here (9 and 6) without reading the comments in inftrees.h 11216 // concerning the ENOUGH constants, which depend on those values 11217 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */ 11218 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11219 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 11220 ret = Xinflate_table(tls, LENS, state+144, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+136, 11221 state+112, state+784) 11222 if !(ret != 0) { 11223 goto __358 11224 } 11225 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 11226 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11227 goto __9 11228 __358: 11229 ; 11230 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11231 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 11232 ret = Xinflate_table(tls, DISTS, state+144+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist, 11233 state+136, state+116, state+784) 11234 if !(ret != 0) { 11235 goto __359 11236 } 11237 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 11238 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11239 goto __9 11240 __359: 11241 ; 11242 11243 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ 11244 if !(flush == Z_TREES) { 11245 goto __360 11246 } 11247 goto inf_leave 11248 __360: 11249 ; 11250 __29: 11251 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11252 __30: 11253 if !(have >= uint32(6) && left >= uint32(258)) { 11254 goto __361 11255 } 11256 __362: 11257 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 11258 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 11259 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 11260 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 11261 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11262 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11263 goto __363 11264 __363: 11265 if 0 != 0 { 11266 goto __362 11267 } 11268 goto __364 11269 __364: 11270 ; 11271 Xinflate_fast(tls, strm, out) 11272 __365: 11273 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11274 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11275 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11276 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11277 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11278 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11279 goto __366 11280 __366: 11281 if 0 != 0 { 11282 goto __365 11283 } 11284 goto __367 11285 __367: 11286 ; 11287 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 11288 goto __368 11289 } 11290 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 11291 __368: 11292 ; 11293 goto __9 11294 __361: 11295 ; 11296 (*Inflate_state)(unsafe.Pointer(state)).Fback = 0 11297 __369: 11298 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 11299 if !(uint32(here.Fbits) <= bits) { 11300 goto __372 11301 } 11302 goto __371 11303 __372: 11304 ; 11305 __373: 11306 if !(have == uint32(0)) { 11307 goto __376 11308 } 11309 goto inf_leave 11310 __376: 11311 ; 11312 have-- 11313 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11314 bits = bits + uint32(8) 11315 goto __374 11316 __374: 11317 if 0 != 0 { 11318 goto __373 11319 } 11320 goto __375 11321 __375: 11322 ; 11323 goto __370 11324 __370: 11325 goto __369 11326 goto __371 11327 __371: 11328 ; 11329 if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) { 11330 goto __377 11331 } 11332 last = here 11333 __378: 11334 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4)) 11335 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 11336 goto __381 11337 } 11338 goto __380 11339 __381: 11340 ; 11341 __382: 11342 if !(have == uint32(0)) { 11343 goto __385 11344 } 11345 goto inf_leave 11346 __385: 11347 ; 11348 have-- 11349 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11350 bits = bits + uint32(8) 11351 goto __383 11352 __383: 11353 if 0 != 0 { 11354 goto __382 11355 } 11356 goto __384 11357 __384: 11358 ; 11359 goto __379 11360 __379: 11361 goto __378 11362 goto __380 11363 __380: 11364 ; 11365 __386: 11366 hold >>= int32(last.Fbits) 11367 bits = bits - uint32(last.Fbits) 11368 goto __387 11369 __387: 11370 if 0 != 0 { 11371 goto __386 11372 } 11373 goto __388 11374 __388: 11375 ; 11376 *(*int32)(unsafe.Pointer(state + 7140)) += int32(last.Fbits) 11377 __377: 11378 ; 11379 __389: 11380 hold >>= int32(here.Fbits) 11381 bits = bits - uint32(here.Fbits) 11382 goto __390 11383 __390: 11384 if 0 != 0 { 11385 goto __389 11386 } 11387 goto __391 11388 __391: 11389 ; 11390 *(*int32)(unsafe.Pointer(state + 7140)) += int32(here.Fbits) 11391 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 11392 if !(int32(here.Fop) == 0) { 11393 goto __392 11394 } 11395 11396 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT 11397 goto __9 11398 __392: 11399 ; 11400 if !(int32(here.Fop)&32 != 0) { 11401 goto __393 11402 } 11403 11404 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 11405 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11406 goto __9 11407 __393: 11408 ; 11409 if !(int32(here.Fop)&64 != 0) { 11410 goto __394 11411 } 11412 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 11413 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11414 goto __9 11415 __394: 11416 ; 11417 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 11418 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT 11419 __31: 11420 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 11421 goto __395 11422 } 11423 __396: 11424 __399: 11425 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 11426 goto __400 11427 } 11428 __401: 11429 if !(have == uint32(0)) { 11430 goto __404 11431 } 11432 goto inf_leave 11433 __404: 11434 ; 11435 have-- 11436 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11437 bits = bits + uint32(8) 11438 goto __402 11439 __402: 11440 if 0 != 0 { 11441 goto __401 11442 } 11443 goto __403 11444 __403: 11445 ; 11446 goto __399 11447 __400: 11448 ; 11449 goto __397 11450 __397: 11451 if 0 != 0 { 11452 goto __396 11453 } 11454 goto __398 11455 __398: 11456 ; 11457 *(*uint32)(unsafe.Pointer(state + 80)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 11458 __405: 11459 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 11460 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 11461 goto __406 11462 __406: 11463 if 0 != 0 { 11464 goto __405 11465 } 11466 goto __407 11467 __407: 11468 ; 11469 *(*int32)(unsafe.Pointer(state + 7140)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra) 11470 __395: 11471 ; 11472 11473 (*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength 11474 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST 11475 __32: 11476 __408: 11477 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4)) 11478 if !(uint32(here.Fbits) <= bits) { 11479 goto __411 11480 } 11481 goto __410 11482 __411: 11483 ; 11484 __412: 11485 if !(have == uint32(0)) { 11486 goto __415 11487 } 11488 goto inf_leave 11489 __415: 11490 ; 11491 have-- 11492 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11493 bits = bits + uint32(8) 11494 goto __413 11495 __413: 11496 if 0 != 0 { 11497 goto __412 11498 } 11499 goto __414 11500 __414: 11501 ; 11502 goto __409 11503 __409: 11504 goto __408 11505 goto __410 11506 __410: 11507 ; 11508 if !(int32(here.Fop)&0xf0 == 0) { 11509 goto __416 11510 } 11511 last = here 11512 __417: 11513 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4)) 11514 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 11515 goto __420 11516 } 11517 goto __419 11518 __420: 11519 ; 11520 __421: 11521 if !(have == uint32(0)) { 11522 goto __424 11523 } 11524 goto inf_leave 11525 __424: 11526 ; 11527 have-- 11528 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11529 bits = bits + uint32(8) 11530 goto __422 11531 __422: 11532 if 0 != 0 { 11533 goto __421 11534 } 11535 goto __423 11536 __423: 11537 ; 11538 goto __418 11539 __418: 11540 goto __417 11541 goto __419 11542 __419: 11543 ; 11544 __425: 11545 hold >>= int32(last.Fbits) 11546 bits = bits - uint32(last.Fbits) 11547 goto __426 11548 __426: 11549 if 0 != 0 { 11550 goto __425 11551 } 11552 goto __427 11553 __427: 11554 ; 11555 *(*int32)(unsafe.Pointer(state + 7140)) += int32(last.Fbits) 11556 __416: 11557 ; 11558 __428: 11559 hold >>= int32(here.Fbits) 11560 bits = bits - uint32(here.Fbits) 11561 goto __429 11562 __429: 11563 if 0 != 0 { 11564 goto __428 11565 } 11566 goto __430 11567 __430: 11568 ; 11569 *(*int32)(unsafe.Pointer(state + 7140)) += int32(here.Fbits) 11570 if !(int32(here.Fop)&64 != 0) { 11571 goto __431 11572 } 11573 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 11574 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11575 goto __9 11576 __431: 11577 ; 11578 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 11579 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 11580 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT 11581 __33: 11582 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 11583 goto __432 11584 } 11585 __433: 11586 __436: 11587 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 11588 goto __437 11589 } 11590 __438: 11591 if !(have == uint32(0)) { 11592 goto __441 11593 } 11594 goto inf_leave 11595 __441: 11596 ; 11597 have-- 11598 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11599 bits = bits + uint32(8) 11600 goto __439 11601 __439: 11602 if 0 != 0 { 11603 goto __438 11604 } 11605 goto __440 11606 __440: 11607 ; 11608 goto __436 11609 __437: 11610 ; 11611 goto __434 11612 __434: 11613 if 0 != 0 { 11614 goto __433 11615 } 11616 goto __435 11617 __435: 11618 ; 11619 *(*uint32)(unsafe.Pointer(state + 84)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 11620 __442: 11621 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 11622 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 11623 goto __443 11624 __443: 11625 if 0 != 0 { 11626 goto __442 11627 } 11628 goto __444 11629 __444: 11630 ; 11631 *(*int32)(unsafe.Pointer(state + 7140)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra) 11632 __432: 11633 ; 11634 11635 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH 11636 __34: 11637 if !(left == uint32(0)) { 11638 goto __445 11639 } 11640 goto inf_leave 11641 __445: 11642 ; 11643 copy = out - left 11644 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) { 11645 goto __446 11646 } // copy from window 11647 copy = (*Inflate_state)(unsafe.Pointer(state)).Foffset - copy 11648 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) { 11649 goto __448 11650 } 11651 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 11652 goto __449 11653 } 11654 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 11655 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11656 goto __9 11657 __449: 11658 ; 11659 __448: 11660 ; 11661 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) { 11662 goto __450 11663 } 11664 copy = copy - (*Inflate_state)(unsafe.Pointer(state)).Fwnext 11665 from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize-copy) 11666 goto __451 11667 __450: 11668 from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext-copy) 11669 __451: 11670 ; 11671 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 11672 goto __452 11673 } 11674 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 11675 __452: 11676 ; 11677 goto __447 11678 __446: // copy from output 11679 from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset) 11680 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 11681 __447: 11682 ; 11683 if !(copy > left) { 11684 goto __453 11685 } 11686 copy = left 11687 __453: 11688 ; 11689 left = left - copy 11690 *(*uint32)(unsafe.Pointer(state + 80)) -= copy 11691 __454: 11692 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11693 goto __455 11694 __455: 11695 if libc.PreDecUint32(©, 1) != 0 { 11696 goto __454 11697 } 11698 goto __456 11699 __456: 11700 ; 11701 if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) { 11702 goto __457 11703 } 11704 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11705 __457: 11706 ; 11707 goto __9 11708 __35: 11709 if !(left == uint32(0)) { 11710 goto __458 11711 } 11712 goto inf_leave 11713 __458: 11714 ; 11715 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 11716 left-- 11717 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11718 goto __9 11719 __36: 11720 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) { 11721 goto __459 11722 } 11723 __460: 11724 __463: 11725 if !(bits < uint32(32)) { 11726 goto __464 11727 } 11728 __465: 11729 if !(have == uint32(0)) { 11730 goto __468 11731 } 11732 goto inf_leave 11733 __468: 11734 ; 11735 have-- 11736 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11737 bits = bits + uint32(8) 11738 goto __466 11739 __466: 11740 if 0 != 0 { 11741 goto __465 11742 } 11743 goto __467 11744 __467: 11745 ; 11746 goto __463 11747 __464: 11748 ; 11749 goto __461 11750 __461: 11751 if 0 != 0 { 11752 goto __460 11753 } 11754 goto __462 11755 __462: 11756 ; 11757 out = out - left 11758 *(*ULong)(unsafe.Pointer(strm + 28)) += ULong(out) 11759 *(*uint32)(unsafe.Pointer(state + 36)) += uint32(out) 11760 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) { 11761 goto __469 11762 } 11763 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, func() uint32 { 11764 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 11765 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out) 11766 } 11767 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out) 11768 }()) 11769 __469: 11770 ; 11771 out = left 11772 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && func() uint32 { 11773 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 11774 return hold 11775 } 11776 return hold>>24&uint32(0xff) + hold>>8&uint32(0xff00) + hold&uint32(0xff00)<<8 + hold&uint32(0xff)<<24 11777 }() != (*Inflate_state)(unsafe.Pointer(state)).Fcheck) { 11778 goto __470 11779 } 11780 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */ 11781 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11782 goto __9 11783 __470: 11784 ; 11785 __471: 11786 hold = uint32(0) 11787 bits = uint32(0) 11788 goto __472 11789 __472: 11790 if 0 != 0 { 11791 goto __471 11792 } 11793 goto __473 11794 __473: 11795 ; 11796 11797 __459: 11798 ; 11799 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH 11800 __37: 11801 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0) { 11802 goto __474 11803 } 11804 __475: 11805 __478: 11806 if !(bits < uint32(32)) { 11807 goto __479 11808 } 11809 __480: 11810 if !(have == uint32(0)) { 11811 goto __483 11812 } 11813 goto inf_leave 11814 __483: 11815 ; 11816 have-- 11817 hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11818 bits = bits + uint32(8) 11819 goto __481 11820 __481: 11821 if 0 != 0 { 11822 goto __480 11823 } 11824 goto __482 11825 __482: 11826 ; 11827 goto __478 11828 __479: 11829 ; 11830 goto __476 11831 __476: 11832 if 0 != 0 { 11833 goto __475 11834 } 11835 goto __477 11836 __477: 11837 ; 11838 if !(hold != (*Inflate_state)(unsafe.Pointer(state)).Ftotal&0xffffffff) { 11839 goto __484 11840 } 11841 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */ 11842 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11843 goto __9 11844 __484: 11845 ; 11846 __485: 11847 hold = uint32(0) 11848 bits = uint32(0) 11849 goto __486 11850 __486: 11851 if 0 != 0 { 11852 goto __485 11853 } 11854 goto __487 11855 __487: 11856 ; 11857 11858 __474: 11859 ; 11860 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 11861 __38: 11862 ret = Z_STREAM_END 11863 goto inf_leave 11864 __39: 11865 ret = -3 11866 goto inf_leave 11867 __40: 11868 return -4 11869 __41: 11870 __42: 11871 return -2 11872 __9: 11873 ; 11874 goto __7 11875 __7: 11876 goto __6 11877 goto __8 11878 __8: 11879 ; 11880 11881 // 11882 // Return from inflate(), updating the total counts and the check value. 11883 // If there was no progress during the inflate() call, return a buffer 11884 // error. Call updatewindow() to create and/or update the window state. 11885 // Note: a memory error from inflate() is non-recoverable. 11886 // 11887 inf_leave: 11888 __488: 11889 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 11890 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 11891 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 11892 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 11893 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11894 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11895 goto __489 11896 __489: 11897 if 0 != 0 { 11898 goto __488 11899 } 11900 goto __490 11901 __490: 11902 ; 11903 if !((*Inflate_state)(unsafe.Pointer(state)).Fwsize != 0 || out != (*Z_stream)(unsafe.Pointer(strm)).Favail_out && (*Inflate_state)(unsafe.Pointer(state)).Fmode < BAD && ((*Inflate_state)(unsafe.Pointer(state)).Fmode < CHECK || flush != Z_FINISH)) { 11904 goto __491 11905 } 11906 if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) != 0) { 11907 goto __492 11908 } 11909 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 11910 return -4 11911 __492: 11912 ; 11913 __491: 11914 ; 11915 in = in - (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11916 out = out - (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11917 *(*ULong)(unsafe.Pointer(strm + 12)) += ULong(in) 11918 *(*ULong)(unsafe.Pointer(strm + 28)) += ULong(out) 11919 *(*uint32)(unsafe.Pointer(state + 36)) += uint32(out) 11920 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) { 11921 goto __493 11922 } 11923 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, func() uint32 { 11924 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 11925 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out) 11926 } 11927 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out) 11928 }()) 11929 __493: 11930 ; 11931 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + func() int32 { 11932 if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 { 11933 return 64 11934 } 11935 return 0 11936 }() + func() int32 { 11937 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE { 11938 return 128 11939 } 11940 return 0 11941 }() + func() int32 { 11942 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_ || (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_ { 11943 return 256 11944 } 11945 return 0 11946 }() 11947 if !((in == uint32(0) && out == uint32(0) || flush == Z_FINISH) && ret == Z_OK) { 11948 goto __494 11949 } 11950 ret = -5 11951 __494: 11952 ; 11953 return ret 11954 } 11955 11956 var order1 = // permutation of code lengths 11957 [19]uint16{uint16(16), uint16(17), uint16(18), uint16(0), uint16(8), uint16(7), uint16(9), uint16(6), uint16(10), uint16(5), uint16(11), uint16(4), uint16(12), uint16(3), uint16(13), uint16(2), uint16(14), uint16(1), uint16(15)} /* inflate.c:642:33 */ 11958 11959 func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */ 11960 var state uintptr 11961 if inflateStateCheck(tls, strm) != 0 { 11962 return -2 11963 } 11964 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11965 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 11966 (*struct { 11967 f func(*libc.TLS, Voidpf, Voidpf) 11968 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 11969 } 11970 (*struct { 11971 f func(*libc.TLS, Voidpf, Voidpf) 11972 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 11973 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 11974 11975 return Z_OK 11976 } 11977 11978 func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */ 11979 var state uintptr 11980 11981 // check state 11982 if inflateStateCheck(tls, strm) != 0 { 11983 return -2 11984 } 11985 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11986 11987 // copy dictionary 11988 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0 && dictionary != uintptr(Z_NULL) { 11989 libc.Xmemcpy(tls, dictionary, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), 11990 uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave-(*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 11991 libc.Xmemcpy(tls, dictionary+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), 11992 (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 11993 } 11994 if dictLength != uintptr(Z_NULL) { 11995 *(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 11996 } 11997 return Z_OK 11998 } 11999 12000 func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */ 12001 var state uintptr 12002 var dictid uint32 12003 var ret int32 12004 12005 // check state 12006 if inflateStateCheck(tls, strm) != 0 { 12007 return -2 12008 } 12009 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12010 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT { 12011 return -2 12012 } 12013 12014 // check for correct dictionary identifier 12015 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT { 12016 dictid = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 12017 dictid = Xadler32(tls, dictid, dictionary, dictLength) 12018 if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck { 12019 return -3 12020 } 12021 } 12022 12023 // copy dictionary to window using updatewindow(), which will amend the 12024 // existing dictionary if appropriate 12025 ret = updatewindow(tls, strm, dictionary+uintptr(dictLength), dictLength) 12026 if ret != 0 { 12027 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 12028 return -4 12029 } 12030 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1 12031 12032 return Z_OK 12033 } 12034 12035 func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */ 12036 var state uintptr 12037 12038 // check state 12039 if inflateStateCheck(tls, strm) != 0 { 12040 return -2 12041 } 12042 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12043 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 == 0 { 12044 return -2 12045 } 12046 12047 // save header structure 12048 (*Inflate_state)(unsafe.Pointer(state)).Fhead = head 12049 (*Gz_header)(unsafe.Pointer(head)).Fdone = 0 12050 return Z_OK 12051 } 12052 12053 // 12054 // Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found 12055 // or when out of input. When called, *have is the number of pattern bytes 12056 // found in order so far, in 0..3. On return *have is updated to the new 12057 // state. If on return *have equals four, then the pattern was found and the 12058 // return value is how many bytes were read including the last byte of the 12059 // pattern. If *have is less than four, then the pattern has not been found 12060 // yet and the return value is len. In the latter case, syncsearch() can be 12061 // called again with more data and the *have state. *have is initialized to 12062 // zero for the first call. 12063 // 12064 func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */ 12065 var got uint32 12066 var next uint32 12067 12068 got = *(*uint32)(unsafe.Pointer(have)) 12069 next = uint32(0) 12070 for next < len && got < uint32(4) { 12071 if int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next)))) == func() int32 { 12072 if got < uint32(2) { 12073 return 0 12074 } 12075 return 0xff 12076 }() { 12077 got++ 12078 } else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 { 12079 got = uint32(0) 12080 } else { 12081 got = uint32(4) - got 12082 } 12083 next++ 12084 } 12085 *(*uint32)(unsafe.Pointer(have)) = got 12086 return next 12087 } 12088 12089 func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */ 12090 bp := tls.Alloc(4) 12091 defer tls.Free(4) 12092 12093 var len uint32 // number of bytes to look at or looked at 12094 var in uint32 12095 var out uint32 // temporary to save total_in and total_out 12096 // var buf [4]uint8 at bp, 4 12097 // to restore bit buffer to byte string 12098 var state uintptr 12099 12100 // check parameters 12101 if inflateStateCheck(tls, strm) != 0 { 12102 return -2 12103 } 12104 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12105 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && (*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8) { 12106 return -5 12107 } 12108 12109 // if first time, start search in bit buffer 12110 if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC { 12111 (*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC 12112 libc.AssignShlPtrUint32(state+72, int((*Inflate_state)(unsafe.Pointer(state)).Fbits&uint32(7))) 12113 *(*uint32)(unsafe.Pointer(state + 76)) -= (*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7) 12114 len = uint32(0) 12115 for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { 12116 *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold) 12117 libc.AssignShrPtrUint32(state+72, int(8)) 12118 *(*uint32)(unsafe.Pointer(state + 76)) -= uint32(8) 12119 } 12120 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 12121 syncsearch(tls, state+132, bp, len) 12122 } 12123 12124 // search available input 12125 len = syncsearch(tls, state+132, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 12126 *(*UInt)(unsafe.Pointer(strm + 8)) -= len 12127 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(len) 12128 *(*ULong)(unsafe.Pointer(strm + 12)) += ULong(len) 12129 12130 // return no joy or set up to restart inflate() on a new block 12131 if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { 12132 return -3 12133 } 12134 in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in 12135 out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out 12136 XinflateReset(tls, strm) 12137 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in 12138 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out 12139 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12140 return Z_OK 12141 } 12142 12143 // 12144 // Returns true if inflate is currently at the end of a block generated by 12145 // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP 12146 // implementation to provide an additional safety check. PPP uses 12147 // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored 12148 // block. When decompressing, PPP checks that at the end of input packet, 12149 // inflate is waiting for these length bytes. 12150 // 12151 func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */ 12152 var state uintptr 12153 12154 if inflateStateCheck(tls, strm) != 0 { 12155 return -2 12156 } 12157 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12158 return libc.Bool32((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED && (*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)) 12159 } 12160 12161 func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */ 12162 var state uintptr 12163 var copy uintptr 12164 var window uintptr 12165 var wsize uint32 12166 12167 // check input 12168 if inflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) { 12169 return -2 12170 } 12171 state = (*Z_stream)(unsafe.Pointer(source)).Fstate 12172 12173 // allocate space 12174 copy = (*struct { 12175 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 12176 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{}))) 12177 if copy == uintptr(Z_NULL) { 12178 return -4 12179 } 12180 window = uintptr(Z_NULL) 12181 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 12182 window = (*struct { 12183 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 12184 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fwbits, uint32(unsafe.Sizeof(uint8(0)))) 12185 if window == uintptr(Z_NULL) { 12186 (*struct { 12187 f func(*libc.TLS, Voidpf, Voidpf) 12188 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy) 12189 return -4 12190 } 12191 } 12192 12193 // copy state 12194 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 12195 libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{}))) 12196 (*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest 12197 if (*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1360 && (*Inflate_state)(unsafe.Pointer(state)).Flencode <= state+1360+uintptr(ENOUGH_LENS+ENOUGH_DISTS)*4-uintptr(1)*4 { 12198 (*Inflate_state)(unsafe.Pointer(copy)).Flencode = copy + 1360 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1360))/4))*4 12199 (*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = copy + 1360 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1360))/4))*4 12200 } 12201 (*Inflate_state)(unsafe.Pointer(copy)).Fnext = copy + 1360 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1360))/4))*4 12202 if window != uintptr(Z_NULL) { 12203 wsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits 12204 libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize)) 12205 } 12206 (*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window 12207 (*Z_stream)(unsafe.Pointer(dest)).Fstate = copy 12208 return Z_OK 12209 } 12210 12211 func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */ 12212 var state uintptr 12213 12214 if inflateStateCheck(tls, strm) != 0 { 12215 return -2 12216 } 12217 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12218 _ = subvert 12219 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 12220 return -3 12221 } 12222 12223 func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */ 12224 var state uintptr 12225 12226 if inflateStateCheck(tls, strm) != 0 { 12227 return -2 12228 } 12229 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12230 if check != 0 { 12231 *(*int32)(unsafe.Pointer(state + 16)) |= 4 12232 } else { 12233 *(*int32)(unsafe.Pointer(state + 16)) &= libc.CplInt32(4) 12234 } 12235 return Z_OK 12236 } 12237 12238 func XinflateMark(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1541:14: */ 12239 var state uintptr 12240 12241 if inflateStateCheck(tls, strm) != 0 { 12242 return -(int32(1) << 16) 12243 } 12244 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12245 return int32(uint32(int32(uint32(int32((*Inflate_state)(unsafe.Pointer(state)).Fback))<<16)) + func() uint32 { 12246 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY { 12247 return uint32((*Inflate_state)(unsafe.Pointer(state)).Flength) 12248 } 12249 return func() uint32 { 12250 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH { 12251 return uint32((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength) 12252 } 12253 return uint32(0) 12254 }() 12255 }()) 12256 } 12257 12258 func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint32 { /* inflate.c:1554:23: */ 12259 var state uintptr 12260 if inflateStateCheck(tls, strm) != 0 { 12261 return libc.Uint32(libc.Uint32FromInt32(-1)) 12262 } 12263 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12264 return uint32(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1360)) / 4)) 12265 } 12266 12267 var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828)) /* inftrees.c:11:12 */ 12268 12269 // 12270 // If you use the zlib library in a product, an acknowledgment is welcome 12271 // in the documentation of your product. If for some reason you cannot 12272 // include such an acknowledgment, I would appreciate that you keep this 12273 // copyright string in the executable of your product. 12274 // 12275 12276 // 12277 // Build a set of tables to decode the provided canonical Huffman code. 12278 // The code lengths are lens[0..codes-1]. The result starts at *table, 12279 // whose indices are 0..2^bits-1. work is a writable array of at least 12280 // lens shorts, which is used as a work area. type is the type of code 12281 // to be generated, CODES, LENS, or DISTS. On return, zero is success, 12282 // -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 12283 // on return points to the next available entry's address. bits is the 12284 // requested root table index bits, and on return it is the actual root 12285 // table index bits. It will differ if the request is greater than the 12286 // longest code or if it is less than the shortest code. 12287 // 12288 func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */ 12289 bp := tls.Alloc(64) 12290 defer tls.Free(64) 12291 12292 var len uint32 // a code's length in bits 12293 var sym uint32 // index of code symbols 12294 var min uint32 12295 var max uint32 // minimum and maximum code lengths 12296 var root uint32 // number of index bits for root table 12297 var curr uint32 // number of index bits for current table 12298 var drop uint32 // code bits to drop for sub-table 12299 var left int32 // number of prefix codes available 12300 var used uint32 // code entries in table used 12301 var huff uint32 // Huffman code 12302 var incr uint32 // for incrementing code, index 12303 var fill uint32 // index for replicating entries 12304 var low uint32 // low bits for current root entry 12305 var mask uint32 // mask for low root bits 12306 var here Code // table entry for duplication 12307 var next uintptr // next available space in table 12308 var base uintptr // base value table to use 12309 var extra uintptr // extra bits table to use 12310 var match uint32 // use base and extra for symbol >= match 12311 // var count [16]uint16 at bp, 32 12312 // number of codes of each length 12313 // var offs [16]uint16 at bp+32, 32 12314 12315 // 12316 // Process a set of code lengths to create a canonical Huffman code. The 12317 // code lengths are lens[0..codes-1]. Each length corresponds to the 12318 // symbols 0..codes-1. The Huffman code is generated by first sorting the 12319 // symbols by length from short to long, and retaining the symbol order 12320 // for codes with equal lengths. Then the code starts with all zero bits 12321 // for the first code of the shortest length, and the codes are integer 12322 // increments for the same length, and zeros are appended as the length 12323 // increases. For the deflate format, these bits are stored backwards 12324 // from their more natural integer increment ordering, and so when the 12325 // decoding tables are built in the large loop below, the integer codes 12326 // are incremented backwards. 12327 // 12328 // This routine assumes, but does not check, that all of the entries in 12329 // lens[] are in the range 0..MAXBITS. The caller must assure this. 12330 // 1..MAXBITS is interpreted as that code length. zero means that that 12331 // symbol does not occur in this code. 12332 // 12333 // The codes are sorted by computing a count of codes for each length, 12334 // creating from that a table of starting indices for each length in the 12335 // sorted table, and then entering the symbols in order in the sorted 12336 // table. The sorted table is work[], with that space being provided by 12337 // the caller. 12338 // 12339 // The length counts are used for other purposes as well, i.e. finding 12340 // the minimum and maximum length codes, determining if there are any 12341 // codes at all, checking for a valid set of lengths, and looking ahead 12342 // at length counts to determine sub-table sizes when building the 12343 // decoding tables. 12344 // 12345 12346 // accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) 12347 for len = uint32(0); len <= uint32(MAXBITS); len++ { 12348 *(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)) = uint16(0) 12349 } 12350 for sym = uint32(0); sym < codes; sym++ { 12351 *(*uint16)(unsafe.Pointer(bp + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++ 12352 } 12353 12354 // bound code lengths, force root to be within code lengths 12355 root = *(*uint32)(unsafe.Pointer(bits)) 12356 for max = uint32(MAXBITS); max >= uint32(1); max-- { 12357 if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(max)*2))) != 0 { 12358 break 12359 } 12360 } 12361 if root > max { 12362 root = max 12363 } 12364 if max == uint32(0) { // no symbols to code at all 12365 here.Fop = uint8(64) // invalid code marker 12366 here.Fbits = uint8(1) 12367 here.Fval = uint16(0) 12368 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here // make a table to force an error 12369 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here 12370 *(*uint32)(unsafe.Pointer(bits)) = uint32(1) 12371 return 0 // no symbols, but wait for decoding to report error 12372 } 12373 for min = uint32(1); min < max; min++ { 12374 if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(min)*2))) != 0 { 12375 break 12376 } 12377 } 12378 if root < min { 12379 root = min 12380 } 12381 12382 // check for an over-subscribed or incomplete set of lengths 12383 left = 1 12384 for len = uint32(1); len <= uint32(MAXBITS); len++ { 12385 left <<= 1 12386 left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2))) 12387 if left < 0 { 12388 return -1 12389 } // over-subscribed 12390 } 12391 if left > 0 && (type1 == CODES || max != uint32(1)) { 12392 return -1 12393 } // incomplete set 12394 12395 // generate offsets into symbol table for each length for sorting 12396 *(*uint16)(unsafe.Pointer(bp + 32 + 1*2)) = uint16(0) 12397 for len = uint32(1); len < uint32(MAXBITS); len++ { 12398 *(*uint16)(unsafe.Pointer(bp + 32 + uintptr(len+uint32(1))*2)) = uint16(int32(*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(len)*2))) + int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)))) 12399 } 12400 12401 // sort symbols by length, by symbol order within each length 12402 for sym = uint32(0); sym < codes; sym++ { 12403 if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { 12404 *(*uint16)(unsafe.Pointer(work + uintptr(libc.PostIncUint16(&*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2)), 1))*2)) = uint16(sym) 12405 } 12406 } 12407 12408 // 12409 // Create and fill in decoding tables. In this loop, the table being 12410 // filled is at next and has curr index bits. The code being used is huff 12411 // with length len. That code is converted to an index by dropping drop 12412 // bits off of the bottom. For codes where len is less than drop + curr, 12413 // those top drop + curr - len bits are incremented through all values to 12414 // fill the table with replicated entries. 12415 // 12416 // root is the number of index bits for the root table. When len exceeds 12417 // root, sub-tables are created pointed to by the root entry with an index 12418 // of the low root bits of huff. This is saved in low to check for when a 12419 // new sub-table should be started. drop is zero when the root table is 12420 // being filled, and drop is root when sub-tables are being filled. 12421 // 12422 // When a new sub-table is needed, it is necessary to look ahead in the 12423 // code lengths to determine what size sub-table is needed. The length 12424 // counts are used for this, and so count[] is decremented as codes are 12425 // entered in the tables. 12426 // 12427 // used keeps track of how many table entries have been allocated from the 12428 // provided *table space. It is checked for LENS and DIST tables against 12429 // the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in 12430 // the initial root table size constants. See the comments in inftrees.h 12431 // for more information. 12432 // 12433 // sym increments through all symbols, and the loop terminates when 12434 // all codes of length max, i.e. all codes, have been processed. This 12435 // routine permits incomplete codes, so another loop after this one fills 12436 // in the rest of the decoding tables with invalid code markers. 12437 // 12438 12439 // set up for code type 12440 switch type1 { 12441 case CODES: 12442 base = libc.AssignUintptr(&extra, work) // dummy value--not used 12443 match = uint32(20) 12444 break 12445 case LENS: 12446 base = uintptr(unsafe.Pointer(&lbase)) 12447 extra = uintptr(unsafe.Pointer(&lext)) 12448 match = uint32(257) 12449 break 12450 default: // DISTS 12451 base = uintptr(unsafe.Pointer(&dbase)) 12452 extra = uintptr(unsafe.Pointer(&dext)) 12453 match = uint32(0) 12454 } 12455 12456 // initialize state for loop 12457 huff = uint32(0) // starting code 12458 sym = uint32(0) // starting code symbol 12459 len = min // starting code length 12460 next = *(*uintptr)(unsafe.Pointer(table)) // current table to fill in 12461 curr = root // current table index bits 12462 drop = uint32(0) // current bits to drop from code for index 12463 low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root 12464 used = uint32(1) << root // use root table entries 12465 mask = used - uint32(1) // mask for comparing low 12466 12467 // check available table space 12468 if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) { 12469 return 1 12470 } 12471 12472 // process all codes and make table entries 12473 for { 12474 // create table entry 12475 here.Fbits = uint8(len - drop) 12476 if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))+1 < match { 12477 here.Fop = uint8(0) 12478 here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) 12479 } else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { 12480 here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2))) 12481 here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2)) 12482 } else { 12483 here.Fop = uint8(32 + 64) // end of block 12484 here.Fval = uint16(0) 12485 } 12486 12487 // replicate for those indices with low len bits equal to huff 12488 incr = uint32(1) << (len - drop) 12489 fill = uint32(1) << curr 12490 min = fill // save offset to next table 12491 for __ccgo := true; __ccgo; __ccgo = fill != uint32(0) { 12492 fill = fill - incr 12493 *(*Code)(unsafe.Pointer(next + uintptr(huff>>drop+fill)*4)) = here 12494 } 12495 12496 // backwards increment the len-bit code huff 12497 incr = uint32(1) << (len - uint32(1)) 12498 for huff&incr != 0 { 12499 incr >>= 1 12500 } 12501 if incr != uint32(0) { 12502 huff = huff & (incr - uint32(1)) 12503 huff = huff + incr 12504 } else { 12505 huff = uint32(0) 12506 } 12507 12508 // go to next symbol, update count, len 12509 sym++ 12510 if int32(libc.PreDecUint16(&*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)), 1)) == 0 { 12511 if len == max { 12512 break 12513 } 12514 len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) 12515 } 12516 12517 // create new sub-table if needed 12518 if len > root && huff&mask != low { 12519 // if first time, transition to sub-tables 12520 if drop == uint32(0) { 12521 drop = root 12522 } 12523 12524 // increment past last table 12525 next += 4 * uintptr(min) // here min is 1 << curr 12526 12527 // determine length of next table 12528 curr = len - drop 12529 left = int32(1) << curr 12530 for curr+drop < max { 12531 left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(curr+drop)*2))) 12532 if left <= 0 { 12533 break 12534 } 12535 curr++ 12536 left <<= 1 12537 } 12538 12539 // check for enough space 12540 used = used + uint32(1)<<curr 12541 if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) { 12542 return 1 12543 } 12544 12545 // point entry in root table to sub-table 12546 low = huff & mask 12547 (*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fop = uint8(curr) 12548 (*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fbits = uint8(root) 12549 (*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fval = uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4) 12550 } 12551 } 12552 12553 // fill in remaining table entry if code is incomplete (guaranteed to have 12554 // at most one remaining entry, since if the code is incomplete, the 12555 // maximum code length that was allowed to get this far is one bit) 12556 if huff != uint32(0) { 12557 here.Fop = uint8(64) // invalid code marker 12558 here.Fbits = uint8(len - drop) 12559 here.Fval = uint16(0) 12560 *(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here 12561 } 12562 12563 // set return parameters 12564 *(*uintptr)(unsafe.Pointer(table)) += uintptr(used) * 4 12565 *(*uint32)(unsafe.Pointer(bits)) = root 12566 return 0 12567 } 12568 12569 var lbase = [31]uint16{ // Length codes 257..285 base 12570 uint16(3), uint16(4), uint16(5), uint16(6), uint16(7), uint16(8), uint16(9), uint16(10), uint16(11), uint16(13), uint16(15), uint16(17), uint16(19), uint16(23), uint16(27), uint16(31), 12571 uint16(35), uint16(43), uint16(51), uint16(59), uint16(67), uint16(83), uint16(99), uint16(115), uint16(131), uint16(163), uint16(195), uint16(227), uint16(258), uint16(0), uint16(0)} /* inftrees.c:60:33 */ 12572 var lext = [31]uint16{ // Length codes 257..285 extra 12573 uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(17), uint16(17), uint16(17), uint16(17), uint16(18), uint16(18), uint16(18), uint16(18), 12574 uint16(19), uint16(19), uint16(19), uint16(19), uint16(20), uint16(20), uint16(20), uint16(20), uint16(21), uint16(21), uint16(21), uint16(21), uint16(16), uint16(77), uint16(202)} /* inftrees.c:63:33 */ 12575 var dbase = [32]uint16{ // Distance codes 0..29 base 12576 uint16(1), uint16(2), uint16(3), uint16(4), uint16(5), uint16(7), uint16(9), uint16(13), uint16(17), uint16(25), uint16(33), uint16(49), uint16(65), uint16(97), uint16(129), uint16(193), 12577 uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145), 12578 uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */ 12579 var dext = [32]uint16{ // Distance codes 0..29 extra 12580 uint16(16), uint16(16), uint16(16), uint16(16), uint16(17), uint16(17), uint16(18), uint16(18), uint16(19), uint16(19), uint16(20), uint16(20), uint16(21), uint16(21), uint16(22), uint16(22), 12581 uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27), 12582 uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */ 12583 12584 type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */ 12585 12586 // =========================================================================== 12587 // Constants 12588 12589 // Bit length codes must not exceed MAX_BL_BITS bits 12590 12591 // end of block literal code 12592 12593 // repeat previous bit length 3-6 times (2 bits of repeat count) 12594 12595 // repeat a zero length 3-10 times (3 bits of repeat count) 12596 12597 // repeat a zero length 11-138 times (7 bits of repeat count) 12598 12599 var extra_lbits = [29]int32{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0} /* trees.c:62:17 */ 12600 12601 var extra_dbits = [30]int32{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} /* trees.c:65:17 */ 12602 12603 var extra_blbits = [19]int32{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7} /* trees.c:68:17 */ 12604 12605 var bl_order = [19]Uch{Uch(16), Uch(17), Uch(18), Uch(0), Uch(8), Uch(7), Uch(9), Uch(6), Uch(10), Uch(5), Uch(11), Uch(4), Uch(12), Uch(3), Uch(13), Uch(2), Uch(14), Uch(1), Uch(15)} /* trees.c:71:17 */ 12606 // The lengths of the bit length codes are sent in order of decreasing 12607 // probability, to avoid transmitting the lengths for unused bit length codes. 12608 12609 // =========================================================================== 12610 // Local data. These are initialized only once. 12611 12612 // header created automatically with -DGEN_TREES_H 12613 12614 var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) { 12615 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 12616 return r 12617 }(), Fdl: func() (r struct{ Fdad Ush }) { 12618 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12619 return r 12620 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12621 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140) 12622 return r 12623 }(), Fdl: func() (r struct{ Fdad Ush }) { 12624 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12625 return r 12626 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12627 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76) 12628 return r 12629 }(), Fdl: func() (r struct{ Fdad Ush }) { 12630 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12631 return r 12632 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12633 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204) 12634 return r 12635 }(), Fdl: func() (r struct{ Fdad Ush }) { 12636 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12637 return r 12638 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12639 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44) 12640 return r 12641 }(), Fdl: func() (r struct{ Fdad Ush }) { 12642 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12643 return r 12644 }()}, 12645 {Ffc: func() (r struct{ Ffreq Ush }) { 12646 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172) 12647 return r 12648 }(), Fdl: func() (r struct{ Fdad Ush }) { 12649 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12650 return r 12651 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12652 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108) 12653 return r 12654 }(), Fdl: func() (r struct{ Fdad Ush }) { 12655 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12656 return r 12657 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12658 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236) 12659 return r 12660 }(), Fdl: func() (r struct{ Fdad Ush }) { 12661 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12662 return r 12663 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12664 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 12665 return r 12666 }(), Fdl: func() (r struct{ Fdad Ush }) { 12667 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12668 return r 12669 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12670 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156) 12671 return r 12672 }(), Fdl: func() (r struct{ Fdad Ush }) { 12673 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12674 return r 12675 }()}, 12676 {Ffc: func() (r struct{ Ffreq Ush }) { 12677 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92) 12678 return r 12679 }(), Fdl: func() (r struct{ Fdad Ush }) { 12680 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12681 return r 12682 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12683 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220) 12684 return r 12685 }(), Fdl: func() (r struct{ Fdad Ush }) { 12686 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12687 return r 12688 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12689 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60) 12690 return r 12691 }(), Fdl: func() (r struct{ Fdad Ush }) { 12692 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12693 return r 12694 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12695 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188) 12696 return r 12697 }(), Fdl: func() (r struct{ Fdad Ush }) { 12698 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12699 return r 12700 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12701 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124) 12702 return r 12703 }(), Fdl: func() (r struct{ Fdad Ush }) { 12704 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12705 return r 12706 }()}, 12707 {Ffc: func() (r struct{ Ffreq Ush }) { 12708 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252) 12709 return r 12710 }(), Fdl: func() (r struct{ Fdad Ush }) { 12711 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12712 return r 12713 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12714 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 12715 return r 12716 }(), Fdl: func() (r struct{ Fdad Ush }) { 12717 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12718 return r 12719 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12720 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130) 12721 return r 12722 }(), Fdl: func() (r struct{ Fdad Ush }) { 12723 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12724 return r 12725 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12726 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66) 12727 return r 12728 }(), Fdl: func() (r struct{ Fdad Ush }) { 12729 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12730 return r 12731 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12732 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194) 12733 return r 12734 }(), Fdl: func() (r struct{ Fdad Ush }) { 12735 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12736 return r 12737 }()}, 12738 {Ffc: func() (r struct{ Ffreq Ush }) { 12739 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34) 12740 return r 12741 }(), Fdl: func() (r struct{ Fdad Ush }) { 12742 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12743 return r 12744 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12745 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162) 12746 return r 12747 }(), Fdl: func() (r struct{ Fdad Ush }) { 12748 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12749 return r 12750 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12751 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98) 12752 return r 12753 }(), Fdl: func() (r struct{ Fdad Ush }) { 12754 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12755 return r 12756 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12757 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226) 12758 return r 12759 }(), Fdl: func() (r struct{ Fdad Ush }) { 12760 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12761 return r 12762 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12763 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 12764 return r 12765 }(), Fdl: func() (r struct{ Fdad Ush }) { 12766 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12767 return r 12768 }()}, 12769 {Ffc: func() (r struct{ Ffreq Ush }) { 12770 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146) 12771 return r 12772 }(), Fdl: func() (r struct{ Fdad Ush }) { 12773 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12774 return r 12775 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12776 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82) 12777 return r 12778 }(), Fdl: func() (r struct{ Fdad Ush }) { 12779 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12780 return r 12781 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12782 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210) 12783 return r 12784 }(), Fdl: func() (r struct{ Fdad Ush }) { 12785 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12786 return r 12787 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12788 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50) 12789 return r 12790 }(), Fdl: func() (r struct{ Fdad Ush }) { 12791 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12792 return r 12793 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12794 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178) 12795 return r 12796 }(), Fdl: func() (r struct{ Fdad Ush }) { 12797 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12798 return r 12799 }()}, 12800 {Ffc: func() (r struct{ Ffreq Ush }) { 12801 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114) 12802 return r 12803 }(), Fdl: func() (r struct{ Fdad Ush }) { 12804 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12805 return r 12806 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12807 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242) 12808 return r 12809 }(), Fdl: func() (r struct{ Fdad Ush }) { 12810 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12811 return r 12812 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12813 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 12814 return r 12815 }(), Fdl: func() (r struct{ Fdad Ush }) { 12816 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12817 return r 12818 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12819 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138) 12820 return r 12821 }(), Fdl: func() (r struct{ Fdad Ush }) { 12822 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12823 return r 12824 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12825 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74) 12826 return r 12827 }(), Fdl: func() (r struct{ Fdad Ush }) { 12828 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12829 return r 12830 }()}, 12831 {Ffc: func() (r struct{ Ffreq Ush }) { 12832 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202) 12833 return r 12834 }(), Fdl: func() (r struct{ Fdad Ush }) { 12835 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12836 return r 12837 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12838 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42) 12839 return r 12840 }(), Fdl: func() (r struct{ Fdad Ush }) { 12841 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12842 return r 12843 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12844 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170) 12845 return r 12846 }(), Fdl: func() (r struct{ Fdad Ush }) { 12847 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12848 return r 12849 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12850 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106) 12851 return r 12852 }(), Fdl: func() (r struct{ Fdad Ush }) { 12853 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12854 return r 12855 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12856 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234) 12857 return r 12858 }(), Fdl: func() (r struct{ Fdad Ush }) { 12859 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12860 return r 12861 }()}, 12862 {Ffc: func() (r struct{ Ffreq Ush }) { 12863 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 12864 return r 12865 }(), Fdl: func() (r struct{ Fdad Ush }) { 12866 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12867 return r 12868 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12869 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154) 12870 return r 12871 }(), Fdl: func() (r struct{ Fdad Ush }) { 12872 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12873 return r 12874 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12875 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90) 12876 return r 12877 }(), Fdl: func() (r struct{ Fdad Ush }) { 12878 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12879 return r 12880 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12881 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218) 12882 return r 12883 }(), Fdl: func() (r struct{ Fdad Ush }) { 12884 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12885 return r 12886 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12887 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58) 12888 return r 12889 }(), Fdl: func() (r struct{ Fdad Ush }) { 12890 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12891 return r 12892 }()}, 12893 {Ffc: func() (r struct{ Ffreq Ush }) { 12894 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186) 12895 return r 12896 }(), Fdl: func() (r struct{ Fdad Ush }) { 12897 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12898 return r 12899 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12900 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122) 12901 return r 12902 }(), Fdl: func() (r struct{ Fdad Ush }) { 12903 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12904 return r 12905 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12906 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250) 12907 return r 12908 }(), Fdl: func() (r struct{ Fdad Ush }) { 12909 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12910 return r 12911 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12912 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 12913 return r 12914 }(), Fdl: func() (r struct{ Fdad Ush }) { 12915 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12916 return r 12917 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12918 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134) 12919 return r 12920 }(), Fdl: func() (r struct{ Fdad Ush }) { 12921 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12922 return r 12923 }()}, 12924 {Ffc: func() (r struct{ Ffreq Ush }) { 12925 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70) 12926 return r 12927 }(), Fdl: func() (r struct{ Fdad Ush }) { 12928 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12929 return r 12930 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12931 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198) 12932 return r 12933 }(), Fdl: func() (r struct{ Fdad Ush }) { 12934 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12935 return r 12936 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38) 12938 return r 12939 }(), Fdl: func() (r struct{ Fdad Ush }) { 12940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12941 return r 12942 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12943 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166) 12944 return r 12945 }(), Fdl: func() (r struct{ Fdad Ush }) { 12946 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12947 return r 12948 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12949 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102) 12950 return r 12951 }(), Fdl: func() (r struct{ Fdad Ush }) { 12952 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12953 return r 12954 }()}, 12955 {Ffc: func() (r struct{ Ffreq Ush }) { 12956 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230) 12957 return r 12958 }(), Fdl: func() (r struct{ Fdad Ush }) { 12959 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12960 return r 12961 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12962 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 12963 return r 12964 }(), Fdl: func() (r struct{ Fdad Ush }) { 12965 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12966 return r 12967 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150) 12969 return r 12970 }(), Fdl: func() (r struct{ Fdad Ush }) { 12971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12972 return r 12973 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12974 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86) 12975 return r 12976 }(), Fdl: func() (r struct{ Fdad Ush }) { 12977 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12978 return r 12979 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12980 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214) 12981 return r 12982 }(), Fdl: func() (r struct{ Fdad Ush }) { 12983 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12984 return r 12985 }()}, 12986 {Ffc: func() (r struct{ Ffreq Ush }) { 12987 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54) 12988 return r 12989 }(), Fdl: func() (r struct{ Fdad Ush }) { 12990 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12991 return r 12992 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12993 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182) 12994 return r 12995 }(), Fdl: func() (r struct{ Fdad Ush }) { 12996 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 12997 return r 12998 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 12999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118) 13000 return r 13001 }(), Fdl: func() (r struct{ Fdad Ush }) { 13002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13003 return r 13004 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13005 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246) 13006 return r 13007 }(), Fdl: func() (r struct{ Fdad Ush }) { 13008 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13009 return r 13010 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13011 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 13012 return r 13013 }(), Fdl: func() (r struct{ Fdad Ush }) { 13014 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13015 return r 13016 }()}, 13017 {Ffc: func() (r struct{ Ffreq Ush }) { 13018 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142) 13019 return r 13020 }(), Fdl: func() (r struct{ Fdad Ush }) { 13021 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13022 return r 13023 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13024 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78) 13025 return r 13026 }(), Fdl: func() (r struct{ Fdad Ush }) { 13027 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13028 return r 13029 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13030 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206) 13031 return r 13032 }(), Fdl: func() (r struct{ Fdad Ush }) { 13033 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13034 return r 13035 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13036 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46) 13037 return r 13038 }(), Fdl: func() (r struct{ Fdad Ush }) { 13039 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13040 return r 13041 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13042 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174) 13043 return r 13044 }(), Fdl: func() (r struct{ Fdad Ush }) { 13045 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13046 return r 13047 }()}, 13048 {Ffc: func() (r struct{ Ffreq Ush }) { 13049 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110) 13050 return r 13051 }(), Fdl: func() (r struct{ Fdad Ush }) { 13052 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13053 return r 13054 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13055 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238) 13056 return r 13057 }(), Fdl: func() (r struct{ Fdad Ush }) { 13058 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13059 return r 13060 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13061 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 13062 return r 13063 }(), Fdl: func() (r struct{ Fdad Ush }) { 13064 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13065 return r 13066 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13067 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158) 13068 return r 13069 }(), Fdl: func() (r struct{ Fdad Ush }) { 13070 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13071 return r 13072 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13073 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94) 13074 return r 13075 }(), Fdl: func() (r struct{ Fdad Ush }) { 13076 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13077 return r 13078 }()}, 13079 {Ffc: func() (r struct{ Ffreq Ush }) { 13080 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222) 13081 return r 13082 }(), Fdl: func() (r struct{ Fdad Ush }) { 13083 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13084 return r 13085 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13086 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62) 13087 return r 13088 }(), Fdl: func() (r struct{ Fdad Ush }) { 13089 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13090 return r 13091 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13092 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190) 13093 return r 13094 }(), Fdl: func() (r struct{ Fdad Ush }) { 13095 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13096 return r 13097 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13098 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126) 13099 return r 13100 }(), Fdl: func() (r struct{ Fdad Ush }) { 13101 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13102 return r 13103 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13104 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254) 13105 return r 13106 }(), Fdl: func() (r struct{ Fdad Ush }) { 13107 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13108 return r 13109 }()}, 13110 {Ffc: func() (r struct{ Ffreq Ush }) { 13111 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 13112 return r 13113 }(), Fdl: func() (r struct{ Fdad Ush }) { 13114 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13115 return r 13116 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13117 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129) 13118 return r 13119 }(), Fdl: func() (r struct{ Fdad Ush }) { 13120 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13121 return r 13122 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13123 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65) 13124 return r 13125 }(), Fdl: func() (r struct{ Fdad Ush }) { 13126 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13127 return r 13128 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13129 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193) 13130 return r 13131 }(), Fdl: func() (r struct{ Fdad Ush }) { 13132 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13133 return r 13134 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13135 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33) 13136 return r 13137 }(), Fdl: func() (r struct{ Fdad Ush }) { 13138 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13139 return r 13140 }()}, 13141 {Ffc: func() (r struct{ Ffreq Ush }) { 13142 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161) 13143 return r 13144 }(), Fdl: func() (r struct{ Fdad Ush }) { 13145 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13146 return r 13147 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13148 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97) 13149 return r 13150 }(), Fdl: func() (r struct{ Fdad Ush }) { 13151 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13152 return r 13153 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13154 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225) 13155 return r 13156 }(), Fdl: func() (r struct{ Fdad Ush }) { 13157 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13158 return r 13159 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13160 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 13161 return r 13162 }(), Fdl: func() (r struct{ Fdad Ush }) { 13163 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13164 return r 13165 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13166 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145) 13167 return r 13168 }(), Fdl: func() (r struct{ Fdad Ush }) { 13169 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13170 return r 13171 }()}, 13172 {Ffc: func() (r struct{ Ffreq Ush }) { 13173 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81) 13174 return r 13175 }(), Fdl: func() (r struct{ Fdad Ush }) { 13176 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13177 return r 13178 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13179 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209) 13180 return r 13181 }(), Fdl: func() (r struct{ Fdad Ush }) { 13182 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13183 return r 13184 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13185 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49) 13186 return r 13187 }(), Fdl: func() (r struct{ Fdad Ush }) { 13188 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13189 return r 13190 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13191 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177) 13192 return r 13193 }(), Fdl: func() (r struct{ Fdad Ush }) { 13194 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13195 return r 13196 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13197 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113) 13198 return r 13199 }(), Fdl: func() (r struct{ Fdad Ush }) { 13200 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13201 return r 13202 }()}, 13203 {Ffc: func() (r struct{ Ffreq Ush }) { 13204 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241) 13205 return r 13206 }(), Fdl: func() (r struct{ Fdad Ush }) { 13207 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13208 return r 13209 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13210 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13211 return r 13212 }(), Fdl: func() (r struct{ Fdad Ush }) { 13213 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13214 return r 13215 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13216 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137) 13217 return r 13218 }(), Fdl: func() (r struct{ Fdad Ush }) { 13219 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13220 return r 13221 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13222 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73) 13223 return r 13224 }(), Fdl: func() (r struct{ Fdad Ush }) { 13225 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13226 return r 13227 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13228 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201) 13229 return r 13230 }(), Fdl: func() (r struct{ Fdad Ush }) { 13231 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13232 return r 13233 }()}, 13234 {Ffc: func() (r struct{ Ffreq Ush }) { 13235 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41) 13236 return r 13237 }(), Fdl: func() (r struct{ Fdad Ush }) { 13238 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13239 return r 13240 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13241 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169) 13242 return r 13243 }(), Fdl: func() (r struct{ Fdad Ush }) { 13244 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13245 return r 13246 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13247 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105) 13248 return r 13249 }(), Fdl: func() (r struct{ Fdad Ush }) { 13250 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13251 return r 13252 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13253 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233) 13254 return r 13255 }(), Fdl: func() (r struct{ Fdad Ush }) { 13256 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13257 return r 13258 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13259 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 13260 return r 13261 }(), Fdl: func() (r struct{ Fdad Ush }) { 13262 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13263 return r 13264 }()}, 13265 {Ffc: func() (r struct{ Ffreq Ush }) { 13266 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153) 13267 return r 13268 }(), Fdl: func() (r struct{ Fdad Ush }) { 13269 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13270 return r 13271 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13272 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89) 13273 return r 13274 }(), Fdl: func() (r struct{ Fdad Ush }) { 13275 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13276 return r 13277 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13278 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217) 13279 return r 13280 }(), Fdl: func() (r struct{ Fdad Ush }) { 13281 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13282 return r 13283 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13284 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57) 13285 return r 13286 }(), Fdl: func() (r struct{ Fdad Ush }) { 13287 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13288 return r 13289 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13290 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185) 13291 return r 13292 }(), Fdl: func() (r struct{ Fdad Ush }) { 13293 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13294 return r 13295 }()}, 13296 {Ffc: func() (r struct{ Ffreq Ush }) { 13297 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121) 13298 return r 13299 }(), Fdl: func() (r struct{ Fdad Ush }) { 13300 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13301 return r 13302 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13303 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249) 13304 return r 13305 }(), Fdl: func() (r struct{ Fdad Ush }) { 13306 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13307 return r 13308 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13309 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 13310 return r 13311 }(), Fdl: func() (r struct{ Fdad Ush }) { 13312 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13313 return r 13314 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13315 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133) 13316 return r 13317 }(), Fdl: func() (r struct{ Fdad Ush }) { 13318 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13319 return r 13320 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13321 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69) 13322 return r 13323 }(), Fdl: func() (r struct{ Fdad Ush }) { 13324 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13325 return r 13326 }()}, 13327 {Ffc: func() (r struct{ Ffreq Ush }) { 13328 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197) 13329 return r 13330 }(), Fdl: func() (r struct{ Fdad Ush }) { 13331 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13332 return r 13333 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13334 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37) 13335 return r 13336 }(), Fdl: func() (r struct{ Fdad Ush }) { 13337 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13338 return r 13339 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13340 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165) 13341 return r 13342 }(), Fdl: func() (r struct{ Fdad Ush }) { 13343 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13344 return r 13345 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13346 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101) 13347 return r 13348 }(), Fdl: func() (r struct{ Fdad Ush }) { 13349 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13350 return r 13351 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13352 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229) 13353 return r 13354 }(), Fdl: func() (r struct{ Fdad Ush }) { 13355 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13356 return r 13357 }()}, 13358 {Ffc: func() (r struct{ Ffreq Ush }) { 13359 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 13360 return r 13361 }(), Fdl: func() (r struct{ Fdad Ush }) { 13362 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13363 return r 13364 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13365 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149) 13366 return r 13367 }(), Fdl: func() (r struct{ Fdad Ush }) { 13368 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13369 return r 13370 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13371 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85) 13372 return r 13373 }(), Fdl: func() (r struct{ Fdad Ush }) { 13374 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13375 return r 13376 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13377 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213) 13378 return r 13379 }(), Fdl: func() (r struct{ Fdad Ush }) { 13380 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13381 return r 13382 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13383 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53) 13384 return r 13385 }(), Fdl: func() (r struct{ Fdad Ush }) { 13386 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13387 return r 13388 }()}, 13389 {Ffc: func() (r struct{ Ffreq Ush }) { 13390 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181) 13391 return r 13392 }(), Fdl: func() (r struct{ Fdad Ush }) { 13393 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13394 return r 13395 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13396 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117) 13397 return r 13398 }(), Fdl: func() (r struct{ Fdad Ush }) { 13399 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13400 return r 13401 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13402 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245) 13403 return r 13404 }(), Fdl: func() (r struct{ Fdad Ush }) { 13405 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13406 return r 13407 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13408 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 13409 return r 13410 }(), Fdl: func() (r struct{ Fdad Ush }) { 13411 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13412 return r 13413 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13414 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141) 13415 return r 13416 }(), Fdl: func() (r struct{ Fdad Ush }) { 13417 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13418 return r 13419 }()}, 13420 {Ffc: func() (r struct{ Ffreq Ush }) { 13421 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77) 13422 return r 13423 }(), Fdl: func() (r struct{ Fdad Ush }) { 13424 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13425 return r 13426 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13427 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205) 13428 return r 13429 }(), Fdl: func() (r struct{ Fdad Ush }) { 13430 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13431 return r 13432 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13433 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45) 13434 return r 13435 }(), Fdl: func() (r struct{ Fdad Ush }) { 13436 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13437 return r 13438 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13439 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173) 13440 return r 13441 }(), Fdl: func() (r struct{ Fdad Ush }) { 13442 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13443 return r 13444 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13445 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109) 13446 return r 13447 }(), Fdl: func() (r struct{ Fdad Ush }) { 13448 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13449 return r 13450 }()}, 13451 {Ffc: func() (r struct{ Ffreq Ush }) { 13452 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237) 13453 return r 13454 }(), Fdl: func() (r struct{ Fdad Ush }) { 13455 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13456 return r 13457 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13458 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 13459 return r 13460 }(), Fdl: func() (r struct{ Fdad Ush }) { 13461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13462 return r 13463 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157) 13465 return r 13466 }(), Fdl: func() (r struct{ Fdad Ush }) { 13467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13468 return r 13469 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13470 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93) 13471 return r 13472 }(), Fdl: func() (r struct{ Fdad Ush }) { 13473 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13474 return r 13475 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13476 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221) 13477 return r 13478 }(), Fdl: func() (r struct{ Fdad Ush }) { 13479 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13480 return r 13481 }()}, 13482 {Ffc: func() (r struct{ Ffreq Ush }) { 13483 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61) 13484 return r 13485 }(), Fdl: func() (r struct{ Fdad Ush }) { 13486 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13487 return r 13488 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13489 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189) 13490 return r 13491 }(), Fdl: func() (r struct{ Fdad Ush }) { 13492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13493 return r 13494 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125) 13496 return r 13497 }(), Fdl: func() (r struct{ Fdad Ush }) { 13498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13499 return r 13500 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13501 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253) 13502 return r 13503 }(), Fdl: func() (r struct{ Fdad Ush }) { 13504 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 13505 return r 13506 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13507 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 13508 return r 13509 }(), Fdl: func() (r struct{ Fdad Ush }) { 13510 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13511 return r 13512 }()}, 13513 {Ffc: func() (r struct{ Ffreq Ush }) { 13514 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275) 13515 return r 13516 }(), Fdl: func() (r struct{ Fdad Ush }) { 13517 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13518 return r 13519 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13520 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147) 13521 return r 13522 }(), Fdl: func() (r struct{ Fdad Ush }) { 13523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13524 return r 13525 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13526 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403) 13527 return r 13528 }(), Fdl: func() (r struct{ Fdad Ush }) { 13529 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13530 return r 13531 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13532 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83) 13533 return r 13534 }(), Fdl: func() (r struct{ Fdad Ush }) { 13535 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13536 return r 13537 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13538 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339) 13539 return r 13540 }(), Fdl: func() (r struct{ Fdad Ush }) { 13541 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13542 return r 13543 }()}, 13544 {Ffc: func() (r struct{ Ffreq Ush }) { 13545 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211) 13546 return r 13547 }(), Fdl: func() (r struct{ Fdad Ush }) { 13548 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13549 return r 13550 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13551 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467) 13552 return r 13553 }(), Fdl: func() (r struct{ Fdad Ush }) { 13554 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13555 return r 13556 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13557 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51) 13558 return r 13559 }(), Fdl: func() (r struct{ Fdad Ush }) { 13560 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13561 return r 13562 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13563 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307) 13564 return r 13565 }(), Fdl: func() (r struct{ Fdad Ush }) { 13566 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13567 return r 13568 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13569 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179) 13570 return r 13571 }(), Fdl: func() (r struct{ Fdad Ush }) { 13572 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13573 return r 13574 }()}, 13575 {Ffc: func() (r struct{ Ffreq Ush }) { 13576 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435) 13577 return r 13578 }(), Fdl: func() (r struct{ Fdad Ush }) { 13579 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13580 return r 13581 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13582 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115) 13583 return r 13584 }(), Fdl: func() (r struct{ Fdad Ush }) { 13585 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13586 return r 13587 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13588 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371) 13589 return r 13590 }(), Fdl: func() (r struct{ Fdad Ush }) { 13591 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13592 return r 13593 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13594 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243) 13595 return r 13596 }(), Fdl: func() (r struct{ Fdad Ush }) { 13597 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13598 return r 13599 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13600 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499) 13601 return r 13602 }(), Fdl: func() (r struct{ Fdad Ush }) { 13603 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13604 return r 13605 }()}, 13606 {Ffc: func() (r struct{ Ffreq Ush }) { 13607 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 13608 return r 13609 }(), Fdl: func() (r struct{ Fdad Ush }) { 13610 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13611 return r 13612 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13613 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267) 13614 return r 13615 }(), Fdl: func() (r struct{ Fdad Ush }) { 13616 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13617 return r 13618 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13619 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139) 13620 return r 13621 }(), Fdl: func() (r struct{ Fdad Ush }) { 13622 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13623 return r 13624 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13625 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395) 13626 return r 13627 }(), Fdl: func() (r struct{ Fdad Ush }) { 13628 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13629 return r 13630 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13631 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75) 13632 return r 13633 }(), Fdl: func() (r struct{ Fdad Ush }) { 13634 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13635 return r 13636 }()}, 13637 {Ffc: func() (r struct{ Ffreq Ush }) { 13638 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331) 13639 return r 13640 }(), Fdl: func() (r struct{ Fdad Ush }) { 13641 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13642 return r 13643 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13644 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203) 13645 return r 13646 }(), Fdl: func() (r struct{ Fdad Ush }) { 13647 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13648 return r 13649 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13650 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459) 13651 return r 13652 }(), Fdl: func() (r struct{ Fdad Ush }) { 13653 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13654 return r 13655 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13656 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43) 13657 return r 13658 }(), Fdl: func() (r struct{ Fdad Ush }) { 13659 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13660 return r 13661 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13662 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299) 13663 return r 13664 }(), Fdl: func() (r struct{ Fdad Ush }) { 13665 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13666 return r 13667 }()}, 13668 {Ffc: func() (r struct{ Ffreq Ush }) { 13669 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171) 13670 return r 13671 }(), Fdl: func() (r struct{ Fdad Ush }) { 13672 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13673 return r 13674 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13675 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427) 13676 return r 13677 }(), Fdl: func() (r struct{ Fdad Ush }) { 13678 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13679 return r 13680 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13681 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107) 13682 return r 13683 }(), Fdl: func() (r struct{ Fdad Ush }) { 13684 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13685 return r 13686 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13687 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363) 13688 return r 13689 }(), Fdl: func() (r struct{ Fdad Ush }) { 13690 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13691 return r 13692 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13693 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235) 13694 return r 13695 }(), Fdl: func() (r struct{ Fdad Ush }) { 13696 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13697 return r 13698 }()}, 13699 {Ffc: func() (r struct{ Ffreq Ush }) { 13700 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491) 13701 return r 13702 }(), Fdl: func() (r struct{ Fdad Ush }) { 13703 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13704 return r 13705 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13706 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 13707 return r 13708 }(), Fdl: func() (r struct{ Fdad Ush }) { 13709 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13710 return r 13711 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13712 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283) 13713 return r 13714 }(), Fdl: func() (r struct{ Fdad Ush }) { 13715 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13716 return r 13717 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13718 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155) 13719 return r 13720 }(), Fdl: func() (r struct{ Fdad Ush }) { 13721 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13722 return r 13723 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13724 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411) 13725 return r 13726 }(), Fdl: func() (r struct{ Fdad Ush }) { 13727 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13728 return r 13729 }()}, 13730 {Ffc: func() (r struct{ Ffreq Ush }) { 13731 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91) 13732 return r 13733 }(), Fdl: func() (r struct{ Fdad Ush }) { 13734 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13735 return r 13736 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13737 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347) 13738 return r 13739 }(), Fdl: func() (r struct{ Fdad Ush }) { 13740 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13741 return r 13742 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13743 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219) 13744 return r 13745 }(), Fdl: func() (r struct{ Fdad Ush }) { 13746 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13747 return r 13748 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13749 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475) 13750 return r 13751 }(), Fdl: func() (r struct{ Fdad Ush }) { 13752 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13753 return r 13754 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13755 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59) 13756 return r 13757 }(), Fdl: func() (r struct{ Fdad Ush }) { 13758 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13759 return r 13760 }()}, 13761 {Ffc: func() (r struct{ Ffreq Ush }) { 13762 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315) 13763 return r 13764 }(), Fdl: func() (r struct{ Fdad Ush }) { 13765 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13766 return r 13767 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13768 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187) 13769 return r 13770 }(), Fdl: func() (r struct{ Fdad Ush }) { 13771 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13772 return r 13773 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13774 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443) 13775 return r 13776 }(), Fdl: func() (r struct{ Fdad Ush }) { 13777 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13778 return r 13779 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13780 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123) 13781 return r 13782 }(), Fdl: func() (r struct{ Fdad Ush }) { 13783 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13784 return r 13785 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13786 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379) 13787 return r 13788 }(), Fdl: func() (r struct{ Fdad Ush }) { 13789 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13790 return r 13791 }()}, 13792 {Ffc: func() (r struct{ Ffreq Ush }) { 13793 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251) 13794 return r 13795 }(), Fdl: func() (r struct{ Fdad Ush }) { 13796 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13797 return r 13798 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13799 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507) 13800 return r 13801 }(), Fdl: func() (r struct{ Fdad Ush }) { 13802 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13803 return r 13804 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13805 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 13806 return r 13807 }(), Fdl: func() (r struct{ Fdad Ush }) { 13808 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13809 return r 13810 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13811 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263) 13812 return r 13813 }(), Fdl: func() (r struct{ Fdad Ush }) { 13814 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13815 return r 13816 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13817 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135) 13818 return r 13819 }(), Fdl: func() (r struct{ Fdad Ush }) { 13820 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13821 return r 13822 }()}, 13823 {Ffc: func() (r struct{ Ffreq Ush }) { 13824 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391) 13825 return r 13826 }(), Fdl: func() (r struct{ Fdad Ush }) { 13827 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13828 return r 13829 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13830 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71) 13831 return r 13832 }(), Fdl: func() (r struct{ Fdad Ush }) { 13833 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13834 return r 13835 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13836 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327) 13837 return r 13838 }(), Fdl: func() (r struct{ Fdad Ush }) { 13839 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13840 return r 13841 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13842 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199) 13843 return r 13844 }(), Fdl: func() (r struct{ Fdad Ush }) { 13845 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13846 return r 13847 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13848 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455) 13849 return r 13850 }(), Fdl: func() (r struct{ Fdad Ush }) { 13851 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13852 return r 13853 }()}, 13854 {Ffc: func() (r struct{ Ffreq Ush }) { 13855 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39) 13856 return r 13857 }(), Fdl: func() (r struct{ Fdad Ush }) { 13858 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13859 return r 13860 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13861 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295) 13862 return r 13863 }(), Fdl: func() (r struct{ Fdad Ush }) { 13864 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13865 return r 13866 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13867 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167) 13868 return r 13869 }(), Fdl: func() (r struct{ Fdad Ush }) { 13870 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13871 return r 13872 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13873 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423) 13874 return r 13875 }(), Fdl: func() (r struct{ Fdad Ush }) { 13876 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13877 return r 13878 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13879 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103) 13880 return r 13881 }(), Fdl: func() (r struct{ Fdad Ush }) { 13882 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13883 return r 13884 }()}, 13885 {Ffc: func() (r struct{ Ffreq Ush }) { 13886 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359) 13887 return r 13888 }(), Fdl: func() (r struct{ Fdad Ush }) { 13889 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13890 return r 13891 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13892 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231) 13893 return r 13894 }(), Fdl: func() (r struct{ Fdad Ush }) { 13895 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13896 return r 13897 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13898 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487) 13899 return r 13900 }(), Fdl: func() (r struct{ Fdad Ush }) { 13901 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13902 return r 13903 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13904 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 13905 return r 13906 }(), Fdl: func() (r struct{ Fdad Ush }) { 13907 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13908 return r 13909 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13910 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279) 13911 return r 13912 }(), Fdl: func() (r struct{ Fdad Ush }) { 13913 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13914 return r 13915 }()}, 13916 {Ffc: func() (r struct{ Ffreq Ush }) { 13917 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151) 13918 return r 13919 }(), Fdl: func() (r struct{ Fdad Ush }) { 13920 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13921 return r 13922 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13923 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407) 13924 return r 13925 }(), Fdl: func() (r struct{ Fdad Ush }) { 13926 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13927 return r 13928 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13929 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87) 13930 return r 13931 }(), Fdl: func() (r struct{ Fdad Ush }) { 13932 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13933 return r 13934 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13935 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343) 13936 return r 13937 }(), Fdl: func() (r struct{ Fdad Ush }) { 13938 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13939 return r 13940 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13941 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215) 13942 return r 13943 }(), Fdl: func() (r struct{ Fdad Ush }) { 13944 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13945 return r 13946 }()}, 13947 {Ffc: func() (r struct{ Ffreq Ush }) { 13948 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471) 13949 return r 13950 }(), Fdl: func() (r struct{ Fdad Ush }) { 13951 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13952 return r 13953 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13954 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55) 13955 return r 13956 }(), Fdl: func() (r struct{ Fdad Ush }) { 13957 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13958 return r 13959 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13960 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311) 13961 return r 13962 }(), Fdl: func() (r struct{ Fdad Ush }) { 13963 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13964 return r 13965 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13966 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183) 13967 return r 13968 }(), Fdl: func() (r struct{ Fdad Ush }) { 13969 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13970 return r 13971 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13972 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439) 13973 return r 13974 }(), Fdl: func() (r struct{ Fdad Ush }) { 13975 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13976 return r 13977 }()}, 13978 {Ffc: func() (r struct{ Ffreq Ush }) { 13979 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119) 13980 return r 13981 }(), Fdl: func() (r struct{ Fdad Ush }) { 13982 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13983 return r 13984 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13985 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375) 13986 return r 13987 }(), Fdl: func() (r struct{ Fdad Ush }) { 13988 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13989 return r 13990 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13991 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247) 13992 return r 13993 }(), Fdl: func() (r struct{ Fdad Ush }) { 13994 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 13995 return r 13996 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 13997 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503) 13998 return r 13999 }(), Fdl: func() (r struct{ Fdad Ush }) { 14000 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14001 return r 14002 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14003 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15) 14004 return r 14005 }(), Fdl: func() (r struct{ Fdad Ush }) { 14006 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14007 return r 14008 }()}, 14009 {Ffc: func() (r struct{ Ffreq Ush }) { 14010 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271) 14011 return r 14012 }(), Fdl: func() (r struct{ Fdad Ush }) { 14013 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14014 return r 14015 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14016 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143) 14017 return r 14018 }(), Fdl: func() (r struct{ Fdad Ush }) { 14019 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14020 return r 14021 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14022 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399) 14023 return r 14024 }(), Fdl: func() (r struct{ Fdad Ush }) { 14025 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14026 return r 14027 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14028 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79) 14029 return r 14030 }(), Fdl: func() (r struct{ Fdad Ush }) { 14031 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14032 return r 14033 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14034 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335) 14035 return r 14036 }(), Fdl: func() (r struct{ Fdad Ush }) { 14037 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14038 return r 14039 }()}, 14040 {Ffc: func() (r struct{ Ffreq Ush }) { 14041 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207) 14042 return r 14043 }(), Fdl: func() (r struct{ Fdad Ush }) { 14044 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14045 return r 14046 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14047 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463) 14048 return r 14049 }(), Fdl: func() (r struct{ Fdad Ush }) { 14050 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14051 return r 14052 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14053 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47) 14054 return r 14055 }(), Fdl: func() (r struct{ Fdad Ush }) { 14056 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14057 return r 14058 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14059 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303) 14060 return r 14061 }(), Fdl: func() (r struct{ Fdad Ush }) { 14062 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14063 return r 14064 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14065 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175) 14066 return r 14067 }(), Fdl: func() (r struct{ Fdad Ush }) { 14068 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14069 return r 14070 }()}, 14071 {Ffc: func() (r struct{ Ffreq Ush }) { 14072 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431) 14073 return r 14074 }(), Fdl: func() (r struct{ Fdad Ush }) { 14075 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14076 return r 14077 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14078 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111) 14079 return r 14080 }(), Fdl: func() (r struct{ Fdad Ush }) { 14081 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14082 return r 14083 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14084 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367) 14085 return r 14086 }(), Fdl: func() (r struct{ Fdad Ush }) { 14087 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14088 return r 14089 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14090 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239) 14091 return r 14092 }(), Fdl: func() (r struct{ Fdad Ush }) { 14093 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14094 return r 14095 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14096 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495) 14097 return r 14098 }(), Fdl: func() (r struct{ Fdad Ush }) { 14099 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14100 return r 14101 }()}, 14102 {Ffc: func() (r struct{ Ffreq Ush }) { 14103 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31) 14104 return r 14105 }(), Fdl: func() (r struct{ Fdad Ush }) { 14106 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14107 return r 14108 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14109 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287) 14110 return r 14111 }(), Fdl: func() (r struct{ Fdad Ush }) { 14112 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14113 return r 14114 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14115 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159) 14116 return r 14117 }(), Fdl: func() (r struct{ Fdad Ush }) { 14118 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14119 return r 14120 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14121 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415) 14122 return r 14123 }(), Fdl: func() (r struct{ Fdad Ush }) { 14124 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14125 return r 14126 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14127 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95) 14128 return r 14129 }(), Fdl: func() (r struct{ Fdad Ush }) { 14130 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14131 return r 14132 }()}, 14133 {Ffc: func() (r struct{ Ffreq Ush }) { 14134 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351) 14135 return r 14136 }(), Fdl: func() (r struct{ Fdad Ush }) { 14137 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14138 return r 14139 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14140 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223) 14141 return r 14142 }(), Fdl: func() (r struct{ Fdad Ush }) { 14143 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14144 return r 14145 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14146 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479) 14147 return r 14148 }(), Fdl: func() (r struct{ Fdad Ush }) { 14149 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14150 return r 14151 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14152 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63) 14153 return r 14154 }(), Fdl: func() (r struct{ Fdad Ush }) { 14155 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14156 return r 14157 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14158 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319) 14159 return r 14160 }(), Fdl: func() (r struct{ Fdad Ush }) { 14161 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14162 return r 14163 }()}, 14164 {Ffc: func() (r struct{ Ffreq Ush }) { 14165 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191) 14166 return r 14167 }(), Fdl: func() (r struct{ Fdad Ush }) { 14168 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14169 return r 14170 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14171 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447) 14172 return r 14173 }(), Fdl: func() (r struct{ Fdad Ush }) { 14174 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14175 return r 14176 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14177 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127) 14178 return r 14179 }(), Fdl: func() (r struct{ Fdad Ush }) { 14180 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14181 return r 14182 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14183 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383) 14184 return r 14185 }(), Fdl: func() (r struct{ Fdad Ush }) { 14186 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14187 return r 14188 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14189 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255) 14190 return r 14191 }(), Fdl: func() (r struct{ Fdad Ush }) { 14192 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14193 return r 14194 }()}, 14195 {Ffc: func() (r struct{ Ffreq Ush }) { 14196 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511) 14197 return r 14198 }(), Fdl: func() (r struct{ Fdad Ush }) { 14199 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14200 return r 14201 }()}, {Fdl: func() (r struct{ Fdad Ush }) { 14202 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14203 return r 14204 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14205 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64) 14206 return r 14207 }(), Fdl: func() (r struct{ Fdad Ush }) { 14208 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14209 return r 14210 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14211 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32) 14212 return r 14213 }(), Fdl: func() (r struct{ Fdad Ush }) { 14214 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14215 return r 14216 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14217 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96) 14218 return r 14219 }(), Fdl: func() (r struct{ Fdad Ush }) { 14220 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14221 return r 14222 }()}, 14223 {Ffc: func() (r struct{ Ffreq Ush }) { 14224 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 14225 return r 14226 }(), Fdl: func() (r struct{ Fdad Ush }) { 14227 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14228 return r 14229 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14230 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80) 14231 return r 14232 }(), Fdl: func() (r struct{ Fdad Ush }) { 14233 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14234 return r 14235 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14236 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48) 14237 return r 14238 }(), Fdl: func() (r struct{ Fdad Ush }) { 14239 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14240 return r 14241 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14242 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112) 14243 return r 14244 }(), Fdl: func() (r struct{ Fdad Ush }) { 14245 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14246 return r 14247 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14248 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14249 return r 14250 }(), Fdl: func() (r struct{ Fdad Ush }) { 14251 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14252 return r 14253 }()}, 14254 {Ffc: func() (r struct{ Ffreq Ush }) { 14255 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72) 14256 return r 14257 }(), Fdl: func() (r struct{ Fdad Ush }) { 14258 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14259 return r 14260 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14261 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40) 14262 return r 14263 }(), Fdl: func() (r struct{ Fdad Ush }) { 14264 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14265 return r 14266 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14267 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104) 14268 return r 14269 }(), Fdl: func() (r struct{ Fdad Ush }) { 14270 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14271 return r 14272 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14273 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 14274 return r 14275 }(), Fdl: func() (r struct{ Fdad Ush }) { 14276 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14277 return r 14278 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14279 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88) 14280 return r 14281 }(), Fdl: func() (r struct{ Fdad Ush }) { 14282 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14283 return r 14284 }()}, 14285 {Ffc: func() (r struct{ Ffreq Ush }) { 14286 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56) 14287 return r 14288 }(), Fdl: func() (r struct{ Fdad Ush }) { 14289 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14290 return r 14291 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14292 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120) 14293 return r 14294 }(), Fdl: func() (r struct{ Fdad Ush }) { 14295 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14296 return r 14297 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14298 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 14299 return r 14300 }(), Fdl: func() (r struct{ Fdad Ush }) { 14301 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14302 return r 14303 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14304 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68) 14305 return r 14306 }(), Fdl: func() (r struct{ Fdad Ush }) { 14307 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14308 return r 14309 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14310 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36) 14311 return r 14312 }(), Fdl: func() (r struct{ Fdad Ush }) { 14313 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14314 return r 14315 }()}, 14316 {Ffc: func() (r struct{ Ffreq Ush }) { 14317 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100) 14318 return r 14319 }(), Fdl: func() (r struct{ Fdad Ush }) { 14320 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14321 return r 14322 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14323 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 14324 return r 14325 }(), Fdl: func() (r struct{ Fdad Ush }) { 14326 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14327 return r 14328 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14329 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84) 14330 return r 14331 }(), Fdl: func() (r struct{ Fdad Ush }) { 14332 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14333 return r 14334 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14335 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52) 14336 return r 14337 }(), Fdl: func() (r struct{ Fdad Ush }) { 14338 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14339 return r 14340 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14341 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116) 14342 return r 14343 }(), Fdl: func() (r struct{ Fdad Ush }) { 14344 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14345 return r 14346 }()}, 14347 {Ffc: func() (r struct{ Ffreq Ush }) { 14348 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 14349 return r 14350 }(), Fdl: func() (r struct{ Fdad Ush }) { 14351 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14352 return r 14353 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14354 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131) 14355 return r 14356 }(), Fdl: func() (r struct{ Fdad Ush }) { 14357 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14358 return r 14359 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14360 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67) 14361 return r 14362 }(), Fdl: func() (r struct{ Fdad Ush }) { 14363 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14364 return r 14365 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14366 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195) 14367 return r 14368 }(), Fdl: func() (r struct{ Fdad Ush }) { 14369 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14370 return r 14371 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14372 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35) 14373 return r 14374 }(), Fdl: func() (r struct{ Fdad Ush }) { 14375 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14376 return r 14377 }()}, 14378 {Ffc: func() (r struct{ Ffreq Ush }) { 14379 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163) 14380 return r 14381 }(), Fdl: func() (r struct{ Fdad Ush }) { 14382 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14383 return r 14384 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14385 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99) 14386 return r 14387 }(), Fdl: func() (r struct{ Fdad Ush }) { 14388 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14389 return r 14390 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14391 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227) 14392 return r 14393 }(), Fdl: func() (r struct{ Fdad Ush }) { 14394 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14395 return r 14396 }()}} /* trees.h:3:21 */ 14397 14398 var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) { 14399 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14400 return r 14401 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14402 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 14403 return r 14404 }(), Fdl: func() (r struct{ Fdad Ush }) { 14405 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14406 return r 14407 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14408 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14409 return r 14410 }(), Fdl: func() (r struct{ Fdad Ush }) { 14411 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14412 return r 14413 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14414 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 14415 return r 14416 }(), Fdl: func() (r struct{ Fdad Ush }) { 14417 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14418 return r 14419 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14420 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 14421 return r 14422 }(), Fdl: func() (r struct{ Fdad Ush }) { 14423 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14424 return r 14425 }()}, 14426 {Ffc: func() (r struct{ Ffreq Ush }) { 14427 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 14428 return r 14429 }(), Fdl: func() (r struct{ Fdad Ush }) { 14430 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14431 return r 14432 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14433 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 14434 return r 14435 }(), Fdl: func() (r struct{ Fdad Ush }) { 14436 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14437 return r 14438 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14439 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 14440 return r 14441 }(), Fdl: func() (r struct{ Fdad Ush }) { 14442 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14443 return r 14444 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14445 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 14446 return r 14447 }(), Fdl: func() (r struct{ Fdad Ush }) { 14448 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14449 return r 14450 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14451 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 14452 return r 14453 }(), Fdl: func() (r struct{ Fdad Ush }) { 14454 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14455 return r 14456 }()}, 14457 {Ffc: func() (r struct{ Ffreq Ush }) { 14458 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 14459 return r 14460 }(), Fdl: func() (r struct{ Fdad Ush }) { 14461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14462 return r 14463 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 14465 return r 14466 }(), Fdl: func() (r struct{ Fdad Ush }) { 14467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14468 return r 14469 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14470 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 14471 return r 14472 }(), Fdl: func() (r struct{ Fdad Ush }) { 14473 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14474 return r 14475 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14476 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 14477 return r 14478 }(), Fdl: func() (r struct{ Fdad Ush }) { 14479 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14480 return r 14481 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14482 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 14483 return r 14484 }(), Fdl: func() (r struct{ Fdad Ush }) { 14485 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14486 return r 14487 }()}, 14488 {Ffc: func() (r struct{ Ffreq Ush }) { 14489 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 14490 return r 14491 }(), Fdl: func() (r struct{ Fdad Ush }) { 14492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14493 return r 14494 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 14496 return r 14497 }(), Fdl: func() (r struct{ Fdad Ush }) { 14498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14499 return r 14500 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14501 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 14502 return r 14503 }(), Fdl: func() (r struct{ Fdad Ush }) { 14504 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14505 return r 14506 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14507 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14508 return r 14509 }(), Fdl: func() (r struct{ Fdad Ush }) { 14510 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14511 return r 14512 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14513 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 14514 return r 14515 }(), Fdl: func() (r struct{ Fdad Ush }) { 14516 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14517 return r 14518 }()}, 14519 {Ffc: func() (r struct{ Ffreq Ush }) { 14520 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14521 return r 14522 }(), Fdl: func() (r struct{ Fdad Ush }) { 14523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14524 return r 14525 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14526 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 14527 return r 14528 }(), Fdl: func() (r struct{ Fdad Ush }) { 14529 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14530 return r 14531 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14532 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 14533 return r 14534 }(), Fdl: func() (r struct{ Fdad Ush }) { 14535 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14536 return r 14537 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14538 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 14539 return r 14540 }(), Fdl: func() (r struct{ Fdad Ush }) { 14541 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14542 return r 14543 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14544 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 14545 return r 14546 }(), Fdl: func() (r struct{ Fdad Ush }) { 14547 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14548 return r 14549 }()}, 14550 {Ffc: func() (r struct{ Ffreq Ush }) { 14551 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 14552 return r 14553 }(), Fdl: func() (r struct{ Fdad Ush }) { 14554 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14555 return r 14556 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14557 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 14558 return r 14559 }(), Fdl: func() (r struct{ Fdad Ush }) { 14560 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14561 return r 14562 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14563 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 14564 return r 14565 }(), Fdl: func() (r struct{ Fdad Ush }) { 14566 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14567 return r 14568 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14569 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 14570 return r 14571 }(), Fdl: func() (r struct{ Fdad Ush }) { 14572 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14573 return r 14574 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14575 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 14576 return r 14577 }(), Fdl: func() (r struct{ Fdad Ush }) { 14578 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14579 return r 14580 }()}} /* trees.h:64:21 */ 14581 14582 var X_dist_code = [512]Uch{ 14583 Uch(0), Uch(1), Uch(2), Uch(3), Uch(4), Uch(4), Uch(5), Uch(5), Uch(6), Uch(6), Uch(6), Uch(6), Uch(7), Uch(7), Uch(7), Uch(7), Uch(8), Uch(8), Uch(8), Uch(8), 14584 Uch(8), Uch(8), Uch(8), Uch(8), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), 14585 Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), 14586 Uch(11), Uch(11), Uch(11), Uch(11), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), 14587 Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(13), Uch(13), Uch(13), Uch(13), 14588 Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), 14589 Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), 14590 Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), 14591 Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), 14592 Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), 14593 Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), 14594 Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), 14595 Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(0), Uch(0), Uch(16), Uch(17), 14596 Uch(18), Uch(18), Uch(19), Uch(19), Uch(20), Uch(20), Uch(20), Uch(20), Uch(21), Uch(21), Uch(21), Uch(21), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), 14597 Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), 14598 Uch(24), Uch(24), Uch(24), Uch(24), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), 14599 Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), 14600 Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), 14601 Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), 14602 Uch(27), Uch(27), Uch(27), Uch(27), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), 14603 Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), 14604 Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), 14605 Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 14606 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 14607 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 14608 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 14609 } /* trees.h:73:25 */ 14610 14611 var X_length_code = [256]Uch{ 14612 Uch(0), Uch(1), Uch(2), Uch(3), Uch(4), Uch(5), Uch(6), Uch(7), Uch(8), Uch(8), Uch(9), Uch(9), Uch(10), Uch(10), Uch(11), Uch(11), Uch(12), Uch(12), Uch(12), Uch(12), 14613 Uch(13), Uch(13), Uch(13), Uch(13), Uch(14), Uch(14), Uch(14), Uch(14), Uch(15), Uch(15), Uch(15), Uch(15), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), 14614 Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(19), Uch(19), Uch(19), Uch(19), 14615 Uch(19), Uch(19), Uch(19), Uch(19), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), 14616 Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(22), Uch(22), Uch(22), Uch(22), 14617 Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), 14618 Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), 14619 Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), 14620 Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), 14621 Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), 14622 Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), 14623 Uch(26), Uch(26), Uch(26), Uch(26), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), 14624 Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(28), 14625 } /* trees.h:102:25 */ 14626 14627 var base_length = [29]int32{ 14628 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 14629 64, 80, 96, 112, 128, 160, 192, 224, 0, 14630 } /* trees.h:118:17 */ 14631 14632 var base_dist = [30]int32{ 14633 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 14634 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 14635 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 14636 } /* trees.h:123:17 */ 14637 14638 var static_l_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Fextra_base: LITERALS + 1, Felems: LITERALS + 1 + LENGTH_CODES, Fmax_length: MAX_BITS} /* trees.c:125:31 */ 14639 14640 var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */ 14641 14642 var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */ 14643 14644 // Send a code of the given tree. c and tree must not have side effects 14645 14646 // =========================================================================== 14647 // Output a short LSB first on the stream. 14648 // IN assertion: there is enough room in pendingBuf. 14649 14650 // =========================================================================== 14651 // Send a value on a given number of bits. 14652 // IN assertion: length <= 16 and value fits in length bits. 14653 14654 // the arguments must not have side effects 14655 14656 // =========================================================================== 14657 // Initialize the various 'constant' tables. 14658 func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */ 14659 } 14660 14661 // =========================================================================== 14662 // Genererate the file trees.h describing the static trees. 14663 14664 // =========================================================================== 14665 // Initialize the tree data structures for a new zlib stream. 14666 func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */ 14667 tr_static_init(tls) 14668 14669 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 188 /* &.dyn_ltree */ 14670 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc)) 14671 14672 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2480 /* &.dyn_dtree */ 14673 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc)) 14674 14675 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2724 /* &.bl_tree */ 14676 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc)) 14677 14678 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 14679 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 14680 14681 // Initialize the first block of the first file: 14682 init_block(tls, s) 14683 } 14684 14685 // =========================================================================== 14686 // Initialize a new block. 14687 func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */ 14688 var n int32 // iterates over tree elements 14689 14690 // Initialize the trees. 14691 for n = 0; n < LITERALS+1+LENGTH_CODES; n++ { 14692 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(n)*4)) = Ush(0) 14693 } 14694 for n = 0; n < D_CODES; n++ { 14695 *(*Ush)(unsafe.Pointer(s + 2480 + uintptr(n)*4)) = Ush(0) 14696 } 14697 for n = 0; n < BL_CODES; n++ { 14698 *(*Ush)(unsafe.Pointer(s + 2724 + uintptr(n)*4)) = Ush(0) 14699 } 14700 14701 *(*Ush)(unsafe.Pointer(s + 188 + 256*4)) = Ush(1) 14702 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint32(s+5892, Ulg(0)) 14703 (*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5896, UInt(0)) 14704 } 14705 14706 // Index within the heap array of least frequent node in the Huffman tree 14707 14708 // =========================================================================== 14709 // Remove the smallest element from the heap and recreate the heap with 14710 // one less element. Updates heap and heap_len. 14711 14712 // =========================================================================== 14713 // Compares to subtrees, using the tree depth as tie breaker when 14714 // the subtrees have equal frequency. This minimizes the worst case length. 14715 14716 // =========================================================================== 14717 // Restore the heap property by moving down the tree starting at node k, 14718 // exchanging a node with the smallest of its two sons if necessary, stopping 14719 // when the heap property is re-established (each father smaller than its 14720 // two sons). 14721 func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */ 14722 var v int32 = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(k)*4)) 14723 var j int32 = k << 1 // left son of k 14724 for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len { 14725 // Set j to the smallest of the two sons: 14726 if j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len && (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j+1)*4)))*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j+1)*4)))*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j+1)*4)))))) <= int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4))))))) { 14727 j++ 14728 } 14729 // Exit if v is smaller than both sons 14730 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))))) { 14731 break 14732 } 14733 14734 // Exchange v with the smallest son 14735 *(*int32)(unsafe.Pointer(s + 2984 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)) 14736 k = j 14737 14738 // And continue down the tree, setting j to the left son of k 14739 j <<= 1 14740 } 14741 *(*int32)(unsafe.Pointer(s + 2984 + uintptr(k)*4)) = v 14742 } 14743 14744 // =========================================================================== 14745 // Compute the optimal bit lengths for a tree and update the total bit length 14746 // for the current block. 14747 // IN assertion: the fields freq and dad are set, heap[heap_max] and 14748 // above are the tree nodes sorted by increasing frequency. 14749 // OUT assertions: the field len is set to the optimal bit length, the 14750 // array bl_count contains the frequencies for each bit length. 14751 // The length opt_len is updated; static_len is also updated if stree is 14752 // not null. 14753 func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */ 14754 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 14755 var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code 14756 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 14757 var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits 14758 var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base 14759 var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length 14760 var h int32 // heap index 14761 var n int32 14762 var m int32 // iterate over the tree elements 14763 var bits int32 // bit length 14764 var xbits int32 // extra bits 14765 var f Ush // frequency 14766 var overflow int32 = 0 // number of elements with bit length too large 14767 14768 for bits = 0; bits <= MAX_BITS; bits++ { 14769 *(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2)) = Ush(0) 14770 } 14771 14772 // In a first pass, compute the optimal bit lengths (which may 14773 // overflow in the case of the bit length tree). 14774 *(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2)) = Ush(0) // root of the heap 14775 14776 for h = (*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1; h < 2*(LITERALS+1+LENGTH_CODES)+1; h++ { 14777 n = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(h)*4)) 14778 bits = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))*4 + 2))) + 1 14779 if bits > max_length { 14780 bits = max_length 14781 overflow++ 14782 } 14783 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(bits) 14784 // We overwrite tree[n].Dad which is no longer needed 14785 14786 if n > max_code { 14787 continue 14788 } // not a leaf node 14789 14790 *(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))++ 14791 xbits = 0 14792 if n >= base { 14793 xbits = *(*Intf)(unsafe.Pointer(extra + uintptr(n-base)*4)) 14794 } 14795 f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) 14796 *(*Ulg)(unsafe.Pointer(s + 5888)) += Ulg(f) * Ulg(uint32(bits+xbits)) 14797 if stree != 0 { 14798 *(*Ulg)(unsafe.Pointer(s + 5892)) += Ulg(f) * Ulg(uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2)))+xbits)) 14799 } 14800 } 14801 if overflow == 0 { 14802 return 14803 } 14804 14805 // This happens for example on obj2 and pic of the Calgary corpus 14806 14807 // Find the first bit length which could increase: 14808 for __ccgo := true; __ccgo; __ccgo = overflow > 0 { 14809 bits = max_length - 1 14810 for int32(*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))) == 0 { 14811 bits-- 14812 } 14813 *(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))-- // move one leaf down the tree 14814 *(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits+1)*2)) += Ush(2) // move one overflow item as its brother 14815 *(*Ush)(unsafe.Pointer(s + 2952 + uintptr(max_length)*2))-- 14816 // The brother of the overflow item also moves one step up, 14817 // but this does not affect bl_count[max_length] 14818 overflow = overflow - 2 14819 } 14820 14821 // Now recompute all bit lengths, scanning in increasing frequency. 14822 // h is still equal to HEAP_SIZE. (It is simpler to reconstruct all 14823 // lengths instead of fixing only the wrong ones. This idea is taken 14824 // from 'ar' written by Haruhiko Okumura.) 14825 for bits = max_length; bits != 0; bits-- { 14826 n = int32(*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))) 14827 for n != 0 { 14828 m = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&h, 1))*4)) 14829 if m > max_code { 14830 continue 14831 } 14832 if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2))) != uint32(bits) { 14833 14834 *(*Ulg)(unsafe.Pointer(s + 5888)) += (Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4))) 14835 *(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = Ush(bits) 14836 } 14837 n-- 14838 } 14839 } 14840 } 14841 14842 // =========================================================================== 14843 // Generate the codes for a given tree and bit counts (which need not be 14844 // optimal). 14845 // IN assertion: the array bl_count contains the bit length statistics for 14846 // the given tree and the field len is set for all tree elements. 14847 // OUT assertion: the field code is set for all tree elements of non 14848 // zero code length. 14849 func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */ 14850 bp := tls.Alloc(32) 14851 defer tls.Free(32) 14852 14853 // var next_code [16]Ush at bp, 32 14854 // next code value for each bit length 14855 var code uint32 = uint32(0) // running code value 14856 var bits int32 // bit index 14857 var n int32 // code index 14858 14859 // The distribution counts are first used to generate the code values 14860 // without bit reversal. 14861 for bits = 1; bits <= MAX_BITS; bits++ { 14862 code = (code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr(bits-1)*2)))) << 1 14863 *(*Ush)(unsafe.Pointer(bp + uintptr(bits)*2)) = Ush(code) 14864 } 14865 // Check that the bit counts in bl_count are consistent. The last code 14866 // must be all ones. 14867 14868 for n = 0; n <= max_code; n++ { 14869 var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2))) 14870 if len == 0 { 14871 continue 14872 } 14873 // Now reverse the bits 14874 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp + uintptr(len)*2)), 1)), len)) 14875 14876 } 14877 } 14878 14879 // =========================================================================== 14880 // Construct one Huffman tree and assigns the code bit strings and lengths. 14881 // Update the total bit length for the current block. 14882 // IN assertion: the field freq is set for all tree elements. 14883 // OUT assertions: the fields len and code are set to the optimal bit length 14884 // and corresponding code. The length opt_len is updated; static_len is 14885 // also updated if stree is not null. The field max_code is set. 14886 func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */ 14887 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 14888 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 14889 var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems 14890 var n int32 14891 var m int32 // iterate over heap elements 14892 var max_code int32 = -1 // largest code with non zero frequency 14893 var node int32 // new node being created 14894 14895 // Construct the initial heap, with least frequent element in 14896 // heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. 14897 // heap[0] is not used. 14898 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0 14899 (*Deflate_state)(unsafe.Pointer(s)).Fheap_max = 2*(LITERALS+1+LENGTH_CODES) + 1 14900 14901 for n = 0; n < elems; n++ { 14902 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) != 0 { 14903 *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) = libc.AssignInt32(&max_code, n) 14904 *(*Uch)(unsafe.Pointer(s + 5284 + uintptr(n))) = Uch(0) 14905 } else { 14906 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(0) 14907 } 14908 } 14909 14910 // The pkzip format requires that at least one distance code exists, 14911 // and that at least one bit should be sent even if there is only one 14912 // possible code. So to avoid special checks later on we force at least 14913 // two codes of non zero frequency. 14914 for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 { 14915 node = libc.AssignPtrInt32(s+2984+uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4, func() int32 { 14916 if max_code < 2 { 14917 return libc.PreIncInt32(&max_code, 1) 14918 } 14919 return 0 14920 }()) 14921 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(1) 14922 *(*Uch)(unsafe.Pointer(s + 5284 + uintptr(node))) = Uch(0) 14923 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len-- 14924 if stree != 0 { 14925 *(*Ulg)(unsafe.Pointer(s + 5892)) -= Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2))) 14926 } 14927 // node is 0 or 1 so it does not have extra bits 14928 } 14929 (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code 14930 14931 // The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, 14932 // establish sub-heaps of increasing lengths: 14933 for n = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2; n >= 1; n-- { 14934 pqdownheap(tls, s, tree, n) 14935 } 14936 14937 // Construct the Huffman tree by repeatedly combining the least two 14938 // frequent nodes. 14939 node = elems // next internal node of the tree 14940 for __ccgo := true; __ccgo; __ccgo = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2 { 14941 { 14942 n = *(*int32)(unsafe.Pointer(s + 2984 + 1*4)) 14943 *(*int32)(unsafe.Pointer(s + 2984 + 1*4)) = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) 14944 pqdownheap(tls, s, tree, SMALLEST) 14945 } 14946 // n = node of least frequency 14947 m = *(*int32)(unsafe.Pointer(s + 2984 + 1*4)) // m = node of next least frequency 14948 14949 *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = n // keep the nodes sorted by frequency 14950 *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = m 14951 14952 // Create a new node father of n and m 14953 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4)))) 14954 *(*Uch)(unsafe.Pointer(s + 5284 + uintptr(node))) = Uch(func() int32 { 14955 if int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(m)))) { 14956 return int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(n)))) 14957 } 14958 return int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(m)))) 14959 }() + 1) 14960 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2, Ush(node)) 14961 // and insert the new node in the heap 14962 *(*int32)(unsafe.Pointer(s + 2984 + 1*4)) = libc.PostIncInt32(&node, 1) 14963 pqdownheap(tls, s, tree, SMALLEST) 14964 14965 } 14966 14967 *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = *(*int32)(unsafe.Pointer(s + 2984 + 1*4)) 14968 14969 // At this point, the fields freq and dad are set. We can now 14970 // generate the bit lengths. 14971 gen_bitlen(tls, s, desc) 14972 14973 // The field len is now set, we can generate the bit codes 14974 gen_codes(tls, tree, max_code, s+2952) 14975 } 14976 14977 // =========================================================================== 14978 // Scan a literal or distance tree to determine the frequencies of the codes 14979 // in the bit length tree. 14980 func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */ 14981 var n int32 // iterates over all tree elements 14982 var prevlen int32 = -1 // last emitted length 14983 var curlen int32 // length of current code 14984 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code 14985 var count int32 = 0 // repeat count of the current code 14986 var max_count int32 = 7 // max repeat count 14987 var min_count int32 = 4 // min repeat count 14988 14989 if nextlen == 0 { 14990 max_count = 138 14991 min_count = 3 14992 } 14993 *(*Ush)(unsafe.Pointer(tree + uintptr(max_code+1)*4 + 2)) = Ush(0xffff) // guard 14994 14995 for n = 0; n <= max_code; n++ { 14996 curlen = nextlen 14997 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2))) 14998 if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen { 14999 continue 15000 } else if count < min_count { 15001 *(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4)) += Ush(count) 15002 } else if curlen != 0 { 15003 if curlen != prevlen { 15004 *(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))++ 15005 } 15006 *(*Ush)(unsafe.Pointer(s + 2724 + 16*4))++ 15007 } else if count <= 10 { 15008 *(*Ush)(unsafe.Pointer(s + 2724 + 17*4))++ 15009 } else { 15010 *(*Ush)(unsafe.Pointer(s + 2724 + 18*4))++ 15011 } 15012 count = 0 15013 prevlen = curlen 15014 if nextlen == 0 { 15015 max_count = 138 15016 min_count = 3 15017 } else if curlen == nextlen { 15018 max_count = 6 15019 min_count = 3 15020 } else { 15021 max_count = 7 15022 min_count = 4 15023 } 15024 } 15025 } 15026 15027 // =========================================================================== 15028 // Send a literal or distance tree in compressed form, using the codes in 15029 // bl_tree. 15030 func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */ 15031 var n int32 // iterates over all tree elements 15032 var prevlen int32 = -1 // last emitted length 15033 var curlen int32 // length of current code 15034 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code 15035 var count int32 = 0 // repeat count of the current code 15036 var max_count int32 = 7 // max repeat count 15037 var min_count int32 = 4 // min repeat count 15038 15039 /* tree[max_code+1].Len = -1; */ // guard already set 15040 if nextlen == 0 { 15041 max_count = 138 15042 min_count = 3 15043 } 15044 15045 for n = 0; n <= max_code; n++ { 15046 curlen = nextlen 15047 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2))) 15048 if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen { 15049 continue 15050 } else if count < min_count { 15051 for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&count, 1) != 0 { 15052 { 15053 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4 + 2))) 15054 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15055 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))) 15056 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15057 { 15058 { 15059 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15060 } 15061 { 15062 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15063 } 15064 15065 } 15066 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15067 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15068 } else { 15069 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15070 *(*int32)(unsafe.Pointer(s + 5908)) += len 15071 } 15072 } 15073 } 15074 15075 } else if curlen != 0 { 15076 if curlen != prevlen { 15077 { 15078 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4 + 2))) 15079 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15080 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))) 15081 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15082 { 15083 { 15084 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15085 } 15086 { 15087 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15088 } 15089 15090 } 15091 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15092 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15093 } else { 15094 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15095 *(*int32)(unsafe.Pointer(s + 5908)) += len 15096 } 15097 } 15098 count-- 15099 } 15100 15101 { 15102 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 16*4 + 2))) 15103 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15104 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 16*4))) 15105 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15106 { 15107 { 15108 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15109 } 15110 { 15111 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15112 } 15113 15114 } 15115 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15116 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15117 } else { 15118 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + 16*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15119 *(*int32)(unsafe.Pointer(s + 5908)) += len 15120 } 15121 } 15122 { 15123 var len int32 = 2 15124 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15125 var val int32 = count - 3 15126 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15127 { 15128 { 15129 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15130 } 15131 { 15132 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15133 } 15134 15135 } 15136 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15137 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15138 } else { 15139 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15140 *(*int32)(unsafe.Pointer(s + 5908)) += len 15141 } 15142 } 15143 15144 } else if count <= 10 { 15145 { 15146 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 17*4 + 2))) 15147 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15148 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 17*4))) 15149 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15150 { 15151 { 15152 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15153 } 15154 { 15155 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15156 } 15157 15158 } 15159 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15160 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15161 } else { 15162 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + 17*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15163 *(*int32)(unsafe.Pointer(s + 5908)) += len 15164 } 15165 } 15166 { 15167 var len int32 = 3 15168 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15169 var val int32 = count - 3 15170 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15171 { 15172 { 15173 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15174 } 15175 { 15176 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15177 } 15178 15179 } 15180 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15181 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15182 } else { 15183 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15184 *(*int32)(unsafe.Pointer(s + 5908)) += len 15185 } 15186 } 15187 15188 } else { 15189 { 15190 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 18*4 + 2))) 15191 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15192 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 18*4))) 15193 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15194 { 15195 { 15196 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15197 } 15198 { 15199 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15200 } 15201 15202 } 15203 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15204 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15205 } else { 15206 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + 18*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15207 *(*int32)(unsafe.Pointer(s + 5908)) += len 15208 } 15209 } 15210 { 15211 var len int32 = 7 15212 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15213 var val int32 = count - 11 15214 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15215 { 15216 { 15217 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15218 } 15219 { 15220 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15221 } 15222 15223 } 15224 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15225 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15226 } else { 15227 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(count-11)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15228 *(*int32)(unsafe.Pointer(s + 5908)) += len 15229 } 15230 } 15231 15232 } 15233 count = 0 15234 prevlen = curlen 15235 if nextlen == 0 { 15236 max_count = 138 15237 min_count = 3 15238 } else if curlen == nextlen { 15239 max_count = 6 15240 min_count = 3 15241 } else { 15242 max_count = 7 15243 min_count = 4 15244 } 15245 } 15246 } 15247 15248 // =========================================================================== 15249 // Construct the Huffman tree for the bit lengths and return the index in 15250 // bl_order of the last bit length code to send. 15251 func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */ 15252 var max_blindex int32 // index of last bit length code of non zero freq 15253 15254 // Determine the bit length frequencies for literal and distance trees 15255 scan_tree(tls, s, s+188 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) 15256 scan_tree(tls, s, s+2480 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) 15257 15258 // Build the bit length tree: 15259 build_tree(tls, s, s+2928) 15260 // opt_len now includes the length of the tree representations, except 15261 // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. 15262 15263 // Determine the number of bit length codes to send. The pkzip format 15264 // requires that at least 4 bit length codes be sent. (appnote.txt says 15265 // 3 but the actual value used is 4.) 15266 for max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex-- { 15267 if int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(bl_order[max_blindex])*4 + 2))) != 0 { 15268 break 15269 } 15270 } 15271 // Update opt_len to include the bit length tree and counts 15272 *(*Ulg)(unsafe.Pointer(s + 5888)) += Ulg(3)*(Ulg(max_blindex)+Ulg(1)) + Ulg(5) + Ulg(5) + Ulg(4) 15273 15274 return max_blindex 15275 } 15276 15277 // =========================================================================== 15278 // Send the header for a block using dynamic Huffman trees: the counts, the 15279 // lengths of the bit length codes, the literal tree and the distance tree. 15280 // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. 15281 func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */ 15282 var rank int32 // index in bl_order 15283 15284 { 15285 var len int32 = 5 15286 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15287 var val int32 = lcodes - 257 15288 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15289 { 15290 { 15291 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15292 } 15293 { 15294 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15295 } 15296 15297 } 15298 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15299 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15300 } else { 15301 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(lcodes-257)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15302 *(*int32)(unsafe.Pointer(s + 5908)) += len 15303 } 15304 } 15305 /* not +255 as stated in appnote.txt */ 15306 { 15307 var len int32 = 5 15308 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15309 var val int32 = dcodes - 1 15310 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15311 { 15312 { 15313 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15314 } 15315 { 15316 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15317 } 15318 15319 } 15320 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15321 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15322 } else { 15323 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(dcodes-1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15324 *(*int32)(unsafe.Pointer(s + 5908)) += len 15325 } 15326 } 15327 15328 { 15329 var len int32 = 4 15330 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15331 var val int32 = blcodes - 4 15332 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15333 { 15334 { 15335 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15336 } 15337 { 15338 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15339 } 15340 15341 } 15342 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15343 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15344 } else { 15345 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(blcodes-4)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15346 *(*int32)(unsafe.Pointer(s + 5908)) += len 15347 } 15348 } 15349 // not -3 as stated in appnote.txt 15350 for rank = 0; rank < blcodes; rank++ { 15351 15352 { 15353 var len int32 = 3 15354 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15355 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(bl_order[rank])*4 + 2))) 15356 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15357 { 15358 { 15359 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15360 } 15361 { 15362 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15363 } 15364 15365 } 15366 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15367 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15368 } else { 15369 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(bl_order[rank])*4 + 2))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15370 *(*int32)(unsafe.Pointer(s + 5908)) += len 15371 } 15372 } 15373 15374 } 15375 15376 send_tree(tls, s, s+188 /* &.dyn_ltree */, lcodes-1) // literal tree 15377 15378 send_tree(tls, s, s+2480 /* &.dyn_dtree */, dcodes-1) // distance tree 15379 15380 } 15381 15382 // =========================================================================== 15383 // Send a stored block 15384 func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */ 15385 { 15386 var len int32 = 3 15387 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15388 var val int32 = int32(STORED_BLOCK)<<1 + last 15389 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15390 { 15391 { 15392 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15393 } 15394 { 15395 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15396 } 15397 15398 } 15399 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15400 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15401 } else { 15402 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(int32(STORED_BLOCK)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15403 *(*int32)(unsafe.Pointer(s + 5908)) += len 15404 } 15405 } 15406 // send block type 15407 bi_windup(tls, s) /* align on byte boundary */ 15408 { 15409 { 15410 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(stored_len)) & 0xff) 15411 } 15412 { 15413 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(stored_len)) >> 8) 15414 } 15415 15416 } 15417 15418 { 15419 { 15420 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(^stored_len)) & 0xff) 15421 } 15422 { 15423 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(^stored_len)) >> 8) 15424 } 15425 15426 } 15427 15428 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), buf, uint64(stored_len)) 15429 *(*Ulg)(unsafe.Pointer(s + 40)) += stored_len 15430 } 15431 15432 // =========================================================================== 15433 // Flush the bits in the bit buffer to pending output (leaves at most 7 bits) 15434 func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */ 15435 bi_flush(tls, s) 15436 } 15437 15438 // =========================================================================== 15439 // Send one empty static block to give enough lookahead for inflate. 15440 // This takes 10 bits, of which 7 may remain in the bit buffer. 15441 func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */ 15442 { 15443 var len int32 = 3 15444 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15445 var val int32 = int32(STATIC_TREES) << 1 15446 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15447 { 15448 { 15449 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15450 } 15451 { 15452 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15453 } 15454 15455 } 15456 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15457 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15458 } else { 15459 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(int32(Ush(int32(STATIC_TREES)<<1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15460 *(*int32)(unsafe.Pointer(s + 5908)) += len 15461 } 15462 } 15463 15464 { 15465 var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2))) 15466 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15467 var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) 15468 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15469 { 15470 { 15471 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15472 } 15473 { 15474 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15475 } 15476 15477 } 15478 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15479 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15480 } else { 15481 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15482 *(*int32)(unsafe.Pointer(s + 5908)) += len 15483 } 15484 } 15485 15486 bi_flush(tls, s) 15487 } 15488 15489 // =========================================================================== 15490 // Determine the best encoding for the current block: dynamic trees, static 15491 // trees or store, and write out the encoded block. 15492 func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */ 15493 var opt_lenb Ulg 15494 var static_lenb Ulg // opt_len and static_len in bytes 15495 var max_blindex int32 = 0 // index of last bit length code of non zero freq 15496 15497 // Build the Huffman trees unless a stored block is forced 15498 if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 { 15499 15500 // Check if the file is binary or text 15501 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN { 15502 (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s) 15503 } 15504 15505 // Construct the literal and distance trees 15506 build_tree(tls, s, s+2880) 15507 15508 build_tree(tls, s, s+2904) 15509 15510 // At this point, opt_len and static_len are the total bit lengths of 15511 // the compressed block data, excluding the tree representations. 15512 15513 // Build the bit length tree for the above two trees, and get the index 15514 // in bl_order of the last bit length code to send. 15515 max_blindex = build_bl_tree(tls, s) 15516 15517 // Determine the best encoding. Compute the block lengths in bytes. 15518 opt_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + Ulg(3) + Ulg(7)) >> 3 15519 static_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + Ulg(3) + Ulg(7)) >> 3 15520 15521 if static_lenb <= opt_lenb { 15522 opt_lenb = static_lenb 15523 } 15524 15525 } else { 15526 15527 opt_lenb = libc.AssignUint32(&static_lenb, stored_len+Ulg(5)) // force a stored block 15528 } 15529 15530 if stored_len+Ulg(4) <= opt_lenb && buf != uintptr(0) { 15531 // 4: two words for the lengths 15532 // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. 15533 // Otherwise we can't have processed more than WSIZE input bytes since 15534 // the last block flush, because compression would have been 15535 // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 15536 // transform a block into a stored block. 15537 X_tr_stored_block(tls, s, buf, stored_len, last) 15538 15539 } else if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED || static_lenb == opt_lenb { 15540 { 15541 var len int32 = 3 15542 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15543 var val int32 = int32(STATIC_TREES)<<1 + last 15544 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15545 { 15546 { 15547 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15548 } 15549 { 15550 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15551 } 15552 15553 } 15554 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15555 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15556 } else { 15557 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(int32(STATIC_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15558 *(*int32)(unsafe.Pointer(s + 5908)) += len 15559 } 15560 } 15561 15562 compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))), 15563 uintptr(uintptr(unsafe.Pointer(&static_dtree)))) 15564 } else { 15565 { 15566 var len int32 = 3 15567 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15568 var val int32 = int32(DYN_TREES)<<1 + last 15569 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15570 { 15571 { 15572 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15573 } 15574 { 15575 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15576 } 15577 15578 } 15579 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15580 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15581 } else { 15582 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(int32(DYN_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15583 *(*int32)(unsafe.Pointer(s + 5908)) += len 15584 } 15585 } 15586 15587 send_all_trees(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code+1, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code+1, 15588 max_blindex+1) 15589 compress_block(tls, s, s+188, /* &.dyn_ltree */ 15590 s+2480 /* &.dyn_dtree */) 15591 } 15592 15593 // The above check is made mod 2^32, for files larger than 512 MB 15594 // and uLong implemented on 32 bits. 15595 init_block(tls, s) 15596 15597 if last != 0 { 15598 bi_windup(tls, s) 15599 } 15600 15601 } 15602 15603 // =========================================================================== 15604 // Save the match info and tally the frequency counts. Return true if 15605 // the current block must be flushed. 15606 func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */ 15607 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist) 15608 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc) 15609 if dist == uint32(0) { 15610 // lc is the unmatched char 15611 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(lc)*4))++ 15612 } else { 15613 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 15614 // Here, lc is the match length - MIN_MATCH 15615 dist-- // dist = match distance - 1 15616 15617 *(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(X_length_code[lc])+LITERALS+1)*4))++ 15618 *(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 { 15619 if dist < uint32(256) { 15620 return int32(X_dist_code[dist]) 15621 } 15622 return int32(X_dist_code[uint32(256)+dist>>7]) 15623 }())*4))++ 15624 } 15625 15626 return libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 15627 // We avoid equality with lit_bufsize because of wraparound at 64K 15628 // on 16 bit machines and because stored blocks are restricted to 15629 // 64K-1 bytes. 15630 } 15631 15632 // =========================================================================== 15633 // Send the block data compressed using the given Huffman trees 15634 func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */ 15635 var dist uint32 // distance of matched string 15636 var lc int32 // match length or unmatched char (if dist == 0) 15637 var lx uint32 = uint32(0) // running index in l_buf 15638 var code uint32 // the code to send 15639 var extra int32 // number of extra bits to send 15640 15641 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) { 15642 for __ccgo := true; __ccgo; __ccgo = lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit { 15643 dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2))) 15644 lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1))))) 15645 if dist == uint32(0) { 15646 { 15647 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2))) 15648 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15649 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) 15650 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15651 { 15652 { 15653 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15654 } 15655 { 15656 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15657 } 15658 15659 } 15660 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15661 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15662 } else { 15663 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15664 *(*int32)(unsafe.Pointer(s + 5908)) += len 15665 } 15666 } 15667 // send a literal byte 15668 15669 } else { 15670 // Here, lc is the match length - MIN_MATCH 15671 code = uint32(X_length_code[lc]) 15672 { 15673 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4 + 2))) 15674 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15675 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4))) 15676 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15677 { 15678 { 15679 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15680 } 15681 { 15682 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15683 } 15684 15685 } 15686 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15687 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15688 } else { 15689 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15690 *(*int32)(unsafe.Pointer(s + 5908)) += len 15691 } 15692 } 15693 // send the length code 15694 extra = extra_lbits[code] 15695 if extra != 0 { 15696 lc = lc - base_length[code] 15697 { 15698 var len int32 = extra 15699 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15700 var val int32 = lc 15701 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15702 { 15703 { 15704 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15705 } 15706 { 15707 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15708 } 15709 15710 } 15711 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15712 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15713 } else { 15714 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(lc)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15715 *(*int32)(unsafe.Pointer(s + 5908)) += len 15716 } 15717 } 15718 // send the extra length bits 15719 } 15720 dist-- // dist is now the match distance - 1 15721 code = func() uint32 { 15722 if dist < uint32(256) { 15723 return uint32(X_dist_code[dist]) 15724 } 15725 return uint32(X_dist_code[uint32(256)+dist>>7]) 15726 }() 15727 15728 { 15729 var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2))) 15730 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15731 var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) 15732 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15733 { 15734 { 15735 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15736 } 15737 { 15738 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15739 } 15740 15741 } 15742 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15743 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15744 } else { 15745 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15746 *(*int32)(unsafe.Pointer(s + 5908)) += len 15747 } 15748 } 15749 // send the distance code 15750 extra = extra_dbits[code] 15751 if extra != 0 { 15752 dist = dist - uint32(base_dist[code]) 15753 { 15754 var len int32 = extra 15755 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15756 var val int32 = int32(dist) 15757 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15758 { 15759 { 15760 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15761 } 15762 { 15763 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15764 } 15765 15766 } 15767 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15768 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15769 } else { 15770 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(dist)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15771 *(*int32)(unsafe.Pointer(s + 5908)) += len 15772 } 15773 } 15774 // send the extra distance bits 15775 } 15776 } // literal or match pair ? 15777 15778 // Check that the overlay between pending_buf and d_buf+l_buf is ok: 15779 15780 } 15781 } 15782 15783 { 15784 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2))) 15785 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 15786 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) 15787 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15788 { 15789 { 15790 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15791 } 15792 { 15793 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15794 } 15795 15796 } 15797 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 15798 *(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size 15799 } else { 15800 *(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 15801 *(*int32)(unsafe.Pointer(s + 5908)) += len 15802 } 15803 } 15804 15805 } 15806 15807 // =========================================================================== 15808 // Check if the data type is TEXT or BINARY, using the following algorithm: 15809 // - TEXT if the two conditions below are satisfied: 15810 // a) There are no non-portable control characters belonging to the 15811 // "black list" (0..6, 14..25, 28..31). 15812 // b) There is at least one printable character belonging to the 15813 // "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). 15814 // - BINARY otherwise. 15815 // - The following partially-portable control characters form a 15816 // "gray list" that is ignored in this detection algorithm: 15817 // (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). 15818 // IN assertion: the fields Freq of dyn_ltree are set. 15819 func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */ 15820 // black_mask is the bit mask of black-listed bytes 15821 // set bits 0..6, 14..25, and 28..31 15822 // 0xf3ffc07f = binary 11110011111111111100000001111111 15823 var black_mask uint32 = 0xf3ffc07f 15824 var n int32 15825 15826 // Check for non-textual ("black-listed") bytes. 15827 n = 0 15828 __1: 15829 if !(n <= 31) { 15830 goto __3 15831 } 15832 if black_mask&uint32(1) != 0 && int32(*(*Ush)(unsafe.Pointer(s + 188 + uintptr(n)*4))) != 0 { 15833 return Z_BINARY 15834 } 15835 goto __2 15836 __2: 15837 n++ 15838 black_mask >>= 1 15839 goto __1 15840 goto __3 15841 __3: 15842 ; 15843 15844 // Check for textual ("white-listed") bytes. 15845 if int32(*(*Ush)(unsafe.Pointer(s + 188 + 9*4))) != 0 || int32(*(*Ush)(unsafe.Pointer(s + 188 + 10*4))) != 0 || 15846 int32(*(*Ush)(unsafe.Pointer(s + 188 + 13*4))) != 0 { 15847 return Z_TEXT 15848 } 15849 for n = 32; n < LITERALS; n++ { 15850 if int32(*(*Ush)(unsafe.Pointer(s + 188 + uintptr(n)*4))) != 0 { 15851 return Z_TEXT 15852 } 15853 } 15854 15855 // There are no "black-listed" or "white-listed" bytes: 15856 // this stream either is empty or has tolerated ("gray-listed") bytes only. 15857 return Z_BINARY 15858 } 15859 15860 // =========================================================================== 15861 // Reverse the first len bits of a code, using straightforward code (a faster 15862 // method would use a table) 15863 // IN assertion: 1 <= len <= 15 15864 func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */ 15865 var res uint32 = uint32(0) 15866 for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&len, 1) > 0 { 15867 res = res | code&uint32(1) 15868 code >>= 1 15869 res <<= 1 15870 } 15871 return res >> 1 15872 } 15873 15874 // =========================================================================== 15875 // Flush the bit buffer, keeping at most 7 bits in it. 15876 func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */ 15877 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 { 15878 { 15879 { 15880 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15881 } 15882 { 15883 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15884 } 15885 15886 } 15887 15888 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 15889 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 15890 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 { 15891 { 15892 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 15893 } 15894 15895 libc.AssignShrPtrUint16(s+5904, int(8)) 15896 *(*int32)(unsafe.Pointer(s + 5908)) -= 8 15897 } 15898 } 15899 15900 // =========================================================================== 15901 // Flush the bit buffer and align the output on a byte boundary 15902 func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */ 15903 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 { 15904 { 15905 { 15906 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff) 15907 } 15908 { 15909 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8) 15910 } 15911 15912 } 15913 15914 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { 15915 { 15916 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 15917 } 15918 15919 } 15920 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 15921 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 15922 } 15923 15924 // =========================================================================== 15925 // Decompresses the source buffer into the destination buffer. *sourceLen is 15926 // the byte length of the source buffer. Upon entry, *destLen is the total size 15927 // of the destination buffer, which must be large enough to hold the entire 15928 // uncompressed data. (The size of the uncompressed data must have been saved 15929 // previously by the compressor and transmitted to the decompressor by some 15930 // mechanism outside the scope of this compression library.) Upon exit, 15931 // *destLen is the size of the decompressed data and *sourceLen is the number 15932 // of source bytes consumed. Upon return, source + *sourceLen points to the 15933 // first unused input byte. 15934 // 15935 // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough 15936 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or 15937 // Z_DATA_ERROR if the input data was corrupted, including if the input data is 15938 // an incomplete zlib stream. 15939 func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */ 15940 bp := tls.Alloc(96) 15941 defer tls.Free(96) 15942 15943 // var stream Z_stream at bp+8, 88 15944 15945 var err int32 15946 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 15947 var len ULong 15948 var left ULong 15949 // var buf [1]Byte at bp, 1 15950 // for detection of incomplete stream when *destLen == 0 15951 15952 len = *(*ULong)(unsafe.Pointer(sourceLen)) 15953 if *(*ULongf)(unsafe.Pointer(destLen)) != 0 { 15954 left = *(*ULongf)(unsafe.Pointer(destLen)) 15955 *(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0) 15956 } else { 15957 left = ULong(1) 15958 dest = bp /* &buf[0] */ 15959 } 15960 15961 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source 15962 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0) 15963 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0) 15964 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0) 15965 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0) 15966 15967 err = XinflateInit_(tls, bp+8, ts, int32(unsafe.Sizeof(Z_stream{}))) 15968 if err != Z_OK { 15969 return err 15970 } 15971 15972 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest 15973 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0) 15974 15975 for __ccgo := true; __ccgo; __ccgo = err == Z_OK { 15976 if (*Z_stream)(unsafe.Pointer(bp+8)).Favail_out == UInt(0) { 15977 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 { 15978 if left > ULong(max) { 15979 return max 15980 } 15981 return UInt(left) 15982 }() 15983 left = left - ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_out) 15984 } 15985 if (*Z_stream)(unsafe.Pointer(bp+8)).Favail_in == UInt(0) { 15986 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 { 15987 if len > ULong(max) { 15988 return max 15989 } 15990 return UInt(len) 15991 }() 15992 len = len - ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_in) 15993 } 15994 err = Xinflate(tls, bp+8, Z_NO_FLUSH) 15995 } 15996 15997 *(*ULong)(unsafe.Pointer(sourceLen)) -= len + ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_in) 15998 if dest != bp { 15999 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out 16000 } else if (*Z_stream)(unsafe.Pointer(bp+8)).Ftotal_out != 0 && err == -5 { 16001 left = ULong(1) 16002 } 16003 16004 XinflateEnd(tls, bp+8) 16005 if err == Z_STREAM_END { 16006 return Z_OK 16007 } 16008 if err == Z_NEED_DICT { 16009 return -3 16010 } 16011 if err == -5 && left+ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_out) != 0 { 16012 return -3 16013 } 16014 return err 16015 } 16016 16017 func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */ 16018 bp := tls.Alloc(4) 16019 defer tls.Free(4) 16020 *(*ULong)(unsafe.Pointer(bp)) = sourceLen 16021 16022 return Xuncompress2(tls, dest, destLen, source, bp) 16023 } 16024 16025 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 16026 // value -- needed when comparing unsigned to z_off64_t, which is signed 16027 // (possible z_off64_t types off_t, off64_t, and long are all signed) 16028 16029 var Xz_errmsg = [10]uintptr{ 16030 uintptr(ts + 876), 16031 uintptr(ts + 892), 16032 uintptr(ts + 101), 16033 uintptr(ts + 903), 16034 uintptr(ts + 914), 16035 uintptr(ts + 927), 16036 uintptr(ts + 938), 16037 uintptr(ts + 958), 16038 uintptr(ts + 971), 16039 uintptr(ts + 101), 16040 } /* zutil.c:13:14 */ 16041 16042 func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */ 16043 return ts /* "1.2.11" */ 16044 } 16045 16046 func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */ 16047 var flags ULong 16048 16049 flags = ULong(0) 16050 switch int32(unsafe.Sizeof(UInt(0))) { 16051 case 2: 16052 break 16053 case 4: 16054 flags = flags + ULong(1) 16055 break 16056 case 8: 16057 flags = flags + ULong(2) 16058 break 16059 default: 16060 flags = flags + ULong(3) 16061 } 16062 switch int32(unsafe.Sizeof(ULong(0))) { 16063 case 2: 16064 break 16065 case 4: 16066 flags = flags + ULong(int32(1)<<2) 16067 break 16068 case 8: 16069 flags = flags + ULong(int32(2)<<2) 16070 break 16071 default: 16072 flags = flags + ULong(int32(3)<<2) 16073 } 16074 switch int32(unsafe.Sizeof(Voidpf(0))) { 16075 case 2: 16076 break 16077 case 4: 16078 flags = flags + ULong(int32(1)<<4) 16079 break 16080 case 8: 16081 flags = flags + ULong(int32(2)<<4) 16082 break 16083 default: 16084 flags = flags + ULong(int32(3)<<4) 16085 } 16086 switch int32(unsafe.Sizeof(int32(0))) { 16087 case 2: 16088 break 16089 case 4: 16090 flags = flags + ULong(int32(1)<<6) 16091 break 16092 case 8: 16093 flags = flags + ULong(int32(2)<<6) 16094 break 16095 default: 16096 flags = flags + ULong(int32(3)<<6) 16097 } 16098 return flags 16099 } 16100 16101 // exported to allow conversion of error code to string for compress() and 16102 // uncompress() 16103 func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */ 16104 return Xz_errmsg[Z_NEED_DICT-err] 16105 } 16106 16107 func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */ 16108 _ = opaque 16109 if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) { 16110 return libc.Xmalloc(tls, uint64(items*size)) 16111 } 16112 return libc.Xcalloc(tls, uint64(items), uint64(size)) 16113 } 16114 16115 func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */ 16116 _ = opaque 16117 libc.Xfree(tls, ptr) 16118 } 16119 16120 func init() { 16121 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8)) = deflate_stored // deflate.c:136:29: 16122 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24)) = deflate_fast // deflate.c:137:29: 16123 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40)) = deflate_fast // deflate.c:138:29: 16124 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56)) = deflate_fast // deflate.c:139:29: 16125 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72)) = deflate_slow // deflate.c:141:29: 16126 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88)) = deflate_slow // deflate.c:142:29: 16127 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104)) = deflate_slow // deflate.c:143:29: 16128 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120)) = deflate_slow // deflate.c:144:29: 16129 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136)) = deflate_slow // deflate.c:145:30: 16130 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152)) = deflate_slow // deflate.c:146:30: 16131 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22: 16132 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2: 16133 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits)) // trees.c:129:16: 16134 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2: 16135 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits)) // trees.c:126:16: 16136 } 16137 16138 var ts1 = "1.2.11\x00 deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler \x00%s\x00<fd:%d>\x00out of memory\x00\x00%s%s%s\x00: \x00unexpected end of file\x00internal error: inflate stream corrupt\x00compressed data error\x00request does not fit in an int\x00request does not fit in a size_t\x00out of room to push characters\x00internal error: deflate stream corrupt\x00requested length does not fit in int\x00invalid block type\x00invalid stored block lengths\x00too many length or distance symbols\x00invalid code lengths set\x00invalid bit length repeat\x00invalid code -- missing end-of-block\x00invalid literal/lengths set\x00invalid distances set\x00invalid literal/length code\x00invalid distance code\x00invalid distance too far back\x00incorrect header check\x00unknown compression method\x00invalid window size\x00unknown header flags set\x00header crc mismatch\x00incorrect data check\x00incorrect length check\x00 inflate 1.2.11 Copyright 1995-2017 Mark Adler \x00need dictionary\x00stream end\x00file error\x00stream error\x00data error\x00insufficient memory\x00buffer error\x00incompatible version\x00" 16139 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data