modernc.org/z@v1.7.4/lib/z_linux_amd64.go (about) 1 // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/z_linux_amd64.go -pkgname z -trace-translation-units /tmp/go-generate-1603745633/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 _ types.Size_t 20 21 const ( 22 AIO_PRIO_DELTA_MAX = 20 23 BASE = 65521 24 BC_BASE_MAX = 99 25 BC_DIM_MAX = 2048 26 BC_SCALE_MAX = 99 27 BC_STRING_MAX = 1000 28 BIG_ENDIAN = 4321 29 BYTE_ORDER = 1234 30 CHARCLASS_NAME_MAX = 2048 31 CHAR_BIT = 8 32 CHAR_MAX = 127 33 CHAR_MIN = -128 34 COLL_WEIGHTS_MAX = 255 35 DEF_MEM_LEVEL = 8 36 DEF_WBITS = 15 37 DELAYTIMER_MAX = 2147483647 38 DYN_TREES = 2 39 EXIT_FAILURE = 1 40 EXIT_SUCCESS = 0 41 EXPR_NEST_MAX = 32 42 FAR = 0 43 FD_SETSIZE = 1024 44 F_LOCK = 1 45 F_OK = 0 46 F_TEST = 3 47 F_TLOCK = 2 48 F_ULOCK = 0 49 HAVE_HIDDEN = 1 50 HAVE_MEMCPY = 0 51 HOST_NAME_MAX = 64 52 INT_MAX = 2147483647 53 INT_MIN = -2147483648 54 LINE_MAX = 2048 55 LITTLE_ENDIAN = 1234 56 LLONG_MAX = 9223372036854775807 57 LLONG_MIN = -9223372036854775808 58 LOGIN_NAME_MAX = 256 59 LONG_MAX = 9223372036854775807 60 LONG_MIN = -9223372036854775808 61 L_INCR = 1 62 L_SET = 0 63 L_XTND = 2 64 MAX_CANON = 255 65 MAX_INPUT = 255 66 MAX_MATCH = 258 67 MAX_MEM_LEVEL = 9 68 MAX_WBITS = 15 69 MB_LEN_MAX = 16 70 MIN_MATCH = 3 71 MQ_PRIO_MAX = 32768 72 NAME_MAX = 255 73 NGROUPS_MAX = 65536 74 NMAX = 5552 75 OS_CODE = 3 76 PATH_MAX = 4096 77 PDP_ENDIAN = 3412 78 PIPE_BUF = 4096 79 PRESET_DICT = 0x20 80 PTHREAD_DESTRUCTOR_ITERATIONS = 4 81 PTHREAD_KEYS_MAX = 1024 82 PTHREAD_STACK_MIN = 16384 83 RAND_MAX = 2147483647 84 RE_DUP_MAX = 32767 85 RTSIG_MAX = 32 86 R_OK = 4 87 SCHAR_MAX = 127 88 SCHAR_MIN = -128 89 SEEK_CUR = 1 90 SEEK_END = 2 91 SEEK_SET = 0 92 SEM_VALUE_MAX = 2147483647 93 SHRT_MAX = 32767 94 SHRT_MIN = -32768 95 SSIZE_MAX = 9223372036854775807 96 STATIC_TREES = 1 97 STDC = 0 98 STDC99 = 0 99 STDERR_FILENO = 2 100 STDIN_FILENO = 0 101 STDOUT_FILENO = 1 102 STORED_BLOCK = 0 103 TTY_NAME_MAX = 32 104 UCHAR_MAX = 255 105 UINT_MAX = 4294967295 106 ULLONG_MAX = 18446744073709551615 107 ULONG_MAX = 18446744073709551615 108 USHRT_MAX = 65535 109 WCONTINUED = 8 110 WEXITED = 4 111 WNOHANG = 1 112 WNOWAIT = 0x01000000 113 WSTOPPED = 2 114 WUNTRACED = 2 115 W_OK = 2 116 XATTR_LIST_MAX = 65536 117 XATTR_NAME_MAX = 255 118 XATTR_SIZE_MAX = 65536 119 X_OK = 1 120 ZCONF_H = 0 121 ZEXPORT = 0 122 ZEXPORTVA = 0 123 ZLIB_H = 0 124 ZLIB_VERNUM = 0x12b0 125 ZLIB_VERSION = "1.2.11" 126 ZLIB_VER_MAJOR = 1 127 ZLIB_VER_MINOR = 2 128 ZLIB_VER_REVISION = 11 129 ZLIB_VER_SUBREVISION = 0 130 ZUTIL_H = 0 131 Z_ASCII = 1 132 Z_BEST_COMPRESSION = 9 133 Z_BEST_SPEED = 1 134 Z_BINARY = 0 135 Z_BLOCK = 5 136 Z_BUF_ERROR = -5 137 Z_DATA_ERROR = -3 138 Z_DEFAULT_COMPRESSION = -1 139 Z_DEFAULT_STRATEGY = 0 140 Z_DEFLATED = 8 141 Z_ERRNO = -1 142 Z_FILTERED = 1 143 Z_FINISH = 4 144 Z_FIXED = 4 145 Z_FULL_FLUSH = 3 146 Z_HAVE_STDARG_H = 0 147 Z_HAVE_UNISTD_H = 0 148 Z_HUFFMAN_ONLY = 2 149 Z_LARGE64 = 0 150 Z_LFS64 = 0 151 Z_MEM_ERROR = -4 152 Z_NEED_DICT = 2 153 Z_NO_COMPRESSION = 0 154 Z_NO_FLUSH = 0 155 Z_NULL = 0 156 Z_OK = 0 157 Z_PARTIAL_FLUSH = 1 158 Z_RLE = 3 159 Z_STREAM_END = 1 160 Z_STREAM_ERROR = -2 161 Z_SYNC_FLUSH = 2 162 Z_TEXT = 1 163 Z_TREES = 6 164 Z_UNKNOWN = 2 165 Z_VERSION_ERROR = -6 166 Z_WANT64 = 0 167 X_ALLOCA_H = 1 168 X_ANSI_STDARG_H_ = 0 169 X_ANSI_STDDEF_H = 0 170 X_ATFILE_SOURCE = 1 171 X_BITS_BYTESWAP_H = 1 172 X_BITS_ENDIANNESS_H = 1 173 X_BITS_ENDIAN_H = 1 174 X_BITS_FLOATN_COMMON_H = 0 175 X_BITS_FLOATN_H = 0 176 X_BITS_POSIX1_LIM_H = 1 177 X_BITS_POSIX2_LIM_H = 1 178 X_BITS_POSIX_OPT_H = 1 179 X_BITS_PTHREADTYPES_ARCH_H = 1 180 X_BITS_PTHREADTYPES_COMMON_H = 1 181 X_BITS_STDINT_INTN_H = 1 182 X_BITS_TIME64_H = 1 183 X_BITS_TYPESIZES_H = 1 184 X_BITS_TYPES_H = 1 185 X_BITS_TYPES_LOCALE_T_H = 1 186 X_BITS_TYPES___LOCALE_T_H = 1 187 X_BITS_UINTN_IDENTITY_H = 1 188 X_BSD_PTRDIFF_T_ = 0 189 X_BSD_SIZE_T_ = 0 190 X_BSD_SIZE_T_DEFINED_ = 0 191 X_DEFAULT_SOURCE = 1 192 X_ENDIAN_H = 1 193 X_FEATURES_H = 1 194 X_FILE_OFFSET_BITS = 64 195 X_GCC_LIMITS_H_ = 0 196 X_GCC_MAX_ALIGN_T = 0 197 X_GCC_PTRDIFF_T = 0 198 X_GCC_SIZE_T = 0 199 X_GCC_WCHAR_T = 0 200 X_GETOPT_CORE_H = 1 201 X_GETOPT_POSIX_H = 1 202 X_LARGEFILE64_SOURCE = 1 203 X_LFS64_ASYNCHRONOUS_IO = 1 204 X_LFS64_LARGEFILE = 1 205 X_LFS64_STDIO = 1 206 X_LFS_ASYNCHRONOUS_IO = 1 207 X_LFS_LARGEFILE = 1 208 X_LIBC_LIMITS_H_ = 1 209 X_LIMITS_H___ = 0 210 X_LINUX_LIMITS_H = 0 211 X_LP64 = 1 212 X_POSIX2_BC_BASE_MAX = 99 213 X_POSIX2_BC_DIM_MAX = 2048 214 X_POSIX2_BC_SCALE_MAX = 99 215 X_POSIX2_BC_STRING_MAX = 1000 216 X_POSIX2_CHARCLASS_NAME_MAX = 14 217 X_POSIX2_CHAR_TERM = 200809 218 X_POSIX2_COLL_WEIGHTS_MAX = 2 219 X_POSIX2_C_BIND = 200809 220 X_POSIX2_C_DEV = 200809 221 X_POSIX2_C_VERSION = 200809 222 X_POSIX2_EXPR_NEST_MAX = 32 223 X_POSIX2_LINE_MAX = 2048 224 X_POSIX2_LOCALEDEF = 200809 225 X_POSIX2_RE_DUP_MAX = 255 226 X_POSIX2_SW_DEV = 200809 227 X_POSIX2_VERSION = 200809 228 X_POSIX_ADVISORY_INFO = 200809 229 X_POSIX_AIO_LISTIO_MAX = 2 230 X_POSIX_AIO_MAX = 1 231 X_POSIX_ARG_MAX = 4096 232 X_POSIX_ASYNCHRONOUS_IO = 200809 233 X_POSIX_ASYNC_IO = 1 234 X_POSIX_BARRIERS = 200809 235 X_POSIX_CHILD_MAX = 25 236 X_POSIX_CHOWN_RESTRICTED = 0 237 X_POSIX_CLOCKRES_MIN = 20000000 238 X_POSIX_CLOCK_SELECTION = 200809 239 X_POSIX_CPUTIME = 0 240 X_POSIX_C_SOURCE = 200809 241 X_POSIX_DELAYTIMER_MAX = 32 242 X_POSIX_FSYNC = 200809 243 X_POSIX_HOST_NAME_MAX = 255 244 X_POSIX_IPV6 = 200809 245 X_POSIX_JOB_CONTROL = 1 246 X_POSIX_LINK_MAX = 8 247 X_POSIX_LOGIN_NAME_MAX = 9 248 X_POSIX_MAPPED_FILES = 200809 249 X_POSIX_MAX_CANON = 255 250 X_POSIX_MAX_INPUT = 255 251 X_POSIX_MEMLOCK = 200809 252 X_POSIX_MEMLOCK_RANGE = 200809 253 X_POSIX_MEMORY_PROTECTION = 200809 254 X_POSIX_MESSAGE_PASSING = 200809 255 X_POSIX_MONOTONIC_CLOCK = 0 256 X_POSIX_MQ_OPEN_MAX = 8 257 X_POSIX_MQ_PRIO_MAX = 32 258 X_POSIX_NAME_MAX = 14 259 X_POSIX_NGROUPS_MAX = 8 260 X_POSIX_NO_TRUNC = 1 261 X_POSIX_OPEN_MAX = 20 262 X_POSIX_PATH_MAX = 256 263 X_POSIX_PIPE_BUF = 512 264 X_POSIX_PRIORITIZED_IO = 200809 265 X_POSIX_PRIORITY_SCHEDULING = 200809 266 X_POSIX_RAW_SOCKETS = 200809 267 X_POSIX_READER_WRITER_LOCKS = 200809 268 X_POSIX_REALTIME_SIGNALS = 200809 269 X_POSIX_REENTRANT_FUNCTIONS = 1 270 X_POSIX_REGEXP = 1 271 X_POSIX_RE_DUP_MAX = 255 272 X_POSIX_RTSIG_MAX = 8 273 X_POSIX_SAVED_IDS = 1 274 X_POSIX_SEMAPHORES = 200809 275 X_POSIX_SEM_NSEMS_MAX = 256 276 X_POSIX_SEM_VALUE_MAX = 32767 277 X_POSIX_SHARED_MEMORY_OBJECTS = 200809 278 X_POSIX_SHELL = 1 279 X_POSIX_SIGQUEUE_MAX = 32 280 X_POSIX_SOURCE = 1 281 X_POSIX_SPAWN = 200809 282 X_POSIX_SPIN_LOCKS = 200809 283 X_POSIX_SPORADIC_SERVER = -1 284 X_POSIX_SSIZE_MAX = 32767 285 X_POSIX_STREAM_MAX = 8 286 X_POSIX_SYMLINK_MAX = 255 287 X_POSIX_SYMLOOP_MAX = 8 288 X_POSIX_SYNCHRONIZED_IO = 200809 289 X_POSIX_THREADS = 200809 290 X_POSIX_THREAD_ATTR_STACKADDR = 200809 291 X_POSIX_THREAD_ATTR_STACKSIZE = 200809 292 X_POSIX_THREAD_CPUTIME = 0 293 X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 294 X_POSIX_THREAD_KEYS_MAX = 128 295 X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 296 X_POSIX_THREAD_PRIO_INHERIT = 200809 297 X_POSIX_THREAD_PRIO_PROTECT = 200809 298 X_POSIX_THREAD_PROCESS_SHARED = 200809 299 X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 300 X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 301 X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 302 X_POSIX_THREAD_SPORADIC_SERVER = -1 303 X_POSIX_THREAD_THREADS_MAX = 64 304 X_POSIX_TIMEOUTS = 200809 305 X_POSIX_TIMERS = 200809 306 X_POSIX_TIMER_MAX = 32 307 X_POSIX_TRACE = -1 308 X_POSIX_TRACE_EVENT_FILTER = -1 309 X_POSIX_TRACE_INHERIT = -1 310 X_POSIX_TRACE_LOG = -1 311 X_POSIX_TTY_NAME_MAX = 9 312 X_POSIX_TYPED_MEMORY_OBJECTS = -1 313 X_POSIX_TZNAME_MAX = 6 314 X_POSIX_V6_LP64_OFF64 = 1 315 X_POSIX_V6_LPBIG_OFFBIG = -1 316 X_POSIX_V7_LP64_OFF64 = 1 317 X_POSIX_V7_LPBIG_OFFBIG = -1 318 X_POSIX_VDISABLE = 0 319 X_POSIX_VERSION = 200809 320 X_PTRDIFF_T = 0 321 X_PTRDIFF_T_ = 0 322 X_PTRDIFF_T_DECLARED = 0 323 X_RWLOCK_INTERNAL_H = 0 324 X_SIZET_ = 0 325 X_SIZE_T = 0 326 X_SIZE_T_ = 0 327 X_SIZE_T_DECLARED = 0 328 X_SIZE_T_DEFINED = 0 329 X_SIZE_T_DEFINED_ = 0 330 X_STDARG_H = 0 331 X_STDC_PREDEF_H = 1 332 X_STDDEF_H = 0 333 X_STDDEF_H_ = 0 334 X_STDLIB_H = 1 335 X_STRINGS_H = 1 336 X_STRING_H = 1 337 X_STRUCT_TIMESPEC = 1 338 X_SYS_CDEFS_H = 1 339 X_SYS_SELECT_H = 1 340 X_SYS_SIZE_T_H = 0 341 X_SYS_TYPES_H = 1 342 X_THREAD_MUTEX_INTERNAL_H = 1 343 X_THREAD_SHARED_TYPES_H = 1 344 X_T_PTRDIFF = 0 345 X_T_PTRDIFF_ = 0 346 X_T_SIZE = 0 347 X_T_SIZE_ = 0 348 X_T_WCHAR = 0 349 X_T_WCHAR_ = 0 350 X_UNISTD_H = 1 351 X_VA_LIST = 0 352 X_VA_LIST_ = 0 353 X_VA_LIST_DEFINED = 0 354 X_VA_LIST_T_H = 0 355 X_WCHAR_T = 0 356 X_WCHAR_T_ = 0 357 X_WCHAR_T_DECLARED = 0 358 X_WCHAR_T_DEFINED = 0 359 X_WCHAR_T_DEFINED_ = 0 360 X_WCHAR_T_H = 0 361 X_XBS5_LP64_OFF64 = 1 362 X_XBS5_LPBIG_OFFBIG = -1 363 X_XOPEN_ENH_I18N = 1 364 X_XOPEN_LEGACY = 1 365 X_XOPEN_REALTIME = 1 366 X_XOPEN_REALTIME_THREADS = 1 367 X_XOPEN_SHM = 1 368 X_XOPEN_UNIX = 1 369 X_XOPEN_VERSION = 700 370 X_XOPEN_XCU_VERSION = 4 371 X_XOPEN_XPG2 = 1 372 X_XOPEN_XPG3 = 1 373 X_XOPEN_XPG4 = 1 374 Linux = 1 375 Unix = 1 376 Z_const = 0 377 BYFOUR = 0 378 GF2_DIM = 32 379 TBLS = 8 380 BL_CODES = 19 381 BUSY_STATE = 113 382 Buf_size = 16 383 COMMENT_STATE = 91 384 DEFLATE_H = 0 385 D_CODES = 30 386 EXTRA_STATE = 69 387 FINISH_STATE = 666 388 GZIP = 0 389 GZIP_STATE = 57 390 HCRC_STATE = 103 391 HEAP_SIZE = 573 392 INIT_STATE = 42 393 LENGTH_CODES = 29 394 LITERALS = 256 395 L_CODES = 286 396 MAX_BITS = 15 397 MAX_STORED = 65535 398 MIN_LOOKAHEAD = 262 399 NAME_STATE = 73 400 NIL = 0 401 TOO_FAR = 4096 402 WIN_INIT = 258 403 AT_EACCESS = 0x200 404 AT_FDCWD = -100 405 AT_REMOVEDIR = 0x200 406 AT_SYMLINK_FOLLOW = 0x400 407 AT_SYMLINK_NOFOLLOW = 0x100 408 BUFSIZ = 8192 409 COPY1 = 1 410 E2BIG = 7 411 EACCES = 13 412 EADDRINUSE = 98 413 EADDRNOTAVAIL = 99 414 EADV = 68 415 EAFNOSUPPORT = 97 416 EAGAIN = 11 417 EALREADY = 114 418 EBADE = 52 419 EBADF = 9 420 EBADFD = 77 421 EBADMSG = 74 422 EBADR = 53 423 EBADRQC = 56 424 EBADSLT = 57 425 EBFONT = 59 426 EBUSY = 16 427 ECANCELED = 125 428 ECHILD = 10 429 ECHRNG = 44 430 ECOMM = 70 431 ECONNABORTED = 103 432 ECONNREFUSED = 111 433 ECONNRESET = 104 434 EDEADLK = 35 435 EDEADLOCK = 35 436 EDESTADDRREQ = 89 437 EDOM = 33 438 EDOTDOT = 73 439 EDQUOT = 122 440 EEXIST = 17 441 EFAULT = 14 442 EFBIG = 27 443 EHOSTDOWN = 112 444 EHOSTUNREACH = 113 445 EHWPOISON = 133 446 EIDRM = 43 447 EILSEQ = 84 448 EINPROGRESS = 115 449 EINTR = 4 450 EINVAL = 22 451 EIO = 5 452 EISCONN = 106 453 EISDIR = 21 454 EISNAM = 120 455 EKEYEXPIRED = 127 456 EKEYREJECTED = 129 457 EKEYREVOKED = 128 458 EL2HLT = 51 459 EL2NSYNC = 45 460 EL3HLT = 46 461 EL3RST = 47 462 ELIBACC = 79 463 ELIBBAD = 80 464 ELIBEXEC = 83 465 ELIBMAX = 82 466 ELIBSCN = 81 467 ELNRNG = 48 468 ELOOP = 40 469 EMEDIUMTYPE = 124 470 EMFILE = 24 471 EMLINK = 31 472 EMSGSIZE = 90 473 EMULTIHOP = 72 474 ENAMETOOLONG = 36 475 ENAVAIL = 119 476 ENETDOWN = 100 477 ENETRESET = 102 478 ENETUNREACH = 101 479 ENFILE = 23 480 ENOANO = 55 481 ENOBUFS = 105 482 ENOCSI = 50 483 ENODATA = 61 484 ENODEV = 19 485 ENOENT = 2 486 ENOEXEC = 8 487 ENOKEY = 126 488 ENOLCK = 37 489 ENOLINK = 67 490 ENOMEDIUM = 123 491 ENOMEM = 12 492 ENOMSG = 42 493 ENONET = 64 494 ENOPKG = 65 495 ENOPROTOOPT = 92 496 ENOSPC = 28 497 ENOSR = 63 498 ENOSTR = 60 499 ENOSYS = 38 500 ENOTBLK = 15 501 ENOTCONN = 107 502 ENOTDIR = 20 503 ENOTEMPTY = 39 504 ENOTNAM = 118 505 ENOTRECOVERABLE = 131 506 ENOTSOCK = 88 507 ENOTSUP = 95 508 ENOTTY = 25 509 ENOTUNIQ = 76 510 ENXIO = 6 511 EOF = -1 512 EOPNOTSUPP = 95 513 EOVERFLOW = 75 514 EOWNERDEAD = 130 515 EPERM = 1 516 EPFNOSUPPORT = 96 517 EPIPE = 32 518 EPROTO = 71 519 EPROTONOSUPPORT = 93 520 EPROTOTYPE = 91 521 ERANGE = 34 522 EREMCHG = 78 523 EREMOTE = 66 524 EREMOTEIO = 121 525 ERESTART = 85 526 ERFKILL = 132 527 EROFS = 30 528 ESHUTDOWN = 108 529 ESOCKTNOSUPPORT = 94 530 ESPIPE = 29 531 ESRCH = 3 532 ESRMNT = 69 533 ESTALE = 116 534 ESTRPIPE = 86 535 ETIME = 62 536 ETIMEDOUT = 110 537 ETOOMANYREFS = 109 538 ETXTBSY = 26 539 EUCLEAN = 117 540 EUNATCH = 49 541 EUSERS = 87 542 EWOULDBLOCK = 11 543 EXDEV = 18 544 EXFULL = 54 545 FAPPEND = 1024 546 FASYNC = 8192 547 FD_CLOEXEC = 1 548 FFSYNC = 1052672 549 FILENAME_MAX = 4096 550 FNDELAY = 2048 551 FNONBLOCK = 2048 552 FOPEN_MAX = 16 553 F_DUPFD = 0 554 F_DUPFD_CLOEXEC = 1030 555 F_EXLCK = 4 556 F_GETFD = 1 557 F_GETFL = 3 558 F_GETLK = 5 559 F_GETLK64 = 5 560 F_GETOWN = 9 561 F_RDLCK = 0 562 F_SETFD = 2 563 F_SETFL = 4 564 F_SETLK = 6 565 F_SETLK64 = 6 566 F_SETLKW = 7 567 F_SETLKW64 = 7 568 F_SETOWN = 8 569 F_SHLCK = 8 570 F_UNLCK = 2 571 F_WRLCK = 1 572 GZBUFSIZE = 8192 573 GZ_APPEND = 1 574 GZ_NONE = 0 575 GZ_READ = 7247 576 GZ_WRITE = 31153 577 HAVE_VSNPRINTF = 0 578 LOCK_EX = 2 579 LOCK_NB = 4 580 LOCK_SH = 1 581 LOCK_UN = 8 582 LOOK = 0 583 L_ctermid = 9 584 L_tmpnam = 20 585 O_ACCMODE = 0003 586 O_APPEND = 02000 587 O_ASYNC = 020000 588 O_CLOEXEC = 524288 589 O_CREAT = 0100 590 O_DIRECTORY = 65536 591 O_DSYNC = 4096 592 O_EXCL = 0200 593 O_FSYNC = 1052672 594 O_LARGEFILE = 0 595 O_NDELAY = 2048 596 O_NOCTTY = 0400 597 O_NOFOLLOW = 131072 598 O_NONBLOCK = 04000 599 O_RDONLY = 00 600 O_RDWR = 02 601 O_RSYNC = 1052672 602 O_SYNC = 04010000 603 O_TRUNC = 01000 604 O_WRONLY = 01 605 POSIX_FADV_DONTNEED = 4 606 POSIX_FADV_NOREUSE = 5 607 POSIX_FADV_NORMAL = 0 608 POSIX_FADV_RANDOM = 1 609 POSIX_FADV_SEQUENTIAL = 2 610 POSIX_FADV_WILLNEED = 3 611 P_tmpdir = "/tmp" 612 S_IFBLK = 24576 613 S_IFCHR = 8192 614 S_IFDIR = 16384 615 S_IFIFO = 4096 616 S_IFLNK = 40960 617 S_IFMT = 61440 618 S_IFREG = 32768 619 S_IFSOCK = 49152 620 S_IRGRP = 32 621 S_IROTH = 4 622 S_IRUSR = 256 623 S_IRWXG = 56 624 S_IRWXO = 7 625 S_IRWXU = 448 626 S_ISGID = 1024 627 S_ISUID = 2048 628 S_ISVTX = 512 629 S_IWGRP = 16 630 S_IWOTH = 2 631 S_IWUSR = 128 632 S_IXGRP = 8 633 S_IXOTH = 1 634 S_IXUSR = 64 635 TMP_MAX = 238328 636 UTIME_NOW = 1073741823 637 UTIME_OMIT = 1073741822 638 X_ASM_GENERIC_ERRNO_BASE_H = 0 639 X_ASM_GENERIC_ERRNO_H = 0 640 X_BITS_ERRNO_H = 1 641 X_BITS_STAT_H = 1 642 X_BITS_STDIO_LIM_H = 1 643 X_ERRNO_H = 1 644 X_FCNTL_H = 1 645 X_IOFBF = 0 646 X_IOLBF = 1 647 X_IONBF = 2 648 X_IO_EOF_SEEN = 0x0010 649 X_IO_ERR_SEEN = 0x0020 650 X_IO_USER_LOCK = 0x8000 651 X_LARGEFILE_SOURCE = 1 652 X_MKNOD_VER_LINUX = 0 653 X_STATBUF_ST_BLKSIZE = 0 654 X_STATBUF_ST_NSEC = 0 655 X_STATBUF_ST_RDEV = 0 656 X_STAT_VER = 1 657 X_STAT_VER_KERNEL = 0 658 X_STAT_VER_LINUX = 1 659 X_STDIO_H = 1 660 ENOUGH = 1444 661 ENOUGH_DISTS = 592 662 ENOUGH_LENS = 852 663 GUNZIP = 0 664 MAXBITS = 15 665 DIST_CODE_LEN = 512 666 END_BLOCK = 256 667 MAX_BL_BITS = 7 668 REPZ_11_138 = 18 669 REPZ_3_10 = 17 670 REP_3_6 = 16 671 SMALLEST = 1 672 ) 673 674 // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; 675 // the `_SC_*' symbols for the NAME argument to `sysconf'; 676 // and the `_CS_*' symbols for the NAME argument to `confstr'. 677 // `sysconf', `pathconf', and `confstr' NAME values. Generic version. 678 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 679 // This file is part of the GNU C Library. 680 // 681 // The GNU C Library is free software; you can redistribute it and/or 682 // modify it under the terms of the GNU Lesser General Public 683 // License as published by the Free Software Foundation; either 684 // version 2.1 of the License, or (at your option) any later version. 685 // 686 // The GNU C Library is distributed in the hope that it will be useful, 687 // but WITHOUT ANY WARRANTY; without even the implied warranty of 688 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 689 // Lesser General Public License for more details. 690 // 691 // You should have received a copy of the GNU Lesser General Public 692 // License along with the GNU C Library; if not, see 693 // <https://www.gnu.org/licenses/>. 694 695 // Values for the NAME argument to `pathconf' and `fpathconf'. 696 const ( /* confname.h:24:1: */ 697 X_PC_LINK_MAX = 0 698 X_PC_MAX_CANON = 1 699 X_PC_MAX_INPUT = 2 700 X_PC_NAME_MAX = 3 701 X_PC_PATH_MAX = 4 702 X_PC_PIPE_BUF = 5 703 X_PC_CHOWN_RESTRICTED = 6 704 X_PC_NO_TRUNC = 7 705 X_PC_VDISABLE = 8 706 X_PC_SYNC_IO = 9 707 X_PC_ASYNC_IO = 10 708 X_PC_PRIO_IO = 11 709 X_PC_SOCK_MAXBUF = 12 710 X_PC_FILESIZEBITS = 13 711 X_PC_REC_INCR_XFER_SIZE = 14 712 X_PC_REC_MAX_XFER_SIZE = 15 713 X_PC_REC_MIN_XFER_SIZE = 16 714 X_PC_REC_XFER_ALIGN = 17 715 X_PC_ALLOC_SIZE_MIN = 18 716 X_PC_SYMLINK_MAX = 19 717 X_PC_2_SYMLINKS = 20 718 ) 719 720 // Values for the NAME argument to `confstr'. 721 const ( /* confname.h:533:1: */ 722 X_CS_PATH = 0 // The default search path. 723 724 X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 725 726 X_CS_GNU_LIBC_VERSION = 2 727 X_CS_GNU_LIBPTHREAD_VERSION = 3 728 729 X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 730 731 X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 732 733 X_CS_LFS_CFLAGS = 1000 734 X_CS_LFS_LDFLAGS = 1001 735 X_CS_LFS_LIBS = 1002 736 X_CS_LFS_LINTFLAGS = 1003 737 X_CS_LFS64_CFLAGS = 1004 738 X_CS_LFS64_LDFLAGS = 1005 739 X_CS_LFS64_LIBS = 1006 740 X_CS_LFS64_LINTFLAGS = 1007 741 742 X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 743 X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 744 X_CS_XBS5_ILP32_OFF32_LIBS = 1102 745 X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 746 X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 747 X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 748 X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 749 X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 750 X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 751 X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 752 X_CS_XBS5_LP64_OFF64_LIBS = 1110 753 X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 754 X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 755 X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 756 X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 757 X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 758 759 X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 760 X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 761 X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 762 X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 763 X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 764 X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 765 X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 766 X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 767 X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 768 X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 769 X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 770 X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 771 X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 772 X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 773 X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 774 X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 775 776 X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 777 X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 778 X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 779 X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 780 X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 781 X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 782 X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 783 X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 784 X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 785 X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 786 X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 787 X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 788 X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 789 X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 790 X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 791 X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 792 793 X_CS_V6_ENV = 1148 794 X_CS_V7_ENV = 1149 795 ) 796 797 // Values for the argument to `sysconf'. 798 const ( /* confname.h:71:1: */ 799 X_SC_ARG_MAX = 0 800 X_SC_CHILD_MAX = 1 801 X_SC_CLK_TCK = 2 802 X_SC_NGROUPS_MAX = 3 803 X_SC_OPEN_MAX = 4 804 X_SC_STREAM_MAX = 5 805 X_SC_TZNAME_MAX = 6 806 X_SC_JOB_CONTROL = 7 807 X_SC_SAVED_IDS = 8 808 X_SC_REALTIME_SIGNALS = 9 809 X_SC_PRIORITY_SCHEDULING = 10 810 X_SC_TIMERS = 11 811 X_SC_ASYNCHRONOUS_IO = 12 812 X_SC_PRIORITIZED_IO = 13 813 X_SC_SYNCHRONIZED_IO = 14 814 X_SC_FSYNC = 15 815 X_SC_MAPPED_FILES = 16 816 X_SC_MEMLOCK = 17 817 X_SC_MEMLOCK_RANGE = 18 818 X_SC_MEMORY_PROTECTION = 19 819 X_SC_MESSAGE_PASSING = 20 820 X_SC_SEMAPHORES = 21 821 X_SC_SHARED_MEMORY_OBJECTS = 22 822 X_SC_AIO_LISTIO_MAX = 23 823 X_SC_AIO_MAX = 24 824 X_SC_AIO_PRIO_DELTA_MAX = 25 825 X_SC_DELAYTIMER_MAX = 26 826 X_SC_MQ_OPEN_MAX = 27 827 X_SC_MQ_PRIO_MAX = 28 828 X_SC_VERSION = 29 829 X_SC_PAGESIZE = 30 830 X_SC_RTSIG_MAX = 31 831 X_SC_SEM_NSEMS_MAX = 32 832 X_SC_SEM_VALUE_MAX = 33 833 X_SC_SIGQUEUE_MAX = 34 834 X_SC_TIMER_MAX = 35 835 836 // Values for the argument to `sysconf' 837 // corresponding to _POSIX2_* symbols. 838 X_SC_BC_BASE_MAX = 36 839 X_SC_BC_DIM_MAX = 37 840 X_SC_BC_SCALE_MAX = 38 841 X_SC_BC_STRING_MAX = 39 842 X_SC_COLL_WEIGHTS_MAX = 40 843 X_SC_EQUIV_CLASS_MAX = 41 844 X_SC_EXPR_NEST_MAX = 42 845 X_SC_LINE_MAX = 43 846 X_SC_RE_DUP_MAX = 44 847 X_SC_CHARCLASS_NAME_MAX = 45 848 849 X_SC_2_VERSION = 46 850 X_SC_2_C_BIND = 47 851 X_SC_2_C_DEV = 48 852 X_SC_2_FORT_DEV = 49 853 X_SC_2_FORT_RUN = 50 854 X_SC_2_SW_DEV = 51 855 X_SC_2_LOCALEDEF = 52 856 857 X_SC_PII = 53 858 X_SC_PII_XTI = 54 859 X_SC_PII_SOCKET = 55 860 X_SC_PII_INTERNET = 56 861 X_SC_PII_OSI = 57 862 X_SC_POLL = 58 863 X_SC_SELECT = 59 864 X_SC_UIO_MAXIOV = 60 865 X_SC_IOV_MAX = 60 866 X_SC_PII_INTERNET_STREAM = 61 867 X_SC_PII_INTERNET_DGRAM = 62 868 X_SC_PII_OSI_COTS = 63 869 X_SC_PII_OSI_CLTS = 64 870 X_SC_PII_OSI_M = 65 871 X_SC_T_IOV_MAX = 66 872 873 // Values according to POSIX 1003.1c (POSIX threads). 874 X_SC_THREADS = 67 875 X_SC_THREAD_SAFE_FUNCTIONS = 68 876 X_SC_GETGR_R_SIZE_MAX = 69 877 X_SC_GETPW_R_SIZE_MAX = 70 878 X_SC_LOGIN_NAME_MAX = 71 879 X_SC_TTY_NAME_MAX = 72 880 X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 881 X_SC_THREAD_KEYS_MAX = 74 882 X_SC_THREAD_STACK_MIN = 75 883 X_SC_THREAD_THREADS_MAX = 76 884 X_SC_THREAD_ATTR_STACKADDR = 77 885 X_SC_THREAD_ATTR_STACKSIZE = 78 886 X_SC_THREAD_PRIORITY_SCHEDULING = 79 887 X_SC_THREAD_PRIO_INHERIT = 80 888 X_SC_THREAD_PRIO_PROTECT = 81 889 X_SC_THREAD_PROCESS_SHARED = 82 890 891 X_SC_NPROCESSORS_CONF = 83 892 X_SC_NPROCESSORS_ONLN = 84 893 X_SC_PHYS_PAGES = 85 894 X_SC_AVPHYS_PAGES = 86 895 X_SC_ATEXIT_MAX = 87 896 X_SC_PASS_MAX = 88 897 898 X_SC_XOPEN_VERSION = 89 899 X_SC_XOPEN_XCU_VERSION = 90 900 X_SC_XOPEN_UNIX = 91 901 X_SC_XOPEN_CRYPT = 92 902 X_SC_XOPEN_ENH_I18N = 93 903 X_SC_XOPEN_SHM = 94 904 905 X_SC_2_CHAR_TERM = 95 906 X_SC_2_C_VERSION = 96 907 X_SC_2_UPE = 97 908 909 X_SC_XOPEN_XPG2 = 98 910 X_SC_XOPEN_XPG3 = 99 911 X_SC_XOPEN_XPG4 = 100 912 913 X_SC_CHAR_BIT = 101 914 X_SC_CHAR_MAX = 102 915 X_SC_CHAR_MIN = 103 916 X_SC_INT_MAX = 104 917 X_SC_INT_MIN = 105 918 X_SC_LONG_BIT = 106 919 X_SC_WORD_BIT = 107 920 X_SC_MB_LEN_MAX = 108 921 X_SC_NZERO = 109 922 X_SC_SSIZE_MAX = 110 923 X_SC_SCHAR_MAX = 111 924 X_SC_SCHAR_MIN = 112 925 X_SC_SHRT_MAX = 113 926 X_SC_SHRT_MIN = 114 927 X_SC_UCHAR_MAX = 115 928 X_SC_UINT_MAX = 116 929 X_SC_ULONG_MAX = 117 930 X_SC_USHRT_MAX = 118 931 932 X_SC_NL_ARGMAX = 119 933 X_SC_NL_LANGMAX = 120 934 X_SC_NL_MSGMAX = 121 935 X_SC_NL_NMAX = 122 936 X_SC_NL_SETMAX = 123 937 X_SC_NL_TEXTMAX = 124 938 939 X_SC_XBS5_ILP32_OFF32 = 125 940 X_SC_XBS5_ILP32_OFFBIG = 126 941 X_SC_XBS5_LP64_OFF64 = 127 942 X_SC_XBS5_LPBIG_OFFBIG = 128 943 944 X_SC_XOPEN_LEGACY = 129 945 X_SC_XOPEN_REALTIME = 130 946 X_SC_XOPEN_REALTIME_THREADS = 131 947 948 X_SC_ADVISORY_INFO = 132 949 X_SC_BARRIERS = 133 950 X_SC_BASE = 134 951 X_SC_C_LANG_SUPPORT = 135 952 X_SC_C_LANG_SUPPORT_R = 136 953 X_SC_CLOCK_SELECTION = 137 954 X_SC_CPUTIME = 138 955 X_SC_THREAD_CPUTIME = 139 956 X_SC_DEVICE_IO = 140 957 X_SC_DEVICE_SPECIFIC = 141 958 X_SC_DEVICE_SPECIFIC_R = 142 959 X_SC_FD_MGMT = 143 960 X_SC_FIFO = 144 961 X_SC_PIPE = 145 962 X_SC_FILE_ATTRIBUTES = 146 963 X_SC_FILE_LOCKING = 147 964 X_SC_FILE_SYSTEM = 148 965 X_SC_MONOTONIC_CLOCK = 149 966 X_SC_MULTI_PROCESS = 150 967 X_SC_SINGLE_PROCESS = 151 968 X_SC_NETWORKING = 152 969 X_SC_READER_WRITER_LOCKS = 153 970 X_SC_SPIN_LOCKS = 154 971 X_SC_REGEXP = 155 972 X_SC_REGEX_VERSION = 156 973 X_SC_SHELL = 157 974 X_SC_SIGNALS = 158 975 X_SC_SPAWN = 159 976 X_SC_SPORADIC_SERVER = 160 977 X_SC_THREAD_SPORADIC_SERVER = 161 978 X_SC_SYSTEM_DATABASE = 162 979 X_SC_SYSTEM_DATABASE_R = 163 980 X_SC_TIMEOUTS = 164 981 X_SC_TYPED_MEMORY_OBJECTS = 165 982 X_SC_USER_GROUPS = 166 983 X_SC_USER_GROUPS_R = 167 984 X_SC_2_PBS = 168 985 X_SC_2_PBS_ACCOUNTING = 169 986 X_SC_2_PBS_LOCATE = 170 987 X_SC_2_PBS_MESSAGE = 171 988 X_SC_2_PBS_TRACK = 172 989 X_SC_SYMLOOP_MAX = 173 990 X_SC_STREAMS = 174 991 X_SC_2_PBS_CHECKPOINT = 175 992 993 X_SC_V6_ILP32_OFF32 = 176 994 X_SC_V6_ILP32_OFFBIG = 177 995 X_SC_V6_LP64_OFF64 = 178 996 X_SC_V6_LPBIG_OFFBIG = 179 997 998 X_SC_HOST_NAME_MAX = 180 999 X_SC_TRACE = 181 1000 X_SC_TRACE_EVENT_FILTER = 182 1001 X_SC_TRACE_INHERIT = 183 1002 X_SC_TRACE_LOG = 184 1003 1004 X_SC_LEVEL1_ICACHE_SIZE = 185 1005 X_SC_LEVEL1_ICACHE_ASSOC = 186 1006 X_SC_LEVEL1_ICACHE_LINESIZE = 187 1007 X_SC_LEVEL1_DCACHE_SIZE = 188 1008 X_SC_LEVEL1_DCACHE_ASSOC = 189 1009 X_SC_LEVEL1_DCACHE_LINESIZE = 190 1010 X_SC_LEVEL2_CACHE_SIZE = 191 1011 X_SC_LEVEL2_CACHE_ASSOC = 192 1012 X_SC_LEVEL2_CACHE_LINESIZE = 193 1013 X_SC_LEVEL3_CACHE_SIZE = 194 1014 X_SC_LEVEL3_CACHE_ASSOC = 195 1015 X_SC_LEVEL3_CACHE_LINESIZE = 196 1016 X_SC_LEVEL4_CACHE_SIZE = 197 1017 X_SC_LEVEL4_CACHE_ASSOC = 198 1018 X_SC_LEVEL4_CACHE_LINESIZE = 199 1019 // Leave room here, maybe we need a few more cache levels some day. 1020 1021 X_SC_IPV6 = 235 1022 X_SC_RAW_SOCKETS = 236 1023 1024 X_SC_V7_ILP32_OFF32 = 237 1025 X_SC_V7_ILP32_OFFBIG = 238 1026 X_SC_V7_LP64_OFF64 = 239 1027 X_SC_V7_LPBIG_OFFBIG = 240 1028 1029 X_SC_SS_REPL_MAX = 241 1030 1031 X_SC_TRACE_EVENT_NAME_MAX = 242 1032 X_SC_TRACE_NAME_MAX = 243 1033 X_SC_TRACE_SYS_MAX = 244 1034 X_SC_TRACE_USER_EVENT_MAX = 245 1035 1036 X_SC_XOPEN_STREAMS = 246 1037 1038 X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 1039 X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 1040 ) 1041 1042 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1043 // This file is part of the GNU C Library. 1044 // 1045 // The GNU C Library is free software; you can redistribute it and/or 1046 // modify it under the terms of the GNU Lesser General Public 1047 // License as published by the Free Software Foundation; either 1048 // version 2.1 of the License, or (at your option) any later version. 1049 // 1050 // The GNU C Library is distributed in the hope that it will be useful, 1051 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1052 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1053 // Lesser General Public License for more details. 1054 // 1055 // You should have received a copy of the GNU Lesser General Public 1056 // License along with the GNU C Library; if not, see 1057 // <https://www.gnu.org/licenses/>. 1058 1059 // ISO C99 Standard: 7.20 General utilities <stdlib.h> 1060 1061 // Handle feature test macros at the start of a header. 1062 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1063 // This file is part of the GNU C Library. 1064 // 1065 // The GNU C Library is free software; you can redistribute it and/or 1066 // modify it under the terms of the GNU Lesser General Public 1067 // License as published by the Free Software Foundation; either 1068 // version 2.1 of the License, or (at your option) any later version. 1069 // 1070 // The GNU C Library is distributed in the hope that it will be useful, 1071 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1072 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1073 // Lesser General Public License for more details. 1074 // 1075 // You should have received a copy of the GNU Lesser General Public 1076 // License along with the GNU C Library; if not, see 1077 // <https://www.gnu.org/licenses/>. 1078 1079 // This header is internal to glibc and should not be included outside 1080 // of glibc headers. Headers including it must define 1081 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1082 // cannot have multiple include guards because ISO C feature test 1083 // macros depend on the definition of the macro when an affected 1084 // header is included, not when the first system header is 1085 // included. 1086 1087 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1088 // This file is part of the GNU C Library. 1089 // 1090 // The GNU C Library is free software; you can redistribute it and/or 1091 // modify it under the terms of the GNU Lesser General Public 1092 // License as published by the Free Software Foundation; either 1093 // version 2.1 of the License, or (at your option) any later version. 1094 // 1095 // The GNU C Library is distributed in the hope that it will be useful, 1096 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1097 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1098 // Lesser General Public License for more details. 1099 // 1100 // You should have received a copy of the GNU Lesser General Public 1101 // License along with the GNU C Library; if not, see 1102 // <https://www.gnu.org/licenses/>. 1103 1104 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1105 // macro. 1106 1107 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1108 // macro. Most but not all symbols enabled by that macro in TS 1109 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1110 // still require that macro in C2X. 1111 1112 // ISO/IEC TS 18661-4:2015 defines the 1113 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1114 // functions, the symbols from this TS are enabled unconditionally in 1115 // C2X. 1116 1117 // ISO/IEC TS 18661-3:2015 defines the 1118 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1119 1120 // Get size_t, wchar_t and NULL from <stddef.h>. 1121 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 1122 // 1123 // This file is part of GCC. 1124 // 1125 // GCC is free software; you can redistribute it and/or modify 1126 // it under the terms of the GNU General Public License as published by 1127 // the Free Software Foundation; either version 3, or (at your option) 1128 // any later version. 1129 // 1130 // GCC is distributed in the hope that it will be useful, 1131 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1132 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1133 // GNU General Public License for more details. 1134 // 1135 // Under Section 7 of GPL version 3, you are granted additional 1136 // permissions described in the GCC Runtime Library Exception, version 1137 // 3.1, as published by the Free Software Foundation. 1138 // 1139 // You should have received a copy of the GNU General Public License and 1140 // a copy of the GCC Runtime Library Exception along with this program; 1141 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1142 // <http://www.gnu.org/licenses/>. 1143 1144 // ISO C Standard: 7.17 Common definitions <stddef.h> 1145 1146 // Any one of these symbols __need_* means that GNU libc 1147 // wants us just to define one data type. So don't define 1148 // the symbols that indicate this file's entire job has been done. 1149 1150 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1151 // There's no way to win with the other order! Sun lossage. 1152 1153 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1154 // Just ignore it. 1155 1156 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1157 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1158 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1159 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1160 // If we find that the macros are still defined at this point, we must 1161 // invoke them so that the type is defined as expected. 1162 1163 // In case nobody has defined these types, but we aren't running under 1164 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1165 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1166 // parts of GCC is compiled by an older compiler, that actually 1167 // include gstddef.h, such as collect2. 1168 1169 // Signed type of difference of two pointers. 1170 1171 // Define this type if we are doing the whole job, 1172 // or if we want this type in particular. 1173 1174 // If this symbol has done its job, get rid of it. 1175 1176 // Unsigned type of `sizeof' something. 1177 1178 // Define this type if we are doing the whole job, 1179 // or if we want this type in particular. 1180 1181 // Wide character type. 1182 // Locale-writers should change this as necessary to 1183 // be big enough to hold unique values not between 0 and 127, 1184 // and not (wchar_t) -1, for each defined multibyte character. 1185 1186 // Define this type if we are doing the whole job, 1187 // or if we want this type in particular. 1188 1189 // A null pointer constant. 1190 1191 // Offset of member MEMBER in a struct of type TYPE. 1192 1193 // XPG requires a few symbols from <sys/wait.h> being defined. 1194 // Definitions of flag bits for `waitpid' et al. 1195 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1196 // This file is part of the GNU C Library. 1197 // 1198 // The GNU C Library is free software; you can redistribute it and/or 1199 // modify it under the terms of the GNU Lesser General Public 1200 // License as published by the Free Software Foundation; either 1201 // version 2.1 of the License, or (at your option) any later version. 1202 // 1203 // The GNU C Library is distributed in the hope that it will be useful, 1204 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1205 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1206 // Lesser General Public License for more details. 1207 // 1208 // You should have received a copy of the GNU Lesser General Public 1209 // License along with the GNU C Library; if not, see 1210 // <https://www.gnu.org/licenses/>. 1211 1212 // Bits in the third argument to `waitpid'. 1213 1214 // Bits in the fourth argument to `waitid'. 1215 1216 // The following values are used by the `waitid' function. 1217 1218 // The Linux kernel defines these bare, rather than an enum, 1219 // which causes a conflict if the include order is reversed. 1220 1221 const ( /* waitflags.h:52:1: */ 1222 P_ALL = 0 // Wait for any child. 1223 P_PID = 1 // Wait for specified process. 1224 P_PGID = 2 1225 ) 1226 1227 // 1228 // If you use the zlib library in a product, an acknowledgment is welcome 1229 // in the documentation of your product. If for some reason you cannot 1230 // include such an acknowledgment, I would appreciate that you keep this 1231 // copyright string in the executable of your product. 1232 // 1233 1234 // =========================================================================== 1235 // Function prototypes. 1236 const ( /* deflate.c:66:1: */ 1237 Need_more = 0 // block not completed, need more input or more output 1238 Block_done = 1 // block flush performed 1239 Finish_started = 2 // finish started, need only more output at next deflate 1240 Finish_done = 3 1241 ) 1242 1243 // inflate.h -- internal inflate state definition 1244 // Copyright (C) 1995-2016 Mark Adler 1245 // For conditions of distribution and use, see copyright notice in zlib.h 1246 1247 // WARNING: this file should *not* be used by applications. It is 1248 // part of the implementation of the compression library and is 1249 // subject to change. Applications should only use zlib.h. 1250 // 1251 1252 // define NO_GZIP when compiling if you want to disable gzip header and 1253 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 1254 // the crc code when it is not needed. For shared libraries, gzip decoding 1255 // should be left enabled. 1256 1257 // Possible inflate modes between inflate() calls 1258 const ( /* inflate.h:20:1: */ 1259 HEAD = 16180 // i: waiting for magic header 1260 FLAGS = 16181 // i: waiting for method and flags (gzip) 1261 TIME = 16182 // i: waiting for modification time (gzip) 1262 OS = 16183 // i: waiting for extra flags and operating system (gzip) 1263 EXLEN = 16184 // i: waiting for extra length (gzip) 1264 EXTRA = 16185 // i: waiting for extra bytes (gzip) 1265 NAME = 16186 // i: waiting for end of file name (gzip) 1266 COMMENT = 16187 // i: waiting for end of comment (gzip) 1267 HCRC = 16188 // i: waiting for header crc (gzip) 1268 DICTID = 16189 // i: waiting for dictionary check value 1269 DICT = 16190 // waiting for inflateSetDictionary() call 1270 TYPE = 16191 // i: waiting for type bits, including last-flag bit 1271 TYPEDO = 16192 // i: same, but skip check to exit inflate on new block 1272 STORED = 16193 // i: waiting for stored size (length and complement) 1273 COPY_ = 16194 // i/o: same as COPY below, but only first time in 1274 COPY = 16195 // i/o: waiting for input or output to copy stored block 1275 TABLE = 16196 // i: waiting for dynamic block table lengths 1276 LENLENS = 16197 // i: waiting for code length code lengths 1277 CODELENS = 16198 // i: waiting for length/lit and distance code lengths 1278 LEN_ = 16199 // i: same as LEN below, but only first time in 1279 LEN = 16200 // i: waiting for length/lit/eob code 1280 LENEXT = 16201 // i: waiting for length extra bits 1281 DIST = 16202 // i: waiting for distance code 1282 DISTEXT = 16203 // i: waiting for distance extra bits 1283 MATCH = 16204 // o: waiting for output space to copy string 1284 LIT = 16205 // o: waiting for output space to write literal 1285 CHECK = 16206 // i: waiting for 32-bit check value 1286 LENGTH = 16207 // i: waiting for 32-bit length (gzip) 1287 DONE = 16208 // finished check, done -- remain here until reset 1288 BAD = 16209 // got a data error -- remain here until reset 1289 MEM = 16210 // got an inflate() memory error -- remain here until reset 1290 SYNC = 16211 1291 ) 1292 1293 // op values as set by inflate_table(): 1294 // 00000000 - literal 1295 // 0000tttt - table link, tttt != 0 is the number of table index bits 1296 // 0001eeee - length or distance, eeee is the number of extra bits 1297 // 01100000 - end of block 1298 // 01000000 - invalid code 1299 // 1300 1301 // Maximum size of the dynamic table. The maximum number of code structures is 1302 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 1303 // codes. These values were found by exhaustive searches using the program 1304 // examples/enough.c found in the zlib distribtution. The arguments to that 1305 // program are the number of symbols, the initial root table size, and the 1306 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 1307 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 1308 // The initial root table size (9 or 6) is found in the fifth argument of the 1309 // inflate_table() calls in inflate.c and infback.c. If the root table size is 1310 // changed, then these maximum sizes would be need to be recalculated and 1311 // updated. 1312 1313 // Type of code to build for inflate_table() 1314 const ( /* inftrees.h:54:1: */ 1315 CODES = 0 1316 LENS = 1 1317 DISTS = 2 1318 ) 1319 1320 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 1321 1322 type Size_t = uint64 /* <builtin>:9:23 */ 1323 1324 type Wchar_t = int32 /* <builtin>:15:24 */ 1325 1326 type X__int128_t = struct { 1327 Flo int64 1328 Fhi int64 1329 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 1330 type X__uint128_t = struct { 1331 Flo uint64 1332 Fhi uint64 1333 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 1334 1335 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 1336 type X__float128 = float64 /* <builtin>:47:21 */ 1337 1338 // A null pointer constant. 1339 1340 // Offset of member MEMBER in a struct of type TYPE. 1341 1342 // Type whose alignment is supported in every context and is at least 1343 // as great as that of any standard type not using alignment 1344 // specifiers. 1345 type Max_align_t = struct { 1346 F__max_align_ll int64 1347 F__max_align_ld float64 1348 } /* stddef.h:426:3 */ 1349 1350 type Z_size_t = Size_t /* zconf.h:248:21 */ 1351 1352 // Maximum value for memLevel in deflateInit2 1353 1354 // Maximum value for windowBits in deflateInit2 and inflateInit2. 1355 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 1356 // created by gzip. (Files created by minigzip can still be extracted by 1357 // gzip.) 1358 1359 // The memory requirements for deflate are (in bytes): 1360 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 1361 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 1362 // plus a few kilobytes for small objects. For example, if you want to reduce 1363 // the default memory requirements from 256K to 128K, compile with 1364 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 1365 // Of course this will generally degrade compression (there's no free lunch). 1366 // 1367 // The memory requirements for inflate are (in bytes) 1 << windowBits 1368 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 1369 // for small objects. 1370 1371 // Type declarations 1372 1373 // The following definitions for FAR are needed only for MSDOS mixed 1374 // model programming (small or medium model with some far allocations). 1375 // This was tested only with MSC; for other MSDOS compilers you may have 1376 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 1377 // just define FAR to be empty. 1378 1379 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 1380 type UInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 1381 type ULong = uint64 /* zconf.h:394:24 */ // 32 bits or more 1382 1383 type Bytef = Byte /* zconf.h:400:22 */ 1384 type Charf = int8 /* zconf.h:402:19 */ 1385 type Intf = int32 /* zconf.h:403:19 */ 1386 type UIntf = UInt /* zconf.h:404:19 */ 1387 type ULongf = ULong /* zconf.h:405:19 */ 1388 1389 type Voidpc = uintptr /* zconf.h:408:23 */ 1390 type Voidpf = uintptr /* zconf.h:409:23 */ 1391 type Voidp = uintptr /* zconf.h:410:23 */ 1392 1393 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1394 // 1395 // This file is part of GCC. 1396 // 1397 // GCC is free software; you can redistribute it and/or modify it under 1398 // the terms of the GNU General Public License as published by the Free 1399 // Software Foundation; either version 3, or (at your option) any later 1400 // version. 1401 // 1402 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 1403 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 1404 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1405 // for more details. 1406 // 1407 // Under Section 7 of GPL version 3, you are granted additional 1408 // permissions described in the GCC Runtime Library Exception, version 1409 // 3.1, as published by the Free Software Foundation. 1410 // 1411 // You should have received a copy of the GNU General Public License and 1412 // a copy of the GCC Runtime Library Exception along with this program; 1413 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1414 // <http://www.gnu.org/licenses/>. 1415 1416 // This administrivia gets added to the beginning of limits.h 1417 // if the system has its own version of limits.h. 1418 1419 // We use _GCC_LIMITS_H_ because we want this not to match 1420 // any macros that the system's limits.h uses for its own purposes. 1421 1422 // Use "..." so that we find syslimits.h only in this same directory. 1423 // syslimits.h stands for the system's own limits.h file. 1424 // If we can use it ok unmodified, then we install this text. 1425 // If fixincludes fixes it, then the fixed version is installed 1426 // instead of this text. 1427 1428 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1429 // This file is part of the GNU C Library. 1430 // 1431 // The GNU C Library is free software; you can redistribute it and/or 1432 // modify it under the terms of the GNU Lesser General Public 1433 // License as published by the Free Software Foundation; either 1434 // version 2.1 of the License, or (at your option) any later version. 1435 // 1436 // The GNU C Library is distributed in the hope that it will be useful, 1437 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1438 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1439 // Lesser General Public License for more details. 1440 // 1441 // You should have received a copy of the GNU Lesser General Public 1442 // License along with the GNU C Library; if not, see 1443 // <https://www.gnu.org/licenses/>. 1444 1445 // ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> 1446 1447 // Handle feature test macros at the start of a header. 1448 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1449 // This file is part of the GNU C Library. 1450 // 1451 // The GNU C Library is free software; you can redistribute it and/or 1452 // modify it under the terms of the GNU Lesser General Public 1453 // License as published by the Free Software Foundation; either 1454 // version 2.1 of the License, or (at your option) any later version. 1455 // 1456 // The GNU C Library is distributed in the hope that it will be useful, 1457 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1458 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1459 // Lesser General Public License for more details. 1460 // 1461 // You should have received a copy of the GNU Lesser General Public 1462 // License along with the GNU C Library; if not, see 1463 // <https://www.gnu.org/licenses/>. 1464 1465 // This header is internal to glibc and should not be included outside 1466 // of glibc headers. Headers including it must define 1467 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1468 // cannot have multiple include guards because ISO C feature test 1469 // macros depend on the definition of the macro when an affected 1470 // header is included, not when the first system header is 1471 // included. 1472 1473 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1474 // This file is part of the GNU C Library. 1475 // 1476 // The GNU C Library is free software; you can redistribute it and/or 1477 // modify it under the terms of the GNU Lesser General Public 1478 // License as published by the Free Software Foundation; either 1479 // version 2.1 of the License, or (at your option) any later version. 1480 // 1481 // The GNU C Library is distributed in the hope that it will be useful, 1482 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1483 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1484 // Lesser General Public License for more details. 1485 // 1486 // You should have received a copy of the GNU Lesser General Public 1487 // License along with the GNU C Library; if not, see 1488 // <https://www.gnu.org/licenses/>. 1489 1490 // These are defined by the user (or the compiler) 1491 // to specify the desired environment: 1492 // 1493 // __STRICT_ANSI__ ISO Standard C. 1494 // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. 1495 // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. 1496 // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. 1497 // __STDC_WANT_LIB_EXT2__ 1498 // Extensions to ISO C99 from TR 27431-2:2010. 1499 // __STDC_WANT_IEC_60559_BFP_EXT__ 1500 // Extensions to ISO C11 from TS 18661-1:2014. 1501 // __STDC_WANT_IEC_60559_FUNCS_EXT__ 1502 // Extensions to ISO C11 from TS 18661-4:2015. 1503 // __STDC_WANT_IEC_60559_TYPES_EXT__ 1504 // Extensions to ISO C11 from TS 18661-3:2015. 1505 // 1506 // _POSIX_SOURCE IEEE Std 1003.1. 1507 // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; 1508 // if >=199309L, add IEEE Std 1003.1b-1993; 1509 // if >=199506L, add IEEE Std 1003.1c-1995; 1510 // if >=200112L, all of IEEE 1003.1-2004 1511 // if >=200809L, all of IEEE 1003.1-2008 1512 // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if 1513 // Single Unix conformance is wanted, to 600 for the 1514 // sixth revision, to 700 for the seventh revision. 1515 // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. 1516 // _LARGEFILE_SOURCE Some more functions for correct standard I/O. 1517 // _LARGEFILE64_SOURCE Additional functionality from LFS for large files. 1518 // _FILE_OFFSET_BITS=N Select default filesystem interface. 1519 // _ATFILE_SOURCE Additional *at interfaces. 1520 // _GNU_SOURCE All of the above, plus GNU extensions. 1521 // _DEFAULT_SOURCE The default set of features (taking precedence over 1522 // __STRICT_ANSI__). 1523 // 1524 // _FORTIFY_SOURCE Add security hardening to many library functions. 1525 // Set to 1 or 2; 2 performs stricter checks than 1. 1526 // 1527 // _REENTRANT, _THREAD_SAFE 1528 // Obsolete; equivalent to _POSIX_C_SOURCE=199506L. 1529 // 1530 // The `-ansi' switch to the GNU C compiler, and standards conformance 1531 // options such as `-std=c99', define __STRICT_ANSI__. If none of 1532 // these are defined, or if _DEFAULT_SOURCE is defined, the default is 1533 // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 1534 // 200809L, as well as enabling miscellaneous functions from BSD and 1535 // SVID. If more than one of these are defined, they accumulate. For 1536 // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together 1537 // give you ISO C, 1003.1, and 1003.2, but nothing else. 1538 // 1539 // These are defined by this file and are used by the 1540 // header files to decide what to declare or define: 1541 // 1542 // __GLIBC_USE (F) Define things from feature set F. This is defined 1543 // to 1 or 0; the subsequent macros are either defined 1544 // or undefined, and those tests should be moved to 1545 // __GLIBC_USE. 1546 // __USE_ISOC11 Define ISO C11 things. 1547 // __USE_ISOC99 Define ISO C99 things. 1548 // __USE_ISOC95 Define ISO C90 AMD1 (C95) things. 1549 // __USE_ISOCXX11 Define ISO C++11 things. 1550 // __USE_POSIX Define IEEE Std 1003.1 things. 1551 // __USE_POSIX2 Define IEEE Std 1003.2 things. 1552 // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. 1553 // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. 1554 // __USE_XOPEN Define XPG things. 1555 // __USE_XOPEN_EXTENDED Define X/Open Unix things. 1556 // __USE_UNIX98 Define Single Unix V2 things. 1557 // __USE_XOPEN2K Define XPG6 things. 1558 // __USE_XOPEN2KXSI Define XPG6 XSI things. 1559 // __USE_XOPEN2K8 Define XPG7 things. 1560 // __USE_XOPEN2K8XSI Define XPG7 XSI things. 1561 // __USE_LARGEFILE Define correct standard I/O things. 1562 // __USE_LARGEFILE64 Define LFS things with separate names. 1563 // __USE_FILE_OFFSET64 Define 64bit interface as default. 1564 // __USE_MISC Define things from 4.3BSD or System V Unix. 1565 // __USE_ATFILE Define *at interfaces and AT_* constants for them. 1566 // __USE_GNU Define GNU extensions. 1567 // __USE_FORTIFY_LEVEL Additional security measures used, according to level. 1568 // 1569 // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are 1570 // defined by this file unconditionally. `__GNU_LIBRARY__' is provided 1571 // only for compatibility. All new code should use the other symbols 1572 // to test for features. 1573 // 1574 // All macros listed above as possibly being defined by this file are 1575 // explicitly undefined if they are not explicitly defined. 1576 // Feature-test macros that are not defined by the user or compiler 1577 // but are implied by the other feature-test macros defined (or by the 1578 // lack of any definitions) are defined by the file. 1579 // 1580 // ISO C feature test macros depend on the definition of the macro 1581 // when an affected header is included, not when the first system 1582 // header is included, and so they are handled in 1583 // <bits/libc-header-start.h>, which does not have a multiple include 1584 // guard. Feature test macros that can be handled from the first 1585 // system header included are handled here. 1586 1587 // Undefine everything, so we get a clean slate. 1588 1589 // Suppress kernel-name space pollution unless user expressedly asks 1590 // for it. 1591 1592 // Convenience macro to test the version of gcc. 1593 // Use like this: 1594 // #if __GNUC_PREREQ (2,8) 1595 // ... code requiring gcc 2.8 or later ... 1596 // #endif 1597 // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was 1598 // added in 2.0. 1599 1600 // Similarly for clang. Features added to GCC after version 4.2 may 1601 // or may not also be available in clang, and clang's definitions of 1602 // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such 1603 // features can be queried via __has_extension/__has_feature. 1604 1605 // Whether to use feature set F. 1606 1607 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for 1608 // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not 1609 // issue a warning; the expectation is that the source is being 1610 // transitioned to use the new macro. 1611 1612 // If _GNU_SOURCE was defined by the user, turn on all the other features. 1613 1614 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, 1615 // define _DEFAULT_SOURCE. 1616 1617 // This is to enable the ISO C2X extension. 1618 1619 // This is to enable the ISO C11 extension. 1620 1621 // This is to enable the ISO C99 extension. 1622 1623 // This is to enable the ISO C90 Amendment 1:1995 extension. 1624 1625 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE 1626 // is defined, use POSIX.1-2008 (or another version depending on 1627 // _XOPEN_SOURCE). 1628 1629 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be 1630 // defined in all multithreaded code. GNU libc has not required this 1631 // for many years. We now treat them as compatibility synonyms for 1632 // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with 1633 // comprehensive support for multithreaded code. Using them never 1634 // lowers the selected level of POSIX conformance, only raises it. 1635 1636 // The function 'gets' existed in C89, but is impossible to use 1637 // safely. It has been removed from ISO C11 and ISO C++14. Note: for 1638 // compatibility with various implementations of <cstdio>, this test 1639 // must consider only the value of __cplusplus when compiling C++. 1640 1641 // GNU formerly extended the scanf functions with modified format 1642 // specifiers %as, %aS, and %a[...] that allocate a buffer for the 1643 // input using malloc. This extension conflicts with ISO C99, which 1644 // defines %a as a standalone format specifier that reads a floating- 1645 // point number; moreover, POSIX.1-2008 provides the same feature 1646 // using the modifier letter 'm' instead (%ms, %mS, %m[...]). 1647 // 1648 // We now follow C99 unless GNU extensions are active and the compiler 1649 // is specifically in C89 or C++98 mode (strict or not). For 1650 // instance, with GCC, -std=gnu11 will have C99-compliant scanf with 1651 // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the 1652 // old extension. 1653 1654 // Get definitions of __STDC_* predefined macros, if the compiler has 1655 // not preincluded this header automatically. 1656 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1657 // This file is part of the GNU C Library. 1658 // 1659 // The GNU C Library is free software; you can redistribute it and/or 1660 // modify it under the terms of the GNU Lesser General Public 1661 // License as published by the Free Software Foundation; either 1662 // version 2.1 of the License, or (at your option) any later version. 1663 // 1664 // The GNU C Library is distributed in the hope that it will be useful, 1665 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1666 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1667 // Lesser General Public License for more details. 1668 // 1669 // You should have received a copy of the GNU Lesser General Public 1670 // License along with the GNU C Library; if not, see 1671 // <https://www.gnu.org/licenses/>. 1672 1673 // This macro indicates that the installed library is the GNU C Library. 1674 // For historic reasons the value now is 6 and this will stay from now 1675 // on. The use of this variable is deprecated. Use __GLIBC__ and 1676 // __GLIBC_MINOR__ now (see below) when you want to test for a specific 1677 // GNU C library version and use the values in <gnu/lib-names.h> to get 1678 // the sonames of the shared libraries. 1679 1680 // Major and minor version number of the GNU C library package. Use 1681 // these macros to test for features in specific releases. 1682 1683 // This is here only because every header file already includes this one. 1684 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1685 // This file is part of the GNU C Library. 1686 // 1687 // The GNU C Library is free software; you can redistribute it and/or 1688 // modify it under the terms of the GNU Lesser General Public 1689 // License as published by the Free Software Foundation; either 1690 // version 2.1 of the License, or (at your option) any later version. 1691 // 1692 // The GNU C Library is distributed in the hope that it will be useful, 1693 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1694 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1695 // Lesser General Public License for more details. 1696 // 1697 // You should have received a copy of the GNU Lesser General Public 1698 // License along with the GNU C Library; if not, see 1699 // <https://www.gnu.org/licenses/>. 1700 1701 // We are almost always included from features.h. 1702 1703 // The GNU libc does not support any K&R compilers or the traditional mode 1704 // of ISO C compilers anymore. Check for some of the combinations not 1705 // anymore supported. 1706 1707 // Some user header file might have defined this before. 1708 1709 // All functions, except those with callbacks or those that 1710 // synchronize memory, are leaf functions. 1711 1712 // GCC can always grok prototypes. For C++ programs we add throw() 1713 // to help it optimize the function calls. But this works only with 1714 // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions 1715 // as non-throwing using a function attribute since programs can use 1716 // the -fexceptions options for C code as well. 1717 1718 // Compilers that are not clang may object to 1719 // #if defined __clang__ && __has_extension(...) 1720 // even though they do not need to evaluate the right-hand side of the &&. 1721 1722 // These two macros are not used in glibc anymore. They are kept here 1723 // only because some other projects expect the macros to be defined. 1724 1725 // For these things, GCC behaves the ANSI way normally, 1726 // and the non-ANSI way under -traditional. 1727 1728 // This is not a typedef so `const __ptr_t' does the right thing. 1729 1730 // C++ needs to know that types and declarations are C, not C++. 1731 1732 // Fortify support. 1733 1734 // Support for flexible arrays. 1735 // Headers that should use flexible arrays only if they're "real" 1736 // (e.g. only if they won't affect sizeof()) should test 1737 // #if __glibc_c99_flexarr_available. 1738 1739 // __asm__ ("xyz") is used throughout the headers to rename functions 1740 // at the assembly language level. This is wrapped by the __REDIRECT 1741 // macro, in order to support compilers that can do this some other 1742 // way. When compilers don't support asm-names at all, we have to do 1743 // preprocessor tricks instead (which don't have exactly the right 1744 // semantics, but it's the best we can do). 1745 // 1746 // Example: 1747 // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); 1748 1749 // 1750 // #elif __SOME_OTHER_COMPILER__ 1751 // 1752 // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) 1753 1754 // GCC has various useful declarations that can be made with the 1755 // `__attribute__' syntax. All of the ways we use this do fine if 1756 // they are omitted for compilers that don't understand it. 1757 1758 // At some point during the gcc 2.96 development the `malloc' attribute 1759 // for functions was introduced. We don't want to use it unconditionally 1760 // (although this would be possible) since it generates warnings. 1761 1762 // Tell the compiler which arguments to an allocation function 1763 // indicate the size of the allocation. 1764 1765 // At some point during the gcc 2.96 development the `pure' attribute 1766 // for functions was introduced. We don't want to use it unconditionally 1767 // (although this would be possible) since it generates warnings. 1768 1769 // This declaration tells the compiler that the value is constant. 1770 1771 // At some point during the gcc 3.1 development the `used' attribute 1772 // for functions was introduced. We don't want to use it unconditionally 1773 // (although this would be possible) since it generates warnings. 1774 1775 // Since version 3.2, gcc allows marking deprecated functions. 1776 1777 // Since version 4.5, gcc also allows one to specify the message printed 1778 // when a deprecated function is used. clang claims to be gcc 4.2, but 1779 // may also support this feature. 1780 1781 // At some point during the gcc 2.8 development the `format_arg' attribute 1782 // for functions was introduced. We don't want to use it unconditionally 1783 // (although this would be possible) since it generates warnings. 1784 // If several `format_arg' attributes are given for the same function, in 1785 // gcc-3.0 and older, all but the last one are ignored. In newer gccs, 1786 // all designated arguments are considered. 1787 1788 // At some point during the gcc 2.97 development the `strfmon' format 1789 // attribute for functions was introduced. We don't want to use it 1790 // unconditionally (although this would be possible) since it 1791 // generates warnings. 1792 1793 // The nonull function attribute allows to mark pointer parameters which 1794 // must not be NULL. 1795 1796 // If fortification mode, we warn about unused results of certain 1797 // function calls which can lead to problems. 1798 1799 // Forces a function to be always inlined. 1800 // The Linux kernel defines __always_inline in stddef.h (283d7573), and 1801 // it conflicts with this definition. Therefore undefine it first to 1802 // allow either header to be included first. 1803 1804 // Associate error messages with the source location of the call site rather 1805 // than with the source location inside the function. 1806 1807 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 1808 // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ 1809 // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions 1810 // older than 4.3 may define these macros and still not guarantee GNU inlining 1811 // semantics. 1812 // 1813 // clang++ identifies itself as gcc-4.2, but has support for GNU inlining 1814 // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and 1815 // __GNUC_GNU_INLINE__ macro definitions. 1816 1817 // GCC 4.3 and above allow passing all anonymous arguments of an 1818 // __extern_always_inline function to some other vararg function. 1819 1820 // It is possible to compile containing GCC extensions even if GCC is 1821 // run in pedantic mode if the uses are carefully marked using the 1822 // `__extension__' keyword. But this is not generally available before 1823 // version 2.8. 1824 1825 // __restrict is known in EGCS 1.2 and above. 1826 1827 // ISO C99 also allows to declare arrays as non-overlapping. The syntax is 1828 // array_name[restrict] 1829 // GCC 3.1 supports this. 1830 1831 // Describes a char array whose address can safely be passed as the first 1832 // argument to strncpy and strncat, as the char array is not necessarily 1833 // a NUL-terminated string. 1834 1835 // Undefine (also defined in libc-symbols.h). 1836 // Copies attributes from the declaration or type referenced by 1837 // the argument. 1838 1839 // Determine the wordsize from the preprocessor defines. 1840 1841 // Both x86-64 and x32 use the 64-bit system call interface. 1842 // Properties of long double type. ldbl-96 version. 1843 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1844 // This file is part of the GNU C Library. 1845 // 1846 // The GNU C Library is free software; you can redistribute it and/or 1847 // modify it under the terms of the GNU Lesser General Public 1848 // License published by the Free Software Foundation; either 1849 // version 2.1 of the License, or (at your option) any later version. 1850 // 1851 // The GNU C Library is distributed in the hope that it will be useful, 1852 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1853 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1854 // Lesser General Public License for more details. 1855 // 1856 // You should have received a copy of the GNU Lesser General Public 1857 // License along with the GNU C Library; if not, see 1858 // <https://www.gnu.org/licenses/>. 1859 1860 // long double is distinct from double, so there is nothing to 1861 // define here. 1862 1863 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is 1864 // intended for use in preprocessor macros. 1865 // 1866 // Note: MESSAGE must be a _single_ string; concatenation of string 1867 // literals is not supported. 1868 1869 // Generic selection (ISO C11) is a C-only feature, available in GCC 1870 // since version 4.9. Previous versions do not provide generic 1871 // selection, even though they might set __STDC_VERSION__ to 201112L, 1872 // when in -std=c11 mode. Thus, we must check for !defined __GNUC__ 1873 // when testing __STDC_VERSION__ for generic selection support. 1874 // On the other hand, Clang also defines __GNUC__, so a clang-specific 1875 // check is required to enable the use of generic selection. 1876 1877 // If we don't have __REDIRECT, prototypes will be missing if 1878 // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. 1879 1880 // Decide whether we can define 'extern inline' functions in headers. 1881 1882 // This is here only because every header file already includes this one. 1883 // Get the definitions of all the appropriate `__stub_FUNCTION' symbols. 1884 // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub 1885 // that will always return failure (and set errno to ENOSYS). 1886 // This file is automatically generated. 1887 // This file selects the right generated file of `__stub_FUNCTION' macros 1888 // based on the architecture being compiled for. 1889 1890 // This file is automatically generated. 1891 // It defines a symbol `__stub_FUNCTION' for each function 1892 // in the C library which is a stub, meaning it will fail 1893 // every time called, usually setting errno to ENOSYS. 1894 1895 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1896 // macro. 1897 1898 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1899 // macro. Most but not all symbols enabled by that macro in TS 1900 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1901 // still require that macro in C2X. 1902 1903 // ISO/IEC TS 18661-4:2015 defines the 1904 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1905 // functions, the symbols from this TS are enabled unconditionally in 1906 // C2X. 1907 1908 // ISO/IEC TS 18661-3:2015 defines the 1909 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1910 1911 // Maximum length of any multibyte character in any locale. 1912 // We define this value here since the gcc header does not define 1913 // the correct value. 1914 1915 // If we are not using GNU CC we have to define all the symbols ourself. 1916 // Otherwise use gcc's definitions (see below). 1917 1918 // Get the compiler's limits.h, which defines almost all the ISO constants. 1919 // 1920 // We put this #include_next outside the double inclusion check because 1921 // it should be possible to include this file more than once and still get 1922 // the definitions from gcc's header. 1923 1924 // The <limits.h> files in some gcc versions don't define LLONG_MIN, 1925 // LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for 1926 // ages are available. 1927 1928 // The integer width macros are not defined by GCC's <limits.h> before 1929 // GCC 7, or if _GNU_SOURCE rather than 1930 // __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. 1931 1932 // POSIX adds things to <limits.h>. 1933 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1934 // This file is part of the GNU C Library. 1935 // 1936 // The GNU C Library is free software; you can redistribute it and/or 1937 // modify it under the terms of the GNU Lesser General Public 1938 // License as published by the Free Software Foundation; either 1939 // version 2.1 of the License, or (at your option) any later version. 1940 // 1941 // The GNU C Library is distributed in the hope that it will be useful, 1942 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1943 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1944 // Lesser General Public License for more details. 1945 // 1946 // You should have received a copy of the GNU Lesser General Public 1947 // License along with the GNU C Library; if not, see 1948 // <https://www.gnu.org/licenses/>. 1949 1950 // POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> 1951 // 1952 // Never include this file directly; use <limits.h> instead. 1953 1954 // Determine the wordsize from the preprocessor defines. 1955 1956 // Both x86-64 and x32 use the 64-bit system call interface. 1957 1958 // These are the standard-mandated minimum values. 1959 1960 // Minimum number of operations in one list I/O call. 1961 1962 // Minimal number of outstanding asynchronous I/O operations. 1963 1964 // Maximum length of arguments to `execve', including environment. 1965 1966 // Maximum simultaneous processes per real user ID. 1967 1968 // Minimal number of timer expiration overruns. 1969 1970 // Maximum length of a host name (not including the terminating null) 1971 // as returned from the GETHOSTNAME function. 1972 1973 // Maximum link count of a file. 1974 1975 // Maximum length of login name. 1976 1977 // Number of bytes in a terminal canonical input queue. 1978 1979 // Number of bytes for which space will be 1980 // available in a terminal input queue. 1981 1982 // Maximum number of message queues open for a process. 1983 1984 // Maximum number of supported message priorities. 1985 1986 // Number of bytes in a filename. 1987 1988 // Number of simultaneous supplementary group IDs per process. 1989 1990 // Number of files one process can have open at once. 1991 1992 // Number of bytes in a pathname. 1993 1994 // Number of bytes than can be written atomically to a pipe. 1995 1996 // The number of repeated occurrences of a BRE permitted by the 1997 // REGEXEC and REGCOMP functions when using the interval notation. 1998 1999 // Minimal number of realtime signals reserved for the application. 2000 2001 // Number of semaphores a process can have. 2002 2003 // Maximal value of a semaphore. 2004 2005 // Number of pending realtime signals. 2006 2007 // Largest value of a `ssize_t'. 2008 2009 // Number of streams a process can have open at once. 2010 2011 // The number of bytes in a symbolic link. 2012 2013 // The number of symbolic links that can be traversed in the 2014 // resolution of a pathname in the absence of a loop. 2015 2016 // Number of timer for a process. 2017 2018 // Maximum number of characters in a tty name. 2019 2020 // Maximum length of a timezone name (element of `tzname'). 2021 2022 // Maximum clock resolution in nanoseconds. 2023 2024 // Get the implementation-specific values for the above. 2025 // Minimum guaranteed maximum values for system limits. Linux version. 2026 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 2027 // This file is part of the GNU C Library. 2028 // 2029 // The GNU C Library is free software; you can redistribute it and/or 2030 // modify it under the terms of the GNU Lesser General Public License as 2031 // published by the Free Software Foundation; either version 2.1 of the 2032 // License, or (at your option) any later version. 2033 // 2034 // The GNU C Library is distributed in the hope that it will be useful, 2035 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2036 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2037 // Lesser General Public License for more details. 2038 // 2039 // You should have received a copy of the GNU Lesser General Public 2040 // License along with the GNU C Library; see the file COPYING.LIB. If 2041 // not, see <https://www.gnu.org/licenses/>. 2042 2043 // The kernel header pollutes the namespace with the NR_OPEN symbol 2044 // and defines LINK_MAX although filesystems have different maxima. A 2045 // similar thing is true for OPEN_MAX: the limit can be changed at 2046 // runtime and therefore the macro must not be defined. Remove this 2047 // after including the header if necessary. 2048 2049 // The kernel sources contain a file with all the needed information. 2050 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 2051 2052 // Have to remove NR_OPEN? 2053 // Have to remove LINK_MAX? 2054 // Have to remove OPEN_MAX? 2055 // Have to remove ARG_MAX? 2056 2057 // The number of data keys per process. 2058 // This is the value this implementation supports. 2059 2060 // Controlling the iterations of destructors for thread-specific data. 2061 // Number of iterations this implementation does. 2062 2063 // The number of threads per process. 2064 // We have no predefined limit on the number of threads. 2065 2066 // Maximum amount by which a process can descrease its asynchronous I/O 2067 // priority level. 2068 2069 // Minimum size for a thread. We are free to choose a reasonable value. 2070 2071 // Maximum number of timer expiration overruns. 2072 2073 // Maximum tty name length. 2074 2075 // Maximum login name length. This is arbitrary. 2076 2077 // Maximum host name length. 2078 2079 // Maximum message queue priority level. 2080 2081 // Maximum value the semaphore can have. 2082 2083 // ssize_t is not formally required to be the signed type 2084 // corresponding to size_t, but it is for all configurations supported 2085 // by glibc. 2086 2087 // This value is a guaranteed minimum maximum. 2088 // The current maximum can be got from `sysconf'. 2089 2090 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2091 // This file is part of the GNU C Library. 2092 // 2093 // The GNU C Library is free software; you can redistribute it and/or 2094 // modify it under the terms of the GNU Lesser General Public 2095 // License as published by the Free Software Foundation; either 2096 // version 2.1 of the License, or (at your option) any later version. 2097 // 2098 // The GNU C Library is distributed in the hope that it will be useful, 2099 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2100 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2101 // Lesser General Public License for more details. 2102 // 2103 // You should have received a copy of the GNU Lesser General Public 2104 // License along with the GNU C Library; if not, see 2105 // <https://www.gnu.org/licenses/>. 2106 2107 // Never include this file directly; include <limits.h> instead. 2108 2109 // The maximum `ibase' and `obase' values allowed by the `bc' utility. 2110 2111 // The maximum number of elements allowed in an array by the `bc' utility. 2112 2113 // The maximum `scale' value allowed by the `bc' utility. 2114 2115 // The maximum length of a string constant accepted by the `bc' utility. 2116 2117 // The maximum number of weights that can be assigned to an entry of 2118 // the LC_COLLATE `order' keyword in the locale definition file. 2119 2120 // The maximum number of expressions that can be nested 2121 // within parentheses by the `expr' utility. 2122 2123 // The maximum length, in bytes, of an input line. 2124 2125 // The maximum number of repeated occurrences of a regular expression 2126 // permitted when using the interval notation `\{M,N\}'. 2127 2128 // The maximum number of bytes in a character class name. We have no 2129 // fixed limit, 2048 is a high number. 2130 2131 // These values are implementation-specific, 2132 // and may vary within the implementation. 2133 // Their precise values can be obtained from sysconf. 2134 2135 // This value is defined like this in regex.h. 2136 2137 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2138 // 2139 // This file is part of GCC. 2140 // 2141 // GCC is free software; you can redistribute it and/or modify it under 2142 // the terms of the GNU General Public License as published by the Free 2143 // Software Foundation; either version 3, or (at your option) any later 2144 // version. 2145 // 2146 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 2147 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 2148 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2149 // for more details. 2150 // 2151 // Under Section 7 of GPL version 3, you are granted additional 2152 // permissions described in the GCC Runtime Library Exception, version 2153 // 3.1, as published by the Free Software Foundation. 2154 // 2155 // You should have received a copy of the GNU General Public License and 2156 // a copy of the GCC Runtime Library Exception along with this program; 2157 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2158 // <http://www.gnu.org/licenses/>. 2159 2160 // Number of bits in a `char'. 2161 2162 // Maximum length of a multibyte character. 2163 2164 // Minimum and maximum values a `signed char' can hold. 2165 2166 // Maximum value an `unsigned char' can hold. (Minimum is 0). 2167 2168 // Minimum and maximum values a `char' can hold. 2169 2170 // Minimum and maximum values a `signed short int' can hold. 2171 2172 // Maximum value an `unsigned short int' can hold. (Minimum is 0). 2173 2174 // Minimum and maximum values a `signed int' can hold. 2175 2176 // Maximum value an `unsigned int' can hold. (Minimum is 0). 2177 2178 // Minimum and maximum values a `signed long int' can hold. 2179 // (Same as `int'). 2180 2181 // Maximum value an `unsigned long int' can hold. (Minimum is 0). 2182 2183 // Minimum and maximum values a `signed long long int' can hold. 2184 2185 // Maximum value an `unsigned long long int' can hold. (Minimum is 0). 2186 2187 // This administrivia gets added to the end of limits.h 2188 // if the system has its own version of limits.h. 2189 2190 type Z_crc_t = uint32 /* zconf.h:429:17 */ 2191 2192 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2193 // This file is part of the GNU C Library. 2194 // 2195 // The GNU C Library is free software; you can redistribute it and/or 2196 // modify it under the terms of the GNU Lesser General Public 2197 // License as published by the Free Software Foundation; either 2198 // version 2.1 of the License, or (at your option) any later version. 2199 // 2200 // The GNU C Library is distributed in the hope that it will be useful, 2201 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2202 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2203 // Lesser General Public License for more details. 2204 // 2205 // You should have received a copy of the GNU Lesser General Public 2206 // License along with the GNU C Library; if not, see 2207 // <https://www.gnu.org/licenses/>. 2208 2209 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 2210 2211 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2212 // This file is part of the GNU C Library. 2213 // 2214 // The GNU C Library is free software; you can redistribute it and/or 2215 // modify it under the terms of the GNU Lesser General Public 2216 // License as published by the Free Software Foundation; either 2217 // version 2.1 of the License, or (at your option) any later version. 2218 // 2219 // The GNU C Library is distributed in the hope that it will be useful, 2220 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2221 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2222 // Lesser General Public License for more details. 2223 // 2224 // You should have received a copy of the GNU Lesser General Public 2225 // License along with the GNU C Library; if not, see 2226 // <https://www.gnu.org/licenses/>. 2227 2228 // bits/types.h -- definitions of __*_t types underlying *_t types. 2229 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2230 // This file is part of the GNU C Library. 2231 // 2232 // The GNU C Library is free software; you can redistribute it and/or 2233 // modify it under the terms of the GNU Lesser General Public 2234 // License as published by the Free Software Foundation; either 2235 // version 2.1 of the License, or (at your option) any later version. 2236 // 2237 // The GNU C Library is distributed in the hope that it will be useful, 2238 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2239 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2240 // Lesser General Public License for more details. 2241 // 2242 // You should have received a copy of the GNU Lesser General Public 2243 // License along with the GNU C Library; if not, see 2244 // <https://www.gnu.org/licenses/>. 2245 2246 // Never include this file directly; use <sys/types.h> instead. 2247 2248 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2249 // This file is part of the GNU C Library. 2250 // 2251 // The GNU C Library is free software; you can redistribute it and/or 2252 // modify it under the terms of the GNU Lesser General Public 2253 // License as published by the Free Software Foundation; either 2254 // version 2.1 of the License, or (at your option) any later version. 2255 // 2256 // The GNU C Library is distributed in the hope that it will be useful, 2257 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2258 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2259 // Lesser General Public License for more details. 2260 // 2261 // You should have received a copy of the GNU Lesser General Public 2262 // License along with the GNU C Library; if not, see 2263 // <https://www.gnu.org/licenses/>. 2264 2265 // Determine the wordsize from the preprocessor defines. 2266 2267 // Both x86-64 and x32 use the 64-bit system call interface. 2268 // Bit size of the time_t type at glibc build time, x86-64 and x32 case. 2269 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2270 // This file is part of the GNU C Library. 2271 // 2272 // The GNU C Library is free software; you can redistribute it and/or 2273 // modify it under the terms of the GNU Lesser General Public 2274 // License as published by the Free Software Foundation; either 2275 // version 2.1 of the License, or (at your option) any later version. 2276 // 2277 // The GNU C Library is distributed in the hope that it will be useful, 2278 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2279 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2280 // Lesser General Public License for more details. 2281 // 2282 // You should have received a copy of the GNU Lesser General Public 2283 // License along with the GNU C Library; if not, see 2284 // <https://www.gnu.org/licenses/>. 2285 2286 // For others, time size is word size. 2287 2288 // Convenience types. 2289 type X__u_char = uint8 /* types.h:31:23 */ 2290 type X__u_short = uint16 /* types.h:32:28 */ 2291 type X__u_int = uint32 /* types.h:33:22 */ 2292 type X__u_long = uint64 /* types.h:34:27 */ 2293 2294 // Fixed-size types, underlying types depend on word size and compiler. 2295 type X__int8_t = int8 /* types.h:37:21 */ 2296 type X__uint8_t = uint8 /* types.h:38:23 */ 2297 type X__int16_t = int16 /* types.h:39:26 */ 2298 type X__uint16_t = uint16 /* types.h:40:28 */ 2299 type X__int32_t = int32 /* types.h:41:20 */ 2300 type X__uint32_t = uint32 /* types.h:42:22 */ 2301 type X__int64_t = int64 /* types.h:44:25 */ 2302 type X__uint64_t = uint64 /* types.h:45:27 */ 2303 2304 // Smallest types with at least a given width. 2305 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 2306 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 2307 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 2308 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 2309 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 2310 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 2311 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 2312 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 2313 2314 // quad_t is also 64 bits. 2315 type X__quad_t = int64 /* types.h:63:18 */ 2316 type X__u_quad_t = uint64 /* types.h:64:27 */ 2317 2318 // Largest integral types. 2319 type X__intmax_t = int64 /* types.h:72:18 */ 2320 type X__uintmax_t = uint64 /* types.h:73:27 */ 2321 2322 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 2323 // macros for each of the OS types we define below. The definitions 2324 // of those macros must use the following macros for underlying types. 2325 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 2326 // variants of each of the following integer types on this machine. 2327 // 2328 // 16 -- "natural" 16-bit type (always short) 2329 // 32 -- "natural" 32-bit type (always int) 2330 // 64 -- "natural" 64-bit type (long or long long) 2331 // LONG32 -- 32-bit type, traditionally long 2332 // QUAD -- 64-bit type, traditionally long long 2333 // WORD -- natural type of __WORDSIZE bits (int or long) 2334 // LONGWORD -- type of __WORDSIZE bits, traditionally long 2335 // 2336 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 2337 // conventional uses of `long' or `long long' type modifiers match the 2338 // types we define, even when a less-adorned type would be the same size. 2339 // This matters for (somewhat) portably writing printf/scanf formats for 2340 // these types, where using the appropriate l or ll format modifiers can 2341 // make the typedefs and the formats match up across all GNU platforms. If 2342 // we used `long' when it's 64 bits where `long long' is expected, then the 2343 // compiler would warn about the formats not matching the argument types, 2344 // and the programmer changing them to shut up the compiler would break the 2345 // program's portability. 2346 // 2347 // Here we assume what is presently the case in all the GCC configurations 2348 // we support: long long is always 64 bits, long is always word/address size, 2349 // and int is always 32 bits. 2350 2351 // No need to mark the typedef with __extension__. 2352 // bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. 2353 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 2354 // This file is part of the GNU C Library. 2355 // 2356 // The GNU C Library is free software; you can redistribute it and/or 2357 // modify it under the terms of the GNU Lesser General Public 2358 // License as published by the Free Software Foundation; either 2359 // version 2.1 of the License, or (at your option) any later version. 2360 // 2361 // The GNU C Library is distributed in the hope that it will be useful, 2362 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2363 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2364 // Lesser General Public License for more details. 2365 // 2366 // You should have received a copy of the GNU Lesser General Public 2367 // License along with the GNU C Library; if not, see 2368 // <https://www.gnu.org/licenses/>. 2369 2370 // See <bits/types.h> for the meaning of these macros. This file exists so 2371 // that <bits/types.h> need not vary across different GNU platforms. 2372 2373 // X32 kernel interface is 64-bit. 2374 2375 // Tell the libc code that off_t and off64_t are actually the same type 2376 // for all ABI purposes, even if possibly expressed as different base types 2377 // for C type-checking purposes. 2378 2379 // Same for ino_t and ino64_t. 2380 2381 // And for __rlim_t and __rlim64_t. 2382 2383 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 2384 2385 // Number of descriptors that can fit in an `fd_set'. 2386 2387 // bits/time64.h -- underlying types for __time64_t. Generic version. 2388 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2389 // This file is part of the GNU C Library. 2390 // 2391 // The GNU C Library is free software; you can redistribute it and/or 2392 // modify it under the terms of the GNU Lesser General Public 2393 // License as published by the Free Software Foundation; either 2394 // version 2.1 of the License, or (at your option) any later version. 2395 // 2396 // The GNU C Library is distributed in the hope that it will be useful, 2397 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2398 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2399 // Lesser General Public License for more details. 2400 // 2401 // You should have received a copy of the GNU Lesser General Public 2402 // License along with the GNU C Library; if not, see 2403 // <https://www.gnu.org/licenses/>. 2404 2405 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 2406 2407 // If we already have 64-bit time type then use it. 2408 2409 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 2410 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 2411 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 2412 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 2413 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 2414 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 2415 type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. 2416 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 2417 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 2418 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 2419 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 2420 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 2421 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 2422 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 2423 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 2424 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 2425 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 2426 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 2427 2428 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. 2429 type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. 2430 2431 // Clock ID used in clock and timer functions. 2432 type X__clockid_t = int32 /* types.h:168:29 */ 2433 2434 // Timer ID returned by `timer_create'. 2435 type X__timer_t = uintptr /* types.h:171:12 */ 2436 2437 // Type to represent block size. 2438 type X__blksize_t = int64 /* types.h:174:29 */ 2439 2440 // Types from the Large File Support interface. 2441 2442 // Type to count number of disk blocks. 2443 type X__blkcnt_t = int64 /* types.h:179:28 */ 2444 type X__blkcnt64_t = int64 /* types.h:180:30 */ 2445 2446 // Type to count file system blocks. 2447 type X__fsblkcnt_t = uint64 /* types.h:183:30 */ 2448 type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ 2449 2450 // Type to count file system nodes. 2451 type X__fsfilcnt_t = uint64 /* types.h:187:30 */ 2452 type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ 2453 2454 // Type of miscellaneous file system fields. 2455 type X__fsword_t = int64 /* types.h:191:28 */ 2456 2457 type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. 2458 2459 // Signed long type used in system calls. 2460 type X__syscall_slong_t = int64 /* types.h:196:33 */ 2461 // Unsigned long type used in system calls. 2462 type X__syscall_ulong_t = uint64 /* types.h:198:33 */ 2463 2464 // These few don't really vary by system, they always correspond 2465 // to one of the other defined types. 2466 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). 2467 type X__caddr_t = uintptr /* types.h:203:14 */ 2468 2469 // Duplicates info from stdint.h but this is used in unistd.h. 2470 type X__intptr_t = int64 /* types.h:206:25 */ 2471 2472 // Duplicate info from sys/socket.h. 2473 type X__socklen_t = uint32 /* types.h:209:23 */ 2474 2475 // C99: An integer type that can be accessed as an atomic entity, 2476 // even in the presence of asynchronous interrupts. 2477 // It is not currently necessary for this to be machine-specific. 2478 type X__sig_atomic_t = int32 /* types.h:214:13 */ 2479 2480 // Seconds since the Epoch, visible to user code when time_t is too 2481 // narrow only for consistency with the old way of widening too-narrow 2482 // types. User code should never use __time64_t. 2483 2484 type U_char = X__u_char /* types.h:33:18 */ 2485 type U_short = X__u_short /* types.h:34:19 */ 2486 type U_int = X__u_int /* types.h:35:17 */ 2487 type U_long = X__u_long /* types.h:36:18 */ 2488 type Quad_t = X__quad_t /* types.h:37:18 */ 2489 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 2490 type Fsid_t = X__fsid_t /* types.h:39:18 */ 2491 type Loff_t = X__loff_t /* types.h:42:18 */ 2492 2493 type Ino_t = X__ino64_t /* types.h:49:19 */ 2494 type Ino64_t = X__ino64_t /* types.h:54:19 */ 2495 2496 type Dev_t = X__dev_t /* types.h:59:17 */ 2497 2498 type Gid_t = X__gid_t /* types.h:64:17 */ 2499 2500 type Mode_t = X__mode_t /* types.h:69:18 */ 2501 2502 type Nlink_t = X__nlink_t /* types.h:74:19 */ 2503 2504 type Uid_t = X__uid_t /* types.h:79:17 */ 2505 2506 type Off_t = X__off64_t /* types.h:87:19 */ 2507 type Off64_t = X__off64_t /* types.h:92:19 */ 2508 2509 type Pid_t = X__pid_t /* types.h:97:17 */ 2510 2511 type Id_t = X__id_t /* types.h:103:16 */ 2512 2513 type Ssize_t = X__ssize_t /* types.h:108:19 */ 2514 2515 type Daddr_t = X__daddr_t /* types.h:114:19 */ 2516 type Caddr_t = X__caddr_t /* types.h:115:19 */ 2517 2518 type Key_t = X__key_t /* types.h:121:17 */ 2519 2520 // bits/types.h -- definitions of __*_t types underlying *_t types. 2521 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2522 // This file is part of the GNU C Library. 2523 // 2524 // The GNU C Library is free software; you can redistribute it and/or 2525 // modify it under the terms of the GNU Lesser General Public 2526 // License as published by the Free Software Foundation; either 2527 // version 2.1 of the License, or (at your option) any later version. 2528 // 2529 // The GNU C Library is distributed in the hope that it will be useful, 2530 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2531 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2532 // Lesser General Public License for more details. 2533 // 2534 // You should have received a copy of the GNU Lesser General Public 2535 // License along with the GNU C Library; if not, see 2536 // <https://www.gnu.org/licenses/>. 2537 2538 // Never include this file directly; use <sys/types.h> instead. 2539 2540 // Returned by `clock'. 2541 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 2542 2543 // bits/types.h -- definitions of __*_t types underlying *_t types. 2544 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2545 // This file is part of the GNU C Library. 2546 // 2547 // The GNU C Library is free software; you can redistribute it and/or 2548 // modify it under the terms of the GNU Lesser General Public 2549 // License as published by the Free Software Foundation; either 2550 // version 2.1 of the License, or (at your option) any later version. 2551 // 2552 // The GNU C Library is distributed in the hope that it will be useful, 2553 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2554 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2555 // Lesser General Public License for more details. 2556 // 2557 // You should have received a copy of the GNU Lesser General Public 2558 // License along with the GNU C Library; if not, see 2559 // <https://www.gnu.org/licenses/>. 2560 2561 // Never include this file directly; use <sys/types.h> instead. 2562 2563 // Clock ID used in clock and timer functions. 2564 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 2565 2566 // bits/types.h -- definitions of __*_t types underlying *_t types. 2567 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2568 // This file is part of the GNU C Library. 2569 // 2570 // The GNU C Library is free software; you can redistribute it and/or 2571 // modify it under the terms of the GNU Lesser General Public 2572 // License as published by the Free Software Foundation; either 2573 // version 2.1 of the License, or (at your option) any later version. 2574 // 2575 // The GNU C Library is distributed in the hope that it will be useful, 2576 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2577 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2578 // Lesser General Public License for more details. 2579 // 2580 // You should have received a copy of the GNU Lesser General Public 2581 // License along with the GNU C Library; if not, see 2582 // <https://www.gnu.org/licenses/>. 2583 2584 // Never include this file directly; use <sys/types.h> instead. 2585 2586 // Returned by `time'. 2587 type Time_t = X__time_t /* time_t.h:7:18 */ 2588 2589 // bits/types.h -- definitions of __*_t types underlying *_t types. 2590 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2591 // This file is part of the GNU C Library. 2592 // 2593 // The GNU C Library is free software; you can redistribute it and/or 2594 // modify it under the terms of the GNU Lesser General Public 2595 // License as published by the Free Software Foundation; either 2596 // version 2.1 of the License, or (at your option) any later version. 2597 // 2598 // The GNU C Library is distributed in the hope that it will be useful, 2599 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2600 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2601 // Lesser General Public License for more details. 2602 // 2603 // You should have received a copy of the GNU Lesser General Public 2604 // License along with the GNU C Library; if not, see 2605 // <https://www.gnu.org/licenses/>. 2606 2607 // Never include this file directly; use <sys/types.h> instead. 2608 2609 // Timer ID returned by `timer_create'. 2610 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 2611 2612 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 2613 // 2614 // This file is part of GCC. 2615 // 2616 // GCC is free software; you can redistribute it and/or modify 2617 // it under the terms of the GNU General Public License as published by 2618 // the Free Software Foundation; either version 3, or (at your option) 2619 // any later version. 2620 // 2621 // GCC is distributed in the hope that it will be useful, 2622 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2623 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2624 // GNU General Public License for more details. 2625 // 2626 // Under Section 7 of GPL version 3, you are granted additional 2627 // permissions described in the GCC Runtime Library Exception, version 2628 // 3.1, as published by the Free Software Foundation. 2629 // 2630 // You should have received a copy of the GNU General Public License and 2631 // a copy of the GCC Runtime Library Exception along with this program; 2632 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2633 // <http://www.gnu.org/licenses/>. 2634 2635 // ISO C Standard: 7.17 Common definitions <stddef.h> 2636 2637 // Any one of these symbols __need_* means that GNU libc 2638 // wants us just to define one data type. So don't define 2639 // the symbols that indicate this file's entire job has been done. 2640 2641 // This avoids lossage on SunOS but only if stdtypes.h comes first. 2642 // There's no way to win with the other order! Sun lossage. 2643 2644 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 2645 // Just ignore it. 2646 2647 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 2648 // _TYPE_size_t which will typedef size_t. fixincludes patched the 2649 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 2650 // not defined, and so that defining this macro defines _GCC_SIZE_T. 2651 // If we find that the macros are still defined at this point, we must 2652 // invoke them so that the type is defined as expected. 2653 2654 // In case nobody has defined these types, but we aren't running under 2655 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 2656 // __WCHAR_TYPE__ have reasonable values. This can happen if the 2657 // parts of GCC is compiled by an older compiler, that actually 2658 // include gstddef.h, such as collect2. 2659 2660 // Signed type of difference of two pointers. 2661 2662 // Define this type if we are doing the whole job, 2663 // or if we want this type in particular. 2664 2665 // If this symbol has done its job, get rid of it. 2666 2667 // Unsigned type of `sizeof' something. 2668 2669 // Define this type if we are doing the whole job, 2670 // or if we want this type in particular. 2671 2672 // Wide character type. 2673 // Locale-writers should change this as necessary to 2674 // be big enough to hold unique values not between 0 and 127, 2675 // and not (wchar_t) -1, for each defined multibyte character. 2676 2677 // Define this type if we are doing the whole job, 2678 // or if we want this type in particular. 2679 2680 // A null pointer constant. 2681 2682 // Offset of member MEMBER in a struct of type TYPE. 2683 2684 // Old compatibility names for C types. 2685 type Ulong = uint64 /* types.h:148:27 */ 2686 type Ushort = uint16 /* types.h:149:28 */ 2687 type Uint = uint32 /* types.h:150:22 */ 2688 2689 // These size-specific names are used by some of the inet code. 2690 2691 // Define intN_t types. 2692 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2693 // This file is part of the GNU C Library. 2694 // 2695 // The GNU C Library is free software; you can redistribute it and/or 2696 // modify it under the terms of the GNU Lesser General Public 2697 // License as published by the Free Software Foundation; either 2698 // version 2.1 of the License, or (at your option) any later version. 2699 // 2700 // The GNU C Library is distributed in the hope that it will be useful, 2701 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2702 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2703 // Lesser General Public License for more details. 2704 // 2705 // You should have received a copy of the GNU Lesser General Public 2706 // License along with the GNU C Library; if not, see 2707 // <https://www.gnu.org/licenses/>. 2708 2709 // bits/types.h -- definitions of __*_t types underlying *_t types. 2710 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2711 // This file is part of the GNU C Library. 2712 // 2713 // The GNU C Library is free software; you can redistribute it and/or 2714 // modify it under the terms of the GNU Lesser General Public 2715 // License as published by the Free Software Foundation; either 2716 // version 2.1 of the License, or (at your option) any later version. 2717 // 2718 // The GNU C Library is distributed in the hope that it will be useful, 2719 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2720 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2721 // Lesser General Public License for more details. 2722 // 2723 // You should have received a copy of the GNU Lesser General Public 2724 // License along with the GNU C Library; if not, see 2725 // <https://www.gnu.org/licenses/>. 2726 2727 // Never include this file directly; use <sys/types.h> instead. 2728 2729 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 2730 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 2731 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 2732 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 2733 2734 // These were defined by ISO C without the first `_'. 2735 type U_int8_t = X__uint8_t /* types.h:158:19 */ 2736 type U_int16_t = X__uint16_t /* types.h:159:20 */ 2737 type U_int32_t = X__uint32_t /* types.h:160:20 */ 2738 type U_int64_t = X__uint64_t /* types.h:161:20 */ 2739 2740 type Register_t = int32 /* types.h:164:13 */ 2741 2742 // It also defines `fd_set' and the FD_* macros for `select'. 2743 // `fd_set' type and related macros, and `select'/`pselect' declarations. 2744 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 2745 // This file is part of the GNU C Library. 2746 // 2747 // The GNU C Library is free software; you can redistribute it and/or 2748 // modify it under the terms of the GNU Lesser General Public 2749 // License as published by the Free Software Foundation; either 2750 // version 2.1 of the License, or (at your option) any later version. 2751 // 2752 // The GNU C Library is distributed in the hope that it will be useful, 2753 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2754 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2755 // Lesser General Public License for more details. 2756 // 2757 // You should have received a copy of the GNU Lesser General Public 2758 // License along with the GNU C Library; if not, see 2759 // <https://www.gnu.org/licenses/>. 2760 2761 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 2762 2763 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2764 // This file is part of the GNU C Library. 2765 // 2766 // The GNU C Library is free software; you can redistribute it and/or 2767 // modify it under the terms of the GNU Lesser General Public 2768 // License as published by the Free Software Foundation; either 2769 // version 2.1 of the License, or (at your option) any later version. 2770 // 2771 // The GNU C Library is distributed in the hope that it will be useful, 2772 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2773 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2774 // Lesser General Public License for more details. 2775 // 2776 // You should have received a copy of the GNU Lesser General Public 2777 // License along with the GNU C Library; if not, see 2778 // <https://www.gnu.org/licenses/>. 2779 2780 // Get definition of needed basic types. 2781 // bits/types.h -- definitions of __*_t types underlying *_t types. 2782 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2783 // This file is part of the GNU C Library. 2784 // 2785 // The GNU C Library is free software; you can redistribute it and/or 2786 // modify it under the terms of the GNU Lesser General Public 2787 // License as published by the Free Software Foundation; either 2788 // version 2.1 of the License, or (at your option) any later version. 2789 // 2790 // The GNU C Library is distributed in the hope that it will be useful, 2791 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2792 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2793 // Lesser General Public License for more details. 2794 // 2795 // You should have received a copy of the GNU Lesser General Public 2796 // License along with the GNU C Library; if not, see 2797 // <https://www.gnu.org/licenses/>. 2798 2799 // Never include this file directly; use <sys/types.h> instead. 2800 2801 // Get __FD_* definitions. 2802 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 2803 // This file is part of the GNU C Library. 2804 // 2805 // The GNU C Library is free software; you can redistribute it and/or 2806 // modify it under the terms of the GNU Lesser General Public 2807 // License as published by the Free Software Foundation; either 2808 // version 2.1 of the License, or (at your option) any later version. 2809 // 2810 // The GNU C Library is distributed in the hope that it will be useful, 2811 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2812 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2813 // Lesser General Public License for more details. 2814 // 2815 // You should have received a copy of the GNU Lesser General Public 2816 // License along with the GNU C Library; if not, see 2817 // <https://www.gnu.org/licenses/>. 2818 2819 // Determine the wordsize from the preprocessor defines. 2820 2821 // Both x86-64 and x32 use the 64-bit system call interface. 2822 2823 // Get sigset_t. 2824 2825 type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ 2826 2827 // A set of signals to be blocked, unblocked, or waited for. 2828 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 2829 2830 // Get definition of timer specification structures. 2831 2832 // bits/types.h -- definitions of __*_t types underlying *_t types. 2833 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2834 // This file is part of the GNU C Library. 2835 // 2836 // The GNU C Library is free software; you can redistribute it and/or 2837 // modify it under the terms of the GNU Lesser General Public 2838 // License as published by the Free Software Foundation; either 2839 // version 2.1 of the License, or (at your option) any later version. 2840 // 2841 // The GNU C Library is distributed in the hope that it will be useful, 2842 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2843 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2844 // Lesser General Public License for more details. 2845 // 2846 // You should have received a copy of the GNU Lesser General Public 2847 // License along with the GNU C Library; if not, see 2848 // <https://www.gnu.org/licenses/>. 2849 2850 // Never include this file directly; use <sys/types.h> instead. 2851 2852 // A time value that is accurate to the nearest 2853 // microsecond but also has a range of years. 2854 type Timeval = struct { 2855 Ftv_sec X__time_t 2856 Ftv_usec X__suseconds_t 2857 } /* struct_timeval.h:8:1 */ 2858 2859 // NB: Include guard matches what <linux/time.h> uses. 2860 2861 // bits/types.h -- definitions of __*_t types underlying *_t types. 2862 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2863 // This file is part of the GNU C Library. 2864 // 2865 // The GNU C Library is free software; you can redistribute it and/or 2866 // modify it under the terms of the GNU Lesser General Public 2867 // License as published by the Free Software Foundation; either 2868 // version 2.1 of the License, or (at your option) any later version. 2869 // 2870 // The GNU C Library is distributed in the hope that it will be useful, 2871 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2872 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2873 // Lesser General Public License for more details. 2874 // 2875 // You should have received a copy of the GNU Lesser General Public 2876 // License along with the GNU C Library; if not, see 2877 // <https://www.gnu.org/licenses/>. 2878 2879 // Never include this file directly; use <sys/types.h> instead. 2880 2881 // Endian macros for string.h functions 2882 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 2883 // This file is part of the GNU C Library. 2884 // 2885 // The GNU C Library is free software; you can redistribute it and/or 2886 // modify it under the terms of the GNU Lesser General Public 2887 // License as published by the Free Software Foundation; either 2888 // version 2.1 of the License, or (at your option) any later version. 2889 // 2890 // The GNU C Library is distributed in the hope that it will be useful, 2891 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2892 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2893 // Lesser General Public License for more details. 2894 // 2895 // You should have received a copy of the GNU Lesser General Public 2896 // License along with the GNU C Library; if not, see 2897 // <http://www.gnu.org/licenses/>. 2898 2899 // POSIX.1b structure for a time value. This is like a `struct timeval' but 2900 // has nanoseconds instead of microseconds. 2901 type Timespec = struct { 2902 Ftv_sec X__time_t 2903 Ftv_nsec X__syscall_slong_t 2904 } /* struct_timespec.h:10:1 */ 2905 2906 type Suseconds_t = X__suseconds_t /* select.h:43:23 */ 2907 2908 // The fd_set member is required to be an array of longs. 2909 type X__fd_mask = int64 /* select.h:49:18 */ 2910 2911 // Some versions of <linux/posix_types.h> define this macros. 2912 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 2913 2914 // fd_set for select and pselect. 2915 type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ 2916 2917 // Maximum number of file descriptors in `fd_set'. 2918 2919 // Sometimes the fd_set member is assumed to have this type. 2920 type Fd_mask = X__fd_mask /* select.h:77:19 */ 2921 2922 // Define some inlines helping to catch common problems. 2923 2924 type Blksize_t = X__blksize_t /* types.h:185:21 */ 2925 2926 // Types from the Large File Support interface. 2927 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 2928 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 2929 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 2930 2931 type Blkcnt64_t = X__blkcnt64_t /* types.h:219:22 */ // Type to count number of disk blocks. 2932 type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks. 2933 type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes. 2934 2935 // Now add the thread types. 2936 // Declaration of common pthread types for all architectures. 2937 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2938 // This file is part of the GNU C Library. 2939 // 2940 // The GNU C Library is free software; you can redistribute it and/or 2941 // modify it under the terms of the GNU Lesser General Public 2942 // License as published by the Free Software Foundation; either 2943 // version 2.1 of the License, or (at your option) any later version. 2944 // 2945 // The GNU C Library is distributed in the hope that it will be useful, 2946 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2947 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2948 // Lesser General Public License for more details. 2949 // 2950 // You should have received a copy of the GNU Lesser General Public 2951 // License along with the GNU C Library; if not, see 2952 // <https://www.gnu.org/licenses/>. 2953 2954 // For internal mutex and condition variable definitions. 2955 // Common threading primitives definitions for both POSIX and C11. 2956 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2957 // This file is part of the GNU C Library. 2958 // 2959 // The GNU C Library is free software; you can redistribute it and/or 2960 // modify it under the terms of the GNU Lesser General Public 2961 // License as published by the Free Software Foundation; either 2962 // version 2.1 of the License, or (at your option) any later version. 2963 // 2964 // The GNU C Library is distributed in the hope that it will be useful, 2965 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2966 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2967 // Lesser General Public License for more details. 2968 // 2969 // You should have received a copy of the GNU Lesser General Public 2970 // License along with the GNU C Library; if not, see 2971 // <https://www.gnu.org/licenses/>. 2972 2973 // Arch-specific definitions. Each architecture must define the following 2974 // macros to define the expected sizes of pthread data types: 2975 // 2976 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 2977 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 2978 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 2979 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 2980 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 2981 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 2982 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 2983 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 2984 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 2985 // 2986 // The additional macro defines any constraint for the lock alignment 2987 // inside the thread structures: 2988 // 2989 // __LOCK_ALIGNMENT - for internal lock/futex usage. 2990 // 2991 // Same idea but for the once locking primitive: 2992 // 2993 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 2994 2995 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2996 // This file is part of the GNU C Library. 2997 // 2998 // The GNU C Library is free software; you can redistribute it and/or 2999 // modify it under the terms of the GNU Lesser General Public 3000 // License as published by the Free Software Foundation; either 3001 // version 2.1 of the License, or (at your option) any later version. 3002 // 3003 // The GNU C Library is distributed in the hope that it will be useful, 3004 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3005 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3006 // Lesser General Public License for more details. 3007 // 3008 // You should have received a copy of the GNU Lesser General Public 3009 // License along with the GNU C Library; if not, see 3010 // <https://www.gnu.org/licenses/>. 3011 3012 // Determine the wordsize from the preprocessor defines. 3013 3014 // Both x86-64 and x32 use the 64-bit system call interface. 3015 3016 // Common definition of pthread_mutex_t. 3017 3018 type X__pthread_internal_list = struct { 3019 F__prev uintptr 3020 F__next uintptr 3021 } /* thread-shared-types.h:49:9 */ 3022 3023 // Type to count file system inodes. 3024 3025 // Now add the thread types. 3026 // Declaration of common pthread types for all architectures. 3027 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3028 // This file is part of the GNU C Library. 3029 // 3030 // The GNU C Library is free software; you can redistribute it and/or 3031 // modify it under the terms of the GNU Lesser General Public 3032 // License as published by the Free Software Foundation; either 3033 // version 2.1 of the License, or (at your option) any later version. 3034 // 3035 // The GNU C Library is distributed in the hope that it will be useful, 3036 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3037 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3038 // Lesser General Public License for more details. 3039 // 3040 // You should have received a copy of the GNU Lesser General Public 3041 // License along with the GNU C Library; if not, see 3042 // <https://www.gnu.org/licenses/>. 3043 3044 // For internal mutex and condition variable definitions. 3045 // Common threading primitives definitions for both POSIX and C11. 3046 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3047 // This file is part of the GNU C Library. 3048 // 3049 // The GNU C Library is free software; you can redistribute it and/or 3050 // modify it under the terms of the GNU Lesser General Public 3051 // License as published by the Free Software Foundation; either 3052 // version 2.1 of the License, or (at your option) any later version. 3053 // 3054 // The GNU C Library is distributed in the hope that it will be useful, 3055 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3056 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3057 // Lesser General Public License for more details. 3058 // 3059 // You should have received a copy of the GNU Lesser General Public 3060 // License along with the GNU C Library; if not, see 3061 // <https://www.gnu.org/licenses/>. 3062 3063 // Arch-specific definitions. Each architecture must define the following 3064 // macros to define the expected sizes of pthread data types: 3065 // 3066 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 3067 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 3068 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 3069 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 3070 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 3071 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 3072 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 3073 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 3074 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 3075 // 3076 // The additional macro defines any constraint for the lock alignment 3077 // inside the thread structures: 3078 // 3079 // __LOCK_ALIGNMENT - for internal lock/futex usage. 3080 // 3081 // Same idea but for the once locking primitive: 3082 // 3083 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 3084 3085 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3086 // This file is part of the GNU C Library. 3087 // 3088 // The GNU C Library is free software; you can redistribute it and/or 3089 // modify it under the terms of the GNU Lesser General Public 3090 // License as published by the Free Software Foundation; either 3091 // version 2.1 of the License, or (at your option) any later version. 3092 // 3093 // The GNU C Library is distributed in the hope that it will be useful, 3094 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3095 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3096 // Lesser General Public License for more details. 3097 // 3098 // You should have received a copy of the GNU Lesser General Public 3099 // License along with the GNU C Library; if not, see 3100 // <https://www.gnu.org/licenses/>. 3101 3102 // Determine the wordsize from the preprocessor defines. 3103 3104 // Both x86-64 and x32 use the 64-bit system call interface. 3105 3106 // Common definition of pthread_mutex_t. 3107 3108 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 3109 3110 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 3111 3112 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 3113 3114 // Arch-specific mutex definitions. A generic implementation is provided 3115 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 3116 // can override it by defining: 3117 // 3118 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 3119 // definition). It should contains at least the internal members 3120 // defined in the generic version. 3121 // 3122 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 3123 // atomic operations. 3124 // 3125 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 3126 // It should initialize the mutex internal flag. 3127 3128 // x86 internal mutex struct definitions. 3129 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3130 // This file is part of the GNU C Library. 3131 // 3132 // The GNU C Library is free software; you can redistribute it and/or 3133 // modify it under the terms of the GNU Lesser General Public 3134 // License as published by the Free Software Foundation; either 3135 // version 2.1 of the License, or (at your option) any later version. 3136 // 3137 // The GNU C Library is distributed in the hope that it will be useful, 3138 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3139 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3140 // Lesser General Public License for more details. 3141 // 3142 // You should have received a copy of the GNU Lesser General Public 3143 // License along with the GNU C Library; if not, see 3144 // <http://www.gnu.org/licenses/>. 3145 3146 type X__pthread_mutex_s = struct { 3147 F__lock int32 3148 F__count uint32 3149 F__owner int32 3150 F__nusers uint32 3151 F__kind int32 3152 F__spins int16 3153 F__elision int16 3154 F__list X__pthread_list_t 3155 } /* struct_mutex.h:22:1 */ 3156 3157 // Arch-sepecific read-write lock definitions. A generic implementation is 3158 // provided by struct_rwlock.h. If required, an architecture can override it 3159 // by defining: 3160 // 3161 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 3162 // It should contain at least the internal members defined in the 3163 // generic version. 3164 // 3165 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 3166 // It should initialize the rwlock internal type. 3167 3168 // x86 internal rwlock struct definitions. 3169 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3170 // 3171 // This file is part of the GNU C Library. 3172 // 3173 // The GNU C Library is free software; you can redistribute it and/or 3174 // modify it under the terms of the GNU Lesser General Public 3175 // License as published by the Free Software Foundation; either 3176 // version 2.1 of the License, or (at your option) any later version. 3177 // 3178 // The GNU C Library is distributed in the hope that it will be useful, 3179 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3180 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3181 // Lesser General Public License for more details. 3182 // 3183 // You should have received a copy of the GNU Lesser General Public 3184 // License along with the GNU C Library; if not, see 3185 // <http://www.gnu.org/licenses/>. 3186 3187 type X__pthread_rwlock_arch_t = struct { 3188 F__readers uint32 3189 F__writers uint32 3190 F__wrphase_futex uint32 3191 F__writers_futex uint32 3192 F__pad3 uint32 3193 F__pad4 uint32 3194 F__cur_writer int32 3195 F__shared int32 3196 F__rwelision int8 3197 F__pad1 [7]uint8 3198 F__pad2 uint64 3199 F__flags uint32 3200 F__ccgo_pad1 [4]byte 3201 } /* struct_rwlock.h:23:1 */ 3202 3203 // Common definition of pthread_cond_t. 3204 3205 type X__pthread_cond_s = struct { 3206 F__0 struct{ F__wseq uint64 } 3207 F__8 struct{ F__g1_start uint64 } 3208 F__g_refs [2]uint32 3209 F__g_size [2]uint32 3210 F__g1_orig_size uint32 3211 F__wrefs uint32 3212 F__g_signals [2]uint32 3213 } /* thread-shared-types.h:92:1 */ 3214 3215 // Thread identifiers. The structure of the attribute type is not 3216 // exposed on purpose. 3217 type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ 3218 3219 // Data structures for mutex handling. The structure of the attribute 3220 // type is not exposed on purpose. 3221 type Pthread_mutexattr_t = struct { 3222 _ [0]uint32 3223 F__size [4]int8 3224 } /* pthreadtypes.h:36:3 */ 3225 3226 // Data structure for condition variable handling. The structure of 3227 // the attribute type is not exposed on purpose. 3228 type Pthread_condattr_t = struct { 3229 _ [0]uint32 3230 F__size [4]int8 3231 } /* pthreadtypes.h:45:3 */ 3232 3233 // Keys for thread-specific data 3234 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 3235 3236 // Once-only execution 3237 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 3238 3239 type Pthread_attr_t1 = struct { 3240 _ [0]uint64 3241 F__size [56]int8 3242 } /* pthreadtypes.h:56:1 */ 3243 3244 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 3245 3246 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 3247 3248 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 3249 3250 // Data structure for reader-writer lock variable handling. The 3251 // structure of the attribute type is deliberately not exposed. 3252 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 3253 3254 type Pthread_rwlockattr_t = struct { 3255 _ [0]uint64 3256 F__size [8]int8 3257 } /* pthreadtypes.h:97:3 */ 3258 3259 // POSIX spinlock data type. 3260 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 3261 3262 // POSIX barriers data type. The structure of the type is 3263 // deliberately not exposed. 3264 type Pthread_barrier_t = struct { 3265 _ [0]uint64 3266 F__size [32]int8 3267 } /* pthreadtypes.h:112:3 */ 3268 3269 type Pthread_barrierattr_t = struct { 3270 _ [0]uint32 3271 F__size [4]int8 3272 } /* pthreadtypes.h:118:3 */ 3273 3274 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 3275 // 3276 // This file is part of GCC. 3277 // 3278 // GCC is free software; you can redistribute it and/or modify 3279 // it under the terms of the GNU General Public License as published by 3280 // the Free Software Foundation; either version 3, or (at your option) 3281 // any later version. 3282 // 3283 // GCC is distributed in the hope that it will be useful, 3284 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3285 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3286 // GNU General Public License for more details. 3287 // 3288 // Under Section 7 of GPL version 3, you are granted additional 3289 // permissions described in the GCC Runtime Library Exception, version 3290 // 3.1, as published by the Free Software Foundation. 3291 // 3292 // You should have received a copy of the GNU General Public License and 3293 // a copy of the GCC Runtime Library Exception along with this program; 3294 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3295 // <http://www.gnu.org/licenses/>. 3296 3297 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 3298 3299 // Define __gnuc_va_list. 3300 3301 type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ 3302 3303 // Define the standard macros for the user, 3304 // if this invocation was from the user program. 3305 3306 // Define va_list, if desired, from __gnuc_va_list. 3307 // We deliberately do not define va_list when called from 3308 // stdio.h, because ANSI C says that stdio.h is not supposed to define 3309 // va_list. stdio.h needs to have access to that data type, 3310 // but must not use that name. It should use the name __gnuc_va_list, 3311 // which is safe because it is reserved for the implementation. 3312 3313 // The macro _VA_LIST_ is the same thing used by this file in Ultrix. 3314 // But on BSD NET2 we must not test or define or undef it. 3315 // (Note that the comments in NET 2's ansi.h 3316 // are incorrect for _VA_LIST_--see stdio.h!) 3317 // The macro _VA_LIST_DEFINED is used in Windows NT 3.5 3318 // The macro _VA_LIST is used in SCO Unix 3.2. 3319 // The macro _VA_LIST_T_H is used in the Bull dpx2 3320 // The macro __va_list__ is used by BeOS. 3321 type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */ 3322 3323 // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 3324 // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 3325 // though the former does not conform to the LFS document), but considering 3326 // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 3327 // equivalently requesting no 64-bit operations 3328 3329 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3330 // This file is part of the GNU C Library. 3331 // 3332 // The GNU C Library is free software; you can redistribute it and/or 3333 // modify it under the terms of the GNU Lesser General Public 3334 // License as published by the Free Software Foundation; either 3335 // version 2.1 of the License, or (at your option) any later version. 3336 // 3337 // The GNU C Library is distributed in the hope that it will be useful, 3338 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3339 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3340 // Lesser General Public License for more details. 3341 // 3342 // You should have received a copy of the GNU Lesser General Public 3343 // License along with the GNU C Library; if not, see 3344 // <https://www.gnu.org/licenses/>. 3345 3346 // POSIX Standard: 2.10 Symbolic Constants <unistd.h> 3347 3348 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3349 // This file is part of the GNU C Library. 3350 // 3351 // The GNU C Library is free software; you can redistribute it and/or 3352 // modify it under the terms of the GNU Lesser General Public 3353 // License as published by the Free Software Foundation; either 3354 // version 2.1 of the License, or (at your option) any later version. 3355 // 3356 // The GNU C Library is distributed in the hope that it will be useful, 3357 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3358 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3359 // Lesser General Public License for more details. 3360 // 3361 // You should have received a copy of the GNU Lesser General Public 3362 // License along with the GNU C Library; if not, see 3363 // <https://www.gnu.org/licenses/>. 3364 3365 // These may be used to determine what facilities are present at compile time. 3366 // Their values can be obtained at run time from `sysconf'. 3367 3368 // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. 3369 3370 // These are not #ifdef __USE_POSIX2 because they are 3371 // in the theoretically application-owned namespace. 3372 3373 // The utilities on GNU systems also correspond to this version. 3374 3375 // The utilities on GNU systems also correspond to this version. 3376 3377 // This symbol was required until the 2001 edition of POSIX. 3378 3379 // If defined, the implementation supports the 3380 // C Language Bindings Option. 3381 3382 // If defined, the implementation supports the 3383 // C Language Development Utilities Option. 3384 3385 // If defined, the implementation supports the 3386 // Software Development Utilities Option. 3387 3388 // If defined, the implementation supports the 3389 // creation of locales with the localedef utility. 3390 3391 // X/Open version number to which the library conforms. It is selectable. 3392 3393 // Commands and utilities from XPG4 are available. 3394 3395 // We are compatible with the old published standards as well. 3396 3397 // The X/Open Unix extensions are available. 3398 3399 // The enhanced internationalization capabilities according to XPG4.2 3400 // are present. 3401 3402 // The legacy interfaces are also available. 3403 3404 // Get values of POSIX options: 3405 // 3406 // If these symbols are defined, the corresponding features are 3407 // always available. If not, they may be available sometimes. 3408 // The current values can be obtained with `sysconf'. 3409 // 3410 // _POSIX_JOB_CONTROL Job control is supported. 3411 // _POSIX_SAVED_IDS Processes have a saved set-user-ID 3412 // and a saved set-group-ID. 3413 // _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. 3414 // _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. 3415 // _POSIX_TIMERS POSIX.4 clocks and timers are supported. 3416 // _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. 3417 // _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. 3418 // _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. 3419 // _POSIX_FSYNC The fsync function is present. 3420 // _POSIX_MAPPED_FILES Mapping of files to memory is supported. 3421 // _POSIX_MEMLOCK Locking of all memory is supported. 3422 // _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. 3423 // _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. 3424 // _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. 3425 // _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. 3426 // _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. 3427 // _POSIX_THREADS POSIX.1c pthreads are supported. 3428 // _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. 3429 // _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. 3430 // _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. 3431 // _POSIX_THREAD_PRIORITY_SCHEDULING 3432 // POSIX.1c thread execution scheduling supported. 3433 // _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. 3434 // _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. 3435 // _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. 3436 // _POSIX_PII Protocol-independent interfaces are supported. 3437 // _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. 3438 // _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. 3439 // _POSIX_PII_INTERNET Internet family of protocols supported. 3440 // _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. 3441 // _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. 3442 // _POSIX_PII_OSI ISO/OSI family of protocols supported. 3443 // _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. 3444 // _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. 3445 // _POSIX_POLL Implementation supports `poll' function. 3446 // _POSIX_SELECT Implementation supports `select' and `pselect'. 3447 // 3448 // _XOPEN_REALTIME X/Open realtime support is available. 3449 // _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. 3450 // _XOPEN_SHM Shared memory interface according to XPG4.2. 3451 // 3452 // _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit 3453 // int, long, pointer, and off_t types. 3454 // _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit 3455 // int, long, and pointer and off_t with at least 3456 // 64 bits. 3457 // _XBS5_LP64_OFF64 Implementation provides environment with 32-bit 3458 // int, and 64-bit long, pointer, and off_t types. 3459 // _XBS5_LPBIG_OFFBIG Implementation provides environment with at 3460 // least 32 bits int and long, pointer, and off_t 3461 // with at least 64 bits. 3462 // 3463 // If any of these symbols is defined as -1, the corresponding option is not 3464 // true for any file. If any is defined as other than -1, the corresponding 3465 // option is true for all files. If a symbol is not defined at all, the value 3466 // for a specific file can be obtained from `pathconf' and `fpathconf'. 3467 // 3468 // _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change 3469 // the owner of a file. `chown' can only be used 3470 // to change the group ID of a file to a group of 3471 // which the calling process is a member. 3472 // _POSIX_NO_TRUNC Pathname components longer than 3473 // NAME_MAX generate an error. 3474 // _POSIX_VDISABLE If defined, if the value of an element of the 3475 // `c_cc' member of `struct termios' is 3476 // _POSIX_VDISABLE, no character will have the 3477 // effect associated with that element. 3478 // _POSIX_SYNC_IO Synchronous I/O may be performed. 3479 // _POSIX_ASYNC_IO Asynchronous I/O may be performed. 3480 // _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. 3481 // 3482 // Support for the Large File Support interface is not generally available. 3483 // If it is available the following constants are defined to one. 3484 // _LFS64_LARGEFILE Low-level I/O supports large files. 3485 // _LFS64_STDIO Standard I/O supports large files. 3486 // 3487 3488 // Define POSIX options for Linux. 3489 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 3490 // This file is part of the GNU C Library. 3491 // 3492 // The GNU C Library is free software; you can redistribute it and/or 3493 // modify it under the terms of the GNU Lesser General Public License as 3494 // published by the Free Software Foundation; either version 2.1 of the 3495 // License, or (at your option) any later version. 3496 // 3497 // The GNU C Library is distributed in the hope that it will be useful, 3498 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3499 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3500 // Lesser General Public License for more details. 3501 // 3502 // You should have received a copy of the GNU Lesser General Public 3503 // License along with the GNU C Library; see the file COPYING.LIB. If 3504 // not, see <https://www.gnu.org/licenses/>. 3505 3506 // Job control is supported. 3507 3508 // Processes have a saved set-user-ID and a saved set-group-ID. 3509 3510 // Priority scheduling is not supported with the correct semantics, 3511 // but GNU/Linux applications expect that the corresponding interfaces 3512 // are available, even though the semantics do not meet the POSIX 3513 // requirements. See glibc bug 14829. 3514 3515 // Synchronizing file data is supported. 3516 3517 // The fsync function is present. 3518 3519 // Mapping of files to memory is supported. 3520 3521 // Locking of all memory is supported. 3522 3523 // Locking of ranges of memory is supported. 3524 3525 // Setting of memory protections is supported. 3526 3527 // Some filesystems allow all users to change file ownership. 3528 3529 // `c_cc' member of 'struct termios' structure can be disabled by 3530 // using the value _POSIX_VDISABLE. 3531 3532 // Filenames are not silently truncated. 3533 3534 // X/Open realtime support is available. 3535 3536 // X/Open thread realtime support is available. 3537 3538 // XPG4.2 shared memory is supported. 3539 3540 // Tell we have POSIX threads. 3541 3542 // We have the reentrant functions described in POSIX. 3543 3544 // We provide priority scheduling for threads. 3545 3546 // We support user-defined stack sizes. 3547 3548 // We support user-defined stacks. 3549 3550 // We support priority inheritence. 3551 3552 // We support priority protection, though only for non-robust 3553 // mutexes. 3554 3555 // We support priority inheritence for robust mutexes. 3556 3557 // We do not support priority protection for robust mutexes. 3558 3559 // We support POSIX.1b semaphores. 3560 3561 // Real-time signals are supported. 3562 3563 // We support asynchronous I/O. 3564 // Alternative name for Unix98. 3565 // Support for prioritization is also available. 3566 3567 // The LFS support in asynchronous I/O is also available. 3568 3569 // The rest of the LFS is also available. 3570 3571 // POSIX shared memory objects are implemented. 3572 3573 // CPU-time clocks support needs to be checked at runtime. 3574 3575 // Clock support in threads must be also checked at runtime. 3576 3577 // GNU libc provides regular expression handling. 3578 3579 // Reader/Writer locks are available. 3580 3581 // We have a POSIX shell. 3582 3583 // We support the Timeouts option. 3584 3585 // We support spinlocks. 3586 3587 // The `spawn' function family is supported. 3588 3589 // We have POSIX timers. 3590 3591 // The barrier functions are available. 3592 3593 // POSIX message queues are available. 3594 3595 // Thread process-shared synchronization is supported. 3596 3597 // The monotonic clock might be available. 3598 3599 // The clock selection interfaces are available. 3600 3601 // Advisory information interfaces are available. 3602 3603 // IPv6 support is available. 3604 3605 // Raw socket support is available. 3606 3607 // We have at least one terminal. 3608 3609 // Neither process nor thread sporadic server interfaces is available. 3610 3611 // trace.h is not available. 3612 3613 // Typed memory objects are not available. 3614 3615 // Get the environment definitions from Unix98. 3616 // Copyright (C) 1999-2020 Free Software Foundation, Inc. 3617 // This file is part of the GNU C Library. 3618 // 3619 // The GNU C Library is free software; you can redistribute it and/or 3620 // modify it under the terms of the GNU Lesser General Public 3621 // License as published by the Free Software Foundation; either 3622 // version 2.1 of the License, or (at your option) any later version. 3623 // 3624 // The GNU C Library is distributed in the hope that it will be useful, 3625 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3626 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3627 // Lesser General Public License for more details. 3628 // 3629 // You should have received a copy of the GNU Lesser General Public 3630 // License along with the GNU C Library; if not, see 3631 // <https://www.gnu.org/licenses/>. 3632 3633 // Determine the wordsize from the preprocessor defines. 3634 3635 // Both x86-64 and x32 use the 64-bit system call interface. 3636 3637 // This header should define the following symbols under the described 3638 // situations. A value `1' means that the model is always supported, 3639 // `-1' means it is never supported. Undefined means it cannot be 3640 // statically decided. 3641 // 3642 // _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type 3643 // _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type 3644 // 3645 // _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type 3646 // _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type 3647 // 3648 // The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, 3649 // _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, 3650 // _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were 3651 // used in previous versions of the Unix standard and are available 3652 // only for compatibility. 3653 3654 // Environments with 32-bit wide pointers are optionally provided. 3655 // Therefore following macros aren't defined: 3656 // # undef _POSIX_V7_ILP32_OFF32 3657 // # undef _POSIX_V7_ILP32_OFFBIG 3658 // # undef _POSIX_V6_ILP32_OFF32 3659 // # undef _POSIX_V6_ILP32_OFFBIG 3660 // # undef _XBS5_ILP32_OFF32 3661 // # undef _XBS5_ILP32_OFFBIG 3662 // and users need to check at runtime. 3663 3664 // We also have no use (for now) for an environment with bigger pointers 3665 // and offsets. 3666 3667 // By default we have 64-bit wide `long int', pointers and `off_t'. 3668 3669 // Standard file descriptors. 3670 3671 // All functions that are not declared anywhere else. 3672 3673 // bits/types.h -- definitions of __*_t types underlying *_t types. 3674 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3675 // This file is part of the GNU C Library. 3676 // 3677 // The GNU C Library is free software; you can redistribute it and/or 3678 // modify it under the terms of the GNU Lesser General Public 3679 // License as published by the Free Software Foundation; either 3680 // version 2.1 of the License, or (at your option) any later version. 3681 // 3682 // The GNU C Library is distributed in the hope that it will be useful, 3683 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3684 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3685 // Lesser General Public License for more details. 3686 // 3687 // You should have received a copy of the GNU Lesser General Public 3688 // License along with the GNU C Library; if not, see 3689 // <https://www.gnu.org/licenses/>. 3690 3691 // Never include this file directly; use <sys/types.h> instead. 3692 3693 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 3694 // 3695 // This file is part of GCC. 3696 // 3697 // GCC is free software; you can redistribute it and/or modify 3698 // it under the terms of the GNU General Public License as published by 3699 // the Free Software Foundation; either version 3, or (at your option) 3700 // any later version. 3701 // 3702 // GCC is distributed in the hope that it will be useful, 3703 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3704 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3705 // GNU General Public License for more details. 3706 // 3707 // Under Section 7 of GPL version 3, you are granted additional 3708 // permissions described in the GCC Runtime Library Exception, version 3709 // 3.1, as published by the Free Software Foundation. 3710 // 3711 // You should have received a copy of the GNU General Public License and 3712 // a copy of the GCC Runtime Library Exception along with this program; 3713 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3714 // <http://www.gnu.org/licenses/>. 3715 3716 // ISO C Standard: 7.17 Common definitions <stddef.h> 3717 3718 // Any one of these symbols __need_* means that GNU libc 3719 // wants us just to define one data type. So don't define 3720 // the symbols that indicate this file's entire job has been done. 3721 3722 // This avoids lossage on SunOS but only if stdtypes.h comes first. 3723 // There's no way to win with the other order! Sun lossage. 3724 3725 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 3726 // Just ignore it. 3727 3728 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 3729 // _TYPE_size_t which will typedef size_t. fixincludes patched the 3730 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 3731 // not defined, and so that defining this macro defines _GCC_SIZE_T. 3732 // If we find that the macros are still defined at this point, we must 3733 // invoke them so that the type is defined as expected. 3734 3735 // In case nobody has defined these types, but we aren't running under 3736 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 3737 // __WCHAR_TYPE__ have reasonable values. This can happen if the 3738 // parts of GCC is compiled by an older compiler, that actually 3739 // include gstddef.h, such as collect2. 3740 3741 // Signed type of difference of two pointers. 3742 3743 // Define this type if we are doing the whole job, 3744 // or if we want this type in particular. 3745 3746 // If this symbol has done its job, get rid of it. 3747 3748 // Unsigned type of `sizeof' something. 3749 3750 // Define this type if we are doing the whole job, 3751 // or if we want this type in particular. 3752 3753 // Wide character type. 3754 // Locale-writers should change this as necessary to 3755 // be big enough to hold unique values not between 0 and 127, 3756 // and not (wchar_t) -1, for each defined multibyte character. 3757 3758 // Define this type if we are doing the whole job, 3759 // or if we want this type in particular. 3760 3761 // A null pointer constant. 3762 3763 // Offset of member MEMBER in a struct of type TYPE. 3764 3765 // The Single Unix specification says that some more types are 3766 // available here. 3767 3768 type Useconds_t = X__useconds_t /* unistd.h:255:22 */ 3769 3770 type Intptr_t = X__intptr_t /* unistd.h:267:20 */ 3771 3772 type Socklen_t = X__socklen_t /* unistd.h:274:21 */ 3773 3774 // Define some macros helping to catch buffer overflows. 3775 3776 // System-specific extensions. 3777 // System-specific extensions of <unistd.h>, Linux version. 3778 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3779 // This file is part of the GNU C Library. 3780 // 3781 // The GNU C Library is free software; you can redistribute it and/or 3782 // modify it under the terms of the GNU Lesser General Public 3783 // License as published by the Free Software Foundation; either 3784 // version 2.1 of the License, or (at your option) any later version. 3785 // 3786 // The GNU C Library is distributed in the hope that it will be useful, 3787 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3788 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3789 // Lesser General Public License for more details. 3790 // 3791 // You should have received a copy of the GNU Lesser General Public 3792 // License along with the GNU C Library; if not, see 3793 // <https://www.gnu.org/licenses/>. 3794 3795 // MVS linker does not support external names larger than 8 bytes 3796 3797 // 3798 // The 'zlib' compression library provides in-memory compression and 3799 // decompression functions, including integrity checks of the uncompressed data. 3800 // This version of the library supports only one compression method (deflation) 3801 // but other algorithms will be added later and will have the same stream 3802 // interface. 3803 // 3804 // Compression can be done in a single step if the buffers are large enough, 3805 // or can be done by repeated calls of the compression function. In the latter 3806 // case, the application must provide more input and/or consume the output 3807 // (providing more output space) before each call. 3808 // 3809 // The compressed data format used by default by the in-memory functions is 3810 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 3811 // around a deflate stream, which is itself documented in RFC 1951. 3812 // 3813 // The library also supports reading and writing files in gzip (.gz) format 3814 // with an interface similar to that of stdio using the functions that start 3815 // with "gz". The gzip format is different from the zlib format. gzip is a 3816 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 3817 // 3818 // This library can optionally read and write gzip and raw deflate streams in 3819 // memory as well. 3820 // 3821 // The zlib format was designed to be compact and fast for use in memory 3822 // and on communications channels. The gzip format was designed for single- 3823 // file compression on file systems, has a larger header than zlib to maintain 3824 // directory information, and uses a different, slower check method than zlib. 3825 // 3826 // The library does not install any signal handler. The decoder checks 3827 // the consistency of the compressed data, so the library should never crash 3828 // even in the case of corrupted input. 3829 3830 type Alloc_func = uintptr /* zlib.h:81:16 */ 3831 type Free_func = uintptr /* zlib.h:82:16 */ 3832 3833 type Internal_state = struct { 3834 Fstrm Z_streamp 3835 Fstatus int32 3836 F__ccgo_pad1 [4]byte 3837 Fpending_buf uintptr 3838 Fpending_buf_size Ulg 3839 Fpending_out uintptr 3840 Fpending Ulg 3841 Fwrap int32 3842 F__ccgo_pad2 [4]byte 3843 Fgzhead Gz_headerp 3844 Fgzindex Ulg 3845 Fmethod Byte 3846 F__ccgo_pad3 [3]byte 3847 Flast_flush int32 3848 Fw_size UInt 3849 Fw_bits UInt 3850 Fw_mask UInt 3851 F__ccgo_pad4 [4]byte 3852 Fwindow uintptr 3853 Fwindow_size Ulg 3854 Fprev uintptr 3855 Fhead uintptr 3856 Fins_h UInt 3857 Fhash_size UInt 3858 Fhash_bits UInt 3859 Fhash_mask UInt 3860 Fhash_shift UInt 3861 F__ccgo_pad5 [4]byte 3862 Fblock_start int64 3863 Fmatch_length UInt 3864 Fprev_match IPos 3865 Fmatch_available int32 3866 Fstrstart UInt 3867 Fmatch_start UInt 3868 Flookahead UInt 3869 Fprev_length UInt 3870 Fmax_chain_length UInt 3871 Fmax_lazy_match UInt 3872 Flevel int32 3873 Fstrategy int32 3874 Fgood_match UInt 3875 Fnice_match int32 3876 Fdyn_ltree [573]struct { 3877 Ffc struct{ Ffreq Ush } 3878 Fdl struct{ Fdad Ush } 3879 } 3880 Fdyn_dtree [61]struct { 3881 Ffc struct{ Ffreq Ush } 3882 Fdl struct{ Fdad Ush } 3883 } 3884 Fbl_tree [39]struct { 3885 Ffc struct{ Ffreq Ush } 3886 Fdl struct{ Fdad Ush } 3887 } 3888 Fl_desc struct { 3889 Fdyn_tree uintptr 3890 Fmax_code int32 3891 F__ccgo_pad1 [4]byte 3892 Fstat_desc uintptr 3893 } 3894 Fd_desc struct { 3895 Fdyn_tree uintptr 3896 Fmax_code int32 3897 F__ccgo_pad1 [4]byte 3898 Fstat_desc uintptr 3899 } 3900 Fbl_desc struct { 3901 Fdyn_tree uintptr 3902 Fmax_code int32 3903 F__ccgo_pad1 [4]byte 3904 Fstat_desc uintptr 3905 } 3906 Fbl_count [16]Ush 3907 Fheap [573]int32 3908 Fheap_len int32 3909 Fheap_max int32 3910 Fdepth [573]Uch 3911 F__ccgo_pad6 [7]byte 3912 Fl_buf uintptr 3913 Flit_bufsize UInt 3914 Flast_lit UInt 3915 Fd_buf uintptr 3916 Fopt_len Ulg 3917 Fstatic_len Ulg 3918 Fmatches UInt 3919 Finsert UInt 3920 Fbi_buf Ush 3921 F__ccgo_pad7 [2]byte 3922 Fbi_valid int32 3923 Fhigh_water Ulg 3924 } /* zlib.h:84:1 */ 3925 3926 type Z_stream_s = struct { 3927 Fnext_in uintptr 3928 Favail_in UInt 3929 F__ccgo_pad1 [4]byte 3930 Ftotal_in ULong 3931 Fnext_out uintptr 3932 Favail_out UInt 3933 F__ccgo_pad2 [4]byte 3934 Ftotal_out ULong 3935 Fmsg uintptr 3936 Fstate uintptr 3937 Fzalloc Alloc_func 3938 Fzfree Free_func 3939 Fopaque Voidpf 3940 Fdata_type int32 3941 F__ccgo_pad3 [4]byte 3942 Fadler ULong 3943 Freserved ULong 3944 } /* zlib.h:86:9 */ 3945 3946 type Z_stream = Z_stream_s /* zlib.h:106:3 */ 3947 3948 type Z_streamp = uintptr /* zlib.h:108:22 */ 3949 3950 // 3951 // gzip header information passed to and from zlib routines. See RFC 1952 3952 // for more details on the meanings of these fields. 3953 type Gz_header_s = struct { 3954 Ftext int32 3955 F__ccgo_pad1 [4]byte 3956 Ftime ULong 3957 Fxflags int32 3958 Fos int32 3959 Fextra uintptr 3960 Fextra_len UInt 3961 Fextra_max UInt 3962 Fname uintptr 3963 Fname_max UInt 3964 F__ccgo_pad2 [4]byte 3965 Fcomment uintptr 3966 Fcomm_max UInt 3967 Fhcrc int32 3968 Fdone int32 3969 F__ccgo_pad3 [4]byte 3970 } /* zlib.h:114:9 */ 3971 3972 // 3973 // gzip header information passed to and from zlib routines. See RFC 1952 3974 // for more details on the meanings of these fields. 3975 type Gz_header = Gz_header_s /* zlib.h:129:3 */ 3976 3977 type Gz_headerp = uintptr /* zlib.h:131:23 */ 3978 // 3979 // inflateGetHeader() requests that gzip header information be stored in the 3980 // provided gz_header structure. inflateGetHeader() may be called after 3981 // inflateInit2() or inflateReset(), and before the first call of inflate(). 3982 // As inflate() processes the gzip stream, head->done is zero until the header 3983 // is completed, at which time head->done is set to one. If a zlib stream is 3984 // being decoded, then head->done is set to -1 to indicate that there will be 3985 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 3986 // used to force inflate() to return immediately after header processing is 3987 // complete and before any actual data is decompressed. 3988 // 3989 // The text, time, xflags, and os fields are filled in with the gzip header 3990 // contents. hcrc is set to true if there is a header CRC. (The header CRC 3991 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 3992 // contains the maximum number of bytes to write to extra. Once done is true, 3993 // extra_len contains the actual extra field length, and extra contains the 3994 // extra field, or that field truncated if extra_max is less than extra_len. 3995 // If name is not Z_NULL, then up to name_max characters are written there, 3996 // terminated with a zero unless the length is greater than name_max. If 3997 // comment is not Z_NULL, then up to comm_max characters are written there, 3998 // terminated with a zero unless the length is greater than comm_max. When any 3999 // of extra, name, or comment are not Z_NULL and the respective field is not 4000 // present in the header, then that field is set to Z_NULL to signal its 4001 // absence. This allows the use of deflateSetHeader() with the returned 4002 // structure to duplicate the header. However if those fields are set to 4003 // allocated memory, then the application will need to save those pointers 4004 // elsewhere so that they can be eventually freed. 4005 // 4006 // If inflateGetHeader is not used, then the header information is simply 4007 // discarded. The header is always checked for validity, including the header 4008 // CRC if present. inflateReset() will reset the process to discard the header 4009 // information. The application would need to call inflateGetHeader() again to 4010 // retrieve the header from the next gzip stream. 4011 // 4012 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 4013 // stream state was inconsistent. 4014 4015 // 4016 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 4017 // unsigned char FAR *window)); 4018 // 4019 // Initialize the internal stream state for decompression using inflateBack() 4020 // calls. The fields zalloc, zfree and opaque in strm must be initialized 4021 // before the call. If zalloc and zfree are Z_NULL, then the default library- 4022 // derived memory allocation routines are used. windowBits is the base two 4023 // logarithm of the window size, in the range 8..15. window is a caller 4024 // supplied buffer of that size. Except for special applications where it is 4025 // assured that deflate was used with small window sizes, windowBits must be 15 4026 // and a 32K byte window must be supplied to be able to decompress general 4027 // deflate streams. 4028 // 4029 // See inflateBack() for the usage of these routines. 4030 // 4031 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 4032 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 4033 // allocated, or Z_VERSION_ERROR if the version of the library does not match 4034 // the version of the header file. 4035 4036 type In_func = uintptr /* zlib.h:1092:18 */ 4037 type Out_func = uintptr /* zlib.h:1094:13 */ 4038 // 4039 // Same as uncompress, except that sourceLen is a pointer, where the 4040 // length of the source is *sourceLen. On return, *sourceLen is the number of 4041 // source bytes consumed. 4042 4043 // gzip file access functions 4044 4045 // 4046 // This library supports reading and writing files in gzip (.gz) format with 4047 // an interface similar to that of stdio, using the functions that start with 4048 // "gz". The gzip format is different from the zlib format. gzip is a gzip 4049 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 4050 4051 type GzFile_s = struct { 4052 Fhave uint32 4053 F__ccgo_pad1 [4]byte 4054 Fnext uintptr 4055 Fpos Off64_t 4056 } /* zlib.h:1300:9 */ 4057 4058 // 4059 // Same as uncompress, except that sourceLen is a pointer, where the 4060 // length of the source is *sourceLen. On return, *sourceLen is the number of 4061 // source bytes consumed. 4062 4063 // gzip file access functions 4064 4065 // 4066 // This library supports reading and writing files in gzip (.gz) format with 4067 // an interface similar to that of stdio, using the functions that start with 4068 // "gz". The gzip format is different from the zlib format. gzip is a gzip 4069 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 4070 4071 type GzFile = uintptr /* zlib.h:1300:25 */ 4072 4073 // POSIX.1-2008 extended locale interface (see locale.h). 4074 // Definition of locale_t. 4075 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4076 // This file is part of the GNU C Library. 4077 // 4078 // The GNU C Library is free software; you can redistribute it and/or 4079 // modify it under the terms of the GNU Lesser General Public 4080 // License as published by the Free Software Foundation; either 4081 // version 2.1 of the License, or (at your option) any later version. 4082 // 4083 // The GNU C Library is distributed in the hope that it will be useful, 4084 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4085 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4086 // Lesser General Public License for more details. 4087 // 4088 // You should have received a copy of the GNU Lesser General Public 4089 // License along with the GNU C Library; if not, see 4090 // <https://www.gnu.org/licenses/>. 4091 4092 // Definition of struct __locale_struct and __locale_t. 4093 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 4094 // This file is part of the GNU C Library. 4095 // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 4096 // 4097 // The GNU C Library is free software; you can redistribute it and/or 4098 // modify it under the terms of the GNU Lesser General Public 4099 // License as published by the Free Software Foundation; either 4100 // version 2.1 of the License, or (at your option) any later version. 4101 // 4102 // The GNU C Library is distributed in the hope that it will be useful, 4103 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4104 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4105 // Lesser General Public License for more details. 4106 // 4107 // You should have received a copy of the GNU Lesser General Public 4108 // License along with the GNU C Library; if not, see 4109 // <https://www.gnu.org/licenses/>. 4110 4111 // POSIX.1-2008: the locale_t type, representing a locale context 4112 // (implementation-namespace version). This type should be treated 4113 // as opaque by applications; some details are exposed for the sake of 4114 // efficiency in e.g. ctype functions. 4115 4116 type X__locale_struct = struct { 4117 F__locales [13]uintptr 4118 F__ctype_b uintptr 4119 F__ctype_tolower uintptr 4120 F__ctype_toupper uintptr 4121 F__names [13]uintptr 4122 } /* __locale_t.h:28:1 */ 4123 4124 type X__locale_t = uintptr /* __locale_t.h:42:32 */ 4125 4126 type Locale_t = X__locale_t /* locale_t.h:24:20 */ 4127 4128 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4129 // This file is part of the GNU C Library. 4130 // 4131 // The GNU C Library is free software; you can redistribute it and/or 4132 // modify it under the terms of the GNU Lesser General Public 4133 // License as published by the Free Software Foundation; either 4134 // version 2.1 of the License, or (at your option) any later version. 4135 // 4136 // The GNU C Library is distributed in the hope that it will be useful, 4137 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4138 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4139 // Lesser General Public License for more details. 4140 // 4141 // You should have received a copy of the GNU Lesser General Public 4142 // License along with the GNU C Library; if not, see 4143 // <https://www.gnu.org/licenses/>. 4144 4145 // ISO C99 Standard: 7.20 General utilities <stdlib.h> 4146 4147 // Handle feature test macros at the start of a header. 4148 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4149 // This file is part of the GNU C Library. 4150 // 4151 // The GNU C Library is free software; you can redistribute it and/or 4152 // modify it under the terms of the GNU Lesser General Public 4153 // License as published by the Free Software Foundation; either 4154 // version 2.1 of the License, or (at your option) any later version. 4155 // 4156 // The GNU C Library is distributed in the hope that it will be useful, 4157 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4158 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4159 // Lesser General Public License for more details. 4160 // 4161 // You should have received a copy of the GNU Lesser General Public 4162 // License along with the GNU C Library; if not, see 4163 // <https://www.gnu.org/licenses/>. 4164 4165 // This header is internal to glibc and should not be included outside 4166 // of glibc headers. Headers including it must define 4167 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 4168 // cannot have multiple include guards because ISO C feature test 4169 // macros depend on the definition of the macro when an affected 4170 // header is included, not when the first system header is 4171 // included. 4172 4173 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4174 // This file is part of the GNU C Library. 4175 // 4176 // The GNU C Library is free software; you can redistribute it and/or 4177 // modify it under the terms of the GNU Lesser General Public 4178 // License as published by the Free Software Foundation; either 4179 // version 2.1 of the License, or (at your option) any later version. 4180 // 4181 // The GNU C Library is distributed in the hope that it will be useful, 4182 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4183 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4184 // Lesser General Public License for more details. 4185 // 4186 // You should have received a copy of the GNU Lesser General Public 4187 // License along with the GNU C Library; if not, see 4188 // <https://www.gnu.org/licenses/>. 4189 4190 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 4191 // macro. 4192 4193 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 4194 // macro. Most but not all symbols enabled by that macro in TS 4195 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 4196 // still require that macro in C2X. 4197 4198 // ISO/IEC TS 18661-4:2015 defines the 4199 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 4200 // functions, the symbols from this TS are enabled unconditionally in 4201 // C2X. 4202 4203 // ISO/IEC TS 18661-3:2015 defines the 4204 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 4205 4206 // Get size_t, wchar_t and NULL from <stddef.h>. 4207 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 4208 // 4209 // This file is part of GCC. 4210 // 4211 // GCC is free software; you can redistribute it and/or modify 4212 // it under the terms of the GNU General Public License as published by 4213 // the Free Software Foundation; either version 3, or (at your option) 4214 // any later version. 4215 // 4216 // GCC is distributed in the hope that it will be useful, 4217 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4218 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4219 // GNU General Public License for more details. 4220 // 4221 // Under Section 7 of GPL version 3, you are granted additional 4222 // permissions described in the GCC Runtime Library Exception, version 4223 // 3.1, as published by the Free Software Foundation. 4224 // 4225 // You should have received a copy of the GNU General Public License and 4226 // a copy of the GCC Runtime Library Exception along with this program; 4227 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 4228 // <http://www.gnu.org/licenses/>. 4229 4230 // ISO C Standard: 7.17 Common definitions <stddef.h> 4231 4232 // Any one of these symbols __need_* means that GNU libc 4233 // wants us just to define one data type. So don't define 4234 // the symbols that indicate this file's entire job has been done. 4235 4236 // This avoids lossage on SunOS but only if stdtypes.h comes first. 4237 // There's no way to win with the other order! Sun lossage. 4238 4239 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 4240 // Just ignore it. 4241 4242 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 4243 // _TYPE_size_t which will typedef size_t. fixincludes patched the 4244 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 4245 // not defined, and so that defining this macro defines _GCC_SIZE_T. 4246 // If we find that the macros are still defined at this point, we must 4247 // invoke them so that the type is defined as expected. 4248 4249 // In case nobody has defined these types, but we aren't running under 4250 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 4251 // __WCHAR_TYPE__ have reasonable values. This can happen if the 4252 // parts of GCC is compiled by an older compiler, that actually 4253 // include gstddef.h, such as collect2. 4254 4255 // Signed type of difference of two pointers. 4256 4257 // Define this type if we are doing the whole job, 4258 // or if we want this type in particular. 4259 4260 // If this symbol has done its job, get rid of it. 4261 4262 // Unsigned type of `sizeof' something. 4263 4264 // Define this type if we are doing the whole job, 4265 // or if we want this type in particular. 4266 4267 // Wide character type. 4268 // Locale-writers should change this as necessary to 4269 // be big enough to hold unique values not between 0 and 127, 4270 // and not (wchar_t) -1, for each defined multibyte character. 4271 4272 // Define this type if we are doing the whole job, 4273 // or if we want this type in particular. 4274 4275 // A null pointer constant. 4276 4277 // Offset of member MEMBER in a struct of type TYPE. 4278 4279 // XPG requires a few symbols from <sys/wait.h> being defined. 4280 // Definitions of flag bits for `waitpid' et al. 4281 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 4282 // This file is part of the GNU C Library. 4283 // 4284 // The GNU C Library is free software; you can redistribute it and/or 4285 // modify it under the terms of the GNU Lesser General Public 4286 // License as published by the Free Software Foundation; either 4287 // version 2.1 of the License, or (at your option) any later version. 4288 // 4289 // The GNU C Library is distributed in the hope that it will be useful, 4290 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4291 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4292 // Lesser General Public License for more details. 4293 // 4294 // You should have received a copy of the GNU Lesser General Public 4295 // License along with the GNU C Library; if not, see 4296 // <https://www.gnu.org/licenses/>. 4297 4298 // Bits in the third argument to `waitpid'. 4299 4300 // Bits in the fourth argument to `waitid'. 4301 4302 // The following values are used by the `waitid' function. 4303 4304 // The Linux kernel defines these bare, rather than an enum, 4305 // which causes a conflict if the include order is reversed. 4306 4307 type Idtype_t = uint32 /* waitflags.h:57:3 */ 4308 // Definitions of status bits for `wait' et al. 4309 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 4310 // This file is part of the GNU C Library. 4311 // 4312 // The GNU C Library is free software; you can redistribute it and/or 4313 // modify it under the terms of the GNU Lesser General Public 4314 // License as published by the Free Software Foundation; either 4315 // version 2.1 of the License, or (at your option) any later version. 4316 // 4317 // The GNU C Library is distributed in the hope that it will be useful, 4318 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4319 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4320 // Lesser General Public License for more details. 4321 // 4322 // You should have received a copy of the GNU Lesser General Public 4323 // License along with the GNU C Library; if not, see 4324 // <https://www.gnu.org/licenses/>. 4325 4326 // Everything extant so far uses these same bits. 4327 4328 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 4329 4330 // If WIFSIGNALED(STATUS), the terminating signal. 4331 4332 // If WIFSTOPPED(STATUS), the signal that stopped the child. 4333 4334 // Nonzero if STATUS indicates normal termination. 4335 4336 // Nonzero if STATUS indicates termination by a signal. 4337 4338 // Nonzero if STATUS indicates the child is stopped. 4339 4340 // Nonzero if STATUS indicates the child continued after a stop. We only 4341 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 4342 4343 // Nonzero if STATUS indicates the child dumped core. 4344 4345 // Macros for constructing status values. 4346 4347 // Define the macros <sys/wait.h> also would define this way. 4348 4349 // _FloatN API tests for enablement. 4350 // Macros to control TS 18661-3 glibc features on x86. 4351 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4352 // This file is part of the GNU C Library. 4353 // 4354 // The GNU C Library is free software; you can redistribute it and/or 4355 // modify it under the terms of the GNU Lesser General Public 4356 // License as published by the Free Software Foundation; either 4357 // version 2.1 of the License, or (at your option) any later version. 4358 // 4359 // The GNU C Library is distributed in the hope that it will be useful, 4360 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4361 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4362 // Lesser General Public License for more details. 4363 // 4364 // You should have received a copy of the GNU Lesser General Public 4365 // License along with the GNU C Library; if not, see 4366 // <https://www.gnu.org/licenses/>. 4367 4368 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4369 // This file is part of the GNU C Library. 4370 // 4371 // The GNU C Library is free software; you can redistribute it and/or 4372 // modify it under the terms of the GNU Lesser General Public 4373 // License as published by the Free Software Foundation; either 4374 // version 2.1 of the License, or (at your option) any later version. 4375 // 4376 // The GNU C Library is distributed in the hope that it will be useful, 4377 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4378 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4379 // Lesser General Public License for more details. 4380 // 4381 // You should have received a copy of the GNU Lesser General Public 4382 // License along with the GNU C Library; if not, see 4383 // <https://www.gnu.org/licenses/>. 4384 4385 // Defined to 1 if the current compiler invocation provides a 4386 // floating-point type with the IEEE 754 binary128 format, and this 4387 // glibc includes corresponding *f128 interfaces for it. The required 4388 // libgcc support was added some time after the basic compiler 4389 // support, for x86_64 and x86. 4390 4391 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 4392 // from the default float, double and long double types in this glibc. 4393 4394 // Defined to 1 if the current compiler invocation provides a 4395 // floating-point type with the right format for _Float64x, and this 4396 // glibc includes corresponding *f64x interfaces for it. 4397 4398 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 4399 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 4400 // the format of _Float128, which must be different from that of long 4401 // double. 4402 4403 // Defined to concatenate the literal suffix to be used with _Float128 4404 // types, if __HAVE_FLOAT128 is 1. 4405 4406 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 4407 4408 // The remaining of this file provides support for older compilers. 4409 4410 // The type _Float128 exists only since GCC 7.0. 4411 4412 // __builtin_huge_valf128 doesn't exist before GCC 7.0. 4413 4414 // Older GCC has only a subset of built-in functions for _Float128 on 4415 // x86, and __builtin_infq is not usable in static initializers. 4416 // Converting a narrower sNaN to _Float128 produces a quiet NaN, so 4417 // attempts to use _Float128 sNaNs will not work properly with older 4418 // compilers. 4419 4420 // In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, 4421 // e.g.: __builtin_signbitf128, before GCC 6. However, there has never 4422 // been a __builtin_signbitf128 in GCC and the type-generic builtin is 4423 // only available since GCC 6. 4424 4425 // Macros to control TS 18661-3 glibc features where the same 4426 // definitions are appropriate for all platforms. 4427 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4428 // This file is part of the GNU C Library. 4429 // 4430 // The GNU C Library is free software; you can redistribute it and/or 4431 // modify it under the terms of the GNU Lesser General Public 4432 // License as published by the Free Software Foundation; either 4433 // version 2.1 of the License, or (at your option) any later version. 4434 // 4435 // The GNU C Library is distributed in the hope that it will be useful, 4436 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4437 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4438 // Lesser General Public License for more details. 4439 // 4440 // You should have received a copy of the GNU Lesser General Public 4441 // License along with the GNU C Library; if not, see 4442 // <https://www.gnu.org/licenses/>. 4443 4444 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4445 // This file is part of the GNU C Library. 4446 // 4447 // The GNU C Library is free software; you can redistribute it and/or 4448 // modify it under the terms of the GNU Lesser General Public 4449 // License as published by the Free Software Foundation; either 4450 // version 2.1 of the License, or (at your option) any later version. 4451 // 4452 // The GNU C Library is distributed in the hope that it will be useful, 4453 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4454 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4455 // Lesser General Public License for more details. 4456 // 4457 // You should have received a copy of the GNU Lesser General Public 4458 // License along with the GNU C Library; if not, see 4459 // <https://www.gnu.org/licenses/>. 4460 4461 // Properties of long double type. ldbl-96 version. 4462 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4463 // This file is part of the GNU C Library. 4464 // 4465 // The GNU C Library is free software; you can redistribute it and/or 4466 // modify it under the terms of the GNU Lesser General Public 4467 // License published by the Free Software Foundation; either 4468 // version 2.1 of the License, or (at your option) any later version. 4469 // 4470 // The GNU C Library is distributed in the hope that it will be useful, 4471 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4472 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4473 // Lesser General Public License for more details. 4474 // 4475 // You should have received a copy of the GNU Lesser General Public 4476 // License along with the GNU C Library; if not, see 4477 // <https://www.gnu.org/licenses/>. 4478 4479 // long double is distinct from double, so there is nothing to 4480 // define here. 4481 4482 // This header should be included at the bottom of each bits/floatn.h. 4483 // It defines the following macros for each _FloatN and _FloatNx type, 4484 // where the same definitions, or definitions based only on the macros 4485 // in bits/floatn.h, are appropriate for all glibc configurations. 4486 4487 // Defined to 1 if the current compiler invocation provides a 4488 // floating-point type with the right format for this type, and this 4489 // glibc includes corresponding *fN or *fNx interfaces for it. 4490 4491 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 4492 // type is the first with its format in the sequence of (the default 4493 // choices for) float, double, long double, _Float16, _Float32, 4494 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 4495 // glibc; that is, if functions present once per floating-point format 4496 // rather than once per type are present for this type. 4497 // 4498 // All configurations supported by glibc have _Float32 the same format 4499 // as float, _Float64 and _Float32x the same format as double, the 4500 // _Float64x the same format as either long double or _Float128. No 4501 // configurations support _Float128x or, as of GCC 7, have compiler 4502 // support for a type meeting the requirements for _Float128x. 4503 4504 // Defined to 1 if the corresponding _FloatN type is not binary compatible 4505 // with the corresponding ISO C type in the current compilation unit as 4506 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 4507 // in glibc. 4508 4509 // Defined to 1 if any _FloatN or _FloatNx types that are not 4510 // ABI-distinct are however distinct types at the C language level (so 4511 // for the purposes of __builtin_types_compatible_p and _Generic). 4512 4513 // Defined to concatenate the literal suffix to be used with _FloatN 4514 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 4515 // literal suffixes exist since GCC 7, for C only. 4516 4517 // Defined to a complex type if __HAVE_<type> is 1. 4518 4519 // The remaining of this file provides support for older compilers. 4520 4521 // If double, long double and _Float64 all have the same set of 4522 // values, TS 18661-3 requires the usual arithmetic conversions on 4523 // long double and _Float64 to produce _Float64. For this to be the 4524 // case when building with a compiler without a distinct _Float64 4525 // type, _Float64 must be a typedef for long double, not for 4526 // double. 4527 4528 // Returned by `div'. 4529 type Div_t = struct { 4530 Fquot int32 4531 Frem int32 4532 } /* stdlib.h:62:5 */ 4533 4534 // Returned by `ldiv'. 4535 type Ldiv_t = struct { 4536 Fquot int64 4537 Frem int64 4538 } /* stdlib.h:70:5 */ 4539 4540 // Returned by `lldiv'. 4541 type Lldiv_t = struct { 4542 Fquot int64 4543 Frem int64 4544 } /* stdlib.h:80:5 */ 4545 4546 // Reentrant versions of the `random' family of functions. 4547 // These functions all use the following data structure to contain 4548 // state, rather than global state variables. 4549 4550 type Random_data = struct { 4551 Ffptr uintptr 4552 Frptr uintptr 4553 Fstate uintptr 4554 Frand_type int32 4555 Frand_deg int32 4556 Frand_sep int32 4557 F__ccgo_pad1 [4]byte 4558 Fend_ptr uintptr 4559 } /* stdlib.h:423:1 */ 4560 4561 // Data structure for communication with thread safe versions. This 4562 // type is to be regarded as opaque. It's only exported because users 4563 // have to allocate objects of this type. 4564 type Drand48_data = struct { 4565 F__x [3]uint16 4566 F__old_x [3]uint16 4567 F__c uint16 4568 F__init uint16 4569 F__a uint64 4570 } /* stdlib.h:490:1 */ 4571 4572 // Shorthand for type of comparison functions. 4573 type X__compar_fn_t = uintptr /* stdlib.h:808:13 */ 4574 4575 // Floating-point inline functions for stdlib.h. 4576 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 4577 // This file is part of the GNU C Library. 4578 // 4579 // The GNU C Library is free software; you can redistribute it and/or 4580 // modify it under the terms of the GNU Lesser General Public 4581 // License as published by the Free Software Foundation; either 4582 // version 2.1 of the License, or (at your option) any later version. 4583 // 4584 // The GNU C Library is distributed in the hope that it will be useful, 4585 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4586 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4587 // Lesser General Public License for more details. 4588 // 4589 // You should have received a copy of the GNU Lesser General Public 4590 // License along with the GNU C Library; if not, see 4591 // <https://www.gnu.org/licenses/>. 4592 4593 // Define some macros helping to catch buffer overflows. 4594 4595 // since "static" is used to mean two completely different things in C, we 4596 // define "local" for the non-static meaning of "static", for readability 4597 // (compile with -Dlocal if your debugger can't find static symbols) 4598 4599 type Uch = uint8 /* zutil.h:43:24 */ 4600 type Uchf = Uch /* zutil.h:44:17 */ 4601 type Ush = uint16 /* zutil.h:45:24 */ 4602 type Ushf = Ush /* zutil.h:46:17 */ 4603 type Ulg = uint64 /* zutil.h:47:24 */ 4604 4605 // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 4606 4607 // use NO_DIVIDE if your processor does not do division in hardware -- 4608 // try it both ways to see which is faster 4609 4610 // ========================================================================= 4611 func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */ 4612 var sum2 uint64 4613 var n uint32 4614 4615 // split Adler-32 into component sums 4616 sum2 = ((adler >> 16) & uint64(0xffff)) 4617 adler = adler & (uint64(0xffff)) 4618 4619 // in case user likes doing a byte at a time, keep it fast 4620 if len == uint64(1) { 4621 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(buf)))) 4622 if adler >= uint64(BASE) { 4623 adler = adler - (uint64(BASE)) 4624 } 4625 sum2 = sum2 + (adler) 4626 if sum2 >= uint64(BASE) { 4627 sum2 = sum2 - (uint64(BASE)) 4628 } 4629 return (adler | (sum2 << 16)) 4630 } 4631 4632 // initial Adler-32 value (deferred check for len == 1 speed) 4633 if buf == uintptr(Z_NULL) { 4634 return uint64(1) 4635 } 4636 4637 // in case short lengths are provided, keep it somewhat fast 4638 if len < uint64(16) { 4639 for libc.PostDecUint64(&len, 1) != 0 { 4640 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 4641 sum2 = sum2 + (adler) 4642 } 4643 if adler >= uint64(BASE) { 4644 adler = adler - (uint64(BASE)) 4645 } 4646 sum2 = sum2 % (uint64(BASE)) // only added so many BASE's 4647 return (adler | (sum2 << 16)) 4648 } 4649 4650 // do length NMAX blocks -- requires just one modulo operation 4651 for len >= uint64(NMAX) { 4652 len = len - (uint64(NMAX)) 4653 n = (uint32(NMAX / 16)) // NMAX is divisible by 16 4654 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 4655 { 4656 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 4657 sum2 = sum2 + (adler) 4658 } 4659 { 4660 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 4661 sum2 = sum2 + (adler) 4662 } 4663 4664 { 4665 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 4666 sum2 = sum2 + (adler) 4667 } 4668 { 4669 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 4670 sum2 = sum2 + (adler) 4671 } 4672 4673 { 4674 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 4675 sum2 = sum2 + (adler) 4676 } 4677 { 4678 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 4679 sum2 = sum2 + (adler) 4680 } 4681 4682 { 4683 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 4684 sum2 = sum2 + (adler) 4685 } 4686 { 4687 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 4688 sum2 = sum2 + (adler) 4689 } 4690 4691 { 4692 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 4693 sum2 = sum2 + (adler) 4694 } 4695 { 4696 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 4697 sum2 = sum2 + (adler) 4698 } 4699 4700 { 4701 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 4702 sum2 = sum2 + (adler) 4703 } 4704 { 4705 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 4706 sum2 = sum2 + (adler) 4707 } 4708 4709 { 4710 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 4711 sum2 = sum2 + (adler) 4712 } 4713 { 4714 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 4715 sum2 = sum2 + (adler) 4716 } 4717 4718 { 4719 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 4720 sum2 = sum2 + (adler) 4721 } 4722 { 4723 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 4724 sum2 = sum2 + (adler) 4725 } 4726 4727 // 16 sums unrolled 4728 buf += uintptr(16) 4729 } 4730 adler = adler % (uint64(BASE)) 4731 sum2 = sum2 % (uint64(BASE)) 4732 } 4733 4734 // do remaining bytes (less than NMAX, still just one modulo) 4735 if len != 0 { // avoid modulos if none remaining 4736 for len >= uint64(16) { 4737 len = len - (uint64(16)) 4738 { 4739 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 4740 sum2 = sum2 + (adler) 4741 } 4742 { 4743 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 4744 sum2 = sum2 + (adler) 4745 } 4746 4747 { 4748 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 4749 sum2 = sum2 + (adler) 4750 } 4751 { 4752 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 4753 sum2 = sum2 + (adler) 4754 } 4755 4756 { 4757 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 4758 sum2 = sum2 + (adler) 4759 } 4760 { 4761 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 4762 sum2 = sum2 + (adler) 4763 } 4764 4765 { 4766 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 4767 sum2 = sum2 + (adler) 4768 } 4769 { 4770 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 4771 sum2 = sum2 + (adler) 4772 } 4773 4774 { 4775 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 4776 sum2 = sum2 + (adler) 4777 } 4778 { 4779 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 4780 sum2 = sum2 + (adler) 4781 } 4782 4783 { 4784 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 4785 sum2 = sum2 + (adler) 4786 } 4787 { 4788 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 4789 sum2 = sum2 + (adler) 4790 } 4791 4792 { 4793 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 4794 sum2 = sum2 + (adler) 4795 } 4796 { 4797 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 4798 sum2 = sum2 + (adler) 4799 } 4800 4801 { 4802 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 4803 sum2 = sum2 + (adler) 4804 } 4805 { 4806 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 4807 sum2 = sum2 + (adler) 4808 } 4809 4810 buf += uintptr(16) 4811 } 4812 for libc.PostDecUint64(&len, 1) != 0 { 4813 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 4814 sum2 = sum2 + (adler) 4815 } 4816 adler = adler % (uint64(BASE)) 4817 sum2 = sum2 % (uint64(BASE)) 4818 } 4819 4820 // return recombined sums 4821 return (adler | (sum2 << 16)) 4822 } 4823 4824 // ========================================================================= 4825 func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */ 4826 return Xadler32_z(tls, adler, buf, uint64(len)) 4827 } 4828 4829 // ========================================================================= 4830 func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:143:13: */ 4831 var sum1 uint64 4832 var sum2 uint64 4833 var rem uint32 4834 4835 // for negative len, return invalid adler32 as a clue for debugging 4836 if len2 < int64(0) { 4837 return 0xffffffff 4838 } 4839 4840 // the derivation of this formula is left as an exercise for the reader 4841 len2 = len2 % (int64(BASE)) // assumes len2 >= 0 4842 rem = uint32(len2) 4843 sum1 = (adler1 & uint64(0xffff)) 4844 sum2 = (uint64(rem) * sum1) 4845 sum2 = sum2 % (uint64(BASE)) 4846 sum1 = sum1 + (((adler2 & uint64(0xffff)) + uint64(BASE)) - uint64(1)) 4847 sum2 = sum2 + (((((adler1 >> 16) & uint64(0xffff)) + ((adler2 >> 16) & uint64(0xffff))) + uint64(BASE)) - ULong(rem)) 4848 if sum1 >= uint64(BASE) { 4849 sum1 = sum1 - (uint64(BASE)) 4850 } 4851 if sum1 >= uint64(BASE) { 4852 sum1 = sum1 - (uint64(BASE)) 4853 } 4854 if sum2 >= (uint64(uint64(BASE)) << 1) { 4855 sum2 = sum2 - (uint64(uint64(BASE)) << 1) 4856 } 4857 if sum2 >= uint64(BASE) { 4858 sum2 = sum2 - (uint64(BASE)) 4859 } 4860 return (sum1 | (sum2 << 16)) 4861 } 4862 4863 // ========================================================================= 4864 func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */ 4865 return adler32_combine_(tls, adler1, adler2, len2) 4866 } 4867 4868 func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:180:15: */ 4869 return adler32_combine_(tls, adler1, adler2, len2) 4870 } 4871 4872 // =========================================================================== 4873 // Compresses the source buffer into the destination buffer. The level 4874 // parameter has the same meaning as in deflateInit. sourceLen is the byte 4875 // length of the source buffer. Upon entry, destLen is the total size of the 4876 // destination buffer, which must be at least 0.1% larger than sourceLen plus 4877 // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 4878 // 4879 // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 4880 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, 4881 // Z_STREAM_ERROR if the level parameter is invalid. 4882 func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */ 4883 bp := tls.Alloc(112) 4884 defer tls.Free(112) 4885 4886 // var stream Z_stream at bp, 112 4887 4888 var err int32 4889 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 4890 var left ULong 4891 4892 left = *(*ULongf)(unsafe.Pointer(destLen)) 4893 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 4894 4895 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0) 4896 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0) 4897 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0) 4898 4899 err = XdeflateInit_(tls, bp /* &stream */, level, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 4900 if err != Z_OK { 4901 return err 4902 } 4903 4904 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest 4905 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0) 4906 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source 4907 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0) 4908 4909 for ok := true; ok; ok = (err == Z_OK) { 4910 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out == UInt(0) { 4911 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 { 4912 if left > ULong(max) { 4913 return max 4914 } 4915 return UInt(left) 4916 }() 4917 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out)) 4918 } 4919 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in == UInt(0) { 4920 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 { 4921 if sourceLen > ULong(max) { 4922 return max 4923 } 4924 return UInt(sourceLen) 4925 }() 4926 sourceLen = sourceLen - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in)) 4927 } 4928 err = Xdeflate(tls, bp /* &stream */, func() int32 { 4929 if sourceLen != 0 { 4930 return Z_NO_FLUSH 4931 } 4932 return Z_FINISH 4933 }()) 4934 } 4935 4936 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out 4937 XdeflateEnd(tls, bp /* &stream */) 4938 if err == Z_STREAM_END { 4939 return Z_OK 4940 } 4941 return err 4942 } 4943 4944 // =========================================================================== 4945 func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */ 4946 return Xcompress2(tls, dest, destLen, source, sourceLen, -1) 4947 } 4948 4949 // =========================================================================== 4950 // If the default memLevel or windowBits for deflateInit() is changed, then 4951 // this function needs to be updated. 4952 // 4953 func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */ 4954 return ((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) 4955 } 4956 4957 // ======================================================================== 4958 // Tables of CRC-32s of all single-byte values, made by make_crc_table(). 4959 // crc32.h -- tables for rapid CRC calculation 4960 // Generated automatically by crc32.c 4961 4962 var crc_table = [8][256]Z_crc_t{ 4963 { 4964 uint32(0x00000000), uint32(0x77073096), uint32(0xee0e612c), uint32(0x990951ba), uint32(0x076dc419), 4965 uint32(0x706af48f), uint32(0xe963a535), uint32(0x9e6495a3), uint32(0x0edb8832), uint32(0x79dcb8a4), 4966 uint32(0xe0d5e91e), uint32(0x97d2d988), uint32(0x09b64c2b), uint32(0x7eb17cbd), uint32(0xe7b82d07), 4967 uint32(0x90bf1d91), uint32(0x1db71064), uint32(0x6ab020f2), uint32(0xf3b97148), uint32(0x84be41de), 4968 uint32(0x1adad47d), uint32(0x6ddde4eb), uint32(0xf4d4b551), uint32(0x83d385c7), uint32(0x136c9856), 4969 uint32(0x646ba8c0), uint32(0xfd62f97a), uint32(0x8a65c9ec), uint32(0x14015c4f), uint32(0x63066cd9), 4970 uint32(0xfa0f3d63), uint32(0x8d080df5), uint32(0x3b6e20c8), uint32(0x4c69105e), uint32(0xd56041e4), 4971 uint32(0xa2677172), uint32(0x3c03e4d1), uint32(0x4b04d447), uint32(0xd20d85fd), uint32(0xa50ab56b), 4972 uint32(0x35b5a8fa), uint32(0x42b2986c), uint32(0xdbbbc9d6), uint32(0xacbcf940), uint32(0x32d86ce3), 4973 uint32(0x45df5c75), uint32(0xdcd60dcf), uint32(0xabd13d59), uint32(0x26d930ac), uint32(0x51de003a), 4974 uint32(0xc8d75180), uint32(0xbfd06116), uint32(0x21b4f4b5), uint32(0x56b3c423), uint32(0xcfba9599), 4975 uint32(0xb8bda50f), uint32(0x2802b89e), uint32(0x5f058808), uint32(0xc60cd9b2), uint32(0xb10be924), 4976 uint32(0x2f6f7c87), uint32(0x58684c11), uint32(0xc1611dab), uint32(0xb6662d3d), uint32(0x76dc4190), 4977 uint32(0x01db7106), uint32(0x98d220bc), uint32(0xefd5102a), uint32(0x71b18589), uint32(0x06b6b51f), 4978 uint32(0x9fbfe4a5), uint32(0xe8b8d433), uint32(0x7807c9a2), uint32(0x0f00f934), uint32(0x9609a88e), 4979 uint32(0xe10e9818), uint32(0x7f6a0dbb), uint32(0x086d3d2d), uint32(0x91646c97), uint32(0xe6635c01), 4980 uint32(0x6b6b51f4), uint32(0x1c6c6162), uint32(0x856530d8), uint32(0xf262004e), uint32(0x6c0695ed), 4981 uint32(0x1b01a57b), uint32(0x8208f4c1), uint32(0xf50fc457), uint32(0x65b0d9c6), uint32(0x12b7e950), 4982 uint32(0x8bbeb8ea), uint32(0xfcb9887c), uint32(0x62dd1ddf), uint32(0x15da2d49), uint32(0x8cd37cf3), 4983 uint32(0xfbd44c65), uint32(0x4db26158), uint32(0x3ab551ce), uint32(0xa3bc0074), uint32(0xd4bb30e2), 4984 uint32(0x4adfa541), uint32(0x3dd895d7), uint32(0xa4d1c46d), uint32(0xd3d6f4fb), uint32(0x4369e96a), 4985 uint32(0x346ed9fc), uint32(0xad678846), uint32(0xda60b8d0), uint32(0x44042d73), uint32(0x33031de5), 4986 uint32(0xaa0a4c5f), uint32(0xdd0d7cc9), uint32(0x5005713c), uint32(0x270241aa), uint32(0xbe0b1010), 4987 uint32(0xc90c2086), uint32(0x5768b525), uint32(0x206f85b3), uint32(0xb966d409), uint32(0xce61e49f), 4988 uint32(0x5edef90e), uint32(0x29d9c998), uint32(0xb0d09822), uint32(0xc7d7a8b4), uint32(0x59b33d17), 4989 uint32(0x2eb40d81), uint32(0xb7bd5c3b), uint32(0xc0ba6cad), uint32(0xedb88320), uint32(0x9abfb3b6), 4990 uint32(0x03b6e20c), uint32(0x74b1d29a), uint32(0xead54739), uint32(0x9dd277af), uint32(0x04db2615), 4991 uint32(0x73dc1683), uint32(0xe3630b12), uint32(0x94643b84), uint32(0x0d6d6a3e), uint32(0x7a6a5aa8), 4992 uint32(0xe40ecf0b), uint32(0x9309ff9d), uint32(0x0a00ae27), uint32(0x7d079eb1), uint32(0xf00f9344), 4993 uint32(0x8708a3d2), uint32(0x1e01f268), uint32(0x6906c2fe), uint32(0xf762575d), uint32(0x806567cb), 4994 uint32(0x196c3671), uint32(0x6e6b06e7), uint32(0xfed41b76), uint32(0x89d32be0), uint32(0x10da7a5a), 4995 uint32(0x67dd4acc), uint32(0xf9b9df6f), uint32(0x8ebeeff9), uint32(0x17b7be43), uint32(0x60b08ed5), 4996 uint32(0xd6d6a3e8), uint32(0xa1d1937e), uint32(0x38d8c2c4), uint32(0x4fdff252), uint32(0xd1bb67f1), 4997 uint32(0xa6bc5767), uint32(0x3fb506dd), uint32(0x48b2364b), uint32(0xd80d2bda), uint32(0xaf0a1b4c), 4998 uint32(0x36034af6), uint32(0x41047a60), uint32(0xdf60efc3), uint32(0xa867df55), uint32(0x316e8eef), 4999 uint32(0x4669be79), uint32(0xcb61b38c), uint32(0xbc66831a), uint32(0x256fd2a0), uint32(0x5268e236), 5000 uint32(0xcc0c7795), uint32(0xbb0b4703), uint32(0x220216b9), uint32(0x5505262f), uint32(0xc5ba3bbe), 5001 uint32(0xb2bd0b28), uint32(0x2bb45a92), uint32(0x5cb36a04), uint32(0xc2d7ffa7), uint32(0xb5d0cf31), 5002 uint32(0x2cd99e8b), uint32(0x5bdeae1d), uint32(0x9b64c2b0), uint32(0xec63f226), uint32(0x756aa39c), 5003 uint32(0x026d930a), uint32(0x9c0906a9), uint32(0xeb0e363f), uint32(0x72076785), uint32(0x05005713), 5004 uint32(0x95bf4a82), uint32(0xe2b87a14), uint32(0x7bb12bae), uint32(0x0cb61b38), uint32(0x92d28e9b), 5005 uint32(0xe5d5be0d), uint32(0x7cdcefb7), uint32(0x0bdbdf21), uint32(0x86d3d2d4), uint32(0xf1d4e242), 5006 uint32(0x68ddb3f8), uint32(0x1fda836e), uint32(0x81be16cd), uint32(0xf6b9265b), uint32(0x6fb077e1), 5007 uint32(0x18b74777), uint32(0x88085ae6), uint32(0xff0f6a70), uint32(0x66063bca), uint32(0x11010b5c), 5008 uint32(0x8f659eff), uint32(0xf862ae69), uint32(0x616bffd3), uint32(0x166ccf45), uint32(0xa00ae278), 5009 uint32(0xd70dd2ee), uint32(0x4e048354), uint32(0x3903b3c2), uint32(0xa7672661), uint32(0xd06016f7), 5010 uint32(0x4969474d), uint32(0x3e6e77db), uint32(0xaed16a4a), uint32(0xd9d65adc), uint32(0x40df0b66), 5011 uint32(0x37d83bf0), uint32(0xa9bcae53), uint32(0xdebb9ec5), uint32(0x47b2cf7f), uint32(0x30b5ffe9), 5012 uint32(0xbdbdf21c), uint32(0xcabac28a), uint32(0x53b39330), uint32(0x24b4a3a6), uint32(0xbad03605), 5013 uint32(0xcdd70693), uint32(0x54de5729), uint32(0x23d967bf), uint32(0xb3667a2e), uint32(0xc4614ab8), 5014 uint32(0x5d681b02), uint32(0x2a6f2b94), uint32(0xb40bbe37), uint32(0xc30c8ea1), uint32(0x5a05df1b), 5015 uint32(0x2d02ef8d), 5016 }, 5017 { 5018 uint32(0x00000000), uint32(0x191b3141), uint32(0x32366282), uint32(0x2b2d53c3), uint32(0x646cc504), 5019 uint32(0x7d77f445), uint32(0x565aa786), uint32(0x4f4196c7), uint32(0xc8d98a08), uint32(0xd1c2bb49), 5020 uint32(0xfaefe88a), uint32(0xe3f4d9cb), uint32(0xacb54f0c), uint32(0xb5ae7e4d), uint32(0x9e832d8e), 5021 uint32(0x87981ccf), uint32(0x4ac21251), uint32(0x53d92310), uint32(0x78f470d3), uint32(0x61ef4192), 5022 uint32(0x2eaed755), uint32(0x37b5e614), uint32(0x1c98b5d7), uint32(0x05838496), uint32(0x821b9859), 5023 uint32(0x9b00a918), uint32(0xb02dfadb), uint32(0xa936cb9a), uint32(0xe6775d5d), uint32(0xff6c6c1c), 5024 uint32(0xd4413fdf), uint32(0xcd5a0e9e), uint32(0x958424a2), uint32(0x8c9f15e3), uint32(0xa7b24620), 5025 uint32(0xbea97761), uint32(0xf1e8e1a6), uint32(0xe8f3d0e7), uint32(0xc3de8324), uint32(0xdac5b265), 5026 uint32(0x5d5daeaa), uint32(0x44469feb), uint32(0x6f6bcc28), uint32(0x7670fd69), uint32(0x39316bae), 5027 uint32(0x202a5aef), uint32(0x0b07092c), uint32(0x121c386d), uint32(0xdf4636f3), uint32(0xc65d07b2), 5028 uint32(0xed705471), uint32(0xf46b6530), uint32(0xbb2af3f7), uint32(0xa231c2b6), uint32(0x891c9175), 5029 uint32(0x9007a034), uint32(0x179fbcfb), uint32(0x0e848dba), uint32(0x25a9de79), uint32(0x3cb2ef38), 5030 uint32(0x73f379ff), uint32(0x6ae848be), uint32(0x41c51b7d), uint32(0x58de2a3c), uint32(0xf0794f05), 5031 uint32(0xe9627e44), uint32(0xc24f2d87), uint32(0xdb541cc6), uint32(0x94158a01), uint32(0x8d0ebb40), 5032 uint32(0xa623e883), uint32(0xbf38d9c2), uint32(0x38a0c50d), uint32(0x21bbf44c), uint32(0x0a96a78f), 5033 uint32(0x138d96ce), uint32(0x5ccc0009), uint32(0x45d73148), uint32(0x6efa628b), uint32(0x77e153ca), 5034 uint32(0xbabb5d54), uint32(0xa3a06c15), uint32(0x888d3fd6), uint32(0x91960e97), uint32(0xded79850), 5035 uint32(0xc7cca911), uint32(0xece1fad2), uint32(0xf5facb93), uint32(0x7262d75c), uint32(0x6b79e61d), 5036 uint32(0x4054b5de), uint32(0x594f849f), uint32(0x160e1258), uint32(0x0f152319), uint32(0x243870da), 5037 uint32(0x3d23419b), uint32(0x65fd6ba7), uint32(0x7ce65ae6), uint32(0x57cb0925), uint32(0x4ed03864), 5038 uint32(0x0191aea3), uint32(0x188a9fe2), uint32(0x33a7cc21), uint32(0x2abcfd60), uint32(0xad24e1af), 5039 uint32(0xb43fd0ee), uint32(0x9f12832d), uint32(0x8609b26c), uint32(0xc94824ab), uint32(0xd05315ea), 5040 uint32(0xfb7e4629), uint32(0xe2657768), uint32(0x2f3f79f6), uint32(0x362448b7), uint32(0x1d091b74), 5041 uint32(0x04122a35), uint32(0x4b53bcf2), uint32(0x52488db3), uint32(0x7965de70), uint32(0x607eef31), 5042 uint32(0xe7e6f3fe), uint32(0xfefdc2bf), uint32(0xd5d0917c), uint32(0xcccba03d), uint32(0x838a36fa), 5043 uint32(0x9a9107bb), uint32(0xb1bc5478), uint32(0xa8a76539), uint32(0x3b83984b), uint32(0x2298a90a), 5044 uint32(0x09b5fac9), uint32(0x10aecb88), uint32(0x5fef5d4f), uint32(0x46f46c0e), uint32(0x6dd93fcd), 5045 uint32(0x74c20e8c), uint32(0xf35a1243), uint32(0xea412302), uint32(0xc16c70c1), uint32(0xd8774180), 5046 uint32(0x9736d747), uint32(0x8e2de606), uint32(0xa500b5c5), uint32(0xbc1b8484), uint32(0x71418a1a), 5047 uint32(0x685abb5b), uint32(0x4377e898), uint32(0x5a6cd9d9), uint32(0x152d4f1e), uint32(0x0c367e5f), 5048 uint32(0x271b2d9c), uint32(0x3e001cdd), uint32(0xb9980012), uint32(0xa0833153), uint32(0x8bae6290), 5049 uint32(0x92b553d1), uint32(0xddf4c516), uint32(0xc4eff457), uint32(0xefc2a794), uint32(0xf6d996d5), 5050 uint32(0xae07bce9), uint32(0xb71c8da8), uint32(0x9c31de6b), uint32(0x852aef2a), uint32(0xca6b79ed), 5051 uint32(0xd37048ac), uint32(0xf85d1b6f), uint32(0xe1462a2e), uint32(0x66de36e1), uint32(0x7fc507a0), 5052 uint32(0x54e85463), uint32(0x4df36522), uint32(0x02b2f3e5), uint32(0x1ba9c2a4), uint32(0x30849167), 5053 uint32(0x299fa026), uint32(0xe4c5aeb8), uint32(0xfdde9ff9), uint32(0xd6f3cc3a), uint32(0xcfe8fd7b), 5054 uint32(0x80a96bbc), uint32(0x99b25afd), uint32(0xb29f093e), uint32(0xab84387f), uint32(0x2c1c24b0), 5055 uint32(0x350715f1), uint32(0x1e2a4632), uint32(0x07317773), uint32(0x4870e1b4), uint32(0x516bd0f5), 5056 uint32(0x7a468336), uint32(0x635db277), uint32(0xcbfad74e), uint32(0xd2e1e60f), uint32(0xf9ccb5cc), 5057 uint32(0xe0d7848d), uint32(0xaf96124a), uint32(0xb68d230b), uint32(0x9da070c8), uint32(0x84bb4189), 5058 uint32(0x03235d46), uint32(0x1a386c07), uint32(0x31153fc4), uint32(0x280e0e85), uint32(0x674f9842), 5059 uint32(0x7e54a903), uint32(0x5579fac0), uint32(0x4c62cb81), uint32(0x8138c51f), uint32(0x9823f45e), 5060 uint32(0xb30ea79d), uint32(0xaa1596dc), uint32(0xe554001b), uint32(0xfc4f315a), uint32(0xd7626299), 5061 uint32(0xce7953d8), uint32(0x49e14f17), uint32(0x50fa7e56), uint32(0x7bd72d95), uint32(0x62cc1cd4), 5062 uint32(0x2d8d8a13), uint32(0x3496bb52), uint32(0x1fbbe891), uint32(0x06a0d9d0), uint32(0x5e7ef3ec), 5063 uint32(0x4765c2ad), uint32(0x6c48916e), uint32(0x7553a02f), uint32(0x3a1236e8), uint32(0x230907a9), 5064 uint32(0x0824546a), uint32(0x113f652b), uint32(0x96a779e4), uint32(0x8fbc48a5), uint32(0xa4911b66), 5065 uint32(0xbd8a2a27), uint32(0xf2cbbce0), uint32(0xebd08da1), uint32(0xc0fdde62), uint32(0xd9e6ef23), 5066 uint32(0x14bce1bd), uint32(0x0da7d0fc), uint32(0x268a833f), uint32(0x3f91b27e), uint32(0x70d024b9), 5067 uint32(0x69cb15f8), uint32(0x42e6463b), uint32(0x5bfd777a), uint32(0xdc656bb5), uint32(0xc57e5af4), 5068 uint32(0xee530937), uint32(0xf7483876), uint32(0xb809aeb1), uint32(0xa1129ff0), uint32(0x8a3fcc33), 5069 uint32(0x9324fd72), 5070 }, 5071 { 5072 uint32(0x00000000), uint32(0x01c26a37), uint32(0x0384d46e), uint32(0x0246be59), uint32(0x0709a8dc), 5073 uint32(0x06cbc2eb), uint32(0x048d7cb2), uint32(0x054f1685), uint32(0x0e1351b8), uint32(0x0fd13b8f), 5074 uint32(0x0d9785d6), uint32(0x0c55efe1), uint32(0x091af964), uint32(0x08d89353), uint32(0x0a9e2d0a), 5075 uint32(0x0b5c473d), uint32(0x1c26a370), uint32(0x1de4c947), uint32(0x1fa2771e), uint32(0x1e601d29), 5076 uint32(0x1b2f0bac), uint32(0x1aed619b), uint32(0x18abdfc2), uint32(0x1969b5f5), uint32(0x1235f2c8), 5077 uint32(0x13f798ff), uint32(0x11b126a6), uint32(0x10734c91), uint32(0x153c5a14), uint32(0x14fe3023), 5078 uint32(0x16b88e7a), uint32(0x177ae44d), uint32(0x384d46e0), uint32(0x398f2cd7), uint32(0x3bc9928e), 5079 uint32(0x3a0bf8b9), uint32(0x3f44ee3c), uint32(0x3e86840b), uint32(0x3cc03a52), uint32(0x3d025065), 5080 uint32(0x365e1758), uint32(0x379c7d6f), uint32(0x35dac336), uint32(0x3418a901), uint32(0x3157bf84), 5081 uint32(0x3095d5b3), uint32(0x32d36bea), uint32(0x331101dd), uint32(0x246be590), uint32(0x25a98fa7), 5082 uint32(0x27ef31fe), uint32(0x262d5bc9), uint32(0x23624d4c), uint32(0x22a0277b), uint32(0x20e69922), 5083 uint32(0x2124f315), uint32(0x2a78b428), uint32(0x2bbade1f), uint32(0x29fc6046), uint32(0x283e0a71), 5084 uint32(0x2d711cf4), uint32(0x2cb376c3), uint32(0x2ef5c89a), uint32(0x2f37a2ad), uint32(0x709a8dc0), 5085 uint32(0x7158e7f7), uint32(0x731e59ae), uint32(0x72dc3399), uint32(0x7793251c), uint32(0x76514f2b), 5086 uint32(0x7417f172), uint32(0x75d59b45), uint32(0x7e89dc78), uint32(0x7f4bb64f), uint32(0x7d0d0816), 5087 uint32(0x7ccf6221), uint32(0x798074a4), uint32(0x78421e93), uint32(0x7a04a0ca), uint32(0x7bc6cafd), 5088 uint32(0x6cbc2eb0), uint32(0x6d7e4487), uint32(0x6f38fade), uint32(0x6efa90e9), uint32(0x6bb5866c), 5089 uint32(0x6a77ec5b), uint32(0x68315202), uint32(0x69f33835), uint32(0x62af7f08), uint32(0x636d153f), 5090 uint32(0x612bab66), uint32(0x60e9c151), uint32(0x65a6d7d4), uint32(0x6464bde3), uint32(0x662203ba), 5091 uint32(0x67e0698d), uint32(0x48d7cb20), uint32(0x4915a117), uint32(0x4b531f4e), uint32(0x4a917579), 5092 uint32(0x4fde63fc), uint32(0x4e1c09cb), uint32(0x4c5ab792), uint32(0x4d98dda5), uint32(0x46c49a98), 5093 uint32(0x4706f0af), uint32(0x45404ef6), uint32(0x448224c1), uint32(0x41cd3244), uint32(0x400f5873), 5094 uint32(0x4249e62a), uint32(0x438b8c1d), uint32(0x54f16850), uint32(0x55330267), uint32(0x5775bc3e), 5095 uint32(0x56b7d609), uint32(0x53f8c08c), uint32(0x523aaabb), uint32(0x507c14e2), uint32(0x51be7ed5), 5096 uint32(0x5ae239e8), uint32(0x5b2053df), uint32(0x5966ed86), uint32(0x58a487b1), uint32(0x5deb9134), 5097 uint32(0x5c29fb03), uint32(0x5e6f455a), uint32(0x5fad2f6d), uint32(0xe1351b80), uint32(0xe0f771b7), 5098 uint32(0xe2b1cfee), uint32(0xe373a5d9), uint32(0xe63cb35c), uint32(0xe7fed96b), uint32(0xe5b86732), 5099 uint32(0xe47a0d05), uint32(0xef264a38), uint32(0xeee4200f), uint32(0xeca29e56), uint32(0xed60f461), 5100 uint32(0xe82fe2e4), uint32(0xe9ed88d3), uint32(0xebab368a), uint32(0xea695cbd), uint32(0xfd13b8f0), 5101 uint32(0xfcd1d2c7), uint32(0xfe976c9e), uint32(0xff5506a9), uint32(0xfa1a102c), uint32(0xfbd87a1b), 5102 uint32(0xf99ec442), uint32(0xf85cae75), uint32(0xf300e948), uint32(0xf2c2837f), uint32(0xf0843d26), 5103 uint32(0xf1465711), uint32(0xf4094194), uint32(0xf5cb2ba3), uint32(0xf78d95fa), uint32(0xf64fffcd), 5104 uint32(0xd9785d60), uint32(0xd8ba3757), uint32(0xdafc890e), uint32(0xdb3ee339), uint32(0xde71f5bc), 5105 uint32(0xdfb39f8b), uint32(0xddf521d2), uint32(0xdc374be5), uint32(0xd76b0cd8), uint32(0xd6a966ef), 5106 uint32(0xd4efd8b6), uint32(0xd52db281), uint32(0xd062a404), uint32(0xd1a0ce33), uint32(0xd3e6706a), 5107 uint32(0xd2241a5d), uint32(0xc55efe10), uint32(0xc49c9427), uint32(0xc6da2a7e), uint32(0xc7184049), 5108 uint32(0xc25756cc), uint32(0xc3953cfb), uint32(0xc1d382a2), uint32(0xc011e895), uint32(0xcb4dafa8), 5109 uint32(0xca8fc59f), uint32(0xc8c97bc6), uint32(0xc90b11f1), uint32(0xcc440774), uint32(0xcd866d43), 5110 uint32(0xcfc0d31a), uint32(0xce02b92d), uint32(0x91af9640), uint32(0x906dfc77), uint32(0x922b422e), 5111 uint32(0x93e92819), uint32(0x96a63e9c), uint32(0x976454ab), uint32(0x9522eaf2), uint32(0x94e080c5), 5112 uint32(0x9fbcc7f8), uint32(0x9e7eadcf), uint32(0x9c381396), uint32(0x9dfa79a1), uint32(0x98b56f24), 5113 uint32(0x99770513), uint32(0x9b31bb4a), uint32(0x9af3d17d), uint32(0x8d893530), uint32(0x8c4b5f07), 5114 uint32(0x8e0de15e), uint32(0x8fcf8b69), uint32(0x8a809dec), uint32(0x8b42f7db), uint32(0x89044982), 5115 uint32(0x88c623b5), uint32(0x839a6488), uint32(0x82580ebf), uint32(0x801eb0e6), uint32(0x81dcdad1), 5116 uint32(0x8493cc54), uint32(0x8551a663), uint32(0x8717183a), uint32(0x86d5720d), uint32(0xa9e2d0a0), 5117 uint32(0xa820ba97), uint32(0xaa6604ce), uint32(0xaba46ef9), uint32(0xaeeb787c), uint32(0xaf29124b), 5118 uint32(0xad6fac12), uint32(0xacadc625), uint32(0xa7f18118), uint32(0xa633eb2f), uint32(0xa4755576), 5119 uint32(0xa5b73f41), uint32(0xa0f829c4), uint32(0xa13a43f3), uint32(0xa37cfdaa), uint32(0xa2be979d), 5120 uint32(0xb5c473d0), uint32(0xb40619e7), uint32(0xb640a7be), uint32(0xb782cd89), uint32(0xb2cddb0c), 5121 uint32(0xb30fb13b), uint32(0xb1490f62), uint32(0xb08b6555), uint32(0xbbd72268), uint32(0xba15485f), 5122 uint32(0xb853f606), uint32(0xb9919c31), uint32(0xbcde8ab4), uint32(0xbd1ce083), uint32(0xbf5a5eda), 5123 uint32(0xbe9834ed), 5124 }, 5125 { 5126 uint32(0x00000000), uint32(0xb8bc6765), uint32(0xaa09c88b), uint32(0x12b5afee), uint32(0x8f629757), 5127 uint32(0x37def032), uint32(0x256b5fdc), uint32(0x9dd738b9), uint32(0xc5b428ef), uint32(0x7d084f8a), 5128 uint32(0x6fbde064), uint32(0xd7018701), uint32(0x4ad6bfb8), uint32(0xf26ad8dd), uint32(0xe0df7733), 5129 uint32(0x58631056), uint32(0x5019579f), uint32(0xe8a530fa), uint32(0xfa109f14), uint32(0x42acf871), 5130 uint32(0xdf7bc0c8), uint32(0x67c7a7ad), uint32(0x75720843), uint32(0xcdce6f26), uint32(0x95ad7f70), 5131 uint32(0x2d111815), uint32(0x3fa4b7fb), uint32(0x8718d09e), uint32(0x1acfe827), uint32(0xa2738f42), 5132 uint32(0xb0c620ac), uint32(0x087a47c9), uint32(0xa032af3e), uint32(0x188ec85b), uint32(0x0a3b67b5), 5133 uint32(0xb28700d0), uint32(0x2f503869), uint32(0x97ec5f0c), uint32(0x8559f0e2), uint32(0x3de59787), 5134 uint32(0x658687d1), uint32(0xdd3ae0b4), uint32(0xcf8f4f5a), uint32(0x7733283f), uint32(0xeae41086), 5135 uint32(0x525877e3), uint32(0x40edd80d), uint32(0xf851bf68), uint32(0xf02bf8a1), uint32(0x48979fc4), 5136 uint32(0x5a22302a), uint32(0xe29e574f), uint32(0x7f496ff6), uint32(0xc7f50893), uint32(0xd540a77d), 5137 uint32(0x6dfcc018), uint32(0x359fd04e), uint32(0x8d23b72b), uint32(0x9f9618c5), uint32(0x272a7fa0), 5138 uint32(0xbafd4719), uint32(0x0241207c), uint32(0x10f48f92), uint32(0xa848e8f7), uint32(0x9b14583d), 5139 uint32(0x23a83f58), uint32(0x311d90b6), uint32(0x89a1f7d3), uint32(0x1476cf6a), uint32(0xaccaa80f), 5140 uint32(0xbe7f07e1), uint32(0x06c36084), uint32(0x5ea070d2), uint32(0xe61c17b7), uint32(0xf4a9b859), 5141 uint32(0x4c15df3c), uint32(0xd1c2e785), uint32(0x697e80e0), uint32(0x7bcb2f0e), uint32(0xc377486b), 5142 uint32(0xcb0d0fa2), uint32(0x73b168c7), uint32(0x6104c729), uint32(0xd9b8a04c), uint32(0x446f98f5), 5143 uint32(0xfcd3ff90), uint32(0xee66507e), uint32(0x56da371b), uint32(0x0eb9274d), uint32(0xb6054028), 5144 uint32(0xa4b0efc6), uint32(0x1c0c88a3), uint32(0x81dbb01a), uint32(0x3967d77f), uint32(0x2bd27891), 5145 uint32(0x936e1ff4), uint32(0x3b26f703), uint32(0x839a9066), uint32(0x912f3f88), uint32(0x299358ed), 5146 uint32(0xb4446054), uint32(0x0cf80731), uint32(0x1e4da8df), uint32(0xa6f1cfba), uint32(0xfe92dfec), 5147 uint32(0x462eb889), uint32(0x549b1767), uint32(0xec277002), uint32(0x71f048bb), uint32(0xc94c2fde), 5148 uint32(0xdbf98030), uint32(0x6345e755), uint32(0x6b3fa09c), uint32(0xd383c7f9), uint32(0xc1366817), 5149 uint32(0x798a0f72), uint32(0xe45d37cb), uint32(0x5ce150ae), uint32(0x4e54ff40), uint32(0xf6e89825), 5150 uint32(0xae8b8873), uint32(0x1637ef16), uint32(0x048240f8), uint32(0xbc3e279d), uint32(0x21e91f24), 5151 uint32(0x99557841), uint32(0x8be0d7af), uint32(0x335cb0ca), uint32(0xed59b63b), uint32(0x55e5d15e), 5152 uint32(0x47507eb0), uint32(0xffec19d5), uint32(0x623b216c), uint32(0xda874609), uint32(0xc832e9e7), 5153 uint32(0x708e8e82), uint32(0x28ed9ed4), uint32(0x9051f9b1), uint32(0x82e4565f), uint32(0x3a58313a), 5154 uint32(0xa78f0983), uint32(0x1f336ee6), uint32(0x0d86c108), uint32(0xb53aa66d), uint32(0xbd40e1a4), 5155 uint32(0x05fc86c1), uint32(0x1749292f), uint32(0xaff54e4a), uint32(0x322276f3), uint32(0x8a9e1196), 5156 uint32(0x982bbe78), uint32(0x2097d91d), uint32(0x78f4c94b), uint32(0xc048ae2e), uint32(0xd2fd01c0), 5157 uint32(0x6a4166a5), uint32(0xf7965e1c), uint32(0x4f2a3979), uint32(0x5d9f9697), uint32(0xe523f1f2), 5158 uint32(0x4d6b1905), uint32(0xf5d77e60), uint32(0xe762d18e), uint32(0x5fdeb6eb), uint32(0xc2098e52), 5159 uint32(0x7ab5e937), uint32(0x680046d9), uint32(0xd0bc21bc), uint32(0x88df31ea), uint32(0x3063568f), 5160 uint32(0x22d6f961), uint32(0x9a6a9e04), uint32(0x07bda6bd), uint32(0xbf01c1d8), uint32(0xadb46e36), 5161 uint32(0x15080953), uint32(0x1d724e9a), uint32(0xa5ce29ff), uint32(0xb77b8611), uint32(0x0fc7e174), 5162 uint32(0x9210d9cd), uint32(0x2aacbea8), uint32(0x38191146), uint32(0x80a57623), uint32(0xd8c66675), 5163 uint32(0x607a0110), uint32(0x72cfaefe), uint32(0xca73c99b), uint32(0x57a4f122), uint32(0xef189647), 5164 uint32(0xfdad39a9), uint32(0x45115ecc), uint32(0x764dee06), uint32(0xcef18963), uint32(0xdc44268d), 5165 uint32(0x64f841e8), uint32(0xf92f7951), uint32(0x41931e34), uint32(0x5326b1da), uint32(0xeb9ad6bf), 5166 uint32(0xb3f9c6e9), uint32(0x0b45a18c), uint32(0x19f00e62), uint32(0xa14c6907), uint32(0x3c9b51be), 5167 uint32(0x842736db), uint32(0x96929935), uint32(0x2e2efe50), uint32(0x2654b999), uint32(0x9ee8defc), 5168 uint32(0x8c5d7112), uint32(0x34e11677), uint32(0xa9362ece), uint32(0x118a49ab), uint32(0x033fe645), 5169 uint32(0xbb838120), uint32(0xe3e09176), uint32(0x5b5cf613), uint32(0x49e959fd), uint32(0xf1553e98), 5170 uint32(0x6c820621), uint32(0xd43e6144), uint32(0xc68bceaa), uint32(0x7e37a9cf), uint32(0xd67f4138), 5171 uint32(0x6ec3265d), uint32(0x7c7689b3), uint32(0xc4caeed6), uint32(0x591dd66f), uint32(0xe1a1b10a), 5172 uint32(0xf3141ee4), uint32(0x4ba87981), uint32(0x13cb69d7), uint32(0xab770eb2), uint32(0xb9c2a15c), 5173 uint32(0x017ec639), uint32(0x9ca9fe80), uint32(0x241599e5), uint32(0x36a0360b), uint32(0x8e1c516e), 5174 uint32(0x866616a7), uint32(0x3eda71c2), uint32(0x2c6fde2c), uint32(0x94d3b949), uint32(0x090481f0), 5175 uint32(0xb1b8e695), uint32(0xa30d497b), uint32(0x1bb12e1e), uint32(0x43d23e48), uint32(0xfb6e592d), 5176 uint32(0xe9dbf6c3), uint32(0x516791a6), uint32(0xccb0a91f), uint32(0x740cce7a), uint32(0x66b96194), 5177 uint32(0xde0506f1), 5178 }, 5179 { 5180 uint32(0x00000000), uint32(0x96300777), uint32(0x2c610eee), uint32(0xba510999), uint32(0x19c46d07), 5181 uint32(0x8ff46a70), uint32(0x35a563e9), uint32(0xa395649e), uint32(0x3288db0e), uint32(0xa4b8dc79), 5182 uint32(0x1ee9d5e0), uint32(0x88d9d297), uint32(0x2b4cb609), uint32(0xbd7cb17e), uint32(0x072db8e7), 5183 uint32(0x911dbf90), uint32(0x6410b71d), uint32(0xf220b06a), uint32(0x4871b9f3), uint32(0xde41be84), 5184 uint32(0x7dd4da1a), uint32(0xebe4dd6d), uint32(0x51b5d4f4), uint32(0xc785d383), uint32(0x56986c13), 5185 uint32(0xc0a86b64), uint32(0x7af962fd), uint32(0xecc9658a), uint32(0x4f5c0114), uint32(0xd96c0663), 5186 uint32(0x633d0ffa), uint32(0xf50d088d), uint32(0xc8206e3b), uint32(0x5e10694c), uint32(0xe44160d5), 5187 uint32(0x727167a2), uint32(0xd1e4033c), uint32(0x47d4044b), uint32(0xfd850dd2), uint32(0x6bb50aa5), 5188 uint32(0xfaa8b535), uint32(0x6c98b242), uint32(0xd6c9bbdb), uint32(0x40f9bcac), uint32(0xe36cd832), 5189 uint32(0x755cdf45), uint32(0xcf0dd6dc), uint32(0x593dd1ab), uint32(0xac30d926), uint32(0x3a00de51), 5190 uint32(0x8051d7c8), uint32(0x1661d0bf), uint32(0xb5f4b421), uint32(0x23c4b356), uint32(0x9995bacf), 5191 uint32(0x0fa5bdb8), uint32(0x9eb80228), uint32(0x0888055f), uint32(0xb2d90cc6), uint32(0x24e90bb1), 5192 uint32(0x877c6f2f), uint32(0x114c6858), uint32(0xab1d61c1), uint32(0x3d2d66b6), uint32(0x9041dc76), 5193 uint32(0x0671db01), uint32(0xbc20d298), uint32(0x2a10d5ef), uint32(0x8985b171), uint32(0x1fb5b606), 5194 uint32(0xa5e4bf9f), uint32(0x33d4b8e8), uint32(0xa2c90778), uint32(0x34f9000f), uint32(0x8ea80996), 5195 uint32(0x18980ee1), uint32(0xbb0d6a7f), uint32(0x2d3d6d08), uint32(0x976c6491), uint32(0x015c63e6), 5196 uint32(0xf4516b6b), uint32(0x62616c1c), uint32(0xd8306585), uint32(0x4e0062f2), uint32(0xed95066c), 5197 uint32(0x7ba5011b), uint32(0xc1f40882), uint32(0x57c40ff5), uint32(0xc6d9b065), uint32(0x50e9b712), 5198 uint32(0xeab8be8b), uint32(0x7c88b9fc), uint32(0xdf1ddd62), uint32(0x492dda15), uint32(0xf37cd38c), 5199 uint32(0x654cd4fb), uint32(0x5861b24d), uint32(0xce51b53a), uint32(0x7400bca3), uint32(0xe230bbd4), 5200 uint32(0x41a5df4a), uint32(0xd795d83d), uint32(0x6dc4d1a4), uint32(0xfbf4d6d3), uint32(0x6ae96943), 5201 uint32(0xfcd96e34), uint32(0x468867ad), uint32(0xd0b860da), uint32(0x732d0444), uint32(0xe51d0333), 5202 uint32(0x5f4c0aaa), uint32(0xc97c0ddd), uint32(0x3c710550), uint32(0xaa410227), uint32(0x10100bbe), 5203 uint32(0x86200cc9), uint32(0x25b56857), uint32(0xb3856f20), uint32(0x09d466b9), uint32(0x9fe461ce), 5204 uint32(0x0ef9de5e), uint32(0x98c9d929), uint32(0x2298d0b0), uint32(0xb4a8d7c7), uint32(0x173db359), 5205 uint32(0x810db42e), uint32(0x3b5cbdb7), uint32(0xad6cbac0), uint32(0x2083b8ed), uint32(0xb6b3bf9a), 5206 uint32(0x0ce2b603), uint32(0x9ad2b174), uint32(0x3947d5ea), uint32(0xaf77d29d), uint32(0x1526db04), 5207 uint32(0x8316dc73), uint32(0x120b63e3), uint32(0x843b6494), uint32(0x3e6a6d0d), uint32(0xa85a6a7a), 5208 uint32(0x0bcf0ee4), uint32(0x9dff0993), uint32(0x27ae000a), uint32(0xb19e077d), uint32(0x44930ff0), 5209 uint32(0xd2a30887), uint32(0x68f2011e), uint32(0xfec20669), uint32(0x5d5762f7), uint32(0xcb676580), 5210 uint32(0x71366c19), uint32(0xe7066b6e), uint32(0x761bd4fe), uint32(0xe02bd389), uint32(0x5a7ada10), 5211 uint32(0xcc4add67), uint32(0x6fdfb9f9), uint32(0xf9efbe8e), uint32(0x43beb717), uint32(0xd58eb060), 5212 uint32(0xe8a3d6d6), uint32(0x7e93d1a1), uint32(0xc4c2d838), uint32(0x52f2df4f), uint32(0xf167bbd1), 5213 uint32(0x6757bca6), uint32(0xdd06b53f), uint32(0x4b36b248), uint32(0xda2b0dd8), uint32(0x4c1b0aaf), 5214 uint32(0xf64a0336), uint32(0x607a0441), uint32(0xc3ef60df), uint32(0x55df67a8), uint32(0xef8e6e31), 5215 uint32(0x79be6946), uint32(0x8cb361cb), uint32(0x1a8366bc), uint32(0xa0d26f25), uint32(0x36e26852), 5216 uint32(0x95770ccc), uint32(0x03470bbb), uint32(0xb9160222), uint32(0x2f260555), uint32(0xbe3bbac5), 5217 uint32(0x280bbdb2), uint32(0x925ab42b), uint32(0x046ab35c), uint32(0xa7ffd7c2), uint32(0x31cfd0b5), 5218 uint32(0x8b9ed92c), uint32(0x1daede5b), uint32(0xb0c2649b), uint32(0x26f263ec), uint32(0x9ca36a75), 5219 uint32(0x0a936d02), uint32(0xa906099c), uint32(0x3f360eeb), uint32(0x85670772), uint32(0x13570005), 5220 uint32(0x824abf95), uint32(0x147ab8e2), uint32(0xae2bb17b), uint32(0x381bb60c), uint32(0x9b8ed292), 5221 uint32(0x0dbed5e5), uint32(0xb7efdc7c), uint32(0x21dfdb0b), uint32(0xd4d2d386), uint32(0x42e2d4f1), 5222 uint32(0xf8b3dd68), uint32(0x6e83da1f), uint32(0xcd16be81), uint32(0x5b26b9f6), uint32(0xe177b06f), 5223 uint32(0x7747b718), uint32(0xe65a0888), uint32(0x706a0fff), uint32(0xca3b0666), uint32(0x5c0b0111), 5224 uint32(0xff9e658f), uint32(0x69ae62f8), uint32(0xd3ff6b61), uint32(0x45cf6c16), uint32(0x78e20aa0), 5225 uint32(0xeed20dd7), uint32(0x5483044e), uint32(0xc2b30339), uint32(0x612667a7), uint32(0xf71660d0), 5226 uint32(0x4d476949), uint32(0xdb776e3e), uint32(0x4a6ad1ae), uint32(0xdc5ad6d9), uint32(0x660bdf40), 5227 uint32(0xf03bd837), uint32(0x53aebca9), uint32(0xc59ebbde), uint32(0x7fcfb247), uint32(0xe9ffb530), 5228 uint32(0x1cf2bdbd), uint32(0x8ac2baca), uint32(0x3093b353), uint32(0xa6a3b424), uint32(0x0536d0ba), 5229 uint32(0x9306d7cd), uint32(0x2957de54), uint32(0xbf67d923), uint32(0x2e7a66b3), uint32(0xb84a61c4), 5230 uint32(0x021b685d), uint32(0x942b6f2a), uint32(0x37be0bb4), uint32(0xa18e0cc3), uint32(0x1bdf055a), 5231 uint32(0x8def022d), 5232 }, 5233 { 5234 uint32(0x00000000), uint32(0x41311b19), uint32(0x82623632), uint32(0xc3532d2b), uint32(0x04c56c64), 5235 uint32(0x45f4777d), uint32(0x86a75a56), uint32(0xc796414f), uint32(0x088ad9c8), uint32(0x49bbc2d1), 5236 uint32(0x8ae8effa), uint32(0xcbd9f4e3), uint32(0x0c4fb5ac), uint32(0x4d7eaeb5), uint32(0x8e2d839e), 5237 uint32(0xcf1c9887), uint32(0x5112c24a), uint32(0x1023d953), uint32(0xd370f478), uint32(0x9241ef61), 5238 uint32(0x55d7ae2e), uint32(0x14e6b537), uint32(0xd7b5981c), uint32(0x96848305), uint32(0x59981b82), 5239 uint32(0x18a9009b), uint32(0xdbfa2db0), uint32(0x9acb36a9), uint32(0x5d5d77e6), uint32(0x1c6c6cff), 5240 uint32(0xdf3f41d4), uint32(0x9e0e5acd), uint32(0xa2248495), uint32(0xe3159f8c), uint32(0x2046b2a7), 5241 uint32(0x6177a9be), uint32(0xa6e1e8f1), uint32(0xe7d0f3e8), uint32(0x2483dec3), uint32(0x65b2c5da), 5242 uint32(0xaaae5d5d), uint32(0xeb9f4644), uint32(0x28cc6b6f), uint32(0x69fd7076), uint32(0xae6b3139), 5243 uint32(0xef5a2a20), uint32(0x2c09070b), uint32(0x6d381c12), uint32(0xf33646df), uint32(0xb2075dc6), 5244 uint32(0x715470ed), uint32(0x30656bf4), uint32(0xf7f32abb), uint32(0xb6c231a2), uint32(0x75911c89), 5245 uint32(0x34a00790), uint32(0xfbbc9f17), uint32(0xba8d840e), uint32(0x79dea925), uint32(0x38efb23c), 5246 uint32(0xff79f373), uint32(0xbe48e86a), uint32(0x7d1bc541), uint32(0x3c2ade58), uint32(0x054f79f0), 5247 uint32(0x447e62e9), uint32(0x872d4fc2), uint32(0xc61c54db), uint32(0x018a1594), uint32(0x40bb0e8d), 5248 uint32(0x83e823a6), uint32(0xc2d938bf), uint32(0x0dc5a038), uint32(0x4cf4bb21), uint32(0x8fa7960a), 5249 uint32(0xce968d13), uint32(0x0900cc5c), uint32(0x4831d745), uint32(0x8b62fa6e), uint32(0xca53e177), 5250 uint32(0x545dbbba), uint32(0x156ca0a3), uint32(0xd63f8d88), uint32(0x970e9691), uint32(0x5098d7de), 5251 uint32(0x11a9ccc7), uint32(0xd2fae1ec), uint32(0x93cbfaf5), uint32(0x5cd76272), uint32(0x1de6796b), 5252 uint32(0xdeb55440), uint32(0x9f844f59), uint32(0x58120e16), uint32(0x1923150f), uint32(0xda703824), 5253 uint32(0x9b41233d), uint32(0xa76bfd65), uint32(0xe65ae67c), uint32(0x2509cb57), uint32(0x6438d04e), 5254 uint32(0xa3ae9101), uint32(0xe29f8a18), uint32(0x21cca733), uint32(0x60fdbc2a), uint32(0xafe124ad), 5255 uint32(0xeed03fb4), uint32(0x2d83129f), uint32(0x6cb20986), uint32(0xab2448c9), uint32(0xea1553d0), 5256 uint32(0x29467efb), uint32(0x687765e2), uint32(0xf6793f2f), uint32(0xb7482436), uint32(0x741b091d), 5257 uint32(0x352a1204), uint32(0xf2bc534b), uint32(0xb38d4852), uint32(0x70de6579), uint32(0x31ef7e60), 5258 uint32(0xfef3e6e7), uint32(0xbfc2fdfe), uint32(0x7c91d0d5), uint32(0x3da0cbcc), uint32(0xfa368a83), 5259 uint32(0xbb07919a), uint32(0x7854bcb1), uint32(0x3965a7a8), uint32(0x4b98833b), uint32(0x0aa99822), 5260 uint32(0xc9fab509), uint32(0x88cbae10), uint32(0x4f5def5f), uint32(0x0e6cf446), uint32(0xcd3fd96d), 5261 uint32(0x8c0ec274), uint32(0x43125af3), uint32(0x022341ea), uint32(0xc1706cc1), uint32(0x804177d8), 5262 uint32(0x47d73697), uint32(0x06e62d8e), uint32(0xc5b500a5), uint32(0x84841bbc), uint32(0x1a8a4171), 5263 uint32(0x5bbb5a68), uint32(0x98e87743), uint32(0xd9d96c5a), uint32(0x1e4f2d15), uint32(0x5f7e360c), 5264 uint32(0x9c2d1b27), uint32(0xdd1c003e), uint32(0x120098b9), uint32(0x533183a0), uint32(0x9062ae8b), 5265 uint32(0xd153b592), uint32(0x16c5f4dd), uint32(0x57f4efc4), uint32(0x94a7c2ef), uint32(0xd596d9f6), 5266 uint32(0xe9bc07ae), uint32(0xa88d1cb7), uint32(0x6bde319c), uint32(0x2aef2a85), uint32(0xed796bca), 5267 uint32(0xac4870d3), uint32(0x6f1b5df8), uint32(0x2e2a46e1), uint32(0xe136de66), uint32(0xa007c57f), 5268 uint32(0x6354e854), uint32(0x2265f34d), uint32(0xe5f3b202), uint32(0xa4c2a91b), uint32(0x67918430), 5269 uint32(0x26a09f29), uint32(0xb8aec5e4), uint32(0xf99fdefd), uint32(0x3accf3d6), uint32(0x7bfde8cf), 5270 uint32(0xbc6ba980), uint32(0xfd5ab299), uint32(0x3e099fb2), uint32(0x7f3884ab), uint32(0xb0241c2c), 5271 uint32(0xf1150735), uint32(0x32462a1e), uint32(0x73773107), uint32(0xb4e17048), uint32(0xf5d06b51), 5272 uint32(0x3683467a), uint32(0x77b25d63), uint32(0x4ed7facb), uint32(0x0fe6e1d2), uint32(0xccb5ccf9), 5273 uint32(0x8d84d7e0), uint32(0x4a1296af), uint32(0x0b238db6), uint32(0xc870a09d), uint32(0x8941bb84), 5274 uint32(0x465d2303), uint32(0x076c381a), uint32(0xc43f1531), uint32(0x850e0e28), uint32(0x42984f67), 5275 uint32(0x03a9547e), uint32(0xc0fa7955), uint32(0x81cb624c), uint32(0x1fc53881), uint32(0x5ef42398), 5276 uint32(0x9da70eb3), uint32(0xdc9615aa), uint32(0x1b0054e5), uint32(0x5a314ffc), uint32(0x996262d7), 5277 uint32(0xd85379ce), uint32(0x174fe149), uint32(0x567efa50), uint32(0x952dd77b), uint32(0xd41ccc62), 5278 uint32(0x138a8d2d), uint32(0x52bb9634), uint32(0x91e8bb1f), uint32(0xd0d9a006), uint32(0xecf37e5e), 5279 uint32(0xadc26547), uint32(0x6e91486c), uint32(0x2fa05375), uint32(0xe836123a), uint32(0xa9070923), 5280 uint32(0x6a542408), uint32(0x2b653f11), uint32(0xe479a796), uint32(0xa548bc8f), uint32(0x661b91a4), 5281 uint32(0x272a8abd), uint32(0xe0bccbf2), uint32(0xa18dd0eb), uint32(0x62defdc0), uint32(0x23efe6d9), 5282 uint32(0xbde1bc14), uint32(0xfcd0a70d), uint32(0x3f838a26), uint32(0x7eb2913f), uint32(0xb924d070), 5283 uint32(0xf815cb69), uint32(0x3b46e642), uint32(0x7a77fd5b), uint32(0xb56b65dc), uint32(0xf45a7ec5), 5284 uint32(0x370953ee), uint32(0x763848f7), uint32(0xb1ae09b8), uint32(0xf09f12a1), uint32(0x33cc3f8a), 5285 uint32(0x72fd2493), 5286 }, 5287 { 5288 uint32(0x00000000), uint32(0x376ac201), uint32(0x6ed48403), uint32(0x59be4602), uint32(0xdca80907), 5289 uint32(0xebc2cb06), uint32(0xb27c8d04), uint32(0x85164f05), uint32(0xb851130e), uint32(0x8f3bd10f), 5290 uint32(0xd685970d), uint32(0xe1ef550c), uint32(0x64f91a09), uint32(0x5393d808), uint32(0x0a2d9e0a), 5291 uint32(0x3d475c0b), uint32(0x70a3261c), uint32(0x47c9e41d), uint32(0x1e77a21f), uint32(0x291d601e), 5292 uint32(0xac0b2f1b), uint32(0x9b61ed1a), uint32(0xc2dfab18), uint32(0xf5b56919), uint32(0xc8f23512), 5293 uint32(0xff98f713), uint32(0xa626b111), uint32(0x914c7310), uint32(0x145a3c15), uint32(0x2330fe14), 5294 uint32(0x7a8eb816), uint32(0x4de47a17), uint32(0xe0464d38), uint32(0xd72c8f39), uint32(0x8e92c93b), 5295 uint32(0xb9f80b3a), uint32(0x3cee443f), uint32(0x0b84863e), uint32(0x523ac03c), uint32(0x6550023d), 5296 uint32(0x58175e36), uint32(0x6f7d9c37), uint32(0x36c3da35), uint32(0x01a91834), uint32(0x84bf5731), 5297 uint32(0xb3d59530), uint32(0xea6bd332), uint32(0xdd011133), uint32(0x90e56b24), uint32(0xa78fa925), 5298 uint32(0xfe31ef27), uint32(0xc95b2d26), uint32(0x4c4d6223), uint32(0x7b27a022), uint32(0x2299e620), 5299 uint32(0x15f32421), uint32(0x28b4782a), uint32(0x1fdeba2b), uint32(0x4660fc29), uint32(0x710a3e28), 5300 uint32(0xf41c712d), uint32(0xc376b32c), uint32(0x9ac8f52e), uint32(0xada2372f), uint32(0xc08d9a70), 5301 uint32(0xf7e75871), uint32(0xae591e73), uint32(0x9933dc72), uint32(0x1c259377), uint32(0x2b4f5176), 5302 uint32(0x72f11774), uint32(0x459bd575), uint32(0x78dc897e), uint32(0x4fb64b7f), uint32(0x16080d7d), 5303 uint32(0x2162cf7c), uint32(0xa4748079), uint32(0x931e4278), uint32(0xcaa0047a), uint32(0xfdcac67b), 5304 uint32(0xb02ebc6c), uint32(0x87447e6d), uint32(0xdefa386f), uint32(0xe990fa6e), uint32(0x6c86b56b), 5305 uint32(0x5bec776a), uint32(0x02523168), uint32(0x3538f369), uint32(0x087faf62), uint32(0x3f156d63), 5306 uint32(0x66ab2b61), uint32(0x51c1e960), uint32(0xd4d7a665), uint32(0xe3bd6464), uint32(0xba032266), 5307 uint32(0x8d69e067), uint32(0x20cbd748), uint32(0x17a11549), uint32(0x4e1f534b), uint32(0x7975914a), 5308 uint32(0xfc63de4f), uint32(0xcb091c4e), uint32(0x92b75a4c), uint32(0xa5dd984d), uint32(0x989ac446), 5309 uint32(0xaff00647), uint32(0xf64e4045), uint32(0xc1248244), uint32(0x4432cd41), uint32(0x73580f40), 5310 uint32(0x2ae64942), uint32(0x1d8c8b43), uint32(0x5068f154), uint32(0x67023355), uint32(0x3ebc7557), 5311 uint32(0x09d6b756), uint32(0x8cc0f853), uint32(0xbbaa3a52), uint32(0xe2147c50), uint32(0xd57ebe51), 5312 uint32(0xe839e25a), uint32(0xdf53205b), uint32(0x86ed6659), uint32(0xb187a458), uint32(0x3491eb5d), 5313 uint32(0x03fb295c), uint32(0x5a456f5e), uint32(0x6d2fad5f), uint32(0x801b35e1), uint32(0xb771f7e0), 5314 uint32(0xeecfb1e2), uint32(0xd9a573e3), uint32(0x5cb33ce6), uint32(0x6bd9fee7), uint32(0x3267b8e5), 5315 uint32(0x050d7ae4), uint32(0x384a26ef), uint32(0x0f20e4ee), uint32(0x569ea2ec), uint32(0x61f460ed), 5316 uint32(0xe4e22fe8), uint32(0xd388ede9), uint32(0x8a36abeb), uint32(0xbd5c69ea), uint32(0xf0b813fd), 5317 uint32(0xc7d2d1fc), uint32(0x9e6c97fe), uint32(0xa90655ff), uint32(0x2c101afa), uint32(0x1b7ad8fb), 5318 uint32(0x42c49ef9), uint32(0x75ae5cf8), uint32(0x48e900f3), uint32(0x7f83c2f2), uint32(0x263d84f0), 5319 uint32(0x115746f1), uint32(0x944109f4), uint32(0xa32bcbf5), uint32(0xfa958df7), uint32(0xcdff4ff6), 5320 uint32(0x605d78d9), uint32(0x5737bad8), uint32(0x0e89fcda), uint32(0x39e33edb), uint32(0xbcf571de), 5321 uint32(0x8b9fb3df), uint32(0xd221f5dd), uint32(0xe54b37dc), uint32(0xd80c6bd7), uint32(0xef66a9d6), 5322 uint32(0xb6d8efd4), uint32(0x81b22dd5), uint32(0x04a462d0), uint32(0x33cea0d1), uint32(0x6a70e6d3), 5323 uint32(0x5d1a24d2), uint32(0x10fe5ec5), uint32(0x27949cc4), uint32(0x7e2adac6), uint32(0x494018c7), 5324 uint32(0xcc5657c2), uint32(0xfb3c95c3), uint32(0xa282d3c1), uint32(0x95e811c0), uint32(0xa8af4dcb), 5325 uint32(0x9fc58fca), uint32(0xc67bc9c8), uint32(0xf1110bc9), uint32(0x740744cc), uint32(0x436d86cd), 5326 uint32(0x1ad3c0cf), uint32(0x2db902ce), uint32(0x4096af91), uint32(0x77fc6d90), uint32(0x2e422b92), 5327 uint32(0x1928e993), uint32(0x9c3ea696), uint32(0xab546497), uint32(0xf2ea2295), uint32(0xc580e094), 5328 uint32(0xf8c7bc9f), uint32(0xcfad7e9e), uint32(0x9613389c), uint32(0xa179fa9d), uint32(0x246fb598), 5329 uint32(0x13057799), uint32(0x4abb319b), uint32(0x7dd1f39a), uint32(0x3035898d), uint32(0x075f4b8c), 5330 uint32(0x5ee10d8e), uint32(0x698bcf8f), uint32(0xec9d808a), uint32(0xdbf7428b), uint32(0x82490489), 5331 uint32(0xb523c688), uint32(0x88649a83), uint32(0xbf0e5882), uint32(0xe6b01e80), uint32(0xd1dadc81), 5332 uint32(0x54cc9384), uint32(0x63a65185), uint32(0x3a181787), uint32(0x0d72d586), uint32(0xa0d0e2a9), 5333 uint32(0x97ba20a8), uint32(0xce0466aa), uint32(0xf96ea4ab), uint32(0x7c78ebae), uint32(0x4b1229af), 5334 uint32(0x12ac6fad), uint32(0x25c6adac), uint32(0x1881f1a7), uint32(0x2feb33a6), uint32(0x765575a4), 5335 uint32(0x413fb7a5), uint32(0xc429f8a0), uint32(0xf3433aa1), uint32(0xaafd7ca3), uint32(0x9d97bea2), 5336 uint32(0xd073c4b5), uint32(0xe71906b4), uint32(0xbea740b6), uint32(0x89cd82b7), uint32(0x0cdbcdb2), 5337 uint32(0x3bb10fb3), uint32(0x620f49b1), uint32(0x55658bb0), uint32(0x6822d7bb), uint32(0x5f4815ba), 5338 uint32(0x06f653b8), uint32(0x319c91b9), uint32(0xb48adebc), uint32(0x83e01cbd), uint32(0xda5e5abf), 5339 uint32(0xed3498be), 5340 }, 5341 { 5342 uint32(0x00000000), uint32(0x6567bcb8), uint32(0x8bc809aa), uint32(0xeeafb512), uint32(0x5797628f), 5343 uint32(0x32f0de37), uint32(0xdc5f6b25), uint32(0xb938d79d), uint32(0xef28b4c5), uint32(0x8a4f087d), 5344 uint32(0x64e0bd6f), uint32(0x018701d7), uint32(0xb8bfd64a), uint32(0xddd86af2), uint32(0x3377dfe0), 5345 uint32(0x56106358), uint32(0x9f571950), uint32(0xfa30a5e8), uint32(0x149f10fa), uint32(0x71f8ac42), 5346 uint32(0xc8c07bdf), uint32(0xada7c767), uint32(0x43087275), uint32(0x266fcecd), uint32(0x707fad95), 5347 uint32(0x1518112d), uint32(0xfbb7a43f), uint32(0x9ed01887), uint32(0x27e8cf1a), uint32(0x428f73a2), 5348 uint32(0xac20c6b0), uint32(0xc9477a08), uint32(0x3eaf32a0), uint32(0x5bc88e18), uint32(0xb5673b0a), 5349 uint32(0xd00087b2), uint32(0x6938502f), uint32(0x0c5fec97), uint32(0xe2f05985), uint32(0x8797e53d), 5350 uint32(0xd1878665), uint32(0xb4e03add), uint32(0x5a4f8fcf), uint32(0x3f283377), uint32(0x8610e4ea), 5351 uint32(0xe3775852), uint32(0x0dd8ed40), uint32(0x68bf51f8), uint32(0xa1f82bf0), uint32(0xc49f9748), 5352 uint32(0x2a30225a), uint32(0x4f579ee2), uint32(0xf66f497f), uint32(0x9308f5c7), uint32(0x7da740d5), 5353 uint32(0x18c0fc6d), uint32(0x4ed09f35), uint32(0x2bb7238d), uint32(0xc518969f), uint32(0xa07f2a27), 5354 uint32(0x1947fdba), uint32(0x7c204102), uint32(0x928ff410), uint32(0xf7e848a8), uint32(0x3d58149b), 5355 uint32(0x583fa823), uint32(0xb6901d31), uint32(0xd3f7a189), uint32(0x6acf7614), uint32(0x0fa8caac), 5356 uint32(0xe1077fbe), uint32(0x8460c306), uint32(0xd270a05e), uint32(0xb7171ce6), uint32(0x59b8a9f4), 5357 uint32(0x3cdf154c), uint32(0x85e7c2d1), uint32(0xe0807e69), uint32(0x0e2fcb7b), uint32(0x6b4877c3), 5358 uint32(0xa20f0dcb), uint32(0xc768b173), uint32(0x29c70461), uint32(0x4ca0b8d9), uint32(0xf5986f44), 5359 uint32(0x90ffd3fc), uint32(0x7e5066ee), uint32(0x1b37da56), uint32(0x4d27b90e), uint32(0x284005b6), 5360 uint32(0xc6efb0a4), uint32(0xa3880c1c), uint32(0x1ab0db81), uint32(0x7fd76739), uint32(0x9178d22b), 5361 uint32(0xf41f6e93), uint32(0x03f7263b), uint32(0x66909a83), uint32(0x883f2f91), uint32(0xed589329), 5362 uint32(0x546044b4), uint32(0x3107f80c), uint32(0xdfa84d1e), uint32(0xbacff1a6), uint32(0xecdf92fe), 5363 uint32(0x89b82e46), uint32(0x67179b54), uint32(0x027027ec), uint32(0xbb48f071), uint32(0xde2f4cc9), 5364 uint32(0x3080f9db), uint32(0x55e74563), uint32(0x9ca03f6b), uint32(0xf9c783d3), uint32(0x176836c1), 5365 uint32(0x720f8a79), uint32(0xcb375de4), uint32(0xae50e15c), uint32(0x40ff544e), uint32(0x2598e8f6), 5366 uint32(0x73888bae), uint32(0x16ef3716), uint32(0xf8408204), uint32(0x9d273ebc), uint32(0x241fe921), 5367 uint32(0x41785599), uint32(0xafd7e08b), uint32(0xcab05c33), uint32(0x3bb659ed), uint32(0x5ed1e555), 5368 uint32(0xb07e5047), uint32(0xd519ecff), uint32(0x6c213b62), uint32(0x094687da), uint32(0xe7e932c8), 5369 uint32(0x828e8e70), uint32(0xd49eed28), uint32(0xb1f95190), uint32(0x5f56e482), uint32(0x3a31583a), 5370 uint32(0x83098fa7), uint32(0xe66e331f), uint32(0x08c1860d), uint32(0x6da63ab5), uint32(0xa4e140bd), 5371 uint32(0xc186fc05), uint32(0x2f294917), uint32(0x4a4ef5af), uint32(0xf3762232), uint32(0x96119e8a), 5372 uint32(0x78be2b98), uint32(0x1dd99720), uint32(0x4bc9f478), uint32(0x2eae48c0), uint32(0xc001fdd2), 5373 uint32(0xa566416a), uint32(0x1c5e96f7), uint32(0x79392a4f), uint32(0x97969f5d), uint32(0xf2f123e5), 5374 uint32(0x05196b4d), uint32(0x607ed7f5), uint32(0x8ed162e7), uint32(0xebb6de5f), uint32(0x528e09c2), 5375 uint32(0x37e9b57a), uint32(0xd9460068), uint32(0xbc21bcd0), uint32(0xea31df88), uint32(0x8f566330), 5376 uint32(0x61f9d622), uint32(0x049e6a9a), uint32(0xbda6bd07), uint32(0xd8c101bf), uint32(0x366eb4ad), 5377 uint32(0x53090815), uint32(0x9a4e721d), uint32(0xff29cea5), uint32(0x11867bb7), uint32(0x74e1c70f), 5378 uint32(0xcdd91092), uint32(0xa8beac2a), uint32(0x46111938), uint32(0x2376a580), uint32(0x7566c6d8), 5379 uint32(0x10017a60), uint32(0xfeaecf72), uint32(0x9bc973ca), uint32(0x22f1a457), uint32(0x479618ef), 5380 uint32(0xa939adfd), uint32(0xcc5e1145), uint32(0x06ee4d76), uint32(0x6389f1ce), uint32(0x8d2644dc), 5381 uint32(0xe841f864), uint32(0x51792ff9), uint32(0x341e9341), uint32(0xdab12653), uint32(0xbfd69aeb), 5382 uint32(0xe9c6f9b3), uint32(0x8ca1450b), uint32(0x620ef019), uint32(0x07694ca1), uint32(0xbe519b3c), 5383 uint32(0xdb362784), uint32(0x35999296), uint32(0x50fe2e2e), uint32(0x99b95426), uint32(0xfcdee89e), 5384 uint32(0x12715d8c), uint32(0x7716e134), uint32(0xce2e36a9), uint32(0xab498a11), uint32(0x45e63f03), 5385 uint32(0x208183bb), uint32(0x7691e0e3), uint32(0x13f65c5b), uint32(0xfd59e949), uint32(0x983e55f1), 5386 uint32(0x2106826c), uint32(0x44613ed4), uint32(0xaace8bc6), uint32(0xcfa9377e), uint32(0x38417fd6), 5387 uint32(0x5d26c36e), uint32(0xb389767c), uint32(0xd6eecac4), uint32(0x6fd61d59), uint32(0x0ab1a1e1), 5388 uint32(0xe41e14f3), uint32(0x8179a84b), uint32(0xd769cb13), uint32(0xb20e77ab), uint32(0x5ca1c2b9), 5389 uint32(0x39c67e01), uint32(0x80fea99c), uint32(0xe5991524), uint32(0x0b36a036), uint32(0x6e511c8e), 5390 uint32(0xa7166686), uint32(0xc271da3e), uint32(0x2cde6f2c), uint32(0x49b9d394), uint32(0xf0810409), 5391 uint32(0x95e6b8b1), uint32(0x7b490da3), uint32(0x1e2eb11b), uint32(0x483ed243), uint32(0x2d596efb), 5392 uint32(0xc3f6dbe9), uint32(0xa6916751), uint32(0x1fa9b0cc), uint32(0x7ace0c74), uint32(0x9461b966), 5393 uint32(0xf10605de), 5394 }, 5395 } /* crc32.h:5:25 */ 5396 5397 // ========================================================================= 5398 // This function can be used by asm versions of crc32() 5399 func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */ 5400 return uintptr(uintptr(unsafe.Pointer(&crc_table))) 5401 } 5402 5403 // ========================================================================= 5404 5405 // ========================================================================= 5406 func Xcrc32_z(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:202:23: */ 5407 bp := tls.Alloc(4) 5408 defer tls.Free(4) 5409 5410 if buf == uintptr(Z_NULL) { 5411 return 0 5412 } 5413 5414 if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) { 5415 // var endian Z_crc_t at bp, 4 5416 5417 *(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1) 5418 if *(*uint8)(unsafe.Pointer(bp /* &endian */)) != 0 { 5419 return crc32_little(tls, crc, buf, len) 5420 } else { 5421 return crc32_big(tls, crc, buf, len) 5422 } 5423 } 5424 crc = (crc ^ 0xffffffff) 5425 for len >= uint64(8) { 5426 crc = (uint64(*(*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)) 5427 crc = (uint64(*(*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)) 5428 crc = (uint64(*(*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)) 5429 crc = (uint64(*(*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)) 5430 crc = (uint64(*(*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)) 5431 crc = (uint64(*(*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)) 5432 crc = (uint64(*(*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)) 5433 crc = (uint64(*(*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)) 5434 len = len - (uint64(8)) 5435 } 5436 if len != 0 { 5437 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 5438 crc = (uint64(*(*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)) 5439 } 5440 } 5441 return (crc ^ 0xffffffff) 5442 } 5443 5444 // ========================================================================= 5445 func Xcrc32(tls *libc.TLS, crc uint64, buf uintptr, len UInt) uint64 { /* crc32.c:237:23: */ 5446 return Xcrc32_z(tls, crc, buf, uint64(len)) 5447 } 5448 5449 // 5450 // This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit 5451 // integer pointer type. This violates the strict aliasing rule, where a 5452 // compiler can assume, for optimization purposes, that two pointers to 5453 // fundamentally different types won't ever point to the same memory. This can 5454 // manifest as a problem only if one of the pointers is written to. This code 5455 // only reads from those pointers. So long as this code remains isolated in 5456 // this compilation unit, there won't be a problem. For this reason, this code 5457 // should not be copied and pasted into a compilation unit in which other code 5458 // writes to the buffer that is passed to these routines. 5459 // 5460 5461 // ========================================================================= 5462 5463 // ========================================================================= 5464 func crc32_little(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:266:21: */ 5465 var c Z_crc_t 5466 var buf4 uintptr 5467 5468 c = Z_crc_t(crc) 5469 c = ^c 5470 for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) { 5471 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)) 5472 len-- 5473 } 5474 5475 buf4 = buf 5476 for len >= uint64(32) { 5477 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5478 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))) 5479 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5480 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))) 5481 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5482 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))) 5483 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5484 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))) 5485 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5486 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))) 5487 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5488 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))) 5489 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5490 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))) 5491 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5492 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))) 5493 len = len - (uint64(32)) 5494 } 5495 for len >= uint64(4) { 5496 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5497 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))) 5498 len = len - (uint64(4)) 5499 } 5500 buf = buf4 5501 5502 if len != 0 { 5503 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 5504 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)) 5505 } 5506 } 5507 c = ^c 5508 return uint64(c) 5509 } 5510 5511 // ========================================================================= 5512 5513 // ========================================================================= 5514 func crc32_big(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:306:21: */ 5515 var c Z_crc_t 5516 var buf4 uintptr 5517 5518 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)) 5519 c = ^c 5520 for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) { 5521 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)) 5522 len-- 5523 } 5524 5525 buf4 = buf 5526 for len >= uint64(32) { 5527 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5528 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))) 5529 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5530 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))) 5531 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5532 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))) 5533 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5534 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))) 5535 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5536 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))) 5537 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5538 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))) 5539 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5540 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))) 5541 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5542 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))) 5543 len = len - (uint64(32)) 5544 } 5545 for len >= uint64(4) { 5546 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5547 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))) 5548 len = len - (uint64(4)) 5549 } 5550 buf = buf4 5551 5552 if len != 0 { 5553 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 5554 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)) 5555 } 5556 } 5557 c = ^c 5558 return (uint64((((((c) >> 24) & Z_crc_t(0xff)) + (((c) >> 8) & Z_crc_t(0xff00))) + (((c) & Z_crc_t(0xff00)) << 8)) + (((c) & Z_crc_t(0xff)) << 24))) 5559 } 5560 5561 // ========================================================================= 5562 func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint64) uint64 { /* crc32.c:344:21: */ 5563 var sum uint64 5564 5565 sum = uint64(0) 5566 for vec != 0 { 5567 if (vec & uint64(1)) != 0 { 5568 sum = sum ^ (*(*uint64)(unsafe.Pointer(mat))) 5569 } 5570 vec >>= 1 5571 mat += 8 5572 } 5573 return sum 5574 } 5575 5576 // ========================================================================= 5577 func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */ 5578 var n int32 5579 5580 for n = 0; n < GF2_DIM; n++ { 5581 *(*uint64)(unsafe.Pointer(square + uintptr(n)*8)) = gf2_matrix_times(tls, mat, *(*uint64)(unsafe.Pointer(mat + uintptr(n)*8))) 5582 } 5583 } 5584 5585 // ========================================================================= 5586 func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:372:13: */ 5587 bp := tls.Alloc(512) 5588 defer tls.Free(512) 5589 5590 var n int32 5591 var row uint64 5592 // var even [32]uint64 at bp+256, 256 5593 // even-power-of-two zeros operator 5594 // var odd [32]uint64 at bp, 256 5595 // odd-power-of-two zeros operator 5596 5597 // degenerate case (also disallow negative lengths) 5598 if len2 <= int64(0) { 5599 return crc1 5600 } 5601 5602 // put operator for one zero bit in odd 5603 *(*uint64)(unsafe.Pointer(bp /* &odd[0] */)) = 0xedb88320 // CRC-32 polynomial 5604 row = uint64(1) 5605 for n = 1; n < GF2_DIM; n++ { 5606 *(*uint64)(unsafe.Pointer(bp /* &odd[0] */ + uintptr(n)*8)) = row 5607 row <<= 1 5608 } 5609 5610 // put operator for two zero bits in even 5611 gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */) 5612 5613 // put operator for four zero bits in odd 5614 gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */) 5615 5616 // apply len2 zeros to crc1 (first square will put the operator for one 5617 // zero byte, eight zero bits, in even) 5618 for ok := true; ok; ok = (len2 != int64(0)) { 5619 // apply zeros operator for this bit of len2 5620 gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */) 5621 if (len2 & int64(1)) != 0 { 5622 crc1 = gf2_matrix_times(tls, bp+256 /* &even[0] */, crc1) 5623 } 5624 len2 >>= 1 5625 5626 // if no more bits set, then done 5627 if len2 == int64(0) { 5628 break 5629 } 5630 5631 // another iteration of the loop with odd and even swapped 5632 gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */) 5633 if (len2 & int64(1)) != 0 { 5634 crc1 = gf2_matrix_times(tls, bp /* &odd[0] */, crc1) 5635 } 5636 len2 >>= 1 5637 5638 // if no more bits set, then done 5639 } 5640 5641 // return combined crc 5642 crc1 = crc1 ^ (crc2) 5643 return crc1 5644 } 5645 5646 // ========================================================================= 5647 func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */ 5648 return crc32_combine_(tls, crc1, crc2, len2) 5649 } 5650 5651 func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:436:15: */ 5652 return crc32_combine_(tls, crc1, crc2, len2) 5653 } 5654 5655 // Reverse the bytes in a 32-bit value 5656 5657 // define NO_GZIP when compiling if you want to disable gzip header and 5658 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 5659 // the crc code when it is not needed. For shared libraries, gzip encoding 5660 // should be left enabled. 5661 5662 // =========================================================================== 5663 // Internal compression state. 5664 5665 // number of length codes, not counting the special END_BLOCK code 5666 5667 // number of literal bytes 0..255 5668 5669 // number of Literal or Length codes, including the END_BLOCK code 5670 5671 // number of distance codes 5672 5673 // number of codes used to transfer the bit lengths 5674 5675 // maximum heap size 5676 5677 // All codes must not exceed MAX_BITS bits 5678 5679 // size of bit buffer in bi_buf 5680 5681 // Stream status 5682 5683 // Data structure describing a single value and its code string. 5684 type Ct_data_s = struct { 5685 Ffc struct{ Ffreq Ush } 5686 Fdl struct{ Fdad Ush } 5687 } /* zlib.h:84:1 */ 5688 5689 // Reverse the bytes in a 32-bit value 5690 5691 // define NO_GZIP when compiling if you want to disable gzip header and 5692 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 5693 // the crc code when it is not needed. For shared libraries, gzip encoding 5694 // should be left enabled. 5695 5696 // =========================================================================== 5697 // Internal compression state. 5698 5699 // number of length codes, not counting the special END_BLOCK code 5700 5701 // number of literal bytes 0..255 5702 5703 // number of Literal or Length codes, including the END_BLOCK code 5704 5705 // number of distance codes 5706 5707 // number of codes used to transfer the bit lengths 5708 5709 // maximum heap size 5710 5711 // All codes must not exceed MAX_BITS bits 5712 5713 // size of bit buffer in bi_buf 5714 5715 // Stream status 5716 5717 // Data structure describing a single value and its code string. 5718 type Ct_data = Ct_data_s /* deflate.h:77:7 */ 5719 5720 type Static_tree_desc_s = struct { 5721 Fstatic_tree uintptr 5722 Fextra_bits uintptr 5723 Fextra_base int32 5724 Felems int32 5725 Fmax_length int32 5726 F__ccgo_pad1 [4]byte 5727 } /* deflate.h:84:9 */ 5728 5729 type Tree_desc_s = struct { 5730 Fdyn_tree uintptr 5731 Fmax_code int32 5732 F__ccgo_pad1 [4]byte 5733 Fstat_desc uintptr 5734 } /* zlib.h:84:1 */ 5735 5736 type Tree_desc = Tree_desc_s /* deflate.h:90:7 */ 5737 5738 type Pos = Ush /* deflate.h:92:13 */ 5739 type Posf = Pos /* deflate.h:93:17 */ 5740 type IPos = uint32 /* deflate.h:94:18 */ 5741 5742 // A Pos is an index in the character window. We use short instead of int to 5743 // save space in the various tables. IPos is used only for parameter passing. 5744 5745 type Deflate_state = Internal_state /* deflate.h:276:7 */ 5746 5747 var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7 /* " deflate 1.2.11 ..." */)) /* deflate.c:54:12 */ 5748 // 5749 // If you use the zlib library in a product, an acknowledgment is welcome 5750 // in the documentation of your product. If for some reason you cannot 5751 // include such an acknowledgment, I would appreciate that you keep this 5752 // copyright string in the executable of your product. 5753 // 5754 5755 // =========================================================================== 5756 // Function prototypes. 5757 type Block_state = uint32 /* deflate.c:71:3 */ 5758 5759 type Compress_func = uintptr /* deflate.c:73:21 */ 5760 5761 // =========================================================================== 5762 // Local data 5763 5764 // Tail of hash chains 5765 5766 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 5767 5768 // Values for max_lazy_match, good_match and max_chain_length, depending on 5769 // the desired pack level (0..9). The values given below have been tuned to 5770 // exclude worst case performance for pathological files. Better values may be 5771 // found for specific files. 5772 type Config_s = struct { 5773 Fgood_length Ush 5774 Fmax_lazy Ush 5775 Fnice_length Ush 5776 Fmax_chain Ush 5777 Ffunc Compress_func 5778 } /* deflate.c:120:9 */ 5779 5780 // =========================================================================== 5781 // Local data 5782 5783 // Tail of hash chains 5784 5785 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 5786 5787 // Values for max_lazy_match, good_match and max_chain_length, depending on 5788 // the desired pack level (0..9). The values given below have been tuned to 5789 // exclude worst case performance for pathological files. Better values may be 5790 // found for specific files. 5791 type Config = Config_s /* deflate.c:126:3 */ 5792 5793 var configuration_table = [10]Config{ 5794 // good lazy nice chain 5795 /* 0 */ {Ffunc: 0}, // store only 5796 /* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches 5797 /* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0}, 5798 /* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 5799 5800 /* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches 5801 /* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 5802 /* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0}, 5803 /* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0}, 5804 /* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0}, 5805 /* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */ 5806 5807 // max compression 5808 5809 // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 5810 // For deflate_fast() (levels <= 3) good is ignored and lazy has a different 5811 // meaning. 5812 5813 // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH 5814 5815 // =========================================================================== 5816 // Update a hash value with the given input byte 5817 // IN assertion: all calls to UPDATE_HASH are made with consecutive input 5818 // characters, so that a running hash key can be computed from the previous 5819 // key instead of complete recalculation each time. 5820 5821 // =========================================================================== 5822 // Insert string str in the dictionary and set match_head to the previous head 5823 // of the hash chain (the most recent string with same hash key). Return 5824 // the previous length of the hash chain. 5825 // If this file is compiled with -DFASTEST, the compression level is forced 5826 // to 1, and no hash chains are maintained. 5827 // IN assertion: all calls to INSERT_STRING are made with consecutive input 5828 // characters and the first MIN_MATCH bytes of str are valid (except for 5829 // the last MIN_MATCH-1 bytes of the input file). 5830 5831 // =========================================================================== 5832 // Initialize the hash table (avoiding 64K overflow for 16 bit systems). 5833 // prev[] will be initialized on the fly. 5834 5835 // =========================================================================== 5836 // Slide the hash table when sliding the window down (could be avoided with 32 5837 // bit values at the expense of memory usage). We slide even when level == 0 to 5838 // keep the hash table consistent if we switch back to level > 0 later. 5839 func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */ 5840 var n uint32 5841 var m uint32 5842 var p uintptr 5843 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5844 5845 n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size 5846 p = ((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2) 5847 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 5848 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 5849 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 5850 if m >= wsize { 5851 return (uint16(m - wsize)) 5852 } 5853 return uint16(NIL) 5854 }() 5855 } 5856 n = wsize 5857 p = ((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2) 5858 for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 { 5859 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 5860 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 5861 if m >= wsize { 5862 return (uint16(m - wsize)) 5863 } 5864 return uint16(NIL) 5865 }() 5866 // If n is not on any hash chain, prev[n] is garbage but 5867 // its value will never be used. 5868 } 5869 } 5870 5871 // ========================================================================= 5872 func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */ 5873 return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, 5874 Z_DEFAULT_STRATEGY, version, stream_size) 5875 // To do: ignore strm->next_in if we use it as window 5876 } 5877 5878 // ========================================================================= 5879 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: */ 5880 var s uintptr 5881 var wrap int32 = 1 5882 var overlay uintptr 5883 // We overlay pending_buf and d_buf+l_buf. This works since the average 5884 // output size for (length,distance) codes is <= 24 bits. 5885 5886 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]))) || (uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{}))) { 5887 return -6 5888 } 5889 if strm == uintptr(Z_NULL) { 5890 return -2 5891 } 5892 5893 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 5894 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 5895 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 5896 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 5897 }{Xzcalloc})) 5898 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 5899 } 5900 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 5901 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 5902 f func(*libc.TLS, Voidpf, Voidpf) 5903 }{Xzcfree})) 5904 } 5905 5906 if level == (-1) { 5907 level = 6 5908 } 5909 5910 if windowBits < 0 { // suppress zlib wrapper 5911 wrap = 0 5912 windowBits = -windowBits 5913 } else if windowBits > 15 { 5914 wrap = 2 // write gzip wrapper instead 5915 windowBits = windowBits - (16) 5916 } 5917 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)) { 5918 return -2 5919 } 5920 if windowBits == 8 { 5921 windowBits = 9 5922 } // until 256-byte window bug fixed 5923 s = (*struct { 5924 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5925 })(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{}))) 5926 if s == uintptr(Z_NULL) { 5927 return -4 5928 } 5929 (*Z_stream)(unsafe.Pointer(strm)).Fstate = s 5930 (*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm 5931 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset() 5932 5933 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 5934 (*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL) 5935 (*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits) 5936 (*Deflate_state)(unsafe.Pointer(s)).Fw_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)) 5937 (*Deflate_state)(unsafe.Pointer(s)).Fw_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)) 5938 5939 (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = (UInt(memLevel) + UInt(7)) 5940 (*Deflate_state)(unsafe.Pointer(s)).Fhash_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)) 5941 (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) 5942 (*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH)) - UInt(1)) / UInt(MIN_MATCH)) 5943 5944 (*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct { 5945 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5946 })(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)))))) 5947 (*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct { 5948 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5949 })(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)))) 5950 (*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct { 5951 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5952 })(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)))) 5953 5954 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64(0) // nothing written to s->window yet 5955 5956 (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = (UInt(int32(1) << (memLevel + 6))) // 16K elements by default 5957 5958 overlay = (*struct { 5959 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5960 })(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)))) 5961 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay 5962 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2))) 5963 5964 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)) { 5965 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 5966 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-4))] 5967 XdeflateEnd(tls, strm) 5968 return -4 5969 } 5970 (*Deflate_state)(unsafe.Pointer(s)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2) 5971 (*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)))) 5972 5973 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 5974 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 5975 (*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method) 5976 5977 return XdeflateReset(tls, strm) 5978 } 5979 5980 var my_version = *(*[7]int8)(unsafe.Pointer(ts /* "1.2.11" */)) /* deflate.c:253:23 */ 5981 5982 // ========================================================================= 5983 // Check for a valid deflate stream state. Return 0 if ok, 1 if not. 5984 func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */ 5985 var s uintptr 5986 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 5987 return 1 5988 } 5989 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5990 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)) { 5991 return 1 5992 } 5993 return 0 5994 } 5995 5996 // ========================================================================= 5997 func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */ 5998 var s uintptr 5999 var str UInt 6000 var n UInt 6001 var wrap int32 6002 var avail uint32 6003 var next uintptr 6004 6005 if (deflateStateCheck(tls, strm) != 0) || (dictionary == uintptr(Z_NULL)) { 6006 return -2 6007 } 6008 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6009 wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap 6010 if ((wrap == 2) || ((wrap == 1) && ((*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE))) || ((*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0) { 6011 return -2 6012 } 6013 6014 // when using zlib wrappers, compute Adler-32 for provided dictionary 6015 if wrap == 1 { 6016 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) 6017 } 6018 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf 6019 6020 // if dictionary would fill window, just replace the history 6021 if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 6022 if wrap == 0 { // already empty otherwise 6023 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6024 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))))) 6025 6026 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 6027 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 6028 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6029 } 6030 dictionary += (uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size)) // use the tail 6031 dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6032 } 6033 6034 // insert dictionary into window and hash 6035 avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6036 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 6037 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength 6038 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary 6039 fill_window(tls, s) 6040 for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 6041 str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 6042 n = ((*Deflate_state)(unsafe.Pointer(s)).Flookahead - (UInt(MIN_MATCH - 1))) 6043 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 6044 (*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) 6045 *(*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)) 6046 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 6047 str++ 6048 } 6049 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str 6050 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = (UInt(MIN_MATCH - 1)) 6051 fill_window(tls, s) 6052 } 6053 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 6054 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6055 (*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 6056 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 6057 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 6058 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 6059 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 6060 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail 6061 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 6062 return Z_OK 6063 } 6064 6065 // ========================================================================= 6066 func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */ 6067 var s uintptr 6068 var len UInt 6069 6070 if deflateStateCheck(tls, strm) != 0 { 6071 return -2 6072 } 6073 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6074 len = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) 6075 if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 6076 len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6077 } 6078 if (dictionary != uintptr(Z_NULL)) && (len != 0) { 6079 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)) 6080 } 6081 if dictLength != uintptr(Z_NULL) { 6082 *(*UInt)(unsafe.Pointer(dictLength)) = len 6083 } 6084 return Z_OK 6085 } 6086 6087 // ========================================================================= 6088 func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */ 6089 var s uintptr 6090 6091 if deflateStateCheck(tls, strm) != 0 { 6092 return -2 6093 } 6094 6095 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, uint64(0)) 6096 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically 6097 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN 6098 6099 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6100 (*Deflate_state)(unsafe.Pointer(s)).Fpending = uint64(0) 6101 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 6102 6103 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 { 6104 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH); 6105 } 6106 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 { 6107 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6108 return GZIP_STATE 6109 } 6110 return func() int32 { 6111 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 { 6112 return INIT_STATE 6113 } 6114 return BUSY_STATE 6115 }() 6116 }() 6117 (*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint64 { 6118 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6119 return Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6120 } 6121 return Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6122 }() 6123 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH 6124 6125 X_tr_init(tls, s) 6126 6127 return Z_OK 6128 } 6129 6130 // ========================================================================= 6131 func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */ 6132 var ret int32 6133 6134 ret = XdeflateResetKeep(tls, strm) 6135 if ret == Z_OK { 6136 lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 6137 } 6138 return ret 6139 } 6140 6141 // ========================================================================= 6142 func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */ 6143 if (deflateStateCheck(tls, strm) != 0) || ((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2) { 6144 return -2 6145 } 6146 (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head 6147 return Z_OK 6148 } 6149 6150 // ========================================================================= 6151 func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */ 6152 if deflateStateCheck(tls, strm) != 0 { 6153 return -2 6154 } 6155 if pending != uintptr(Z_NULL) { 6156 *(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) 6157 } 6158 if bits != uintptr(Z_NULL) { 6159 *(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid 6160 } 6161 return Z_OK 6162 } 6163 6164 // ========================================================================= 6165 func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */ 6166 var s uintptr 6167 var put int32 6168 6169 if deflateStateCheck(tls, strm) != 0 { 6170 return -2 6171 } 6172 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6173 if ((*Deflate_state)(unsafe.Pointer(s)).Fd_buf) < ((*Deflate_state)(unsafe.Pointer(s)).Fpending_out + uintptr((int32((Buf_size + 7)) >> 3))) { 6174 return -5 6175 } 6176 for ok := true; ok; ok = bits != 0 { 6177 put = (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 6178 if put > bits { 6179 put = bits 6180 } 6181 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((value & ((int32(1) << put) - 1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))))) 6182 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (put) 6183 X_tr_flush_bits(tls, s) 6184 value >>= put 6185 bits = bits - (put) 6186 } 6187 return Z_OK 6188 } 6189 6190 // ========================================================================= 6191 func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */ 6192 var s uintptr 6193 var func1 Compress_func 6194 6195 if deflateStateCheck(tls, strm) != 0 { 6196 return -2 6197 } 6198 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6199 6200 if level == (-1) { 6201 level = 6 6202 } 6203 if (((level < 0) || (level > 9)) || (strategy < 0)) || (strategy > Z_FIXED) { 6204 return -2 6205 } 6206 func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc 6207 6208 if ((strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy) || (func1 != configuration_table[level].Ffunc)) && ((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0) { 6209 // Flush the last buffer: 6210 var err int32 = Xdeflate(tls, strm, Z_BLOCK) 6211 if err == (-2) { 6212 return err 6213 } 6214 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6215 return -5 6216 } 6217 } 6218 if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level { 6219 if ((*Deflate_state)(unsafe.Pointer(s)).Flevel == 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0)) { 6220 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) { 6221 slide_hash(tls, s) 6222 } else { 6223 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6224 } 6225 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))))) 6226 6227 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0) 6228 } 6229 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 6230 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy) 6231 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length) 6232 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length) 6233 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain) 6234 } 6235 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 6236 return Z_OK 6237 } 6238 6239 // ========================================================================= 6240 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: */ 6241 var s uintptr 6242 6243 if deflateStateCheck(tls, strm) != 0 { 6244 return -2 6245 } 6246 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6247 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length) 6248 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy) 6249 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length 6250 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain) 6251 return Z_OK 6252 } 6253 6254 // ========================================================================= 6255 // For the default windowBits of 15 and memLevel of 8, this function returns 6256 // a close to exact, as well as small, upper bound on the compressed size. 6257 // They are coded as constants here for a reason--if the #define's are 6258 // changed, then this function needs to be changed as well. The return 6259 // value for 15 and 8 only works for those exact settings. 6260 // 6261 // For any setting other than those defaults for windowBits and memLevel, 6262 // the value returned is a conservative worst case for the maximum expansion 6263 // resulting from using fixed blocks instead of stored blocks, which deflate 6264 // can emit on compressed data for some combinations of the parameters. 6265 // 6266 // This function could be more sophisticated to provide closer upper bounds for 6267 // every combination of windowBits and memLevel. But even the conservative 6268 // upper bound of about 14% expansion does not seem onerous for output buffer 6269 // allocation. 6270 func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */ 6271 var s uintptr 6272 var complen ULong 6273 var wraplen ULong 6274 6275 // conservative upper bound for compressed data 6276 complen = (((sourceLen + ((sourceLen + uint64(7)) >> 3)) + ((sourceLen + uint64(63)) >> 6)) + uint64(5)) 6277 6278 // if can't get parameters, return conservative bound plus zlib wrapper 6279 if deflateStateCheck(tls, strm) != 0 { 6280 return (complen + uint64(6)) 6281 } 6282 6283 // compute wrapper length 6284 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6285 switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap { 6286 case 0: // raw deflate 6287 wraplen = uint64(0) 6288 break 6289 case 1: // zlib wrapper 6290 wraplen = (ULong(6 + (func() int32 { 6291 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { 6292 return 4 6293 } 6294 return 0 6295 }()))) 6296 break 6297 case 2: // gzip wrapper 6298 wraplen = uint64(18) 6299 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header 6300 var str uintptr 6301 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6302 wraplen = wraplen + (ULong(UInt(2) + (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)) 6303 } 6304 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname 6305 if str != uintptr(Z_NULL) { 6306 for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 6307 wraplen++ 6308 } 6309 } 6310 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment 6311 if str != uintptr(Z_NULL) { 6312 for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 6313 wraplen++ 6314 } 6315 } 6316 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6317 wraplen = wraplen + (uint64(2)) 6318 } 6319 } 6320 break 6321 default: // for compiler happiness 6322 wraplen = uint64(6) 6323 } 6324 6325 // if not default parameters, return conservative bound 6326 if ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15)) || ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != (UInt(8 + 7))) { 6327 return (complen + wraplen) 6328 } 6329 6330 // default settings: return tight bound for that case 6331 return ((((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) - uint64(6)) + wraplen) 6332 } 6333 6334 // ========================================================================= 6335 // Put a short in the pending buffer. The 16-bit value is put in MSB order. 6336 // IN assertion: the stream state is correct and there is enough room in 6337 // pending_buf. 6338 func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */ 6339 { 6340 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b >> 8)) 6341 } 6342 6343 { 6344 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b & UInt(0xff))) 6345 } 6346 6347 } 6348 6349 // ========================================================================= 6350 // Flush as much pending output as possible. All deflate() output, except for 6351 // some deflate_stored() output, goes through this function so some 6352 // applications may wish to modify it to avoid allocating a large 6353 // strm->next_out buffer and copying into it. (See also read_buf()). 6354 func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */ 6355 var len uint32 6356 var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6357 6358 X_tr_flush_bits(tls, s) 6359 len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending) 6360 if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out { 6361 len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 6362 } 6363 if len == uint32(0) { 6364 return 6365 } 6366 6367 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len)) 6368 *(*uintptr)(unsafe.Pointer(strm + 24 /* &.next_out */)) += (uintptr(len)) 6369 *(*uintptr)(unsafe.Pointer(s + 32 /* &.pending_out */)) += (uintptr(len)) 6370 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(len)) 6371 *(*UInt)(unsafe.Pointer(strm + 32 /* &.avail_out */)) -= (len) 6372 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) -= (Ulg(len)) 6373 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == uint64(0) { 6374 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 6375 } 6376 } 6377 6378 // =========================================================================== 6379 // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. 6380 6381 // ========================================================================= 6382 func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */ 6383 var old_flush int32 // value of flush param for previous deflate call 6384 var s uintptr 6385 6386 if ((deflateStateCheck(tls, strm) != 0) || (flush > Z_BLOCK)) || (flush < 0) { 6387 return -2 6388 } 6389 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6390 6391 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)) { 6392 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-2))]; return -2 }() 6393 } 6394 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6395 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6396 } 6397 6398 old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush 6399 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush 6400 6401 // Flush as much pending output as possible 6402 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6403 flush_pending(tls, strm) 6404 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6405 // Since avail_out is 0, deflate will be called again with 6406 // more output space, but possibly with both pending and 6407 // avail_in equal to zero. There won't be anything to do, 6408 // but this is not an error situation so make sure we 6409 // return OK instead of BUF_ERROR at next call of deflate: 6410 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6411 return Z_OK 6412 } 6413 6414 // Make sure there is something to do and avoid duplicate consecutive 6415 // flushes. For repeated and useless calls with Z_FINISH, we keep 6416 // returning Z_STREAM_END instead of Z_BUF_ERROR. 6417 } else if (((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((((flush) * 2) - (func() int32 { 6418 if (flush) > 4 { 6419 return 9 6420 } 6421 return 0 6422 }())) <= (((old_flush) * 2) - (func() int32 { 6423 if (old_flush) > 4 { 6424 return 9 6425 } 6426 return 0 6427 }())))) && (flush != Z_FINISH) { 6428 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6429 } 6430 6431 // User must not provide more input after the first FINISH: 6432 if ((*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE) && ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) { 6433 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6434 } 6435 6436 // Write the header 6437 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE { 6438 // zlib header 6439 var header UInt = ((UInt(Z_DEFLATED) + (((*Deflate_state)(unsafe.Pointer(s)).Fw_bits - UInt(8)) << 4)) << 8) 6440 var level_flags UInt 6441 6442 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6443 level_flags = UInt(0) 6444 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 { 6445 level_flags = UInt(1) 6446 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 { 6447 level_flags = UInt(2) 6448 } else { 6449 level_flags = UInt(3) 6450 } 6451 header = header | (level_flags << 6) 6452 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 6453 header = header | (UInt(PRESET_DICT)) 6454 } 6455 header = header + (UInt(31) - (header % UInt(31))) 6456 6457 putShortMSB(tls, s, header) 6458 6459 // Save the adler32 of the preset dictionary: 6460 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 6461 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 6462 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff)))) 6463 } 6464 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6465 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6466 6467 // Compression must start with an empty pending buffer 6468 flush_pending(tls, strm) 6469 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6470 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6471 return Z_OK 6472 } 6473 } 6474 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE { 6475 // gzip header 6476 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6477 { 6478 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31) 6479 } 6480 6481 { 6482 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139) 6483 } 6484 6485 { 6486 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8) 6487 } 6488 6489 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) { 6490 { 6491 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6492 } 6493 6494 { 6495 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6496 } 6497 6498 { 6499 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6500 } 6501 6502 { 6503 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6504 } 6505 6506 { 6507 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6508 } 6509 6510 { 6511 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 6512 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 6513 return uint8(2) 6514 } 6515 return func() uint8 { 6516 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6517 return uint8(4) 6518 } 6519 return uint8(0) 6520 }() 6521 }() 6522 } 6523 6524 { 6525 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE) 6526 } 6527 6528 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6529 6530 // Compression must start with an empty pending buffer 6531 flush_pending(tls, strm) 6532 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6533 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6534 return Z_OK 6535 } 6536 } else { 6537 { 6538 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((((func() int32 { 6539 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { 6540 return 1 6541 } 6542 return 0 6543 }()) + (func() int32 { 6544 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6545 return 2 6546 } 6547 return 0 6548 }())) + (func() int32 { 6549 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) { 6550 return 0 6551 } 6552 return 4 6553 }())) + (func() int32 { 6554 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) { 6555 return 0 6556 } 6557 return 8 6558 }())) + (func() int32 { 6559 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) { 6560 return 0 6561 } 6562 return 16 6563 }()))) 6564 } 6565 6566 { 6567 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & uint64(0xff))) 6568 } 6569 6570 { 6571 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8) & uint64(0xff))) 6572 } 6573 6574 { 6575 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16) & uint64(0xff))) 6576 } 6577 6578 { 6579 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24) & uint64(0xff))) 6580 } 6581 6582 { 6583 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 6584 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 6585 return uint8(2) 6586 } 6587 return func() uint8 { 6588 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6589 return uint8(4) 6590 } 6591 return uint8(0) 6592 }() 6593 }() 6594 } 6595 6596 { 6597 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff)) 6598 } 6599 6600 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6601 { 6602 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff))) 6603 } 6604 6605 { 6606 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8) & UInt(0xff))) 6607 } 6608 6609 } 6610 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6611 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf, 6612 uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)) 6613 } 6614 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 6615 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE 6616 } 6617 } 6618 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE { 6619 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6620 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6621 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)) 6622 for ((*Deflate_state)(unsafe.Pointer(s)).Fpending + Ulg(left)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6623 var copy UInt = (UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)) 6624 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 6625 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(copy)) 6626 (*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size 6627 for ok := true; ok; ok = 0 != 0 { 6628 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6629 (*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)))) 6630 } 6631 } 6632 *(*Ulg)(unsafe.Pointer(s + 64 /* &.gzindex */)) += (Ulg(copy)) 6633 flush_pending(tls, strm) 6634 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6635 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6636 return Z_OK 6637 } 6638 beg = uint64(0) 6639 left = left - (copy) 6640 } 6641 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 6642 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(left)) 6643 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (Ulg(left)) 6644 for ok1 := true; ok1; ok1 = 0 != 0 { 6645 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6646 (*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)))) 6647 } 6648 } 6649 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 6650 } 6651 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE 6652 } 6653 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE { 6654 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) { 6655 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6656 var val int32 6657 for ok2 := true; ok2; ok2 = (val != 0) { 6658 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6659 for ok3 := true; ok3; ok3 = 0 != 0 { 6660 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6661 (*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)))) 6662 } 6663 } 6664 flush_pending(tls, strm) 6665 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6666 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6667 return Z_OK 6668 } 6669 beg = uint64(0) 6670 } 6671 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 6672 { 6673 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 6674 } 6675 6676 } 6677 for ok4 := true; ok4; ok4 = 0 != 0 { 6678 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6679 (*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)))) 6680 } 6681 } 6682 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 6683 } 6684 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE 6685 } 6686 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE { 6687 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) { 6688 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6689 var val int32 6690 for ok5 := true; ok5; ok5 = (val != 0) { 6691 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6692 for ok6 := true; ok6; ok6 = 0 != 0 { 6693 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6694 (*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)))) 6695 } 6696 } 6697 flush_pending(tls, strm) 6698 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6699 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6700 return Z_OK 6701 } 6702 beg = uint64(0) 6703 } 6704 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 6705 { 6706 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 6707 } 6708 6709 } 6710 for ok7 := true; ok7; ok7 = 0 != 0 { 6711 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6712 (*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)))) 6713 } 6714 } 6715 } 6716 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE 6717 } 6718 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE { 6719 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6720 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending + uint64(2)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6721 flush_pending(tls, strm) 6722 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6723 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6724 return Z_OK 6725 } 6726 } 6727 { 6728 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xff))) 6729 } 6730 6731 { 6732 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & uint64(0xff))) 6733 } 6734 6735 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6736 } 6737 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6738 6739 // Compression must start with an empty pending buffer 6740 flush_pending(tls, strm) 6741 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6742 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6743 return Z_OK 6744 } 6745 } 6746 6747 // Start a new block or continue the current one. 6748 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)) { 6749 var bstate Block_state 6750 6751 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 { 6752 bstate = deflate_stored(tls, s, flush) 6753 } else { 6754 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY { 6755 bstate = deflate_huff(tls, s, flush) 6756 } else { 6757 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE { 6758 bstate = deflate_rle(tls, s, flush) 6759 } else { 6760 bstate = (*struct { 6761 f func(*libc.TLS, uintptr, int32) Block_state 6762 })(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush) 6763 } 6764 } 6765 } 6766 6767 if (bstate == Finish_started) || (bstate == Finish_done) { 6768 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 6769 } 6770 if (bstate == Need_more) || (bstate == Finish_started) { 6771 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6772 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above 6773 } 6774 return Z_OK 6775 // If flush != Z_NO_FLUSH && avail_out == 0, the next call 6776 // of deflate should use the same flush parameter to make sure 6777 // that the flush is complete. So we don't have to output an 6778 // empty block here, this will be done at next call. This also 6779 // ensures that for a very small output buffer, we emit at most 6780 // one empty block. 6781 } 6782 if bstate == Block_done { 6783 if flush == Z_PARTIAL_FLUSH { 6784 X_tr_align(tls, s) 6785 } else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH 6786 X_tr_stored_block(tls, s, uintptr(0), uint64(0), 0) 6787 // For a full flush, this empty block will be recognized 6788 // as a special marker by inflate_sync(). 6789 if flush == Z_FULL_FLUSH { 6790 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6791 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))))) 6792 // forget history 6793 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6794 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 6795 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 6796 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6797 } 6798 } 6799 } 6800 flush_pending(tls, strm) 6801 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6802 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above 6803 return Z_OK 6804 } 6805 } 6806 } 6807 6808 if flush != Z_FINISH { 6809 return Z_OK 6810 } 6811 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { 6812 return Z_STREAM_END 6813 } 6814 6815 // Write the trailer 6816 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6817 { 6818 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xff))) 6819 } 6820 6821 { 6822 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & uint64(0xff))) 6823 } 6824 6825 { 6826 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16) & uint64(0xff))) 6827 } 6828 6829 { 6830 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24) & uint64(0xff))) 6831 } 6832 6833 { 6834 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & uint64(0xff))) 6835 } 6836 6837 { 6838 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8) & uint64(0xff))) 6839 } 6840 6841 { 6842 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16) & uint64(0xff))) 6843 } 6844 6845 { 6846 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24) & uint64(0xff))) 6847 } 6848 6849 } else { 6850 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 6851 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff)))) 6852 } 6853 flush_pending(tls, strm) 6854 // If avail_out is zero, the application will call deflate again 6855 // to flush the rest. 6856 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 { 6857 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap 6858 } // write the trailer only once! 6859 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6860 return Z_OK 6861 } 6862 return Z_STREAM_END 6863 } 6864 6865 // ========================================================================= 6866 func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */ 6867 var status int32 6868 6869 if deflateStateCheck(tls, strm) != 0 { 6870 return -2 6871 } 6872 6873 status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus 6874 6875 /* Deallocate in reverse order of allocations: */ 6876 { 6877 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { 6878 (*struct { 6879 f func(*libc.TLS, Voidpf, Voidpf) 6880 })(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) 6881 } 6882 } 6883 6884 { 6885 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { 6886 (*struct { 6887 f func(*libc.TLS, Voidpf, Voidpf) 6888 })(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) 6889 } 6890 } 6891 6892 { 6893 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { 6894 (*struct { 6895 f func(*libc.TLS, Voidpf, Voidpf) 6896 })(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) 6897 } 6898 } 6899 6900 { 6901 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { 6902 (*struct { 6903 f func(*libc.TLS, Voidpf, Voidpf) 6904 })(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) 6905 } 6906 } 6907 6908 (*struct { 6909 f func(*libc.TLS, Voidpf, Voidpf) 6910 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 6911 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 6912 6913 if status == BUSY_STATE { 6914 return -3 6915 } 6916 return Z_OK 6917 } 6918 6919 // ========================================================================= 6920 // Copy the source state to the destination state. 6921 // To simplify the source, this is not supported for 16-bit MSDOS (which 6922 // doesn't have enough memory anyway to duplicate compression states). 6923 func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */ 6924 var ds uintptr 6925 var ss uintptr 6926 var overlay uintptr 6927 6928 if (deflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 6929 return -2 6930 } 6931 6932 ss = (*Z_stream)(unsafe.Pointer(source)).Fstate 6933 6934 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 6935 6936 ds = (*struct { 6937 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6938 })(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{}))) 6939 if ds == uintptr(Z_NULL) { 6940 return -4 6941 } 6942 (*Z_stream)(unsafe.Pointer(dest)).Fstate = ds 6943 libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{}))) 6944 (*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest 6945 6946 (*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct { 6947 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6948 })(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)))))) 6949 (*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct { 6950 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6951 })(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)))) 6952 (*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct { 6953 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6954 })(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)))) 6955 overlay = (*struct { 6956 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6957 })(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)))) 6958 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay 6959 6960 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)) { 6961 XdeflateEnd(tls, dest) 6962 return -4 6963 } 6964 // following zmemcpy do not work for 16-bit MSDOS 6965 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))))) 6966 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))))) 6967 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))))) 6968 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))) 6969 6970 (*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))) 6971 (*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2) 6972 (*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)))) 6973 6974 (*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 212 /* &.dyn_ltree */ 6975 (*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2504 /* &.dyn_dtree */ 6976 (*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2748 /* &.bl_tree */ 6977 6978 return Z_OK 6979 } 6980 6981 // =========================================================================== 6982 // Read a new buffer from the current input stream, update the adler32 6983 // and total number of bytes read. All deflate() input goes through 6984 // this function so some applications may wish to modify it to avoid 6985 // allocating a large strm->next_in buffer and copying from it. 6986 // (See also flush_pending()). 6987 func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */ 6988 var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6989 6990 if len > size { 6991 len = size 6992 } 6993 if len == uint32(0) { 6994 return uint32(0) 6995 } 6996 6997 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len) 6998 6999 libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len)) 7000 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 { 7001 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 7002 } else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 { 7003 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 7004 } 7005 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 7006 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len)) 7007 7008 return len 7009 } 7010 7011 // =========================================================================== 7012 // Initialize the "longest match" routines for a new zlib stream 7013 func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */ 7014 (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = (uint64(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 7015 7016 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 7017 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))))) 7018 7019 // Set the default configuration parameters: 7020 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) 7021 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) 7022 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) 7023 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) 7024 7025 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 7026 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 7027 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 7028 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 7029 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 7030 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7031 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0) 7032 } 7033 7034 // =========================================================================== 7035 // Set match_start to the longest match starting at the given string and 7036 // return its length. Matches shorter or equal to prev_length are discarded, 7037 // in which case the result is equal to prev_length and match_start is 7038 // garbage. 7039 // IN assertions: cur_match is the head of the hash chain for the current 7040 // string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 7041 // OUT assertion: the match length is not greater than s->lookahead. 7042 // For 80x86 and 680x0, an optimized version will be provided in match.asm or 7043 // match.S. The code will be functionally equivalent. 7044 func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */ 7045 var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length // max hash chain length 7046 var scan uintptr = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) // current string 7047 var match uintptr // matched string 7048 var len int32 // length of current match 7049 var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length) // best match length so far 7050 var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match // stop if match long enough 7051 var limit IPos 7052 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1))) { 7053 limit = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) 7054 } else { 7055 limit = uint32(NIL) 7056 } 7057 // Stop when cur_match becomes <= limit. To simplify the code, 7058 // we prevent matches with the string of window index 0. 7059 var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev 7060 var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask 7061 7062 var strend uintptr = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 7063 var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 7064 var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 7065 7066 // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 7067 // It is easy to get rid of this optimization if necessary. 7068 7069 // Do not waste too much time if we already have a good match: 7070 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match { 7071 chain_length >>= 2 7072 } 7073 // Do not look for matches beyond the end of the input. This is necessary 7074 // to make deflate deterministic. 7075 if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7076 nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 7077 } 7078 7079 for ok := true; ok; ok = (((libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr((cur_match&wmask))*2))))) > limit) && 7080 (libc.PreDecUint32(&chain_length, 1) != uint32(0))) { 7081 7082 match = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match)) 7083 7084 // Skip to next match if the match length cannot increase 7085 // or if the match length is less than 2. Note that the checks below 7086 // for insufficient lookahead only occur occasionally for performance 7087 // reasons. Therefore uninitialized memory will be accessed, and 7088 // conditional jumps will be made that depend on those values. 7089 // However the length of the match is limited to the lookahead, so 7090 // the output of deflate is not affected by the uninitialized values. 7091 7092 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)))) { 7093 continue 7094 } 7095 7096 // The check at best_len-1 can be removed because it will be made 7097 // again later. (This heuristic is not always a win.) 7098 // It is not necessary to compare scan[2] and match[2] since they 7099 // are always equal when the other bytes match, given that 7100 // the hash keys are equal and that HASH_BITS >= 8. 7101 scan += uintptr(2) 7102 match++ 7103 7104 // We check for insufficient lookahead only every 8th comparison; 7105 // the 256th check will be made at strstart+258. 7106 for ok1 := true; ok1; ok1 = (((((((((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)) { 7107 } 7108 7109 len = (MAX_MATCH - (int32((int64(strend) - int64(scan)) / 1))) 7110 scan = (strend - uintptr(MAX_MATCH)) 7111 7112 if len > best_len { 7113 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match 7114 best_len = len 7115 if len >= nice_match { 7116 break 7117 } 7118 scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 7119 scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 7120 } 7121 } 7122 7123 if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7124 return UInt(best_len) 7125 } 7126 return (*Deflate_state)(unsafe.Pointer(s)).Flookahead 7127 } 7128 7129 // =========================================================================== 7130 // Fill the window when the lookahead becomes insufficient. 7131 // Updates strstart and lookahead. 7132 // 7133 // IN assertion: lookahead < MIN_LOOKAHEAD 7134 // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD 7135 // At least one byte has been read, or avail_in == 0; reads are 7136 // performed for at least two bytes (required for the zip translate_eol 7137 // option -- not supported here). 7138 func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */ 7139 var n uint32 7140 var more uint32 // Amount of free space at the end of the window. 7141 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7142 7143 for ok := true; ok; ok = (((*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))) { 7144 more = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7145 7146 // Deal with !@#$% 64K limit: 7147 if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) { 7148 if ((more == uint32(0)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0))) && ((*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0)) { 7149 more = wsize 7150 7151 } else if more == libc.Uint32(libc.Uint32FromInt32(-1)) { 7152 // Very unlikely, but possible on 16 bit machine if 7153 // strstart == 0 && lookahead == 1 (input done a byte at time) 7154 more-- 7155 } 7156 } 7157 7158 // If the window is almost full and there is insufficient lookahead, 7159 // move the upper half to the lower one to make room in the upper half. 7160 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= (wsize + ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) { 7161 7162 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(wsize)), (uint64(wsize - more))) 7163 *(*UInt)(unsafe.Pointer(s + 176 /* &.match_start */)) -= (wsize) 7164 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= (wsize) // we now have strstart >= MAX_DIST 7165 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64(wsize)) 7166 slide_hash(tls, s) 7167 more = more + (wsize) 7168 } 7169 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) { 7170 break 7171 } 7172 7173 // If there was no sliding: 7174 // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && 7175 // more == window_size - lookahead - strstart 7176 // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) 7177 // => more >= window_size - 2*WSIZE + 2 7178 // In the BIG_MEM or MMAP case (not yet supported), 7179 // window_size == input_size + MIN_LOOKAHEAD && 7180 // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. 7181 // Otherwise, window_size == 2*WSIZE so more >= 2. 7182 // If there was sliding, more >= WSIZE. So in all cases, more >= 2. 7183 7184 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) 7185 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) += (n) 7186 7187 // Initialize the hash value now that we have some input: 7188 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) >= UInt(MIN_MATCH) { 7189 var str UInt = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 7190 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) 7191 (*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) 7192 for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 { 7193 (*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) 7194 *(*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)) 7195 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 7196 str++ 7197 (*Deflate_state)(unsafe.Pointer(s)).Finsert-- 7198 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) < UInt(MIN_MATCH) { 7199 break 7200 } 7201 } 7202 } 7203 // If the whole input has less than MIN_MATCH bytes, ins_h is garbage, 7204 // but this is not important since only literal bytes will be emitted. 7205 7206 } 7207 7208 // If the WIN_INIT bytes after the end of the current data have never been 7209 // written, then zero those bytes in order to avoid memory check reports of 7210 // the use of uninitialized (or uninitialised as Julian writes) bytes by 7211 // the longest match routines. Update the high water mark for the next 7212 // time through here. WIN_INIT is set to MAX_MATCH since the longest match 7213 // routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. 7214 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size { 7215 var curr Ulg = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead))) 7216 var init1 Ulg 7217 7218 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { 7219 // Previous high water mark below current data -- zero WIN_INIT 7220 // bytes or up to end of window, whichever is less. 7221 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr) 7222 if init1 > uint64(MAX_MATCH) { 7223 init1 = uint64(MAX_MATCH) 7224 } 7225 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(curr)), 0, uint64(uint32(init1))) 7226 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = (curr + init1) 7227 } else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (curr + uint64(MAX_MATCH)) { 7228 // High water mark at or above current data, but below current data 7229 // plus WIN_INIT -- zero out to current data plus WIN_INIT, or up 7230 // to end of window, whichever is less. 7231 init1 = ((curr + uint64(MAX_MATCH)) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 7232 if init1 > ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) { 7233 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 7234 } 7235 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)), 0, uint64(uint32(init1))) 7236 *(*Ulg)(unsafe.Pointer(s + 5944 /* &.high_water */)) += (init1) 7237 } 7238 } 7239 7240 } 7241 7242 // =========================================================================== 7243 // Flush the current block, with given end-of-file flag. 7244 // IN assertion: strstart is set to the end of the current match. 7245 7246 // Same but force premature exit if necessary. 7247 7248 // Maximum stored block length in deflate format (not including header). 7249 7250 // Minimum of a and b. 7251 7252 // =========================================================================== 7253 // Copy without compression as much as possible from the input stream, return 7254 // the current block state. 7255 // 7256 // In case deflateParams() is used to later switch to a non-zero compression 7257 // level, s->matches (otherwise unused when storing) keeps track of the number 7258 // of hash table slides to perform. If s->matches is 1, then one hash table 7259 // slide will be done when switching. If s->matches is 2, the maximum value 7260 // allowed here, then the hash table will be cleared, since two or more slides 7261 // is the same as a clear. 7262 // 7263 // deflate_stored() is written to minimize the number of times an input byte is 7264 // copied. It is most efficient with large input and output buffers, which 7265 // maximizes the opportunites to have a single copy from next_in to next_out. 7266 func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */ 7267 // Smallest worthy block size when not flushing or finishing. By default 7268 // this is 32K. This can be as small as 507 bytes for memLevel == 1. For 7269 // large input and output buffers, the stored block size will be larger. 7270 var min_block uint32 = func() uint32 { 7271 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5)) > (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 7272 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7273 } 7274 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5))) 7275 }() 7276 7277 // Copy as many min_block or larger stored blocks directly to next_out as 7278 // possible. If flushing, copy the remaining available input to next_out as 7279 // stored blocks, if there is enough space. 7280 var len uint32 7281 var left uint32 7282 var have uint32 7283 var last uint32 = uint32(0) 7284 var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 7285 for ok := true; ok; ok = (last == uint32(0)) { 7286 // Set len to the maximum size block that we can copy directly with the 7287 // available input data and output space. Set left to how much of that 7288 // would be copied from what's left in the window. 7289 len = uint32(MAX_STORED) // maximum deflate stored block length 7290 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 7291 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header 7292 break 7293 } 7294 // maximum stored block length that will fit in avail_out: 7295 have = ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have) 7296 left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window 7297 if Ulg(len) > (Ulg(left) + Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 7298 len = (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) 7299 } // limit len to the input 7300 if len > have { 7301 len = have 7302 } // limit len to the output 7303 7304 // If the stored block would be less than min_block in length, or if 7305 // unable to copy all of the available input when flushing, then try 7306 // copying to the window and the pending buffer instead. Also don't 7307 // write an empty block when flushing -- deflate() does that. 7308 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))) { 7309 break 7310 } 7311 7312 // Make a dummy stored block in pending to get the header bytes, 7313 // including any pending bits. This also updates the debugging counts. 7314 if (flush == Z_FINISH) && (len == (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 7315 last = uint32(1) 7316 } else { 7317 last = uint32(0) 7318 } 7319 X_tr_stored_block(tls, s, uintptr(0), uint64(0), int32(last)) 7320 7321 // Replace the lengths in the dummy stored block with len. 7322 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(4))))) = Bytef(len) 7323 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(3))))) = (Bytef(len >> 8)) 7324 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(2))))) = Bytef(^len) 7325 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(1))))) = (Bytef(^len >> 8)) 7326 7327 // Write the stored block header bytes. 7328 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7329 7330 // Copy uncompressed bytes from the window to next_out. 7331 if left != 0 { 7332 if left > len { 7333 left = len 7334 } 7335 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)) 7336 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(left)) 7337 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (left) 7338 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(left)) 7339 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(left)) 7340 len = len - (left) 7341 } 7342 7343 // Copy uncompressed bytes directly from next_in to next_out, updating 7344 // the check value. 7345 if len != 0 { 7346 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len) 7347 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(len)) 7348 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (len) 7349 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(len)) 7350 } 7351 } 7352 7353 // Update the sliding window with the last s->w_size bytes of the copied 7354 // data, or append all of the copied data to the existing window if less 7355 // than s->w_size bytes were copied. Also update the number of bytes to 7356 // insert in the hash tables, in the event that deflateParams() switches to 7357 // a non-zero compression level. 7358 used = used - ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) // number of input bytes directly copied 7359 if used != 0 { 7360 // If any input was used, then no unused input remains in the window, 7361 // therefore s->block_start == s->strstart. 7362 if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history 7363 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash 7364 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)) 7365 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7366 } else { 7367 if ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) <= Ulg(used) { 7368 // Slide the window down. 7369 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7370 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)) 7371 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 7372 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 7373 } // add a pending slide_hash() 7374 } 7375 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)) 7376 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (used) 7377 } 7378 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7379 *(*UInt)(unsafe.Pointer(s + 5932 /* &.insert */)) += (func() uint32 { 7380 if (used) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) { 7381 return ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 7382 } 7383 return used 7384 }()) 7385 } 7386 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 7387 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7388 } 7389 7390 // If the last block was written to next_out, then done. 7391 if last != 0 { 7392 return Finish_done 7393 } 7394 7395 // If flushing and all input has been consumed, then done. 7396 if (((flush != Z_NO_FLUSH) && (flush != Z_FINISH)) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start) { 7397 return Block_done 7398 } 7399 7400 // Fill the window with any remaining input. 7401 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uint64(1))) 7402 if ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have) && ((*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 7403 // Slide the window down. 7404 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 7405 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7406 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)) 7407 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 7408 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 7409 } // add a pending slide_hash() 7410 have = have + ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) // more space now 7411 } 7412 if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 7413 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 7414 } 7415 if have != 0 { 7416 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), have) 7417 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (have) 7418 } 7419 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 7420 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7421 } 7422 7423 // There was not enough avail_out to write a complete worthy or flushed 7424 // stored block to next_out. Write a stored block to pending instead, if we 7425 // have enough input for a worthy block, or if flushing and there is enough 7426 // room for the remaining input as a stored block in the pending buffer. 7427 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 7428 // maximum stored block length that will fit in pending: 7429 have = func() uint32 { 7430 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) > (uint64(MAX_STORED)) { 7431 return uint32(MAX_STORED) 7432 } 7433 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))) 7434 }() 7435 min_block = func() uint32 { 7436 if (have) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 7437 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7438 } 7439 return have 7440 }() 7441 left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 7442 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)) { 7443 len = func() uint32 { 7444 if (left) > (have) { 7445 return have 7446 } 7447 return left 7448 }() 7449 if ((flush == Z_FINISH) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (len == left) { 7450 last = uint32(1) 7451 } else { 7452 last = uint32(0) 7453 } 7454 X_tr_stored_block(tls, s, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint64(len), int32(last)) 7455 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(len)) 7456 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7457 } 7458 7459 // We've done all we can with the available input and output. 7460 if last != 0 { 7461 return Finish_started 7462 } 7463 return Need_more 7464 } 7465 7466 // =========================================================================== 7467 // Compress as much as possible from the input stream, return the current 7468 // block state. 7469 // This function does not perform lazy evaluation of matches and inserts 7470 // new strings in the dictionary only for unmatched strings or for short 7471 // matches. It is used only for the fast compression options. 7472 func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */ 7473 var hash_head IPos // head of the hash chain 7474 var bflush int32 // set if current block must be flushed 7475 7476 for { 7477 // Make sure that we always have enough lookahead, except 7478 // at the end of the input file. We need MAX_MATCH bytes 7479 // for the next match, plus MIN_MATCH bytes to insert the 7480 // string following the next match. 7481 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 7482 fill_window(tls, s) 7483 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 7484 return Need_more 7485 } 7486 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7487 break 7488 } // flush the current block 7489 } 7490 7491 // Insert the string window[strstart .. strstart+2] in the 7492 // dictionary, and set hash_head to the head of the hash chain: 7493 hash_head = IPos(NIL) 7494 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 7495 (*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) 7496 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)))) 7497 *(*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) 7498 } 7499 7500 // Find the longest match, discarding those <= prev_length. 7501 // At this point we have always match_length < MIN_MATCH 7502 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)))) { 7503 // To simplify the code, we prevent matches with the string 7504 // of window index 0 (in particular we have to avoid a match 7505 // of the string with itself at the start of the input file). 7506 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 7507 // longest_match() sets match_start 7508 } 7509 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 7510 7511 { 7512 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 7513 var dist Ush = (Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)) 7514 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7515 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7516 dist-- 7517 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7518 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 7519 if (int32(dist)) < 256 { 7520 return int32(X_dist_code[dist]) 7521 } 7522 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7523 }()))*4 /* &.fc */))++ 7524 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7525 } 7526 7527 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7528 7529 // Insert new strings in the hash table only if the match length 7530 // is not too large. This saves time but degrades compression. 7531 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)) { 7532 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table 7533 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0)) { 7534 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7535 (*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) 7536 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)))) 7537 *(*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) 7538 // strstart never exceeds WSIZE-MAX_MATCH, so there are 7539 // always MIN_MATCH bytes ahead. 7540 } 7541 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7542 } else { 7543 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7544 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7545 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))) 7546 (*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) 7547 // If lookahead < MIN_MATCH, ins_h is garbage, but it does not 7548 // matter since it will be recomputed at next deflate call. 7549 } 7550 } else { 7551 // No match, output a literal byte 7552 7553 { 7554 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7555 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7556 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7557 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7558 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7559 } 7560 7561 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7562 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7563 } 7564 if bflush != 0 { 7565 { 7566 X_tr_flush_block(tls, s, func() uintptr { 7567 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7568 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7569 } 7570 return uintptr(Z_NULL) 7571 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7572 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7573 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7574 } 7575 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7576 if 0 != 0 { 7577 return Finish_started 7578 } 7579 return Need_more 7580 } 7581 } 7582 7583 } 7584 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 7585 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 7586 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 7587 } 7588 return (uint32(MIN_MATCH - 1)) 7589 }() 7590 if flush == Z_FINISH { 7591 { 7592 { 7593 X_tr_flush_block(tls, s, func() uintptr { 7594 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7595 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7596 } 7597 return uintptr(Z_NULL) 7598 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7599 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7600 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7601 } 7602 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7603 if 1 != 0 { 7604 return Finish_started 7605 } 7606 return Need_more 7607 } 7608 } 7609 7610 return Finish_done 7611 } 7612 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7613 { 7614 X_tr_flush_block(tls, s, func() uintptr { 7615 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7616 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7617 } 7618 return uintptr(Z_NULL) 7619 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7620 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7621 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7622 } 7623 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7624 if 0 != 0 { 7625 return Finish_started 7626 } 7627 return Need_more 7628 } 7629 } 7630 7631 return Block_done 7632 } 7633 7634 // =========================================================================== 7635 // Same as above, but achieves better compression. We use a lazy 7636 // evaluation for matches: a match is finally adopted only if there is 7637 // no better match at the next window position. 7638 func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */ 7639 var hash_head IPos // head of hash chain 7640 var bflush int32 // set if current block must be flushed 7641 7642 // Process the input block. 7643 for { 7644 // Make sure that we always have enough lookahead, except 7645 // at the end of the input file. We need MAX_MATCH bytes 7646 // for the next match, plus MIN_MATCH bytes to insert the 7647 // string following the next match. 7648 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 7649 fill_window(tls, s) 7650 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 7651 return Need_more 7652 } 7653 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7654 break 7655 } // flush the current block 7656 } 7657 7658 // Insert the string window[strstart .. strstart+2] in the 7659 // dictionary, and set hash_head to the head of the hash chain: 7660 hash_head = IPos(NIL) 7661 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 7662 (*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) 7663 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)))) 7664 *(*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) 7665 } 7666 7667 // Find the longest match, discarding those <= prev_length. 7668 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 7669 (*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start 7670 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7671 7672 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)))) { 7673 // To simplify the code, we prevent matches with the string 7674 // of window index 0 (in particular we have to avoid a match 7675 // of the string with itself at the start of the input file). 7676 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 7677 // longest_match() sets match_start 7678 7679 if ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5)) && (((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED) || 7680 (((*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)))) { 7681 7682 // If prev_match is also MIN_MATCH, match_start is garbage 7683 // but we will ignore the current match anyway. 7684 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7685 } 7686 } 7687 // If there was a match at the previous step and the current 7688 // match is not better, output the previous match: 7689 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) { 7690 var max_insert UInt = (((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) - UInt(MIN_MATCH)) 7691 // Do not insert strings in hash table beyond this. 7692 7693 { 7694 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))) 7695 var dist Ush = (Ush(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)) 7696 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7697 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7698 dist-- 7699 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7700 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 7701 if (int32(dist)) < 256 { 7702 return int32(X_dist_code[dist]) 7703 } 7704 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7705 }()))*4 /* &.fc */))++ 7706 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7707 } 7708 7709 // Insert in hash table all strings up to the end of the match. 7710 // strstart-1 and strstart are already inserted. If there is not 7711 // enough lookahead, the last two strings are not inserted in 7712 // the hash table. 7713 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)) 7714 *(*UInt)(unsafe.Pointer(s + 184 /* &.prev_length */)) -= (UInt(2)) 7715 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0)) { 7716 if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert { 7717 (*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) 7718 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)))) 7719 *(*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) 7720 } 7721 } 7722 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7723 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7724 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7725 7726 if bflush != 0 { 7727 { 7728 X_tr_flush_block(tls, s, func() uintptr { 7729 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7730 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7731 } 7732 return uintptr(Z_NULL) 7733 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7734 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7735 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7736 } 7737 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7738 if 0 != 0 { 7739 return Finish_started 7740 } 7741 return Need_more 7742 } 7743 } 7744 7745 } else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 7746 // If there was no match at the previous position, output a 7747 // single literal. If there was a match but the current match 7748 // is longer, truncate the previous match to a single literal. 7749 7750 { 7751 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 7752 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7753 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7754 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7755 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7756 } 7757 7758 if bflush != 0 { 7759 { 7760 X_tr_flush_block(tls, s, func() uintptr { 7761 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7762 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7763 } 7764 return uintptr(Z_NULL) 7765 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7766 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7767 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7768 } 7769 7770 } 7771 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7772 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7773 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7774 return Need_more 7775 } 7776 } else { 7777 // There is no previous match to compare with, wait for 7778 // the next step to decide. 7779 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1 7780 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7781 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7782 } 7783 } 7784 7785 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 7786 7787 { 7788 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 7789 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7790 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7791 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7792 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7793 } 7794 7795 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7796 } 7797 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 7798 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 7799 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 7800 } 7801 return (uint32(MIN_MATCH - 1)) 7802 }() 7803 if flush == Z_FINISH { 7804 { 7805 { 7806 X_tr_flush_block(tls, s, func() uintptr { 7807 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7808 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7809 } 7810 return uintptr(Z_NULL) 7811 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7812 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7813 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7814 } 7815 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7816 if 1 != 0 { 7817 return Finish_started 7818 } 7819 return Need_more 7820 } 7821 } 7822 7823 return Finish_done 7824 } 7825 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7826 { 7827 X_tr_flush_block(tls, s, func() uintptr { 7828 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7829 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7830 } 7831 return uintptr(Z_NULL) 7832 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7833 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7834 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7835 } 7836 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7837 if 0 != 0 { 7838 return Finish_started 7839 } 7840 return Need_more 7841 } 7842 } 7843 7844 return Block_done 7845 } 7846 7847 // =========================================================================== 7848 // For Z_RLE, simply look for runs of bytes, generate matches only of distance 7849 // one. Do not maintain a hash table. (It will be regenerated if this run of 7850 // deflate switches away from Z_RLE.) 7851 func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */ 7852 var bflush int32 // set if current block must be flushed 7853 var prev UInt // byte at distance one to match 7854 var scan uintptr 7855 var strend uintptr // scan goes up to strend for length of run 7856 7857 for { 7858 // Make sure that we always have enough lookahead, except 7859 // at the end of the input file. We need MAX_MATCH bytes 7860 // for the longest run, plus one for the unrolled loop. 7861 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) { 7862 fill_window(tls, s) 7863 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH)) && (flush == Z_NO_FLUSH) { 7864 return Need_more 7865 } 7866 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7867 break 7868 } // flush the current block 7869 } 7870 7871 // See how many times the previous byte repeats 7872 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7873 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0)) { 7874 scan = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uintptr(1)) 7875 prev = UInt(*(*Bytef)(unsafe.Pointer(scan))) 7876 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))))) { 7877 strend = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 7878 for ok := true; ok; ok = (((((((((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)) { 7879 } 7880 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MAX_MATCH) - (UInt((int64(strend) - int64(scan)) / 1))) 7881 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7882 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 7883 } 7884 } 7885 7886 } 7887 7888 // Emit match if have run of MIN_MATCH or longer, else emit literal 7889 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 7890 7891 { 7892 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 7893 var dist Ush = Ush(1) 7894 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7895 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7896 dist-- 7897 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7898 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 7899 if (int32(dist)) < 256 { 7900 return int32(X_dist_code[dist]) 7901 } 7902 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7903 }()))*4 /* &.fc */))++ 7904 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7905 } 7906 7907 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7908 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7909 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7910 } else { 7911 // No match, output a literal byte 7912 7913 { 7914 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7915 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7916 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7917 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7918 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7919 } 7920 7921 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7922 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7923 } 7924 if bflush != 0 { 7925 { 7926 X_tr_flush_block(tls, s, func() uintptr { 7927 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7928 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7929 } 7930 return uintptr(Z_NULL) 7931 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7932 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7933 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7934 } 7935 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7936 if 0 != 0 { 7937 return Finish_started 7938 } 7939 return Need_more 7940 } 7941 } 7942 7943 } 7944 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 7945 if flush == Z_FINISH { 7946 { 7947 { 7948 X_tr_flush_block(tls, s, func() uintptr { 7949 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7950 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7951 } 7952 return uintptr(Z_NULL) 7953 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7954 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7955 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7956 } 7957 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7958 if 1 != 0 { 7959 return Finish_started 7960 } 7961 return Need_more 7962 } 7963 } 7964 7965 return Finish_done 7966 } 7967 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7968 { 7969 X_tr_flush_block(tls, s, func() uintptr { 7970 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7971 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7972 } 7973 return uintptr(Z_NULL) 7974 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7975 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7976 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7977 } 7978 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7979 if 0 != 0 { 7980 return Finish_started 7981 } 7982 return Need_more 7983 } 7984 } 7985 7986 return Block_done 7987 } 7988 7989 // =========================================================================== 7990 // For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. 7991 // (It will be regenerated if this run of deflate switches away from Huffman.) 7992 func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */ 7993 var bflush int32 // set if current block must be flushed 7994 7995 for { 7996 // Make sure that we have a literal to write. 7997 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7998 fill_window(tls, s) 7999 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 8000 if flush == Z_NO_FLUSH { 8001 return Need_more 8002 } 8003 break // flush the current block 8004 } 8005 } 8006 8007 // Output a literal byte 8008 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 8009 8010 { 8011 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 8012 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 8013 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 8014 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 8015 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 8016 } 8017 8018 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 8019 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 8020 if bflush != 0 { 8021 { 8022 X_tr_flush_block(tls, s, func() uintptr { 8023 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8024 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8025 } 8026 return uintptr(Z_NULL) 8027 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 8028 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8029 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8030 } 8031 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8032 if 0 != 0 { 8033 return Finish_started 8034 } 8035 return Need_more 8036 } 8037 } 8038 8039 } 8040 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 8041 if flush == Z_FINISH { 8042 { 8043 { 8044 X_tr_flush_block(tls, s, func() uintptr { 8045 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8046 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8047 } 8048 return uintptr(Z_NULL) 8049 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 8050 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8051 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8052 } 8053 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8054 if 1 != 0 { 8055 return Finish_started 8056 } 8057 return Need_more 8058 } 8059 } 8060 8061 return Finish_done 8062 } 8063 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 8064 { 8065 X_tr_flush_block(tls, s, func() uintptr { 8066 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8067 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8068 } 8069 return uintptr(Z_NULL) 8070 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 8071 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8072 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8073 } 8074 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8075 if 0 != 0 { 8076 return Finish_started 8077 } 8078 return Need_more 8079 } 8080 } 8081 8082 return Block_done 8083 } 8084 8085 // Seconds since the Epoch, visible to user code when time_t is too 8086 // narrow only for consistency with the old way of widening too-narrow 8087 // types. User code should never use __time64_t. 8088 8089 // bits/types.h -- definitions of __*_t types underlying *_t types. 8090 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8091 // This file is part of the GNU C Library. 8092 // 8093 // The GNU C Library is free software; you can redistribute it and/or 8094 // modify it under the terms of the GNU Lesser General Public 8095 // License as published by the Free Software Foundation; either 8096 // version 2.1 of the License, or (at your option) any later version. 8097 // 8098 // The GNU C Library is distributed in the hope that it will be useful, 8099 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8100 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8101 // Lesser General Public License for more details. 8102 // 8103 // You should have received a copy of the GNU Lesser General Public 8104 // License along with the GNU C Library; if not, see 8105 // <https://www.gnu.org/licenses/>. 8106 8107 // Never include this file directly; use <sys/types.h> instead. 8108 8109 // Integral type unchanged by default argument promotions that can 8110 // hold any value corresponding to members of the extended character 8111 // set, as well as at least one value that does not correspond to any 8112 // member of the extended character set. 8113 8114 // Conversion state information. 8115 type X__mbstate_t = struct { 8116 F__count int32 8117 F__value struct{ F__wch uint32 } 8118 } /* __mbstate_t.h:21:3 */ 8119 8120 // The tag name of this struct is _G_fpos_t to preserve historic 8121 // C++ mangled names for functions taking fpos_t arguments. 8122 // That name should not be used in new code. 8123 type X_G_fpos_t = struct { 8124 F__pos X__off_t 8125 F__state X__mbstate_t 8126 } /* __fpos_t.h:10:9 */ 8127 8128 // The tag name of this struct is _G_fpos_t to preserve historic 8129 // C++ mangled names for functions taking fpos_t arguments. 8130 // That name should not be used in new code. 8131 type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ 8132 8133 // bits/types.h -- definitions of __*_t types underlying *_t types. 8134 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8135 // This file is part of the GNU C Library. 8136 // 8137 // The GNU C Library is free software; you can redistribute it and/or 8138 // modify it under the terms of the GNU Lesser General Public 8139 // License as published by the Free Software Foundation; either 8140 // version 2.1 of the License, or (at your option) any later version. 8141 // 8142 // The GNU C Library is distributed in the hope that it will be useful, 8143 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8144 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8145 // Lesser General Public License for more details. 8146 // 8147 // You should have received a copy of the GNU Lesser General Public 8148 // License along with the GNU C Library; if not, see 8149 // <https://www.gnu.org/licenses/>. 8150 8151 // Never include this file directly; use <sys/types.h> instead. 8152 8153 // The tag name of this struct is _G_fpos64_t to preserve historic 8154 // C++ mangled names for functions taking fpos_t and/or fpos64_t 8155 // arguments. That name should not be used in new code. 8156 type X_G_fpos64_t = struct { 8157 F__pos X__off64_t 8158 F__state X__mbstate_t 8159 } /* __fpos64_t.h:10:9 */ 8160 8161 // bits/types.h -- definitions of __*_t types underlying *_t types. 8162 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8163 // This file is part of the GNU C Library. 8164 // 8165 // The GNU C Library is free software; you can redistribute it and/or 8166 // modify it under the terms of the GNU Lesser General Public 8167 // License as published by the Free Software Foundation; either 8168 // version 2.1 of the License, or (at your option) any later version. 8169 // 8170 // The GNU C Library is distributed in the hope that it will be useful, 8171 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8172 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8173 // Lesser General Public License for more details. 8174 // 8175 // You should have received a copy of the GNU Lesser General Public 8176 // License along with the GNU C Library; if not, see 8177 // <https://www.gnu.org/licenses/>. 8178 8179 // Never include this file directly; use <sys/types.h> instead. 8180 8181 // The tag name of this struct is _G_fpos64_t to preserve historic 8182 // C++ mangled names for functions taking fpos_t and/or fpos64_t 8183 // arguments. That name should not be used in new code. 8184 type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ 8185 8186 type X_IO_FILE = struct { 8187 F_flags int32 8188 F__ccgo_pad1 [4]byte 8189 F_IO_read_ptr uintptr 8190 F_IO_read_end uintptr 8191 F_IO_read_base uintptr 8192 F_IO_write_base uintptr 8193 F_IO_write_ptr uintptr 8194 F_IO_write_end uintptr 8195 F_IO_buf_base uintptr 8196 F_IO_buf_end uintptr 8197 F_IO_save_base uintptr 8198 F_IO_backup_base uintptr 8199 F_IO_save_end uintptr 8200 F_markers uintptr 8201 F_chain uintptr 8202 F_fileno int32 8203 F_flags2 int32 8204 F_old_offset X__off_t 8205 F_cur_column uint16 8206 F_vtable_offset int8 8207 F_shortbuf [1]int8 8208 F__ccgo_pad2 [4]byte 8209 F_lock uintptr 8210 F_offset X__off64_t 8211 F_codecvt uintptr 8212 F_wide_data uintptr 8213 F_freeres_list uintptr 8214 F_freeres_buf uintptr 8215 F__pad5 Size_t 8216 F_mode int32 8217 F_unused2 [20]int8 8218 } /* __FILE.h:4:1 */ 8219 8220 type X__FILE = X_IO_FILE /* __FILE.h:5:25 */ 8221 8222 // The opaque type of streams. This is the definition used elsewhere. 8223 type FILE = X_IO_FILE /* FILE.h:7:25 */ 8224 8225 // The type of the second argument to `fgetpos' and `fsetpos'. 8226 type Fpos_t = X__fpos_t /* stdio.h:84:18 */ 8227 type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */ 8228 8229 // Floating-point inline functions for stdlib.h. 8230 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 8231 // This file is part of the GNU C Library. 8232 // 8233 // The GNU C Library is free software; you can redistribute it and/or 8234 // modify it under the terms of the GNU Lesser General Public 8235 // License as published by the Free Software Foundation; either 8236 // version 2.1 of the License, or (at your option) any later version. 8237 // 8238 // The GNU C Library is distributed in the hope that it will be useful, 8239 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8240 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8241 // Lesser General Public License for more details. 8242 // 8243 // You should have received a copy of the GNU Lesser General Public 8244 // License along with the GNU C Library; if not, see 8245 // <https://www.gnu.org/licenses/>. 8246 8247 // Define some macros helping to catch buffer overflows. 8248 8249 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 8250 // 8251 // This file is part of GCC. 8252 // 8253 // GCC is free software; you can redistribute it and/or modify it under 8254 // the terms of the GNU General Public License as published by the Free 8255 // Software Foundation; either version 3, or (at your option) any later 8256 // version. 8257 // 8258 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 8259 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 8260 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 8261 // for more details. 8262 // 8263 // Under Section 7 of GPL version 3, you are granted additional 8264 // permissions described in the GCC Runtime Library Exception, version 8265 // 3.1, as published by the Free Software Foundation. 8266 // 8267 // You should have received a copy of the GNU General Public License and 8268 // a copy of the GCC Runtime Library Exception along with this program; 8269 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 8270 // <http://www.gnu.org/licenses/>. 8271 8272 // This administrivia gets added to the beginning of limits.h 8273 // if the system has its own version of limits.h. 8274 8275 // We use _GCC_LIMITS_H_ because we want this not to match 8276 // any macros that the system's limits.h uses for its own purposes. 8277 8278 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 8279 // This file is part of the GNU C Library. 8280 // 8281 // The GNU C Library is free software; you can redistribute it and/or 8282 // modify it under the terms of the GNU Lesser General Public 8283 // License as published by the Free Software Foundation; either 8284 // version 2.1 of the License, or (at your option) any later version. 8285 // 8286 // The GNU C Library is distributed in the hope that it will be useful, 8287 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8288 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8289 // Lesser General Public License for more details. 8290 // 8291 // You should have received a copy of the GNU Lesser General Public 8292 // License along with the GNU C Library; if not, see 8293 // <https://www.gnu.org/licenses/>. 8294 8295 // POSIX Standard: 6.5 File Control Operations <fcntl.h> 8296 8297 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 8298 // This file is part of the GNU C Library. 8299 // 8300 // The GNU C Library is free software; you can redistribute it and/or 8301 // modify it under the terms of the GNU Lesser General Public 8302 // License as published by the Free Software Foundation; either 8303 // version 2.1 of the License, or (at your option) any later version. 8304 // 8305 // The GNU C Library is distributed in the hope that it will be useful, 8306 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8307 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8308 // Lesser General Public License for more details. 8309 // 8310 // You should have received a copy of the GNU Lesser General Public 8311 // License along with the GNU C Library; if not, see 8312 // <https://www.gnu.org/licenses/>. 8313 8314 // This must be early so <bits/fcntl.h> can define types winningly. 8315 8316 // Get __mode_t, __dev_t and __off_t . 8317 // bits/types.h -- definitions of __*_t types underlying *_t types. 8318 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8319 // This file is part of the GNU C Library. 8320 // 8321 // The GNU C Library is free software; you can redistribute it and/or 8322 // modify it under the terms of the GNU Lesser General Public 8323 // License as published by the Free Software Foundation; either 8324 // version 2.1 of the License, or (at your option) any later version. 8325 // 8326 // The GNU C Library is distributed in the hope that it will be useful, 8327 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8328 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8329 // Lesser General Public License for more details. 8330 // 8331 // You should have received a copy of the GNU Lesser General Public 8332 // License along with the GNU C Library; if not, see 8333 // <https://www.gnu.org/licenses/>. 8334 8335 // Never include this file directly; use <sys/types.h> instead. 8336 8337 // Get the definitions of O_*, F_*, FD_*: all the 8338 // numbers and flag bits for `open', `fcntl', et al. 8339 // O_*, F_*, FD_* bit values for Linux/x86. 8340 // Copyright (C) 2001-2020 Free Software Foundation, Inc. 8341 // This file is part of the GNU C Library. 8342 // 8343 // The GNU C Library is free software; you can redistribute it and/or 8344 // modify it under the terms of the GNU Lesser General Public 8345 // License as published by the Free Software Foundation; either 8346 // version 2.1 of the License, or (at your option) any later version. 8347 // 8348 // The GNU C Library is distributed in the hope that it will be useful, 8349 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8350 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8351 // Lesser General Public License for more details. 8352 // 8353 // You should have received a copy of the GNU Lesser General Public 8354 // License along with the GNU C Library; if not, see 8355 // <https://www.gnu.org/licenses/>. 8356 8357 // Not necessary, we always have 64-bit offsets. 8358 8359 type Flock = struct { 8360 Fl_type int16 8361 Fl_whence int16 8362 F__ccgo_pad1 [4]byte 8363 Fl_start X__off_t 8364 Fl_len X__off_t 8365 Fl_pid X__pid_t 8366 F__ccgo_pad2 [4]byte 8367 } /* fcntl.h:35:1 */ 8368 8369 type Flock64 = struct { 8370 Fl_type int16 8371 Fl_whence int16 8372 F__ccgo_pad1 [4]byte 8373 Fl_start X__off64_t 8374 Fl_len X__off64_t 8375 Fl_pid X__pid_t 8376 F__ccgo_pad2 [4]byte 8377 } /* fcntl.h:50:1 */ 8378 8379 // Include generic Linux declarations. 8380 // O_*, F_*, FD_* bit values for Linux. 8381 // Copyright (C) 2001-2020 Free Software Foundation, Inc. 8382 // This file is part of the GNU C Library. 8383 // 8384 // The GNU C Library is free software; you can redistribute it and/or 8385 // modify it under the terms of the GNU Lesser General Public 8386 // License as published by the Free Software Foundation; either 8387 // version 2.1 of the License, or (at your option) any later version. 8388 // 8389 // The GNU C Library is distributed in the hope that it will be useful, 8390 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8391 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8392 // Lesser General Public License for more details. 8393 // 8394 // You should have received a copy of the GNU Lesser General Public 8395 // License along with the GNU C Library; if not, see 8396 // <https://www.gnu.org/licenses/>. 8397 8398 // This file contains shared definitions between Linux architectures 8399 // and is included by <bits/fcntl.h> to declare them. The various 8400 // #ifndef cases allow the architecture specific file to define those 8401 // values with different values. 8402 // 8403 // A minimal <bits/fcntl.h> contains just: 8404 // 8405 // struct flock {...} 8406 // #ifdef __USE_LARGEFILE64 8407 // struct flock64 {...} 8408 // #endif 8409 // #include <bits/fcntl-linux.h> 8410 8411 // open/fcntl. 8412 8413 // open file description locks. 8414 // 8415 // Usually record locks held by a process are released on *any* close and are 8416 // not inherited across a fork. 8417 // 8418 // These cmd values will set locks that conflict with process-associated record 8419 // locks, but are "owned" by the opened file description, not the process. 8420 // This means that they are inherited across fork or clone with CLONE_FILES 8421 // like BSD (flock) locks, and they are only released automatically when the 8422 // last reference to the the file description against which they were acquired 8423 // is put. 8424 8425 // For now, Linux has no separate synchronicity options for read 8426 // operations. We define O_RSYNC therefore as the same as O_SYNC 8427 // since this is a superset. 8428 8429 // Values for the second argument to `fcntl'. 8430 8431 // For F_[GET|SET]FD. 8432 8433 // For posix fcntl() and `l_type' field of a `struct flock' for lockf(). 8434 8435 // For old implementation of BSD flock. 8436 8437 // Operations for BSD flock, also used by the kernel implementation. 8438 8439 // Define some more compatibility macros to be backward compatible with 8440 // BSD systems which did not managed to hide these kernel macros. 8441 8442 // Advise to `posix_fadvise'. 8443 8444 // Values for `*at' functions. 8445 8446 // Detect if open needs mode as a third argument (or for openat as a fourth 8447 // argument). 8448 8449 // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. 8450 // Earlier POSIX standards permitted any type ending in `_t' to be defined 8451 // by any POSIX header, so we don't conditionalize the definitions here. 8452 8453 // For XPG all symbols from <sys/stat.h> should also be available. 8454 // NB: Include guard matches what <linux/time.h> uses. 8455 // Copyright (C) 1999-2020 Free Software Foundation, Inc. 8456 // This file is part of the GNU C Library. 8457 // 8458 // The GNU C Library is free software; you can redistribute it and/or 8459 // modify it under the terms of the GNU Lesser General Public 8460 // License as published by the Free Software Foundation; either 8461 // version 2.1 of the License, or (at your option) any later version. 8462 // 8463 // The GNU C Library is distributed in the hope that it will be useful, 8464 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8465 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8466 // Lesser General Public License for more details. 8467 // 8468 // You should have received a copy of the GNU Lesser General Public 8469 // License along with the GNU C Library; if not, see 8470 // <https://www.gnu.org/licenses/>. 8471 8472 // Versions of the `struct stat' data structure. 8473 8474 // x86-64 versions of the `xmknod' interface. 8475 8476 type Stat = struct { 8477 Fst_dev X__dev_t 8478 Fst_ino X__ino_t 8479 Fst_nlink X__nlink_t 8480 Fst_mode X__mode_t 8481 Fst_uid X__uid_t 8482 Fst_gid X__gid_t 8483 F__pad0 int32 8484 Fst_rdev X__dev_t 8485 Fst_size X__off_t 8486 Fst_blksize X__blksize_t 8487 Fst_blocks X__blkcnt_t 8488 Fst_atim struct { 8489 Ftv_sec X__time_t 8490 Ftv_nsec X__syscall_slong_t 8491 } 8492 Fst_mtim struct { 8493 Ftv_sec X__time_t 8494 Ftv_nsec X__syscall_slong_t 8495 } 8496 Fst_ctim struct { 8497 Ftv_sec X__time_t 8498 Ftv_nsec X__syscall_slong_t 8499 } 8500 F__glibc_reserved [3]X__syscall_slong_t 8501 } /* stat.h:46:1 */ 8502 8503 // Note stat64 has the same shape as stat for x86-64. 8504 type Stat64 = struct { 8505 Fst_dev X__dev_t 8506 Fst_ino X__ino64_t 8507 Fst_nlink X__nlink_t 8508 Fst_mode X__mode_t 8509 Fst_uid X__uid_t 8510 Fst_gid X__gid_t 8511 F__pad0 int32 8512 Fst_rdev X__dev_t 8513 Fst_size X__off_t 8514 Fst_blksize X__blksize_t 8515 Fst_blocks X__blkcnt64_t 8516 Fst_atim struct { 8517 Ftv_sec X__time_t 8518 Ftv_nsec X__syscall_slong_t 8519 } 8520 Fst_mtim struct { 8521 Ftv_sec X__time_t 8522 Ftv_nsec X__syscall_slong_t 8523 } 8524 Fst_ctim struct { 8525 Ftv_sec X__time_t 8526 Ftv_nsec X__syscall_slong_t 8527 } 8528 F__glibc_reserved [3]X__syscall_slong_t 8529 } /* stat.h:119:1 */ 8530 8531 // provide prototypes for these when building zlib without LFS 8532 8533 // default memLevel 8534 8535 // default i/o buffer size -- double this for output when reading (this and 8536 // twice this must be able to fit in an unsigned type) 8537 8538 // gzip modes, also provide a little integrity check on the passed structure 8539 8540 // values for gz_state how 8541 8542 // internal gzip file state data structure 8543 type Gz_state = struct { 8544 Fx GzFile_s 8545 Fmode int32 8546 Ffd int32 8547 Fpath uintptr 8548 Fsize uint32 8549 Fwant uint32 8550 Fin uintptr 8551 Fout uintptr 8552 Fdirect int32 8553 Fhow int32 8554 Fstart Off64_t 8555 Feof int32 8556 Fpast int32 8557 Flevel int32 8558 Fstrategy int32 8559 Fskip Off64_t 8560 Fseek int32 8561 Ferr int32 8562 Fmsg uintptr 8563 Fstrm Z_stream 8564 } /* gzguts.h:201:3 */ 8565 type Gz_statep = uintptr /* gzguts.h:202:22 */ 8566 8567 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 8568 // value -- needed when comparing unsigned to z_off64_t, which is signed 8569 // (possible z_off64_t types off_t, off64_t, and long are all signed) 8570 8571 // gzclose() is in a separate file so that it is linked in only if it is used. 8572 // That way the other gzclose functions can be used instead to avoid linking in 8573 // unneeded compression or decompression routines. 8574 func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */ 8575 var state Gz_statep 8576 8577 if file == (uintptr(0)) { 8578 return -2 8579 } 8580 state = file 8581 8582 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8583 return Xgzclose_r(tls, file) 8584 } 8585 return Xgzclose_w(tls, file) 8586 } 8587 8588 // Reset gzip file state 8589 func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */ 8590 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) // no output data available 8591 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ... 8592 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 // not at end of file 8593 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 // have not read past end yet 8594 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header 8595 } 8596 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 // no seek request pending 8597 Xgz_error(tls, state, Z_OK, uintptr(0)) // clear error 8598 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0) // no uncompressed data yet 8599 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet 8600 } 8601 8602 // Open a gzip file either by name or file descriptor. 8603 func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */ 8604 bp := tls.Alloc(16) 8605 defer tls.Free(16) 8606 8607 var state Gz_statep 8608 var len Z_size_t 8609 var oflag int32 8610 var cloexec int32 = 0 8611 var exclusive int32 = 0 8612 8613 // check input 8614 if path == (uintptr(0)) { 8615 return uintptr(0) 8616 } 8617 8618 // allocate gzFile structure to return 8619 state = libc.Xmalloc(tls, uint64(unsafe.Sizeof(Gz_state{}))) 8620 if state == (uintptr(0)) { 8621 return uintptr(0) 8622 } 8623 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) // no buffers allocated yet 8624 (*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size 8625 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) // no error message yet 8626 8627 // interpret mode 8628 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE 8629 (*Gz_state)(unsafe.Pointer(state)).Flevel = -1 8630 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY 8631 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 8632 for *(*int8)(unsafe.Pointer(mode)) != 0 { 8633 if (int32(*(*int8)(unsafe.Pointer(mode))) >= '0') && (int32(*(*int8)(unsafe.Pointer(mode))) <= '9') { 8634 (*Gz_state)(unsafe.Pointer(state)).Flevel = (int32(*(*int8)(unsafe.Pointer(mode))) - '0') 8635 } else { 8636 switch int32(*(*int8)(unsafe.Pointer(mode))) { 8637 case 'r': 8638 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ 8639 break 8640 fallthrough 8641 case 'w': 8642 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE 8643 break 8644 fallthrough 8645 case 'a': 8646 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND 8647 break 8648 fallthrough 8649 case '+': // can't read and write at the same time 8650 libc.Xfree(tls, state) 8651 return uintptr(0) 8652 fallthrough 8653 case 'b': // ignore -- will request binary anyway 8654 break 8655 fallthrough 8656 case 'e': 8657 cloexec = 1 8658 break 8659 fallthrough 8660 case 'x': 8661 exclusive = 1 8662 break 8663 fallthrough 8664 case 'f': 8665 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED 8666 break 8667 fallthrough 8668 case 'h': 8669 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY 8670 break 8671 fallthrough 8672 case 'R': 8673 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE 8674 break 8675 fallthrough 8676 case 'F': 8677 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED 8678 break 8679 fallthrough 8680 case 'T': 8681 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 8682 break 8683 fallthrough 8684 default: // could consider as an error, but just ignore 8685 8686 } 8687 } 8688 mode++ 8689 } 8690 8691 // must provide an "r", "w", or "a" 8692 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE { 8693 libc.Xfree(tls, state) 8694 return uintptr(0) 8695 } 8696 8697 // can't force transparent read 8698 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8699 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 8700 libc.Xfree(tls, state) 8701 return uintptr(0) 8702 } 8703 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file 8704 } 8705 8706 // save the path name for error messages 8707 len = libc.Xstrlen(tls, path) 8708 (*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, (len + uint64(1))) 8709 if (*Gz_state)(unsafe.Pointer(state)).Fpath == (uintptr(0)) { 8710 libc.Xfree(tls, state) 8711 return uintptr(0) 8712 } 8713 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, (len + uint64(1)), ts+76 /* "%s" */, libc.VaList(bp, path)) 8714 8715 // compute the flags for open() 8716 oflag = ((0 | (func() int32 { 8717 if cloexec != 0 { 8718 return 02000000 8719 } 8720 return 0 8721 }())) | (func() int32 { 8722 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8723 return O_RDONLY 8724 } 8725 return (((O_WRONLY | O_CREAT) | (func() int32 { 8726 if exclusive != 0 { 8727 return O_EXCL 8728 } 8729 return 0 8730 }())) | (func() int32 { 8731 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE { 8732 return O_TRUNC 8733 } 8734 return O_APPEND 8735 }())) 8736 }())) 8737 8738 // open the file with the appropriate flags (or just use fd) 8739 (*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 { 8740 if fd > -1 { 8741 return fd 8742 } 8743 return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666)) 8744 }() 8745 if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 { 8746 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 8747 libc.Xfree(tls, state) 8748 return uintptr(0) 8749 } 8750 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND { 8751 libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct 8752 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE // simplify later checks 8753 } 8754 8755 // save the current position for rewinding (only if reading) 8756 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8757 (*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 8758 if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) { 8759 (*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0) 8760 } 8761 } 8762 8763 // initialize stream 8764 gz_reset(tls, state) 8765 8766 // return stream 8767 return state 8768 } 8769 8770 // -- see zlib.h -- 8771 func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */ 8772 return gz_open(tls, path, -1, mode) 8773 } 8774 8775 // -- see zlib.h -- 8776 func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */ 8777 return gz_open(tls, path, -1, mode) 8778 } 8779 8780 // -- see zlib.h -- 8781 func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */ 8782 bp := tls.Alloc(8) 8783 defer tls.Free(8) 8784 8785 var path uintptr // identifier for error messages 8786 var gz GzFile 8787 8788 if (fd == -1) || ((libc.AssignUintptr(&path, libc.Xmalloc(tls, (uint64(7)+(uint64(3)*uint64(unsafe.Sizeof(int32(0)))))))) == (uintptr(0))) { 8789 return uintptr(0) 8790 } 8791 libc.Xsnprintf(tls, path, (uint64(7) + (uint64(3) * uint64(unsafe.Sizeof(int32(0))))), ts+79 /* "<fd:%d>" */, libc.VaList(bp, fd)) 8792 gz = gz_open(tls, path, fd, mode) 8793 libc.Xfree(tls, path) 8794 return gz 8795 } 8796 8797 // -- see zlib.h -- 8798 8799 // -- see zlib.h -- 8800 func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */ 8801 var state Gz_statep 8802 8803 // get internal structure and check integrity 8804 if file == (uintptr(0)) { 8805 return -1 8806 } 8807 state = file 8808 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8809 return -1 8810 } 8811 8812 // make sure we haven't already allocated memory 8813 if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { 8814 return -1 8815 } 8816 8817 // check and set requested size 8818 if (size << 1) < size { 8819 return -1 8820 } // need to be able to double it 8821 if size < uint32(2) { 8822 size = uint32(2) 8823 } // need two bytes to check magic header 8824 (*Gz_state)(unsafe.Pointer(state)).Fwant = size 8825 return 0 8826 } 8827 8828 // -- see zlib.h -- 8829 func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */ 8830 var state Gz_statep 8831 8832 // get internal structure 8833 if file == (uintptr(0)) { 8834 return -1 8835 } 8836 state = file 8837 8838 // check that we're reading and that there's no error 8839 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8840 return -1 8841 } 8842 8843 // back up and start over 8844 if libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) { 8845 return -1 8846 } 8847 gz_reset(tls, state) 8848 return 0 8849 } 8850 8851 // -- see zlib.h -- 8852 func Xgzseek64(tls *libc.TLS, file GzFile, offset Off64_t, whence int32) Off64_t { /* gzlib.c:366:19: */ 8853 var n uint32 8854 var ret Off64_t 8855 var state Gz_statep 8856 8857 // get internal structure and check integrity 8858 if file == (uintptr(0)) { 8859 return int64(-1) 8860 } 8861 state = file 8862 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8863 return int64(-1) 8864 } 8865 8866 // check that there's no error 8867 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 8868 return int64(-1) 8869 } 8870 8871 // can only seek from start or relative to current position 8872 if (whence != SEEK_SET) && (whence != SEEK_CUR) { 8873 return int64(-1) 8874 } 8875 8876 // normalize offset to a SEEK_CUR specification 8877 if whence == SEEK_SET { 8878 offset = offset - ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 8879 } else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8880 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fskip) 8881 } 8882 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8883 8884 // if within raw area while reading, just go there 8885 if (((*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1)) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset) >= int64(0)) { 8886 ret = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (offset - Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)), SEEK_CUR) 8887 if ret == int64(-1) { 8888 return int64(-1) 8889 } 8890 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 8891 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 8892 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 8893 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8894 Xgz_error(tls, state, Z_OK, uintptr(0)) 8895 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 8896 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (offset) 8897 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 8898 } 8899 8900 // calculate skip amount, rewinding if needed for back seek when reading 8901 if offset < int64(0) { 8902 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards 8903 return int64(-1) 8904 } 8905 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 8906 if offset < int64(0) { // before start of file! 8907 return int64(-1) 8908 } 8909 if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset 8910 return int64(-1) 8911 } 8912 } 8913 8914 // if reading, skip what's in output buffer (one less gzgetc() check) 8915 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8916 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset) { 8917 n = uint32(offset) 8918 } else { 8919 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8920 } 8921 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 8922 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 8923 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 8924 offset = offset - (Off64_t(n)) 8925 } 8926 8927 // request skip (if not zero) 8928 if offset != 0 { 8929 (*Gz_state)(unsafe.Pointer(state)).Fseek = 1 8930 (*Gz_state)(unsafe.Pointer(state)).Fskip = offset 8931 } 8932 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset) 8933 } 8934 8935 // -- see zlib.h -- 8936 func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:443:17: */ 8937 var ret Off64_t 8938 8939 ret = Xgzseek64(tls, file, offset, whence) 8940 if ret == ret { 8941 return ret 8942 } 8943 return int64(-1) 8944 } 8945 8946 // -- see zlib.h -- 8947 func Xgztell64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:455:19: */ 8948 var state Gz_statep 8949 8950 // get internal structure and check integrity 8951 if file == (uintptr(0)) { 8952 return int64(-1) 8953 } 8954 state = file 8955 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8956 return int64(-1) 8957 } 8958 8959 // return position 8960 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + (func() int64 { 8961 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8962 return (*Gz_state)(unsafe.Pointer(state)).Fskip 8963 } 8964 return int64(0) 8965 }())) 8966 } 8967 8968 // -- see zlib.h -- 8969 func Xgztell(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:472:17: */ 8970 var ret Off64_t 8971 8972 ret = Xgztell64(tls, file) 8973 if ret == ret { 8974 return ret 8975 } 8976 return int64(-1) 8977 } 8978 8979 // -- see zlib.h -- 8980 func Xgzoffset64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:482:19: */ 8981 var offset Off64_t 8982 var state Gz_statep 8983 8984 // get internal structure and check integrity 8985 if file == (uintptr(0)) { 8986 return int64(-1) 8987 } 8988 state = file 8989 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8990 return int64(-1) 8991 } 8992 8993 // compute and return effective offset in file 8994 offset = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 8995 if offset == int64(-1) { 8996 return int64(-1) 8997 } 8998 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading 8999 offset = offset - (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) 9000 } // don't count buffered input 9001 return offset 9002 } 9003 9004 // -- see zlib.h -- 9005 func Xgzoffset(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:505:17: */ 9006 var ret Off64_t 9007 9008 ret = Xgzoffset64(tls, file) 9009 if ret == ret { 9010 return ret 9011 } 9012 return int64(-1) 9013 } 9014 9015 // -- see zlib.h -- 9016 func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */ 9017 var state Gz_statep 9018 9019 // get internal structure and check integrity 9020 if file == (uintptr(0)) { 9021 return 0 9022 } 9023 state = file 9024 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 9025 return 0 9026 } 9027 9028 // return end-of-file state 9029 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 9030 return (*Gz_state)(unsafe.Pointer(state)).Fpast 9031 } 9032 return 0 9033 } 9034 9035 // -- see zlib.h -- 9036 func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */ 9037 var state Gz_statep 9038 9039 // get internal structure and check integrity 9040 if file == (uintptr(0)) { 9041 return uintptr(0) 9042 } 9043 state = file 9044 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 9045 return uintptr(0) 9046 } 9047 9048 // return error information 9049 if errnum != (uintptr(0)) { 9050 *(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr 9051 } 9052 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-4) { 9053 return ts + 87 /* "out of memory" */ 9054 } 9055 return func() uintptr { 9056 if (*Gz_state)(unsafe.Pointer(state)).Fmsg == (uintptr(0)) { 9057 return ts + 101 /* "" */ 9058 } 9059 return (*Gz_state)(unsafe.Pointer(state)).Fmsg 9060 }() 9061 } 9062 9063 // -- see zlib.h -- 9064 func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */ 9065 var state Gz_statep 9066 9067 // get internal structure and check integrity 9068 if file == (uintptr(0)) { 9069 return 9070 } 9071 state = file 9072 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 9073 return 9074 } 9075 9076 // clear error and end-of-file 9077 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 9078 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 9079 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9080 } 9081 Xgz_error(tls, state, Z_OK, uintptr(0)) 9082 } 9083 9084 // Create an error message in allocated memory and set state->err and 9085 // state->msg accordingly. Free any previous error message already there. Do 9086 // not try to free or allocate space if the error is Z_MEM_ERROR (out of 9087 // memory). Simply save the error message as a static string. If there is an 9088 // allocation failure constructing the error message, then convert the error to 9089 // out of memory. 9090 func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */ 9091 bp := tls.Alloc(24) 9092 defer tls.Free(24) 9093 9094 // free previously allocated message and clear 9095 if (*Gz_state)(unsafe.Pointer(state)).Fmsg != (uintptr(0)) { 9096 if (*Gz_state)(unsafe.Pointer(state)).Ferr != (-4) { 9097 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg) 9098 } 9099 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) 9100 } 9101 9102 // if fatal, set state->x.have to 0 so that the gzgetc() macro fails 9103 if (err != Z_OK) && (err != (-5)) { 9104 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9105 } 9106 9107 // set error code, and if no message, then done 9108 (*Gz_state)(unsafe.Pointer(state)).Ferr = err 9109 if msg == (uintptr(0)) { 9110 return 9111 } 9112 9113 // for an out of memory error, return literal string when requested 9114 if err == (-4) { 9115 return 9116 } 9117 9118 // construct error message with path 9119 if (libc.AssignPtrUintptr(state+112 /* &.msg */, libc.Xmalloc(tls, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg))+uint64(3))))) == (uintptr(0)) { 9120 (*Gz_state)(unsafe.Pointer(state)).Ferr = -4 9121 return 9122 } 9123 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) + libc.Xstrlen(tls, msg)) + uint64(3)), 9124 ts+102 /* "%s%s%s" */, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109 /* ": " */, msg)) 9125 } 9126 9127 // Use read() to load a buffer -- return -1 on error, otherwise 0. Read from 9128 // state->fd, and update state->eof, state->err, and state->msg as appropriate. 9129 // This function needs to loop on read(), since read() is not guaranteed to 9130 // read the number of bytes requested, depending on the type of descriptor. 9131 func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */ 9132 var ret int32 9133 var get uint32 9134 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 9135 9136 *(*uint32)(unsafe.Pointer(have)) = uint32(0) 9137 for ok := true; ok; ok = (*(*uint32)(unsafe.Pointer(have)) < len) { 9138 get = (len - *(*uint32)(unsafe.Pointer(have))) 9139 if get > max { 9140 get = max 9141 } 9142 ret = int32(libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (buf + uintptr(*(*uint32)(unsafe.Pointer(have)))), uint64(get))) 9143 if ret <= 0 { 9144 break 9145 } 9146 *(*uint32)(unsafe.Pointer(have)) += (uint32(ret)) 9147 } 9148 if ret < 0 { 9149 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9150 return -1 9151 } 9152 if ret == 0 { 9153 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 9154 } 9155 return 0 9156 } 9157 9158 // Load up input buffer and set eof flag if last data loaded -- return -1 on 9159 // error, 0 otherwise. Note that the eof flag is set when the end of the input 9160 // file is reached, even though there may be unused data in the buffer. Once 9161 // that data has been used, no more attempts will be made to read the file. 9162 // If strm->avail_in != 0, then the current data is moved to the beginning of 9163 // the input buffer, and then the remainder of the buffer is loaded with the 9164 // available data from the input file. 9165 func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */ 9166 bp := tls.Alloc(4) 9167 defer tls.Free(4) 9168 9169 // var got uint32 at bp, 4 9170 9171 var strm Z_streamp = (state + 120 /* &.strm */) 9172 9173 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 9174 return -1 9175 } 9176 if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 { 9177 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start 9178 var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin 9179 var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 9180 var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9181 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 9182 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) 9183 } 9184 } 9185 if gz_load(tls, state, ((*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)), 9186 ((*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in), bp /* &got */) == -1 { 9187 return -1 9188 } 9189 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (*(*uint32)(unsafe.Pointer(bp /* got */))) 9190 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9191 } 9192 return 0 9193 } 9194 9195 // Look for gzip header, set up for inflate or copy. state->x.have must be 0. 9196 // If this is the first time in, allocate required memory. state->how will be 9197 // left unchanged if there is no more input data available, will be set to COPY 9198 // if there is no gzip header and direct copying will be performed, or it will 9199 // be set to GZIP for decompression. If direct copying, then leftover input 9200 // data from the input buffer will be copied to the output buffer. In that 9201 // case, all further file reads will be directly to either the output buffer or 9202 // a user buffer. If decompressing, the inflate state will be initialized. 9203 // gz_look() will return 0 on success or -1 on failure. 9204 func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */ 9205 var strm Z_streamp = (state + 120 /* &.strm */) 9206 9207 // allocate read buffers and inflate memory 9208 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { 9209 // allocate buffers 9210 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 9211 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))) 9212 if ((*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0))) || ((*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0))) { 9213 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9214 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9215 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9216 return -1 9217 } 9218 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 9219 9220 // allocate inflate memory 9221 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL) 9222 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL) 9223 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL) 9224 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 9225 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL) 9226 if (XinflateInit2_(tls, (state+120 /* &.strm */), (15+16), ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) { // gunzip 9227 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9228 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9229 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) 9230 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9231 return -1 9232 } 9233 } 9234 9235 // get at least the magic bytes in the input buffer 9236 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) { 9237 if gz_avail(tls, state) == -1 { 9238 return -1 9239 } 9240 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9241 return 0 9242 } 9243 } 9244 9245 // look for gzip magic bytes -- if there, do gzip decoding (note: there is 9246 // a logical dilemma here when considering the case of a partially written 9247 // gzip file, to wit, if a single 31 byte is written, then we cannot tell 9248 // whether this is a single-byte file, or just a partially written gzip 9249 // file -- for here we assume that if a gzip file is being written, then 9250 // the header will be written in a single operation, so that reading a 9251 // single byte is sufficient indication that it is not a gzip file) 9252 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) { 9253 XinflateReset(tls, strm) 9254 (*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2 9255 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 9256 return 0 9257 } 9258 9259 // no gzip header -- if we were decoding gzip before, then this is trailing 9260 // garbage. Ignore the trailing garbage and finish. 9261 if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 { 9262 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 9263 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 9264 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9265 return 0 9266 } 9267 9268 // doing raw i/o, copy any leftover input to output -- this assumes that 9269 // the output buffer is larger than the input buffer, which also assures 9270 // space for gzungetc() 9271 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9272 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 9273 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)) 9274 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9275 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 9276 } 9277 (*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1 9278 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 9279 return 0 9280 } 9281 9282 // Decompress from input to the provided next_out and avail_out in the state. 9283 // On return, state->x.have and state->x.next point to the just decompressed 9284 // data. If the gzip stream completes, state->how is reset to LOOK to look for 9285 // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 9286 // on success, -1 on failure. 9287 func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */ 9288 var ret int32 = Z_OK 9289 var had uint32 9290 var strm Z_streamp = (state + 120 /* &.strm */) 9291 9292 // fill output buffer up to end of deflate stream 9293 had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9294 for ok := true; ok; ok = (((*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0) && (ret != Z_STREAM_END)) { 9295 // get more input for inflate() 9296 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && (gz_avail(tls, state) == -1) { 9297 return -1 9298 } 9299 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9300 Xgz_error(tls, state, -5, ts+112 /* "unexpected end o..." */) 9301 break 9302 } 9303 9304 // decompress and handle errors 9305 ret = Xinflate(tls, strm, Z_NO_FLUSH) 9306 if (ret == (-2)) || (ret == Z_NEED_DICT) { 9307 Xgz_error(tls, state, -2, 9308 ts+135 /* "internal error: ..." */) 9309 return -1 9310 } 9311 if ret == (-4) { 9312 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9313 return -1 9314 } 9315 if ret == (-3) { // deflate stream invalid 9316 Xgz_error(tls, state, -3, 9317 func() uintptr { 9318 if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == (uintptr(0)) { 9319 return ts + 174 /* "compressed data ..." */ 9320 } 9321 return (*Z_stream)(unsafe.Pointer(strm)).Fmsg 9322 }()) 9323 return -1 9324 } 9325 } 9326 9327 // update available output 9328 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out) 9329 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 9330 9331 // if the gzip stream completed successfully, look for another 9332 if ret == Z_STREAM_END { 9333 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK 9334 } 9335 9336 // good decompression 9337 return 0 9338 } 9339 9340 // Fetch data and put it in the output buffer. Assumes state->x.have is 0. 9341 // Data is either copied from the input file or decompressed from the input 9342 // file depending on state->how. If state->how is LOOK, then a gzip header is 9343 // looked for to determine whether to copy or decompress. Returns -1 on error, 9344 // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the 9345 // end of the input file has been reached and all data has been processed. 9346 func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */ 9347 var strm Z_streamp = (state + 120 /* &.strm */) 9348 9349 for ok := true; ok; ok = (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0)) && (!((*Gz_state)(unsafe.Pointer(state)).Feof != 0) || ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0))) { 9350 switch (*Gz_state)(unsafe.Pointer(state)).Fhow { 9351 case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP 9352 if gz_look(tls, state) == -1 { 9353 return -1 9354 } 9355 if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK { 9356 return 0 9357 } 9358 break 9359 case COPY1: // -> COPY 9360 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, ((*Gz_state)(unsafe.Pointer(state)).Fsize<<1), (state /* &.x */ /* &.have */)) == 9361 -1 { 9362 return -1 9363 } 9364 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9365 return 0 9366 case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream) 9367 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) 9368 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9369 if gz_decomp(tls, state) == -1 { 9370 return -1 9371 } 9372 } 9373 } 9374 return 0 9375 } 9376 9377 // Skip len uncompressed bytes of output. Return -1 on error, 0 on success. 9378 func gz_skip(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzread.c:259:11: */ 9379 var n uint32 9380 9381 // skip over len bytes or reach end-of-file, whichever comes first 9382 for len != 0 { 9383 // skip over whatever is in output buffer 9384 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9385 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len) { 9386 n = uint32(len) 9387 } else { 9388 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9389 } 9390 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 9391 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 9392 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 9393 len = len - (Off64_t(n)) 9394 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 9395 break 9396 } else { 9397 // get more output, looking for header if required 9398 if gz_fetch(tls, state) == -1 { 9399 return -1 9400 } 9401 } 9402 } 9403 return 0 9404 } 9405 9406 // Read len bytes into buf from file, or less than len up to the end of the 9407 // input. Return the number of bytes read. If zero is returned, either the 9408 // end of file was reached, or there was an error. state->err must be 9409 // consulted in that case to determine which. 9410 func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */ 9411 bp := tls.Alloc(4) 9412 defer tls.Free(4) 9413 9414 var got Z_size_t 9415 // var n uint32 at bp, 4 9416 9417 // if len is zero, avoid unnecessary operations 9418 if len == uint64(0) { 9419 return uint64(0) 9420 } 9421 9422 // process a skip request 9423 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9424 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9425 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9426 return uint64(0) 9427 } 9428 } 9429 9430 // get len bytes to buf, or less than len if at the end 9431 got = uint64(0) 9432 for ok := true; ok; ok = len != 0 { 9433 // set n to the maximum amount of len that fits in an unsigned int 9434 *(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1) 9435 if Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */))) > len { 9436 *(*uint32)(unsafe.Pointer(bp /* n */)) = uint32(len) 9437 } 9438 9439 // first just try copying data from the output buffer 9440 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9441 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp /* n */)) { 9442 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9443 } 9444 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9445 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9446 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (*(*uint32)(unsafe.Pointer(bp /* n */))) 9447 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 9448 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end 9449 break 9450 } else if ((*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK) || (*(*uint32)(unsafe.Pointer(bp /* n */)) < ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)) { 9451 // get more output, looking for header if required 9452 if gz_fetch(tls, state) == -1 { 9453 return uint64(0) 9454 } 9455 continue // no progress yet -- go back to copy above 9456 // the copy above assures that we will leave with space in the 9457 // output buffer, allowing at least one gzungetc() to succeed 9458 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly 9459 if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp /* n */)), bp /* &n */) == -1 { 9460 return uint64(0) 9461 } 9462 } else { // state->how == GZIP 9463 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */)) 9464 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf 9465 if gz_decomp(tls, state) == -1 { 9466 return uint64(0) 9467 } 9468 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9469 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9470 } 9471 9472 // update progress 9473 len = len - (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9474 buf = (buf + uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9475 got = got + (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9476 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9477 } 9478 9479 // return number of bytes read into user buffer 9480 return got 9481 } 9482 9483 // -- see zlib.h -- 9484 func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */ 9485 var state Gz_statep 9486 9487 // get internal structure 9488 if file == (uintptr(0)) { 9489 return -1 9490 } 9491 state = file 9492 9493 // check that we're reading and that there's no (serious) error 9494 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9495 return -1 9496 } 9497 9498 // since an int is returned, make sure len fits in one, otherwise return 9499 // with an error (this avoids a flaw in the interface) 9500 if int32(len) < 0 { 9501 Xgz_error(tls, state, -2, ts+196 /* "request does not..." */) 9502 return -1 9503 } 9504 9505 // read len or fewer bytes to buf 9506 len = uint32(gz_read(tls, state, buf, uint64(len))) 9507 9508 // check for an error 9509 if ((len == uint32(0)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 9510 return -1 9511 } 9512 9513 // return the number of bytes read (this is assured to fit in an int) 9514 return int32(len) 9515 } 9516 9517 // -- see zlib.h -- 9518 func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */ 9519 var len Z_size_t 9520 var state Gz_statep 9521 9522 // get internal structure 9523 if file == (uintptr(0)) { 9524 return uint64(0) 9525 } 9526 state = file 9527 9528 // check that we're reading and that there's no (serious) error 9529 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9530 return uint64(0) 9531 } 9532 9533 // compute bytes to read -- error on overflow 9534 len = (nitems * size) 9535 if (size != 0) && ((len / size) != nitems) { 9536 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 9537 return uint64(0) 9538 } 9539 9540 // read len or fewer bytes to buf, return the number of full items read 9541 if len != 0 { 9542 return (gz_read(tls, state, buf, len) / size) 9543 } 9544 return uint64(0) 9545 } 9546 9547 // -- see zlib.h -- 9548 func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */ 9549 bp := tls.Alloc(1) 9550 defer tls.Free(1) 9551 9552 var ret int32 9553 // var buf [1]uint8 at bp, 1 9554 9555 var state Gz_statep 9556 9557 // get internal structure 9558 if file == (uintptr(0)) { 9559 return -1 9560 } 9561 state = file 9562 9563 // check that we're reading and that there's no (serious) error 9564 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9565 return -1 9566 } 9567 9568 // try output buffer (no need to check for skip request) 9569 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9570 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave-- 9571 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 9572 return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext), 1)))) 9573 } 9574 9575 // nothing there -- try gz_read() 9576 ret = int32(gz_read(tls, state, bp /* &buf[0] */, uint64(1))) 9577 if ret < 1 { 9578 return -1 9579 } 9580 return int32(*(*uint8)(unsafe.Pointer(bp /* &buf[0] */))) 9581 } 9582 9583 func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */ 9584 return Xgzgetc(tls, file) 9585 } 9586 9587 // -- see zlib.h -- 9588 func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */ 9589 var state Gz_statep 9590 9591 // get internal structure 9592 if file == (uintptr(0)) { 9593 return -1 9594 } 9595 state = file 9596 9597 // check that we're reading and that there's no (serious) error 9598 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9599 return -1 9600 } 9601 9602 // process a skip request 9603 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9604 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9605 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9606 return -1 9607 } 9608 } 9609 9610 // can't push EOF 9611 if c < 0 { 9612 return -1 9613 } 9614 9615 // if output buffer empty, put byte at end (allows more pushing) 9616 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 9617 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) 9618 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) - uintptr(1)) 9619 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 9620 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 9621 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9622 return c 9623 } 9624 9625 // if no room, give up (must have already done a gzungetc()) 9626 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) { 9627 Xgz_error(tls, state, -3, ts+260 /* "out of room to p..." */) 9628 return -1 9629 } 9630 9631 // slide output data if needed and insert byte before existing data 9632 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout { 9633 var src uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 9634 var dest uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) 9635 for src > (*Gz_state)(unsafe.Pointer(state)).Fout { 9636 *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1))) 9637 } 9638 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest 9639 } 9640 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++ 9641 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext-- 9642 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 9643 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 9644 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9645 return c 9646 } 9647 9648 // -- see zlib.h -- 9649 func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */ 9650 var left uint32 9651 var n uint32 9652 var str uintptr 9653 var eol uintptr 9654 var state Gz_statep 9655 9656 // check parameters and get internal structure 9657 if ((file == (uintptr(0))) || (buf == (uintptr(0)))) || (len < 1) { 9658 return uintptr(0) 9659 } 9660 state = file 9661 9662 // check that we're reading and that there's no (serious) error 9663 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9664 return uintptr(0) 9665 } 9666 9667 // process a skip request 9668 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9669 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9670 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9671 return uintptr(0) 9672 } 9673 } 9674 9675 // copy output bytes up to new line or len - 1, whichever comes first -- 9676 // append a terminating zero to the string (we don't check for a zero in 9677 // the contents, let the user worry about that) 9678 str = buf 9679 left = (uint32(len) - uint32(1)) 9680 if left != 0 { 9681 for ok := true; ok; ok = ((left != 0) && (eol == (uintptr(0)))) { 9682 // assure that something is in the output buffer 9683 if ((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0)) && (gz_fetch(tls, state) == -1) { 9684 return uintptr(0) 9685 } // error 9686 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file 9687 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end 9688 break // return what we have 9689 } 9690 9691 // look for end-of-line in current output buffer 9692 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left { 9693 n = left 9694 } else { 9695 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9696 } 9697 eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', uint64(n)) 9698 if eol != (uintptr(0)) { 9699 n = ((uint32((int64(eol) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) + uint32(1)) 9700 } 9701 9702 // copy through end-of-line, or remainder if not found 9703 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n)) 9704 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 9705 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 9706 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 9707 left = left - (n) 9708 buf += uintptr(n) 9709 } 9710 } 9711 9712 // return terminated string, or if nothing, end of file 9713 if buf == str { 9714 return uintptr(0) 9715 } 9716 *(*int8)(unsafe.Pointer(buf)) = int8(0) 9717 return str 9718 } 9719 9720 // -- see zlib.h -- 9721 func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */ 9722 var state Gz_statep 9723 9724 // get internal structure 9725 if file == (uintptr(0)) { 9726 return 0 9727 } 9728 state = file 9729 9730 // if the state is not known, but we can find out, then do so (this is 9731 // mainly for right after a gzopen() or gzdopen()) 9732 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)) { 9733 gz_look(tls, state) 9734 } 9735 9736 // return 1 if transparent, 0 if processing a gzip stream 9737 return (*Gz_state)(unsafe.Pointer(state)).Fdirect 9738 } 9739 9740 // -- see zlib.h -- 9741 func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */ 9742 var ret int32 9743 var err int32 9744 var state Gz_statep 9745 9746 // get internal structure 9747 if file == (uintptr(0)) { 9748 return -2 9749 } 9750 state = file 9751 9752 // check that we're reading 9753 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { 9754 return -2 9755 } 9756 9757 // free memory and close file 9758 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 9759 XinflateEnd(tls, (state + 120 /* &.strm */)) 9760 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9761 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9762 } 9763 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-5) { 9764 err = -5 9765 } else { 9766 err = Z_OK 9767 } 9768 Xgz_error(tls, state, Z_OK, uintptr(0)) 9769 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 9770 ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) 9771 libc.Xfree(tls, state) 9772 if ret != 0 { 9773 return -1 9774 } 9775 return err 9776 } 9777 9778 // Initialize state for writing a gzip file. Mark initialization by setting 9779 // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on 9780 // success. 9781 func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */ 9782 var ret int32 9783 var strm Z_streamp = (state + 120 /* &.strm */) 9784 9785 // allocate input buffer (double size for gzprintf) 9786 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))) 9787 if (*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0)) { 9788 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9789 return -1 9790 } 9791 9792 // only need output buffer and deflate state if compressing 9793 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9794 // allocate output buffer 9795 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 9796 if (*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0)) { 9797 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9798 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9799 return -1 9800 } 9801 9802 // allocate deflate memory, set up for gzip compression 9803 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL) 9804 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL) 9805 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL) 9806 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 /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 9807 if ret != Z_OK { 9808 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9809 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9810 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9811 return -1 9812 } 9813 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0) 9814 } 9815 9816 // mark state as initialized 9817 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 9818 9819 // initialize write buffer if compressing 9820 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9821 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 9822 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9823 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 9824 } 9825 return 0 9826 } 9827 9828 // Compress whatever is at avail_in and next_in and write to the output file. 9829 // Return -1 if there is an error writing to the output file or if gz_init() 9830 // fails to allocate memory, otherwise 0. flush is assumed to be a valid 9831 // deflate() flush value. If flush is Z_FINISH, then the deflate() state is 9832 // reset to start a new gzip stream. If gz->direct is true, then simply write 9833 // to the output file without compressing, and ignore flush. 9834 func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */ 9835 var ret int32 9836 var writ int32 9837 var have uint32 9838 var put uint32 9839 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 9840 var strm Z_streamp = (state + 120 /* &.strm */) 9841 9842 // allocate memory if this is the first time through 9843 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9844 return -1 9845 } 9846 9847 // write directly if requested 9848 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 9849 for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 9850 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max { 9851 put = max 9852 } else { 9853 put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9854 } 9855 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(put))) 9856 if writ < 0 { 9857 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9858 return -1 9859 } 9860 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (uint32(writ)) 9861 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(writ)) 9862 } 9863 return 0 9864 } 9865 9866 // run deflate() on provided input until it produces no more output 9867 ret = Z_OK 9868 for ok := true; ok; ok = have != 0 { 9869 // write out current buffer contents if full, or if flushing, but if 9870 // doing Z_FINISH then don't write until we get to Z_STREAM_END 9871 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0)) || ((flush != Z_NO_FLUSH) && ((flush != Z_FINISH) || (ret == Z_STREAM_END))) { 9872 for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext { 9873 if ((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) > int64(int32(max)) { 9874 put = max 9875 } else { 9876 put = (uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) 9877 } 9878 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(put))) 9879 if writ < 0 { 9880 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9881 return -1 9882 } 9883 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(writ)) 9884 } 9885 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 9886 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 9887 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9888 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9889 } 9890 } 9891 9892 // compress 9893 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9894 ret = Xdeflate(tls, strm, flush) 9895 if ret == (-2) { 9896 Xgz_error(tls, state, -2, 9897 ts+291 /* "internal error: ..." */) 9898 return -1 9899 } 9900 have = have - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 9901 } 9902 9903 // if that completed a deflate stream, allow another to start 9904 if flush == Z_FINISH { 9905 XdeflateReset(tls, strm) 9906 } 9907 9908 // all done, no errors 9909 return 0 9910 } 9911 9912 // Compress len zeros to output. Return -1 on a write error or memory 9913 // allocation failure by gz_comp(), or 0 on success. 9914 func gz_zero(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzwrite.c:145:11: */ 9915 var first int32 9916 var n uint32 9917 var strm Z_streamp = (state + 120 /* &.strm */) 9918 9919 // consume whatever's left in the input buffer 9920 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9921 return -1 9922 } 9923 9924 // compress len zeros (len guaranteed > 0) 9925 first = 1 9926 for len != 0 { 9927 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fsize) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len) { 9928 n = uint32(len) 9929 } else { 9930 n = (*Gz_state)(unsafe.Pointer(state)).Fsize 9931 } 9932 if first != 0 { 9933 libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n)) 9934 first = 0 9935 } 9936 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = n 9937 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9938 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 9939 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 9940 return -1 9941 } 9942 len = len - (Off64_t(n)) 9943 } 9944 return 0 9945 } 9946 9947 // Write len bytes from buf to file. Return the number of bytes written. If 9948 // the returned value is less than len, then there was an error. 9949 func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */ 9950 var put Z_size_t = len 9951 9952 // if len is zero, avoid unnecessary operations 9953 if len == uint64(0) { 9954 return uint64(0) 9955 } 9956 9957 // allocate memory if this is the first time through 9958 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9959 return uint64(0) 9960 } 9961 9962 // check for seek request 9963 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9964 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9965 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9966 return uint64(0) 9967 } 9968 } 9969 9970 // for small len, copy to input buffer, otherwise compress directly 9971 if len < Z_size_t((*Gz_state)(unsafe.Pointer(state)).Fsize) { 9972 // copy to input buffer, compress when full 9973 for ok := true; ok; ok = len != 0 { 9974 var have uint32 9975 var copy uint32 9976 9977 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 9978 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9979 } 9980 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)) 9981 copy = ((*Gz_state)(unsafe.Pointer(state)).Fsize - have) 9982 if Z_size_t(copy) > len { 9983 copy = uint32(len) 9984 } 9985 libc.Xmemcpy(tls, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have)), buf, uint64(copy)) 9986 *(*UInt)(unsafe.Pointer(state + 120 /* &.strm */ + 8 /* &.avail_in */)) += (copy) 9987 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(copy)) 9988 buf = (buf + uintptr(copy)) 9989 len = len - (Z_size_t(copy)) 9990 if (len != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9991 return uint64(0) 9992 } 9993 } 9994 } else { 9995 // consume whatever's left in the input buffer 9996 if ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9997 return uint64(0) 9998 } 9999 10000 // directly compress user buffer to file 10001 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf 10002 for ok1 := true; ok1; ok1 = len != 0 { 10003 var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1)) 10004 if Z_size_t(n) > len { 10005 n = uint32(len) 10006 } 10007 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n 10008 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 10009 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 10010 return uint64(0) 10011 } 10012 len = len - (Z_size_t(n)) 10013 } 10014 } 10015 10016 // input was all buffered or compressed 10017 return put 10018 } 10019 10020 // -- see zlib.h -- 10021 func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */ 10022 var state Gz_statep 10023 10024 // get internal structure 10025 if file == (uintptr(0)) { 10026 return 0 10027 } 10028 state = file 10029 10030 // check that we're writing and that there's no error 10031 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10032 return 0 10033 } 10034 10035 // since an int is returned, make sure len fits in one, otherwise return 10036 // with an error (this avoids a flaw in the interface) 10037 if int32(len) < 0 { 10038 Xgz_error(tls, state, -3, ts+330 /* "requested length..." */) 10039 return 0 10040 } 10041 10042 // write len bytes from buf (the return value will fit in an int) 10043 return int32(gz_write(tls, state, buf, uint64(len))) 10044 } 10045 10046 // -- see zlib.h -- 10047 func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */ 10048 var len Z_size_t 10049 var state Gz_statep 10050 10051 // get internal structure 10052 if file == (uintptr(0)) { 10053 return uint64(0) 10054 } 10055 state = file 10056 10057 // check that we're writing and that there's no error 10058 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10059 return uint64(0) 10060 } 10061 10062 // compute bytes to read -- error on overflow 10063 len = (nitems * size) 10064 if (size != 0) && ((len / size) != nitems) { 10065 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 10066 return uint64(0) 10067 } 10068 10069 // write len bytes to buf, return the number of full items written 10070 if len != 0 { 10071 return (gz_write(tls, state, buf, len) / size) 10072 } 10073 return uint64(0) 10074 } 10075 10076 // -- see zlib.h -- 10077 func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */ 10078 bp := tls.Alloc(1) 10079 defer tls.Free(1) 10080 10081 var have uint32 10082 // var buf [1]uint8 at bp, 1 10083 10084 var state Gz_statep 10085 var strm Z_streamp 10086 10087 // get internal structure 10088 if file == (uintptr(0)) { 10089 return -1 10090 } 10091 state = file 10092 strm = (state + 120 /* &.strm */) 10093 10094 // check that we're writing and that there's no error 10095 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10096 return -1 10097 } 10098 10099 // check for seek request 10100 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10101 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10102 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10103 return -1 10104 } 10105 } 10106 10107 // try writing to input buffer for speed (state->size == 0 if buffer not 10108 // initialized) 10109 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10110 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 10111 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 10112 } 10113 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)) 10114 if have < (*Gz_state)(unsafe.Pointer(state)).Fsize { 10115 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c) 10116 (*Z_stream)(unsafe.Pointer(strm)).Favail_in++ 10117 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 10118 return (c & 0xff) 10119 } 10120 } 10121 10122 // no room in buffer or not initialized, use gz_write() 10123 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */)) = uint8(c) 10124 if gz_write(tls, state, bp /* &buf[0] */, uint64(1)) != uint64(1) { 10125 return -1 10126 } 10127 return (c & 0xff) 10128 } 10129 10130 // -- see zlib.h -- 10131 func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */ 10132 var ret int32 10133 var len Z_size_t 10134 var state Gz_statep 10135 10136 // get internal structure 10137 if file == (uintptr(0)) { 10138 return -1 10139 } 10140 state = file 10141 10142 // check that we're writing and that there's no error 10143 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10144 return -1 10145 } 10146 10147 // write string 10148 len = libc.Xstrlen(tls, str) 10149 ret = int32(gz_write(tls, state, str, len)) 10150 if (ret == 0) && (len != uint64(0)) { 10151 return -1 10152 } 10153 return ret 10154 } 10155 10156 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 10157 // 10158 // This file is part of GCC. 10159 // 10160 // GCC is free software; you can redistribute it and/or modify 10161 // it under the terms of the GNU General Public License as published by 10162 // the Free Software Foundation; either version 3, or (at your option) 10163 // any later version. 10164 // 10165 // GCC is distributed in the hope that it will be useful, 10166 // but WITHOUT ANY WARRANTY; without even the implied warranty of 10167 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10168 // GNU General Public License for more details. 10169 // 10170 // Under Section 7 of GPL version 3, you are granted additional 10171 // permissions described in the GCC Runtime Library Exception, version 10172 // 3.1, as published by the Free Software Foundation. 10173 // 10174 // You should have received a copy of the GNU General Public License and 10175 // a copy of the GCC Runtime Library Exception along with this program; 10176 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 10177 // <http://www.gnu.org/licenses/>. 10178 10179 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 10180 10181 // -- see zlib.h -- 10182 func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */ 10183 var len int32 10184 var left uint32 10185 var next uintptr 10186 var state Gz_statep 10187 var strm Z_streamp 10188 10189 // get internal structure 10190 if file == (uintptr(0)) { 10191 return -2 10192 } 10193 state = file 10194 strm = (state + 120 /* &.strm */) 10195 10196 // check that we're writing and that there's no error 10197 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10198 return -2 10199 } 10200 10201 // make sure we have some buffer space 10202 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 10203 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10204 } 10205 10206 // check for seek request 10207 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10208 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10209 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10210 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10211 } 10212 } 10213 10214 // do the printf() into the input buffer, put length in len -- the input 10215 // buffer is double-sized just for this function, so there is guaranteed to 10216 // be state->size bytes available after the current contents 10217 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 10218 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 10219 } 10220 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)) 10221 *(*int8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1))))) = int8(0) 10222 len = libc.Xvsnprintf(tls, next, uint64((*Gz_state)(unsafe.Pointer(state)).Fsize), format, va) 10223 10224 // check that printf() results fit in buffer 10225 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) { 10226 return 0 10227 } 10228 10229 // update buffer and position, compress first half if past that 10230 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (uint32(len)) 10231 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(len)) 10232 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize { 10233 left = ((*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize) 10234 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize 10235 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 10236 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10237 } 10238 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize)), uint64(left)) 10239 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 10240 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = left 10241 } 10242 return len 10243 } 10244 10245 func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */ 10246 var va1 Va_list 10247 _ = va1 10248 var ret int32 10249 10250 va1 = va 10251 ret = Xgzvprintf(tls, file, format, va1) 10252 _ = va1 10253 return ret 10254 } 10255 10256 // -- see zlib.h -- 10257 func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */ 10258 var state Gz_statep 10259 10260 // get internal structure 10261 if file == (uintptr(0)) { 10262 return -2 10263 } 10264 state = file 10265 10266 // check that we're writing and that there's no error 10267 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10268 return -2 10269 } 10270 10271 // check flush parameter 10272 if (flush < 0) || (flush > Z_FINISH) { 10273 return -2 10274 } 10275 10276 // check for seek request 10277 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10278 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10279 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10280 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10281 } 10282 } 10283 10284 // compress remaining data with requested flush 10285 gz_comp(tls, state, flush) 10286 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10287 } 10288 10289 // -- see zlib.h -- 10290 func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */ 10291 var state Gz_statep 10292 var strm Z_streamp 10293 10294 // get internal structure 10295 if file == (uintptr(0)) { 10296 return -2 10297 } 10298 state = file 10299 strm = (state + 120 /* &.strm */) 10300 10301 // check that we're writing and that there's no error 10302 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10303 return -2 10304 } 10305 10306 // if no change is requested, then do nothing 10307 if (level == (*Gz_state)(unsafe.Pointer(state)).Flevel) && (strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy) { 10308 return Z_OK 10309 } 10310 10311 // check for seek request 10312 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10313 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10314 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10315 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10316 } 10317 } 10318 10319 // change compression parameters for subsequent input 10320 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10321 // flush previous input with previous parameters before changing 10322 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_BLOCK) == -1) { 10323 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10324 } 10325 XdeflateParams(tls, strm, level, strategy) 10326 } 10327 (*Gz_state)(unsafe.Pointer(state)).Flevel = level 10328 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy 10329 return Z_OK 10330 } 10331 10332 // -- see zlib.h -- 10333 func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */ 10334 var ret int32 = Z_OK 10335 var state Gz_statep 10336 10337 // get internal structure 10338 if file == (uintptr(0)) { 10339 return -2 10340 } 10341 state = file 10342 10343 // check that we're writing 10344 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 10345 return -2 10346 } 10347 10348 // check for seek request 10349 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10350 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10351 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10352 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 10353 } 10354 } 10355 10356 // flush, free memory, and close file 10357 if gz_comp(tls, state, Z_FINISH) == -1 { 10358 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 10359 } 10360 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10361 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 10362 XdeflateEnd(tls, (state + 120 /* &.strm */)) 10363 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 10364 } 10365 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 10366 } 10367 Xgz_error(tls, state, Z_OK, uintptr(0)) 10368 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 10369 if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 { 10370 ret = -1 10371 } 10372 libc.Xfree(tls, state) 10373 return ret 10374 } 10375 10376 // Reverse the bytes in a 32-bit value 10377 10378 // inftrees.h -- header to use inftrees.c 10379 // Copyright (C) 1995-2005, 2010 Mark Adler 10380 // For conditions of distribution and use, see copyright notice in zlib.h 10381 10382 // WARNING: this file should *not* be used by applications. It is 10383 // part of the implementation of the compression library and is 10384 // subject to change. Applications should only use zlib.h. 10385 // 10386 10387 // Structure for decoding tables. Each entry provides either the 10388 // information needed to do the operation requested by the code that 10389 // indexed that table entry, or it provides a pointer to another 10390 // table that indexes more bits of the code. op indicates whether 10391 // the entry is a pointer to another table, a literal, a length or 10392 // distance, an end-of-block, or an invalid code. For a table 10393 // pointer, the low four bits of op is the number of index bits of 10394 // that table. For a length or distance, the low four bits of op 10395 // is the number of extra bits to get after the code. bits is 10396 // the number of bits in this code or part of the code to drop off 10397 // of the bit buffer. val is the actual byte to output in the case 10398 // of a literal, the base length or distance, or the offset from 10399 // the current table to the next table. Each entry is four bytes. 10400 type Code = struct { 10401 Fop uint8 10402 Fbits uint8 10403 Fval uint16 10404 } /* inftrees.h:28:3 */ 10405 10406 // op values as set by inflate_table(): 10407 // 00000000 - literal 10408 // 0000tttt - table link, tttt != 0 is the number of table index bits 10409 // 0001eeee - length or distance, eeee is the number of extra bits 10410 // 01100000 - end of block 10411 // 01000000 - invalid code 10412 // 10413 10414 // Maximum size of the dynamic table. The maximum number of code structures is 10415 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 10416 // codes. These values were found by exhaustive searches using the program 10417 // examples/enough.c found in the zlib distribtution. The arguments to that 10418 // program are the number of symbols, the initial root table size, and the 10419 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 10420 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 10421 // The initial root table size (9 or 6) is found in the fifth argument of the 10422 // inflate_table() calls in inflate.c and infback.c. If the root table size is 10423 // changed, then these maximum sizes would be need to be recalculated and 10424 // updated. 10425 10426 // Type of code to build for inflate_table() 10427 type Codetype = uint32 /* inftrees.h:58:3 */ 10428 // inflate.h -- internal inflate state definition 10429 // Copyright (C) 1995-2016 Mark Adler 10430 // For conditions of distribution and use, see copyright notice in zlib.h 10431 10432 // WARNING: this file should *not* be used by applications. It is 10433 // part of the implementation of the compression library and is 10434 // subject to change. Applications should only use zlib.h. 10435 // 10436 10437 // define NO_GZIP when compiling if you want to disable gzip header and 10438 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 10439 // the crc code when it is not needed. For shared libraries, gzip decoding 10440 // should be left enabled. 10441 10442 // Possible inflate modes between inflate() calls 10443 type Inflate_mode = uint32 /* inflate.h:53:3 */ 10444 10445 // 10446 // State transitions between above modes - 10447 // 10448 // (most modes can go to BAD or MEM on error -- not shown for clarity) 10449 // 10450 // Process header: 10451 // HEAD -> (gzip) or (zlib) or (raw) 10452 // (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> 10453 // HCRC -> TYPE 10454 // (zlib) -> DICTID or TYPE 10455 // DICTID -> DICT -> TYPE 10456 // (raw) -> TYPEDO 10457 // Read deflate blocks: 10458 // TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK 10459 // STORED -> COPY_ -> COPY -> TYPE 10460 // TABLE -> LENLENS -> CODELENS -> LEN_ 10461 // LEN_ -> LEN 10462 // Read deflate codes in fixed or dynamic block: 10463 // LEN -> LENEXT or LIT or TYPE 10464 // LENEXT -> DIST -> DISTEXT -> MATCH -> LEN 10465 // LIT -> LEN 10466 // Process trailer: 10467 // CHECK -> LENGTH -> DONE 10468 // 10469 10470 // State maintained between inflate() calls -- approximately 7K bytes, not 10471 // including the allocated sliding window, which is up to 32K bytes. 10472 type Inflate_state = struct { 10473 Fstrm Z_streamp 10474 Fmode Inflate_mode 10475 Flast int32 10476 Fwrap int32 10477 Fhavedict int32 10478 Fflags int32 10479 Fdmax uint32 10480 Fcheck uint64 10481 Ftotal uint64 10482 Fhead Gz_headerp 10483 Fwbits uint32 10484 Fwsize uint32 10485 Fwhave uint32 10486 Fwnext uint32 10487 Fwindow uintptr 10488 Fhold uint64 10489 Fbits uint32 10490 Flength uint32 10491 Foffset uint32 10492 Fextra uint32 10493 Flencode uintptr 10494 Fdistcode uintptr 10495 Flenbits uint32 10496 Fdistbits uint32 10497 Fncode uint32 10498 Fnlen uint32 10499 Fndist uint32 10500 Fhave uint32 10501 Fnext uintptr 10502 Flens [320]uint16 10503 Fwork [288]uint16 10504 Fcodes [1444]Code 10505 Fsane int32 10506 Fback int32 10507 Fwas uint32 10508 F__ccgo_pad1 [4]byte 10509 } /* inflate.h:82:1 */ 10510 10511 // 10512 // strm provides memory allocation functions in zalloc and zfree, or 10513 // Z_NULL to use the library memory allocation functions. 10514 // 10515 // windowBits is in the range 8..15, and window is a user-supplied 10516 // window and output buffer that is 2**windowBits bytes. 10517 // 10518 func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */ 10519 var state uintptr 10520 10521 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) { 10522 return -6 10523 } 10524 if (((strm == uintptr(Z_NULL)) || (window == uintptr(Z_NULL))) || (windowBits < 8)) || (windowBits > 15) { 10525 return -2 10526 } 10527 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 10528 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 10529 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 10530 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 10531 }{Xzcalloc})) 10532 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 10533 } 10534 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 10535 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 10536 f func(*libc.TLS, Voidpf, Voidpf) 10537 }{Xzcfree})) 10538 } 10539 state = (*struct { 10540 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 10541 })(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{}))) 10542 if state == uintptr(Z_NULL) { 10543 return -4 10544 } 10545 10546 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 10547 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 10548 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits) 10549 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << windowBits) 10550 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = window 10551 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10552 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10553 return Z_OK 10554 } 10555 10556 // 10557 // Return state with length and distance decoding tables and index sizes set to 10558 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 10559 // If BUILDFIXED is defined, then instead this routine builds the tables the 10560 // first time it's called, and returns those tables the first time and 10561 // thereafter. This reduces the size of the code by about 2K bytes, in 10562 // exchange for a little execution time. However, BUILDFIXED should not be 10563 // used for threaded applications, since the rewriting of the tables and virgin 10564 // may not be thread-safe. 10565 // 10566 func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */ 10567 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix)) 10568 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 10569 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix)) 10570 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 10571 } 10572 10573 var lenfix = [512]Code{ 10574 {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)}, 10575 {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)}, 10576 {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)}, 10577 {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)}, 10578 {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)}, 10579 {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)}, 10580 {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)}, 10581 {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)}, 10582 {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)}, 10583 {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)}, 10584 {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)}, 10585 {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)}, 10586 {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)}, 10587 {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)}, 10588 {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)}, 10589 {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)}, 10590 {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)}, 10591 {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)}, 10592 {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)}, 10593 {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)}, 10594 {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)}, 10595 {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)}, 10596 {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)}, 10597 {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)}, 10598 {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)}, 10599 {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)}, 10600 {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)}, 10601 {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)}, 10602 {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)}, 10603 {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)}, 10604 {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)}, 10605 {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)}, 10606 {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)}, 10607 {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)}, 10608 {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)}, 10609 {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)}, 10610 {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)}, 10611 {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)}, 10612 {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)}, 10613 {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)}, 10614 {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)}, 10615 {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)}, 10616 {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)}, 10617 {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)}, 10618 {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)}, 10619 {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)}, 10620 {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)}, 10621 {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)}, 10622 {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)}, 10623 {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)}, 10624 {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)}, 10625 {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)}, 10626 {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)}, 10627 {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)}, 10628 {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)}, 10629 {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)}, 10630 {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)}, 10631 {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)}, 10632 {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)}, 10633 {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)}, 10634 {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)}, 10635 {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)}, 10636 {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)}, 10637 {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)}, 10638 {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)}, 10639 {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)}, 10640 {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)}, 10641 {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)}, 10642 {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)}, 10643 {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)}, 10644 {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)}, 10645 {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)}, 10646 {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)}, 10647 {Fbits: uint8(9), Fval: uint16(255)}, 10648 } /* inffixed.h:10:23 */ 10649 var distfix = [32]Code{ 10650 {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)}, 10651 {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)}, 10652 {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)}, 10653 {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)}, 10654 {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)}, 10655 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 10656 } /* inffixed.h:87:23 */ 10657 10658 // Macros for inflateBack(): 10659 10660 // Load returned state from inflate_fast() 10661 10662 // Set state from registers for inflate_fast() 10663 10664 // Clear the input bit accumulator 10665 10666 // Assure that some input is available. If input is requested, but denied, 10667 // then return a Z_BUF_ERROR from inflateBack(). 10668 10669 // Get a byte of input into the bit accumulator, or return from inflateBack() 10670 // with an error if there is no input available. 10671 10672 // Assure that there are at least n bits in the bit accumulator. If there is 10673 // not enough available input to do that, then return from inflateBack() with 10674 // an error. 10675 10676 // Return the low n bits of the bit accumulator (n < 16) 10677 10678 // Remove n bits from the bit accumulator 10679 10680 // Remove zero to seven bits as needed to go to a byte boundary 10681 10682 // Assure that some output space is available, by writing out the window 10683 // if it's full. If the write fails, return from inflateBack() with a 10684 // Z_BUF_ERROR. 10685 10686 // 10687 // strm provides the memory allocation functions and window buffer on input, 10688 // and provides information on the unused input on return. For Z_DATA_ERROR 10689 // returns, strm will also provide an error message. 10690 // 10691 // in() and out() are the call-back input and output functions. When 10692 // inflateBack() needs more input, it calls in(). When inflateBack() has 10693 // filled the window with output, or when it completes with data in the 10694 // window, it calls out() to write out the data. The application must not 10695 // change the provided input until in() is called again or inflateBack() 10696 // returns. The application must not change the window/output buffer until 10697 // inflateBack() returns. 10698 // 10699 // in() and out() are called with a descriptor parameter provided in the 10700 // inflateBack() call. This parameter can be a structure that provides the 10701 // information required to do the read or write, as well as accumulated 10702 // information on the input and output such as totals and check values. 10703 // 10704 // in() should return zero on failure. out() should return non-zero on 10705 // failure. If either in() or out() fails, than inflateBack() returns a 10706 // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it 10707 // was in() or out() that caused in the error. Otherwise, inflateBack() 10708 // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format 10709 // error, or Z_MEM_ERROR if it could not allocate memory for the state. 10710 // inflateBack() can also return Z_STREAM_ERROR if the input parameters 10711 // are not correct, i.e. strm is Z_NULL or the state was not initialized. 10712 // 10713 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: */ 10714 bp := tls.Alloc(8) 10715 defer tls.Free(8) 10716 10717 var state uintptr 10718 // var next uintptr at bp, 8 10719 // next input 10720 var put uintptr // next output 10721 var have uint32 10722 var left uint32 // available input and output 10723 var hold uint64 // bit buffer 10724 var bits uint32 // bits in bit buffer 10725 var copy uint32 // number of stored or match bytes to copy 10726 var from uintptr // where to copy match bytes from 10727 var here Code // current decoding table entry 10728 var last Code // parent table entry 10729 var len uint32 // length to copy for repeats, bits to drop 10730 var ret int32 10731 10732 // Check that the strm exists and that the state was initialized 10733 if !((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) { 10734 goto __1 10735 } 10736 return -2 10737 __1: 10738 ; 10739 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10740 10741 // Reset the state 10742 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 10743 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10744 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 10745 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10746 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 10747 if *(*uintptr)(unsafe.Pointer(bp /* next */)) != uintptr(Z_NULL) { 10748 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 10749 } else { 10750 have = uint32(0) 10751 } 10752 hold = uint64(0) 10753 bits = uint32(0) 10754 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10755 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10756 10757 // Inflate until end of block marked as last 10758 __2: 10759 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 10760 case TYPE: 10761 goto __6 10762 10763 case STORED: 10764 goto __7 10765 10766 case TABLE: 10767 goto __8 10768 10769 case LEN: 10770 goto __9 10771 10772 case DONE: 10773 goto __10 10774 10775 case BAD: 10776 goto __11 10777 10778 default: 10779 goto __12 10780 } 10781 goto __5 10782 __6: 10783 // determine and dispatch block type 10784 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 10785 goto __13 10786 } 10787 __14: 10788 hold >>= (bits & uint32(7)) 10789 bits = bits - (bits & uint32(7)) 10790 goto __15 10791 __15: 10792 if 0 != 0 { 10793 goto __14 10794 } 10795 goto __16 10796 __16: 10797 ; 10798 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 10799 goto __5 10800 __13: 10801 ; 10802 __17: 10803 __20: 10804 if !(bits < (uint32(3))) { 10805 goto __21 10806 } 10807 __22: 10808 __25: 10809 if !(have == uint32(0)) { 10810 goto __28 10811 } 10812 have = (*struct { 10813 f func(*libc.TLS, uintptr, uintptr) uint32 10814 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10815 if !(have == uint32(0)) { 10816 goto __29 10817 } 10818 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10819 ret = -5 10820 goto inf_leave 10821 __29: 10822 ; 10823 __28: 10824 ; 10825 goto __26 10826 __26: 10827 if 0 != 0 { 10828 goto __25 10829 } 10830 goto __27 10831 __27: 10832 ; 10833 have-- 10834 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10835 bits = bits + (uint32(8)) 10836 goto __23 10837 __23: 10838 if 0 != 0 { 10839 goto __22 10840 } 10841 goto __24 10842 __24: 10843 ; 10844 goto __20 10845 __21: 10846 ; 10847 goto __18 10848 __18: 10849 if 0 != 0 { 10850 goto __17 10851 } 10852 goto __19 10853 __19: 10854 ; 10855 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 10856 __30: 10857 hold >>= 1 10858 bits = bits - (uint32(1)) 10859 goto __31 10860 __31: 10861 if 0 != 0 { 10862 goto __30 10863 } 10864 goto __32 10865 __32: 10866 ; 10867 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 10868 case uint32(0): 10869 goto __34 10870 case uint32(1): 10871 goto __35 10872 case uint32(2): 10873 goto __36 10874 case uint32(3): 10875 goto __37 10876 } 10877 goto __33 10878 __34: // stored block 10879 ; 10880 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 10881 goto __33 10882 __35: // fixed block 10883 fixedtables(tls, state) 10884 10885 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes 10886 goto __33 10887 __36: // dynamic block 10888 ; 10889 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 10890 goto __33 10891 __37: 10892 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 10893 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10894 __33: 10895 ; 10896 __38: 10897 hold >>= 2 10898 bits = bits - (uint32(2)) 10899 goto __39 10900 __39: 10901 if 0 != 0 { 10902 goto __38 10903 } 10904 goto __40 10905 __40: 10906 ; 10907 goto __5 10908 10909 __7: 10910 // get and verify stored block length 10911 __41: 10912 hold >>= (bits & uint32(7)) 10913 bits = bits - (bits & uint32(7)) 10914 goto __42 10915 __42: 10916 if 0 != 0 { 10917 goto __41 10918 } 10919 goto __43 10920 __43: 10921 ; // go to byte boundary 10922 __44: 10923 __47: 10924 if !(bits < (uint32(32))) { 10925 goto __48 10926 } 10927 __49: 10928 __52: 10929 if !(have == uint32(0)) { 10930 goto __55 10931 } 10932 have = (*struct { 10933 f func(*libc.TLS, uintptr, uintptr) uint32 10934 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10935 if !(have == uint32(0)) { 10936 goto __56 10937 } 10938 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10939 ret = -5 10940 goto inf_leave 10941 __56: 10942 ; 10943 __55: 10944 ; 10945 goto __53 10946 __53: 10947 if 0 != 0 { 10948 goto __52 10949 } 10950 goto __54 10951 __54: 10952 ; 10953 have-- 10954 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10955 bits = bits + (uint32(8)) 10956 goto __50 10957 __50: 10958 if 0 != 0 { 10959 goto __49 10960 } 10961 goto __51 10962 __51: 10963 ; 10964 goto __47 10965 __48: 10966 ; 10967 goto __45 10968 __45: 10969 if 0 != 0 { 10970 goto __44 10971 } 10972 goto __46 10973 __46: 10974 ; 10975 if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) { 10976 goto __57 10977 } 10978 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 10979 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10980 goto __5 10981 __57: 10982 ; 10983 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 10984 10985 __58: 10986 hold = uint64(0) 10987 bits = uint32(0) 10988 goto __59 10989 __59: 10990 if 0 != 0 { 10991 goto __58 10992 } 10993 goto __60 10994 __60: 10995 ; 10996 10997 // copy stored block from input to output 10998 __61: 10999 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) { 11000 goto __62 11001 } 11002 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 11003 __63: 11004 if !(have == uint32(0)) { 11005 goto __66 11006 } 11007 have = (*struct { 11008 f func(*libc.TLS, uintptr, uintptr) uint32 11009 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11010 if !(have == uint32(0)) { 11011 goto __67 11012 } 11013 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11014 ret = -5 11015 goto inf_leave 11016 __67: 11017 ; 11018 __66: 11019 ; 11020 goto __64 11021 __64: 11022 if 0 != 0 { 11023 goto __63 11024 } 11025 goto __65 11026 __65: 11027 ; 11028 __68: 11029 if !(left == uint32(0)) { 11030 goto __71 11031 } 11032 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11033 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11034 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 11035 if !((*struct { 11036 f func(*libc.TLS, uintptr, uintptr, uint32) int32 11037 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 11038 goto __72 11039 } 11040 ret = -5 11041 goto inf_leave 11042 __72: 11043 ; 11044 __71: 11045 ; 11046 goto __69 11047 __69: 11048 if 0 != 0 { 11049 goto __68 11050 } 11051 goto __70 11052 __70: 11053 ; 11054 if !(copy > have) { 11055 goto __73 11056 } 11057 copy = have 11058 __73: 11059 ; 11060 if !(copy > left) { 11061 goto __74 11062 } 11063 copy = left 11064 __74: 11065 ; 11066 libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy)) 11067 have = have - (copy) 11068 *(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy) 11069 left = left - (copy) 11070 put += uintptr(copy) 11071 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 11072 goto __61 11073 __62: 11074 ; 11075 11076 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11077 goto __5 11078 11079 __8: 11080 // get dynamic table entries descriptor 11081 __75: 11082 __78: 11083 if !(bits < (uint32(14))) { 11084 goto __79 11085 } 11086 __80: 11087 __83: 11088 if !(have == uint32(0)) { 11089 goto __86 11090 } 11091 have = (*struct { 11092 f func(*libc.TLS, uintptr, uintptr) uint32 11093 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11094 if !(have == uint32(0)) { 11095 goto __87 11096 } 11097 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11098 ret = -5 11099 goto inf_leave 11100 __87: 11101 ; 11102 __86: 11103 ; 11104 goto __84 11105 __84: 11106 if 0 != 0 { 11107 goto __83 11108 } 11109 goto __85 11110 __85: 11111 ; 11112 have-- 11113 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11114 bits = bits + (uint32(8)) 11115 goto __81 11116 __81: 11117 if 0 != 0 { 11118 goto __80 11119 } 11120 goto __82 11121 __82: 11122 ; 11123 goto __78 11124 __79: 11125 ; 11126 goto __76 11127 __76: 11128 if 0 != 0 { 11129 goto __75 11130 } 11131 goto __77 11132 __77: 11133 ; 11134 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 11135 __88: 11136 hold >>= 5 11137 bits = bits - (uint32(5)) 11138 goto __89 11139 __89: 11140 if 0 != 0 { 11141 goto __88 11142 } 11143 goto __90 11144 __90: 11145 ; 11146 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 11147 __91: 11148 hold >>= 5 11149 bits = bits - (uint32(5)) 11150 goto __92 11151 __92: 11152 if 0 != 0 { 11153 goto __91 11154 } 11155 goto __93 11156 __93: 11157 ; 11158 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 11159 __94: 11160 hold >>= 4 11161 bits = bits - (uint32(4)) 11162 goto __95 11163 __95: 11164 if 0 != 0 { 11165 goto __94 11166 } 11167 goto __96 11168 __96: 11169 ; 11170 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 11171 goto __97 11172 } 11173 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 11174 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11175 goto __5 11176 __97: 11177 ; 11178 11179 // get code length code lengths (not a typo) 11180 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 11181 __98: 11182 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 11183 goto __99 11184 } 11185 __100: 11186 __103: 11187 if !(bits < (uint32(3))) { 11188 goto __104 11189 } 11190 __105: 11191 __108: 11192 if !(have == uint32(0)) { 11193 goto __111 11194 } 11195 have = (*struct { 11196 f func(*libc.TLS, uintptr, uintptr) uint32 11197 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11198 if !(have == uint32(0)) { 11199 goto __112 11200 } 11201 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11202 ret = -5 11203 goto inf_leave 11204 __112: 11205 ; 11206 __111: 11207 ; 11208 goto __109 11209 __109: 11210 if 0 != 0 { 11211 goto __108 11212 } 11213 goto __110 11214 __110: 11215 ; 11216 have-- 11217 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11218 bits = bits + (uint32(8)) 11219 goto __106 11220 __106: 11221 if 0 != 0 { 11222 goto __105 11223 } 11224 goto __107 11225 __107: 11226 ; 11227 goto __103 11228 __104: 11229 ; 11230 goto __101 11231 __101: 11232 if 0 != 0 { 11233 goto __100 11234 } 11235 goto __102 11236 __102: 11237 ; 11238 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 11239 __113: 11240 hold >>= 3 11241 bits = bits - (uint32(3)) 11242 goto __114 11243 __114: 11244 if 0 != 0 { 11245 goto __113 11246 } 11247 goto __115 11248 __115: 11249 ; 11250 goto __98 11251 __99: 11252 ; 11253 __116: 11254 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 11255 goto __117 11256 } 11257 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 11258 goto __116 11259 __117: 11260 ; 11261 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 11262 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11263 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 11264 ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */), 11265 (state + 120 /* &.lenbits */), state+792 /* &.work */) 11266 if !(ret != 0) { 11267 goto __118 11268 } 11269 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 11270 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11271 goto __5 11272 __118: 11273 ; 11274 11275 // get length and distance code code lengths 11276 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 11277 __119: 11278 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 11279 goto __120 11280 } 11281 __121: 11282 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 11283 if !((uint32(here.Fbits)) <= bits) { 11284 goto __124 11285 } 11286 goto __123 11287 __124: 11288 ; 11289 __125: 11290 __128: 11291 if !(have == uint32(0)) { 11292 goto __131 11293 } 11294 have = (*struct { 11295 f func(*libc.TLS, uintptr, uintptr) uint32 11296 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11297 if !(have == uint32(0)) { 11298 goto __132 11299 } 11300 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11301 ret = -5 11302 goto inf_leave 11303 __132: 11304 ; 11305 __131: 11306 ; 11307 goto __129 11308 __129: 11309 if 0 != 0 { 11310 goto __128 11311 } 11312 goto __130 11313 __130: 11314 ; 11315 have-- 11316 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11317 bits = bits + (uint32(8)) 11318 goto __126 11319 __126: 11320 if 0 != 0 { 11321 goto __125 11322 } 11323 goto __127 11324 __127: 11325 ; 11326 goto __122 11327 __122: 11328 goto __121 11329 goto __123 11330 __123: 11331 ; 11332 if !(int32(here.Fval) < 16) { 11333 goto __133 11334 } 11335 __135: 11336 hold >>= int32(here.Fbits) 11337 bits = bits - (uint32(here.Fbits)) 11338 goto __136 11339 __136: 11340 if 0 != 0 { 11341 goto __135 11342 } 11343 goto __137 11344 __137: 11345 ; 11346 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 11347 goto __134 11348 __133: 11349 if !(int32(here.Fval) == 16) { 11350 goto __138 11351 } 11352 __140: 11353 __143: 11354 if !(bits < (uint32(int32(here.Fbits) + 2))) { 11355 goto __144 11356 } 11357 __145: 11358 __148: 11359 if !(have == uint32(0)) { 11360 goto __151 11361 } 11362 have = (*struct { 11363 f func(*libc.TLS, uintptr, uintptr) uint32 11364 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11365 if !(have == uint32(0)) { 11366 goto __152 11367 } 11368 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11369 ret = -5 11370 goto inf_leave 11371 __152: 11372 ; 11373 __151: 11374 ; 11375 goto __149 11376 __149: 11377 if 0 != 0 { 11378 goto __148 11379 } 11380 goto __150 11381 __150: 11382 ; 11383 have-- 11384 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11385 bits = bits + (uint32(8)) 11386 goto __146 11387 __146: 11388 if 0 != 0 { 11389 goto __145 11390 } 11391 goto __147 11392 __147: 11393 ; 11394 goto __143 11395 __144: 11396 ; 11397 goto __141 11398 __141: 11399 if 0 != 0 { 11400 goto __140 11401 } 11402 goto __142 11403 __142: 11404 ; 11405 __153: 11406 hold >>= int32(here.Fbits) 11407 bits = bits - (uint32(here.Fbits)) 11408 goto __154 11409 __154: 11410 if 0 != 0 { 11411 goto __153 11412 } 11413 goto __155 11414 __155: 11415 ; 11416 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 11417 goto __156 11418 } 11419 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11420 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11421 goto __120 11422 __156: 11423 ; 11424 len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 11425 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 11426 __157: 11427 hold >>= 2 11428 bits = bits - (uint32(2)) 11429 goto __158 11430 __158: 11431 if 0 != 0 { 11432 goto __157 11433 } 11434 goto __159 11435 __159: 11436 ; 11437 goto __139 11438 __138: 11439 if !(int32(here.Fval) == 17) { 11440 goto __160 11441 } 11442 __162: 11443 __165: 11444 if !(bits < (uint32(int32(here.Fbits) + 3))) { 11445 goto __166 11446 } 11447 __167: 11448 __170: 11449 if !(have == uint32(0)) { 11450 goto __173 11451 } 11452 have = (*struct { 11453 f func(*libc.TLS, uintptr, uintptr) uint32 11454 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11455 if !(have == uint32(0)) { 11456 goto __174 11457 } 11458 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11459 ret = -5 11460 goto inf_leave 11461 __174: 11462 ; 11463 __173: 11464 ; 11465 goto __171 11466 __171: 11467 if 0 != 0 { 11468 goto __170 11469 } 11470 goto __172 11471 __172: 11472 ; 11473 have-- 11474 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11475 bits = bits + (uint32(8)) 11476 goto __168 11477 __168: 11478 if 0 != 0 { 11479 goto __167 11480 } 11481 goto __169 11482 __169: 11483 ; 11484 goto __165 11485 __166: 11486 ; 11487 goto __163 11488 __163: 11489 if 0 != 0 { 11490 goto __162 11491 } 11492 goto __164 11493 __164: 11494 ; 11495 __175: 11496 hold >>= int32(here.Fbits) 11497 bits = bits - (uint32(here.Fbits)) 11498 goto __176 11499 __176: 11500 if 0 != 0 { 11501 goto __175 11502 } 11503 goto __177 11504 __177: 11505 ; 11506 len = uint32(0) 11507 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 11508 __178: 11509 hold >>= 3 11510 bits = bits - (uint32(3)) 11511 goto __179 11512 __179: 11513 if 0 != 0 { 11514 goto __178 11515 } 11516 goto __180 11517 __180: 11518 ; 11519 goto __161 11520 __160: 11521 __181: 11522 __184: 11523 if !(bits < (uint32(int32(here.Fbits) + 7))) { 11524 goto __185 11525 } 11526 __186: 11527 __189: 11528 if !(have == uint32(0)) { 11529 goto __192 11530 } 11531 have = (*struct { 11532 f func(*libc.TLS, uintptr, uintptr) uint32 11533 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11534 if !(have == uint32(0)) { 11535 goto __193 11536 } 11537 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11538 ret = -5 11539 goto inf_leave 11540 __193: 11541 ; 11542 __192: 11543 ; 11544 goto __190 11545 __190: 11546 if 0 != 0 { 11547 goto __189 11548 } 11549 goto __191 11550 __191: 11551 ; 11552 have-- 11553 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11554 bits = bits + (uint32(8)) 11555 goto __187 11556 __187: 11557 if 0 != 0 { 11558 goto __186 11559 } 11560 goto __188 11561 __188: 11562 ; 11563 goto __184 11564 __185: 11565 ; 11566 goto __182 11567 __182: 11568 if 0 != 0 { 11569 goto __181 11570 } 11571 goto __183 11572 __183: 11573 ; 11574 __194: 11575 hold >>= int32(here.Fbits) 11576 bits = bits - (uint32(here.Fbits)) 11577 goto __195 11578 __195: 11579 if 0 != 0 { 11580 goto __194 11581 } 11582 goto __196 11583 __196: 11584 ; 11585 len = uint32(0) 11586 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 11587 __197: 11588 hold >>= 7 11589 bits = bits - (uint32(7)) 11590 goto __198 11591 __198: 11592 if 0 != 0 { 11593 goto __197 11594 } 11595 goto __199 11596 __199: 11597 ; 11598 __161: 11599 ; 11600 __139: 11601 ; 11602 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 11603 goto __200 11604 } 11605 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11606 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11607 goto __120 11608 __200: 11609 ; 11610 __201: 11611 if !(libc.PostDecUint32(©, 1) != 0) { 11612 goto __202 11613 } 11614 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 11615 goto __201 11616 __202: 11617 ; 11618 __134: 11619 ; 11620 goto __119 11621 __120: 11622 ; 11623 11624 // handle error breaks in while 11625 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 11626 goto __203 11627 } 11628 goto __5 11629 __203: 11630 ; 11631 11632 // check for end-of-block code (better have one) 11633 if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) { 11634 goto __204 11635 } 11636 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 11637 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11638 goto __5 11639 __204: 11640 ; 11641 11642 // build code tables -- note: do not change the lenbits or distbits 11643 // values here (9 and 6) without reading the comments in inftrees.h 11644 // concerning the ENOUGH constants, which depend on those values 11645 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 11646 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11647 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 11648 ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */), 11649 (state + 120 /* &.lenbits */), state+792 /* &.work */) 11650 if !(ret != 0) { 11651 goto __205 11652 } 11653 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 11654 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11655 goto __5 11656 __205: 11657 ; 11658 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11659 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 11660 ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 11661 (state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */) 11662 if !(ret != 0) { 11663 goto __206 11664 } 11665 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 11666 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11667 goto __5 11668 __206: 11669 ; 11670 11671 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11672 11673 __9: 11674 // use inflate_fast() if we have enough input and output 11675 if !((have >= uint32(6)) && (left >= uint32(258))) { 11676 goto __207 11677 } 11678 __208: 11679 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 11680 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 11681 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 11682 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 11683 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11684 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11685 goto __209 11686 __209: 11687 if 0 != 0 { 11688 goto __208 11689 } 11690 goto __210 11691 __210: 11692 ; 11693 if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 11694 goto __211 11695 } 11696 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - left) 11697 __211: 11698 ; 11699 Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 11700 __212: 11701 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11702 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11703 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11704 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11705 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11706 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11707 goto __213 11708 __213: 11709 if 0 != 0 { 11710 goto __212 11711 } 11712 goto __214 11713 __214: 11714 ; 11715 goto __5 11716 __207: 11717 ; 11718 11719 // get a literal, length, or end-of-block code 11720 __215: 11721 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 11722 if !((uint32(here.Fbits)) <= bits) { 11723 goto __218 11724 } 11725 goto __217 11726 __218: 11727 ; 11728 __219: 11729 __222: 11730 if !(have == uint32(0)) { 11731 goto __225 11732 } 11733 have = (*struct { 11734 f func(*libc.TLS, uintptr, uintptr) uint32 11735 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11736 if !(have == uint32(0)) { 11737 goto __226 11738 } 11739 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11740 ret = -5 11741 goto inf_leave 11742 __226: 11743 ; 11744 __225: 11745 ; 11746 goto __223 11747 __223: 11748 if 0 != 0 { 11749 goto __222 11750 } 11751 goto __224 11752 __224: 11753 ; 11754 have-- 11755 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11756 bits = bits + (uint32(8)) 11757 goto __220 11758 __220: 11759 if 0 != 0 { 11760 goto __219 11761 } 11762 goto __221 11763 __221: 11764 ; 11765 goto __216 11766 __216: 11767 goto __215 11768 goto __217 11769 __217: 11770 ; 11771 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 11772 goto __227 11773 } 11774 last = here 11775 __228: 11776 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)) 11777 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 11778 goto __231 11779 } 11780 goto __230 11781 __231: 11782 ; 11783 __232: 11784 __235: 11785 if !(have == uint32(0)) { 11786 goto __238 11787 } 11788 have = (*struct { 11789 f func(*libc.TLS, uintptr, uintptr) uint32 11790 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11791 if !(have == uint32(0)) { 11792 goto __239 11793 } 11794 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11795 ret = -5 11796 goto inf_leave 11797 __239: 11798 ; 11799 __238: 11800 ; 11801 goto __236 11802 __236: 11803 if 0 != 0 { 11804 goto __235 11805 } 11806 goto __237 11807 __237: 11808 ; 11809 have-- 11810 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11811 bits = bits + (uint32(8)) 11812 goto __233 11813 __233: 11814 if 0 != 0 { 11815 goto __232 11816 } 11817 goto __234 11818 __234: 11819 ; 11820 goto __229 11821 __229: 11822 goto __228 11823 goto __230 11824 __230: 11825 ; 11826 __240: 11827 hold >>= int32(last.Fbits) 11828 bits = bits - (uint32(last.Fbits)) 11829 goto __241 11830 __241: 11831 if 0 != 0 { 11832 goto __240 11833 } 11834 goto __242 11835 __242: 11836 ; 11837 __227: 11838 ; 11839 __243: 11840 hold >>= int32(here.Fbits) 11841 bits = bits - (uint32(here.Fbits)) 11842 goto __244 11843 __244: 11844 if 0 != 0 { 11845 goto __243 11846 } 11847 goto __245 11848 __245: 11849 ; 11850 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 11851 11852 // process literal 11853 if !(int32(here.Fop) == 0) { 11854 goto __246 11855 } 11856 11857 __247: 11858 if !(left == uint32(0)) { 11859 goto __250 11860 } 11861 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11862 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11863 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 11864 if !((*struct { 11865 f func(*libc.TLS, uintptr, uintptr, uint32) int32 11866 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 11867 goto __251 11868 } 11869 ret = -5 11870 goto inf_leave 11871 __251: 11872 ; 11873 __250: 11874 ; 11875 goto __248 11876 __248: 11877 if 0 != 0 { 11878 goto __247 11879 } 11880 goto __249 11881 __249: 11882 ; 11883 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 11884 left-- 11885 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11886 goto __5 11887 __246: 11888 ; 11889 11890 // process end of block 11891 if !((int32(here.Fop) & 32) != 0) { 11892 goto __252 11893 } 11894 11895 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11896 goto __5 11897 __252: 11898 ; 11899 11900 // invalid code 11901 if !((int32(here.Fop) & 64) != 0) { 11902 goto __253 11903 } 11904 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 11905 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11906 goto __5 11907 __253: 11908 ; 11909 11910 // length code -- get extra bits, if any 11911 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 11912 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 11913 goto __254 11914 } 11915 __255: 11916 __258: 11917 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 11918 goto __259 11919 } 11920 __260: 11921 __263: 11922 if !(have == uint32(0)) { 11923 goto __266 11924 } 11925 have = (*struct { 11926 f func(*libc.TLS, uintptr, uintptr) uint32 11927 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11928 if !(have == uint32(0)) { 11929 goto __267 11930 } 11931 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11932 ret = -5 11933 goto inf_leave 11934 __267: 11935 ; 11936 __266: 11937 ; 11938 goto __264 11939 __264: 11940 if 0 != 0 { 11941 goto __263 11942 } 11943 goto __265 11944 __265: 11945 ; 11946 have-- 11947 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11948 bits = bits + (uint32(8)) 11949 goto __261 11950 __261: 11951 if 0 != 0 { 11952 goto __260 11953 } 11954 goto __262 11955 __262: 11956 ; 11957 goto __258 11958 __259: 11959 ; 11960 goto __256 11961 __256: 11962 if 0 != 0 { 11963 goto __255 11964 } 11965 goto __257 11966 __257: 11967 ; 11968 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 11969 __268: 11970 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 11971 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 11972 goto __269 11973 __269: 11974 if 0 != 0 { 11975 goto __268 11976 } 11977 goto __270 11978 __270: 11979 ; 11980 __254: 11981 ; 11982 11983 // get distance code 11984 __271: 11985 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 11986 if !((uint32(here.Fbits)) <= bits) { 11987 goto __274 11988 } 11989 goto __273 11990 __274: 11991 ; 11992 __275: 11993 __278: 11994 if !(have == uint32(0)) { 11995 goto __281 11996 } 11997 have = (*struct { 11998 f func(*libc.TLS, uintptr, uintptr) uint32 11999 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 12000 if !(have == uint32(0)) { 12001 goto __282 12002 } 12003 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 12004 ret = -5 12005 goto inf_leave 12006 __282: 12007 ; 12008 __281: 12009 ; 12010 goto __279 12011 __279: 12012 if 0 != 0 { 12013 goto __278 12014 } 12015 goto __280 12016 __280: 12017 ; 12018 have-- 12019 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 12020 bits = bits + (uint32(8)) 12021 goto __276 12022 __276: 12023 if 0 != 0 { 12024 goto __275 12025 } 12026 goto __277 12027 __277: 12028 ; 12029 goto __272 12030 __272: 12031 goto __271 12032 goto __273 12033 __273: 12034 ; 12035 if !((int32(here.Fop) & 0xf0) == 0) { 12036 goto __283 12037 } 12038 last = here 12039 __284: 12040 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)) 12041 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 12042 goto __287 12043 } 12044 goto __286 12045 __287: 12046 ; 12047 __288: 12048 __291: 12049 if !(have == uint32(0)) { 12050 goto __294 12051 } 12052 have = (*struct { 12053 f func(*libc.TLS, uintptr, uintptr) uint32 12054 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 12055 if !(have == uint32(0)) { 12056 goto __295 12057 } 12058 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 12059 ret = -5 12060 goto inf_leave 12061 __295: 12062 ; 12063 __294: 12064 ; 12065 goto __292 12066 __292: 12067 if 0 != 0 { 12068 goto __291 12069 } 12070 goto __293 12071 __293: 12072 ; 12073 have-- 12074 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 12075 bits = bits + (uint32(8)) 12076 goto __289 12077 __289: 12078 if 0 != 0 { 12079 goto __288 12080 } 12081 goto __290 12082 __290: 12083 ; 12084 goto __285 12085 __285: 12086 goto __284 12087 goto __286 12088 __286: 12089 ; 12090 __296: 12091 hold >>= int32(last.Fbits) 12092 bits = bits - (uint32(last.Fbits)) 12093 goto __297 12094 __297: 12095 if 0 != 0 { 12096 goto __296 12097 } 12098 goto __298 12099 __298: 12100 ; 12101 __283: 12102 ; 12103 __299: 12104 hold >>= int32(here.Fbits) 12105 bits = bits - (uint32(here.Fbits)) 12106 goto __300 12107 __300: 12108 if 0 != 0 { 12109 goto __299 12110 } 12111 goto __301 12112 __301: 12113 ; 12114 if !((int32(here.Fop) & 64) != 0) { 12115 goto __302 12116 } 12117 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 12118 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12119 goto __5 12120 __302: 12121 ; 12122 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 12123 12124 // get distance extra bits, if any 12125 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 12126 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 12127 goto __303 12128 } 12129 __304: 12130 __307: 12131 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 12132 goto __308 12133 } 12134 __309: 12135 __312: 12136 if !(have == uint32(0)) { 12137 goto __315 12138 } 12139 have = (*struct { 12140 f func(*libc.TLS, uintptr, uintptr) uint32 12141 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 12142 if !(have == uint32(0)) { 12143 goto __316 12144 } 12145 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 12146 ret = -5 12147 goto inf_leave 12148 __316: 12149 ; 12150 __315: 12151 ; 12152 goto __313 12153 __313: 12154 if 0 != 0 { 12155 goto __312 12156 } 12157 goto __314 12158 __314: 12159 ; 12160 have-- 12161 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 12162 bits = bits + (uint32(8)) 12163 goto __310 12164 __310: 12165 if 0 != 0 { 12166 goto __309 12167 } 12168 goto __311 12169 __311: 12170 ; 12171 goto __307 12172 __308: 12173 ; 12174 goto __305 12175 __305: 12176 if 0 != 0 { 12177 goto __304 12178 } 12179 goto __306 12180 __306: 12181 ; 12182 *(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 12183 __317: 12184 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 12185 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 12186 goto __318 12187 __318: 12188 if 0 != 0 { 12189 goto __317 12190 } 12191 goto __319 12192 __319: 12193 ; 12194 __303: 12195 ; 12196 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (func() uint32 { 12197 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 12198 return left 12199 } 12200 return uint32(0) 12201 }()))) { 12202 goto __320 12203 } 12204 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 12205 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12206 goto __5 12207 __320: 12208 ; 12209 12210 // copy match from window to output 12211 __321: 12212 __324: 12213 if !(left == uint32(0)) { 12214 goto __327 12215 } 12216 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 12217 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12218 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 12219 if !((*struct { 12220 f func(*libc.TLS, uintptr, uintptr, uint32) int32 12221 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 12222 goto __328 12223 } 12224 ret = -5 12225 goto inf_leave 12226 __328: 12227 ; 12228 __327: 12229 ; 12230 goto __325 12231 __325: 12232 if 0 != 0 { 12233 goto __324 12234 } 12235 goto __326 12236 __326: 12237 ; 12238 copy = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset) 12239 if !(copy < left) { 12240 goto __329 12241 } 12242 from = (put + uintptr(copy)) 12243 copy = (left - copy) 12244 goto __330 12245 __329: 12246 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 12247 copy = left 12248 __330: 12249 ; 12250 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 12251 goto __331 12252 } 12253 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 12254 __331: 12255 ; 12256 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 12257 left = left - (copy) 12258 __332: 12259 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12260 goto __333 12261 __333: 12262 if libc.PreDecUint32(©, 1) != 0 { 12263 goto __332 12264 } 12265 goto __334 12266 __334: 12267 ; 12268 goto __322 12269 __322: 12270 if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { 12271 goto __321 12272 } 12273 goto __323 12274 __323: 12275 ; 12276 goto __5 12277 12278 __10: 12279 // inflate stream terminated properly -- write leftover output 12280 ret = Z_STREAM_END 12281 if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 12282 goto __335 12283 } 12284 if !((*struct { 12285 f func(*libc.TLS, uintptr, uintptr, uint32) int32 12286 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, ((*Inflate_state)(unsafe.Pointer(state)).Fwsize-left)) != 0) { 12287 goto __336 12288 } 12289 ret = -5 12290 __336: 12291 ; 12292 __335: 12293 ; 12294 goto inf_leave 12295 12296 __11: 12297 ret = -3 12298 goto inf_leave 12299 12300 __12: // can't happen, but makes compilers happy 12301 ret = -2 12302 goto inf_leave 12303 __5: 12304 ; 12305 goto __3 12306 __3: 12307 goto __2 12308 goto __4 12309 __4: 12310 ; 12311 12312 // Return unused input 12313 inf_leave: 12314 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 12315 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 12316 return ret 12317 } 12318 12319 var order = // permutation of code lengths 12320 [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 */ 12321 12322 func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */ 12323 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 12324 return -2 12325 } 12326 (*struct { 12327 f func(*libc.TLS, Voidpf, Voidpf) 12328 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 12329 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 12330 12331 return Z_OK 12332 } 12333 12334 // 12335 // Decode literal, length, and distance codes and write out the resulting 12336 // literal and match bytes until either not enough input or output is 12337 // available, an end-of-block is encountered, or a data error is encountered. 12338 // When large enough input and output buffers are supplied to inflate(), for 12339 // example, a 16K input buffer and a 64K output buffer, more than 95% of the 12340 // inflate execution time is spent in this routine. 12341 // 12342 // Entry assumptions: 12343 // 12344 // state->mode == LEN 12345 // strm->avail_in >= 6 12346 // strm->avail_out >= 258 12347 // start >= strm->avail_out 12348 // state->bits < 8 12349 // 12350 // On return, state->mode is one of: 12351 // 12352 // LEN -- ran out of enough output space or enough available input 12353 // TYPE -- reached end of block code, inflate() to interpret next block 12354 // BAD -- error in block data 12355 // 12356 // Notes: 12357 // 12358 // - The maximum input bits used by a length/distance pair is 15 bits for the 12359 // length code, 5 bits for the length extra, 15 bits for the distance code, 12360 // and 13 bits for the distance extra. This totals 48 bits, or six bytes. 12361 // Therefore if strm->avail_in >= 6, then there is enough input to avoid 12362 // checking for available input while decoding. 12363 // 12364 // - The maximum bytes that a single length/distance pair can output is 258 12365 // bytes, which is the maximum length that can be coded. inflate_fast() 12366 // requires strm->avail_out >= 258 for each loop to avoid checking for 12367 // output space. 12368 // 12369 func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */ 12370 var state uintptr 12371 var in uintptr // local strm->next_in 12372 var last uintptr // have enough input while in < last 12373 var out uintptr // local strm->next_out 12374 var beg uintptr // inflate()'s initial strm->next_out 12375 var end uintptr // while out < end, enough space available 12376 var wsize uint32 // window size or zero if not using window 12377 var whave uint32 // valid bytes in the window 12378 var wnext uint32 // window write index 12379 var window uintptr // allocated sliding window, if wsize != 0 12380 var hold uint64 // local strm->hold 12381 var bits uint32 // local strm->bits 12382 var lcode uintptr // local strm->lencode 12383 var dcode uintptr // local strm->distcode 12384 var lmask uint32 // mask for first level of length codes 12385 var dmask uint32 // mask for first level of distance codes 12386 var here Code // retrieved table entry 12387 var op uint32 // code bits, operation, extra bits, or 12388 // window position, window bytes to copy 12389 var len uint32 // match length, unused bytes 12390 var dist uint32 // match distance 12391 var from uintptr // where to copy match from 12392 12393 // copy state to local variables 12394 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12395 in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 12396 last = (in + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_in - UInt(5)))) 12397 out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 12398 beg = (out - uintptr((start - (*Z_stream)(unsafe.Pointer(strm)).Favail_out))) 12399 end = (out + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_out - UInt(257)))) 12400 wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12401 whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 12402 wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext 12403 window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 12404 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 12405 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 12406 lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode 12407 dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode 12408 lmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Flenbits) - uint32(1)) 12409 dmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fdistbits) - uint32(1)) 12410 12411 // decode literals and length/distances until end-of-block or not enough 12412 // input data or output space 12413 __1: 12414 if !(bits < uint32(15)) { 12415 goto __4 12416 } 12417 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12418 bits = bits + (uint32(8)) 12419 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12420 bits = bits + (uint32(8)) 12421 __4: 12422 ; 12423 here = *(*Code)(unsafe.Pointer(lcode + uintptr((hold&uint64(lmask)))*4)) 12424 dolen: 12425 op = uint32(here.Fbits) 12426 hold >>= op 12427 bits = bits - (op) 12428 op = uint32(here.Fop) 12429 if !(op == uint32(0)) { 12430 goto __5 12431 } // literal 12432 12433 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval) 12434 goto __6 12435 __5: 12436 if !((op & uint32(16)) != 0) { 12437 goto __7 12438 } // length base 12439 len = uint32(here.Fval) 12440 op = op & (uint32(15)) // number of extra bits 12441 if !(op != 0) { 12442 goto __9 12443 } 12444 if !(bits < op) { 12445 goto __10 12446 } 12447 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12448 bits = bits + (uint32(8)) 12449 __10: 12450 ; 12451 len = len + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 12452 hold >>= op 12453 bits = bits - (op) 12454 __9: 12455 ; 12456 12457 if !(bits < uint32(15)) { 12458 goto __11 12459 } 12460 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12461 bits = bits + (uint32(8)) 12462 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12463 bits = bits + (uint32(8)) 12464 __11: 12465 ; 12466 here = *(*Code)(unsafe.Pointer(dcode + uintptr((hold&uint64(dmask)))*4)) 12467 dodist: 12468 op = uint32(here.Fbits) 12469 hold >>= op 12470 bits = bits - (op) 12471 op = uint32(here.Fop) 12472 if !((op & uint32(16)) != 0) { 12473 goto __12 12474 } // distance base 12475 dist = uint32(here.Fval) 12476 op = op & (uint32(15)) // number of extra bits 12477 if !(bits < op) { 12478 goto __14 12479 } 12480 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12481 bits = bits + (uint32(8)) 12482 if !(bits < op) { 12483 goto __15 12484 } 12485 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12486 bits = bits + (uint32(8)) 12487 __15: 12488 ; 12489 __14: 12490 ; 12491 dist = dist + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 12492 hold >>= op 12493 bits = bits - (op) 12494 12495 op = (uint32((int64(out) - int64(beg)) / 1)) // max distance in output 12496 if !(dist > op) { 12497 goto __16 12498 } // see if copy from window 12499 op = (dist - op) // distance back in window 12500 if !(op > whave) { 12501 goto __18 12502 } 12503 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 12504 goto __19 12505 } 12506 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 12507 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12508 goto __3 12509 __19: 12510 ; 12511 __18: 12512 ; 12513 from = window 12514 if !(wnext == uint32(0)) { 12515 goto __20 12516 } // very common case 12517 from += (uintptr(wsize - op)) 12518 if !(op < len) { 12519 goto __22 12520 } // some from window 12521 len = len - (op) 12522 __23: 12523 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12524 goto __24 12525 __24: 12526 if libc.PreDecUint32(&op, 1) != 0 { 12527 goto __23 12528 } 12529 goto __25 12530 __25: 12531 ; 12532 from = (out - uintptr(dist)) // rest from output 12533 __22: 12534 ; 12535 goto __21 12536 __20: 12537 if !(wnext < op) { 12538 goto __26 12539 } // wrap around window 12540 from += (uintptr((wsize + wnext) - op)) 12541 op = op - (wnext) 12542 if !(op < len) { 12543 goto __28 12544 } // some from end of window 12545 len = len - (op) 12546 __29: 12547 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12548 goto __30 12549 __30: 12550 if libc.PreDecUint32(&op, 1) != 0 { 12551 goto __29 12552 } 12553 goto __31 12554 __31: 12555 ; 12556 from = window 12557 if !(wnext < len) { 12558 goto __32 12559 } // some from start of window 12560 op = wnext 12561 len = len - (op) 12562 __33: 12563 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12564 goto __34 12565 __34: 12566 if libc.PreDecUint32(&op, 1) != 0 { 12567 goto __33 12568 } 12569 goto __35 12570 __35: 12571 ; 12572 from = (out - uintptr(dist)) // rest from output 12573 __32: 12574 ; 12575 __28: 12576 ; 12577 goto __27 12578 __26: // contiguous in window 12579 from += (uintptr(wnext - op)) 12580 if !(op < len) { 12581 goto __36 12582 } // some from window 12583 len = len - (op) 12584 __37: 12585 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12586 goto __38 12587 __38: 12588 if libc.PreDecUint32(&op, 1) != 0 { 12589 goto __37 12590 } 12591 goto __39 12592 __39: 12593 ; 12594 from = (out - uintptr(dist)) // rest from output 12595 __36: 12596 ; 12597 __27: 12598 ; 12599 __21: 12600 ; 12601 __40: 12602 if !(len > uint32(2)) { 12603 goto __41 12604 } 12605 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12606 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12607 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12608 len = len - (uint32(3)) 12609 goto __40 12610 __41: 12611 ; 12612 if !(len != 0) { 12613 goto __42 12614 } 12615 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12616 if !(len > uint32(1)) { 12617 goto __43 12618 } 12619 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12620 __43: 12621 ; 12622 __42: 12623 ; 12624 goto __17 12625 __16: 12626 from = (out - uintptr(dist)) // copy direct from output 12627 __44: // minimum length is three 12628 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12629 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12630 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12631 len = len - (uint32(3)) 12632 goto __45 12633 __45: 12634 if len > uint32(2) { 12635 goto __44 12636 } 12637 goto __46 12638 __46: 12639 ; 12640 if !(len != 0) { 12641 goto __47 12642 } 12643 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12644 if !(len > uint32(1)) { 12645 goto __48 12646 } 12647 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12648 __48: 12649 ; 12650 __47: 12651 ; 12652 __17: 12653 ; 12654 goto __13 12655 __12: 12656 if !((op & uint32(64)) == uint32(0)) { 12657 goto __49 12658 } // 2nd level distance code 12659 here = *(*Code)(unsafe.Pointer(dcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4)) 12660 goto dodist 12661 goto __50 12662 __49: 12663 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 12664 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12665 goto __3 12666 __50: 12667 ; 12668 __13: 12669 ; 12670 goto __8 12671 __7: 12672 if !((op & uint32(64)) == uint32(0)) { 12673 goto __51 12674 } // 2nd level length code 12675 here = *(*Code)(unsafe.Pointer(lcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4)) 12676 goto dolen 12677 goto __52 12678 __51: 12679 if !((op & uint32(32)) != 0) { 12680 goto __53 12681 } // end-of-block 12682 12683 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12684 goto __3 12685 goto __54 12686 __53: 12687 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 12688 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12689 goto __3 12690 __54: 12691 ; 12692 __52: 12693 ; 12694 __8: 12695 ; 12696 __6: 12697 ; 12698 goto __2 12699 __2: 12700 if (in < last) && (out < end) { 12701 goto __1 12702 } 12703 goto __3 12704 __3: 12705 ; 12706 12707 // return unused bytes (on entry, bits < 8, so in won't go too far back) 12708 len = (bits >> 3) 12709 in -= uintptr(len) 12710 bits = bits - (len << 3) 12711 hold = hold & (uint64((uint32(1) << bits) - uint32(1))) 12712 12713 // update state and return 12714 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in 12715 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out 12716 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 { 12717 if in < last { 12718 return (uint32(int64(5) + ((int64(last) - int64(in)) / 1))) 12719 } 12720 return (uint32(int64(5) - ((int64(in) - int64(last)) / 1))) 12721 }() 12722 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 { 12723 if out < end { 12724 return (uint32(int64(257) + ((int64(end) - int64(out)) / 1))) 12725 } 12726 return (uint32(int64(257) - ((int64(out) - int64(end)) / 1))) 12727 }() 12728 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 12729 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 12730 return 12731 } 12732 12733 // 12734 // inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): 12735 // - Using bit fields for code structure 12736 // - Different op definition to avoid & for extra bits (do & for table bits) 12737 // - Three separate decoding do-loops for direct, window, and wnext == 0 12738 // - Special case for distance > 1 copies to do overlapped load and store copy 12739 // - Explicit branch predictions (based on measured branch probabilities) 12740 // - Deferring match copy and interspersed it with decoding subsequent codes 12741 // - Swapping literal/length else 12742 // - Swapping window/direct else 12743 // - Larger unrolled copy loops (three is about right) 12744 // - Moving len -= 3 statement into middle of loop 12745 // 12746 12747 func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */ 12748 var state uintptr 12749 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 12750 return 1 12751 } 12752 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12753 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) { 12754 return 1 12755 } 12756 return 0 12757 } 12758 12759 func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */ 12760 var state uintptr 12761 12762 if inflateStateCheck(tls, strm) != 0 { 12763 return -2 12764 } 12765 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12766 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, libc.AssignPtrUint64(state+40 /* &.total */, uint64(0))) 12767 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 12768 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite 12769 (*Z_stream)(unsafe.Pointer(strm)).Fadler = (ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)) 12770 } 12771 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD 12772 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 12773 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0 12774 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 12775 (*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL) 12776 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 12777 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 12778 (*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+112 /* &.distcode */, libc.AssignPtrUintptr(state+144 /* &.next */, state+1368 /* &.codes */)) 12779 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 12780 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 12781 12782 return Z_OK 12783 } 12784 12785 func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */ 12786 var state uintptr 12787 12788 if inflateStateCheck(tls, strm) != 0 { 12789 return -2 12790 } 12791 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12792 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) 12793 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 12794 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 12795 return XinflateResetKeep(tls, strm) 12796 } 12797 12798 func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */ 12799 var wrap int32 12800 var state uintptr 12801 12802 // get the state 12803 if inflateStateCheck(tls, strm) != 0 { 12804 return -2 12805 } 12806 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12807 12808 // extract wrap request from windowBits parameter 12809 if windowBits < 0 { 12810 wrap = 0 12811 windowBits = -windowBits 12812 } else { 12813 wrap = ((windowBits >> 4) + 5) 12814 if windowBits < 48 { 12815 windowBits = windowBits & (15) 12816 } 12817 } 12818 12819 // set number of window bits, free window if different 12820 if (windowBits != 0) && ((windowBits < 8) || (windowBits > 15)) { 12821 return -2 12822 } 12823 if ((*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL)) && ((*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits)) { 12824 (*struct { 12825 f func(*libc.TLS, Voidpf, Voidpf) 12826 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 12827 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 12828 } 12829 12830 // update state and reset the rest of it 12831 (*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap 12832 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits) 12833 return XinflateReset(tls, strm) 12834 } 12835 12836 func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */ 12837 var ret int32 12838 var state uintptr 12839 12840 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) { 12841 return -6 12842 } 12843 if strm == uintptr(Z_NULL) { 12844 return -2 12845 } 12846 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 12847 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 12848 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 12849 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 12850 }{Xzcalloc})) 12851 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 12852 } 12853 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 12854 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 12855 f func(*libc.TLS, Voidpf, Voidpf) 12856 }{Xzcfree})) 12857 } 12858 state = (*struct { 12859 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 12860 })(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{}))) 12861 if state == uintptr(Z_NULL) { 12862 return -4 12863 } 12864 12865 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 12866 (*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm 12867 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 12868 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2() 12869 ret = XinflateReset2(tls, strm, windowBits) 12870 if ret != Z_OK { 12871 (*struct { 12872 f func(*libc.TLS, Voidpf, Voidpf) 12873 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state) 12874 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 12875 } 12876 return ret 12877 } 12878 12879 func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */ 12880 return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size) 12881 } 12882 12883 func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */ 12884 var state uintptr 12885 12886 if inflateStateCheck(tls, strm) != 0 { 12887 return -2 12888 } 12889 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12890 if bits < 0 { 12891 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 12892 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 12893 return Z_OK 12894 } 12895 if (bits > 16) || (((*Inflate_state)(unsafe.Pointer(state)).Fbits + UInt(bits)) > uint32(32)) { 12896 return -2 12897 } 12898 value = int32(int64(value) & ((int64(1) << bits) - int64(1))) 12899 *(*uint64)(unsafe.Pointer(state + 80 /* &.hold */)) += (uint64(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)) 12900 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) += (UInt(bits)) 12901 return Z_OK 12902 } 12903 12904 // 12905 // Return state with length and distance decoding tables and index sizes set to 12906 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 12907 // If BUILDFIXED is defined, then instead this routine builds the tables the 12908 // first time it's called, and returns those tables the first time and 12909 // thereafter. This reduces the size of the code by about 2K bytes, in 12910 // exchange for a little execution time. However, BUILDFIXED should not be 12911 // used for threaded applications, since the rewriting of the tables and virgin 12912 // may not be thread-safe. 12913 // 12914 func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */ 12915 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1)) 12916 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 12917 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1)) 12918 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 12919 } 12920 12921 var lenfix1 = [512]Code{ 12922 {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)}, 12923 {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)}, 12924 {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)}, 12925 {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)}, 12926 {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)}, 12927 {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)}, 12928 {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)}, 12929 {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)}, 12930 {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)}, 12931 {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)}, 12932 {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)}, 12933 {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)}, 12934 {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)}, 12935 {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)}, 12936 {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)}, 12937 {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)}, 12938 {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)}, 12939 {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)}, 12940 {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)}, 12941 {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)}, 12942 {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)}, 12943 {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)}, 12944 {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)}, 12945 {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)}, 12946 {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)}, 12947 {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)}, 12948 {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)}, 12949 {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)}, 12950 {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)}, 12951 {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)}, 12952 {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)}, 12953 {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)}, 12954 {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)}, 12955 {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)}, 12956 {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)}, 12957 {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)}, 12958 {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)}, 12959 {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)}, 12960 {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)}, 12961 {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)}, 12962 {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)}, 12963 {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)}, 12964 {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)}, 12965 {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)}, 12966 {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)}, 12967 {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)}, 12968 {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)}, 12969 {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)}, 12970 {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)}, 12971 {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)}, 12972 {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)}, 12973 {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)}, 12974 {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)}, 12975 {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)}, 12976 {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)}, 12977 {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)}, 12978 {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)}, 12979 {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)}, 12980 {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)}, 12981 {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)}, 12982 {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)}, 12983 {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)}, 12984 {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)}, 12985 {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)}, 12986 {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)}, 12987 {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)}, 12988 {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)}, 12989 {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)}, 12990 {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)}, 12991 {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)}, 12992 {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)}, 12993 {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)}, 12994 {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)}, 12995 {Fbits: uint8(9), Fval: uint16(255)}, 12996 } /* inffixed.h:10:23 */ 12997 var distfix1 = [32]Code{ 12998 {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)}, 12999 {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)}, 13000 {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)}, 13001 {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)}, 13002 {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)}, 13003 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 13004 } /* inffixed.h:87:23 */ 13005 13006 // 13007 // Update the window with the last wsize (normally 32K) bytes written before 13008 // returning. If window does not exist yet, create it. This is only called 13009 // when a window is already in use, or when output has been written during this 13010 // inflate call, but the end of the deflate stream has not been reached yet. 13011 // It is also called to create a window for dictionary data when a dictionary 13012 // is loaded. 13013 // 13014 // Providing output buffers larger than 32K to inflate() should provide a speed 13015 // advantage, since only the last 32K of output is copied to the sliding window 13016 // upon return from inflate(), and since all distances after the first 32K of 13017 // output will fall in the output data, making match copies simpler and faster. 13018 // The advantage may be dependent on the size of the processor's data caches. 13019 // 13020 func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */ 13021 var state uintptr 13022 var dist uint32 13023 13024 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13025 13026 // if it hasn't been done already, allocate space for the window 13027 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 13028 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct { 13029 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 13030 })(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)))) 13031 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 13032 return 1 13033 } 13034 } 13035 13036 // if window not in use yet, initialize 13037 if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) { 13038 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 13039 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 13040 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 13041 } 13042 13043 // copy state->wsize or less output bytes into the circular window 13044 if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 13045 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize)), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize)) 13046 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 13047 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 13048 } else { 13049 dist = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext) 13050 if dist > copy { 13051 dist = copy 13052 } 13053 libc.Xmemcpy(tls, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), (end - uintptr(copy)), uint64(dist)) 13054 copy = copy - (dist) 13055 if copy != 0 { 13056 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr(copy)), uint64(copy)) 13057 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy 13058 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 13059 } else { 13060 *(*uint32)(unsafe.Pointer(state + 68 /* &.wnext */)) += (dist) 13061 if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 13062 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 13063 } 13064 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 13065 *(*uint32)(unsafe.Pointer(state + 64 /* &.whave */)) += (dist) 13066 } 13067 } 13068 } 13069 return 0 13070 } 13071 13072 // Macros for inflate(): 13073 13074 // check function to use adler32() for zlib or crc32() for gzip 13075 13076 // check macros for header crc 13077 13078 // Load registers with state in inflate() for speed 13079 13080 // Restore state from registers in inflate() 13081 13082 // Clear the input bit accumulator 13083 13084 // Get a byte of input into the bit accumulator, or return from inflate() 13085 // if there is no input available. 13086 13087 // Assure that there are at least n bits in the bit accumulator. If there is 13088 // not enough available input to do that, then return from inflate(). 13089 13090 // Return the low n bits of the bit accumulator (n < 16) 13091 13092 // Remove n bits from the bit accumulator 13093 13094 // Remove zero to seven bits as needed to go to a byte boundary 13095 13096 // 13097 // inflate() uses a state machine to process as much input data and generate as 13098 // much output data as possible before returning. The state machine is 13099 // structured roughly as follows: 13100 // 13101 // for (;;) switch (state) { 13102 // ... 13103 // case STATEn: 13104 // if (not enough input data or output space to make progress) 13105 // return; 13106 // ... make progress ... 13107 // state = STATEm; 13108 // break; 13109 // ... 13110 // } 13111 // 13112 // so when inflate() is called again, the same case is attempted again, and 13113 // if the appropriate resources are provided, the machine proceeds to the 13114 // next state. The NEEDBITS() macro is usually the way the state evaluates 13115 // whether it can proceed or should return. NEEDBITS() does the return if 13116 // the requested bits are not available. The typical use of the BITS macros 13117 // is: 13118 // 13119 // NEEDBITS(n); 13120 // ... do something with BITS(n) ... 13121 // DROPBITS(n); 13122 // 13123 // where NEEDBITS(n) either returns from inflate() if there isn't enough 13124 // input left to load n bits into the accumulator, or it continues. BITS(n) 13125 // gives the low n bits in the accumulator. When done, DROPBITS(n) drops 13126 // the low n bits off the accumulator. INITBITS() clears the accumulator 13127 // and sets the number of available bits to zero. BYTEBITS() discards just 13128 // enough bits to put the accumulator on a byte boundary. After BYTEBITS() 13129 // and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. 13130 // 13131 // NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return 13132 // if there is no input available. The decoding of variable length codes uses 13133 // PULLBYTE() directly in order to pull just enough bytes to decode the next 13134 // code, and no more. 13135 // 13136 // Some states loop until they get enough input, making sure that enough 13137 // state information is maintained to continue the loop where it left off 13138 // if NEEDBITS() returns in the loop. For example, want, need, and keep 13139 // would all have to actually be part of the saved state in case NEEDBITS() 13140 // returns: 13141 // 13142 // case STATEw: 13143 // while (want < need) { 13144 // NEEDBITS(n); 13145 // keep[want++] = BITS(n); 13146 // DROPBITS(n); 13147 // } 13148 // state = STATEx; 13149 // case STATEx: 13150 // 13151 // As shown above, if the next state is also the next case, then the break 13152 // is omitted. 13153 // 13154 // A state may also return if there is not enough output space available to 13155 // complete that state. Those states are copying stored data, writing a 13156 // literal byte, and copying a matching string. 13157 // 13158 // When returning, a "goto inf_leave" is used to update the total counters, 13159 // update the check value, and determine whether any progress has been made 13160 // during that inflate() call in order to return the proper return code. 13161 // Progress is defined as a change in either strm->avail_in or strm->avail_out. 13162 // When there is a window, goto inf_leave will update the window with the last 13163 // output written. If a goto inf_leave occurs in the middle of decompression 13164 // and there is no window currently, goto inf_leave will create one and copy 13165 // output to the window for the next call of inflate(). 13166 // 13167 // In this implementation, the flush parameter of inflate() only affects the 13168 // return code (per zlib.h). inflate() always writes as much as possible to 13169 // strm->next_out, given the space available and the provided input--the effect 13170 // documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers 13171 // the allocation of and copying into a sliding window until necessary, which 13172 // provides the effect documented in zlib.h for Z_FINISH when the entire input 13173 // stream available. So the only thing the flush parameter actually does is: 13174 // when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it 13175 // will return Z_BUF_ERROR if it has not reached the end of the stream. 13176 // 13177 13178 func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */ 13179 bp := tls.Alloc(4) 13180 defer tls.Free(4) 13181 13182 var state uintptr 13183 var next uintptr // next input 13184 var put uintptr // next output 13185 var have uint32 13186 var left uint32 // available input and output 13187 var hold uint64 // bit buffer 13188 var bits uint32 // bits in bit buffer 13189 var in uint32 13190 var out uint32 // save starting available input and output 13191 var copy uint32 // number of stored or match bytes to copy 13192 var from uintptr // where to copy match bytes from 13193 var here Code // current decoding table entry 13194 var last Code // parent table entry 13195 var len uint32 // length to copy for repeats, bits to drop 13196 var ret int32 // return code 13197 // var hbuf [4]uint8 at bp, 4 13198 13199 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)))) { 13200 goto __1 13201 } 13202 return -2 13203 __1: 13204 ; 13205 13206 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13207 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 13208 goto __2 13209 } 13210 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 13211 __2: 13212 ; // skip check 13213 __3: 13214 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 13215 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 13216 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 13217 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 13218 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 13219 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 13220 goto __4 13221 __4: 13222 if 0 != 0 { 13223 goto __3 13224 } 13225 goto __5 13226 __5: 13227 ; 13228 in = have 13229 out = left 13230 ret = Z_OK 13231 __6: 13232 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 13233 case HEAD: 13234 goto __10 13235 case FLAGS: 13236 goto __11 13237 case TIME: 13238 goto __12 13239 case OS: 13240 goto __13 13241 case EXLEN: 13242 goto __14 13243 case EXTRA: 13244 goto __15 13245 case NAME: 13246 goto __16 13247 case COMMENT: 13248 goto __17 13249 case HCRC: 13250 goto __18 13251 case DICTID: 13252 goto __19 13253 case DICT: 13254 goto __20 13255 case TYPE: 13256 goto __21 13257 case TYPEDO: 13258 goto __22 13259 case STORED: 13260 goto __23 13261 case COPY_: 13262 goto __24 13263 case COPY: 13264 goto __25 13265 case TABLE: 13266 goto __26 13267 case LENLENS: 13268 goto __27 13269 case CODELENS: 13270 goto __28 13271 case LEN_: 13272 goto __29 13273 case LEN: 13274 goto __30 13275 case LENEXT: 13276 goto __31 13277 case DIST: 13278 goto __32 13279 case DISTEXT: 13280 goto __33 13281 case MATCH: 13282 goto __34 13283 case LIT: 13284 goto __35 13285 case CHECK: 13286 goto __36 13287 case LENGTH: 13288 goto __37 13289 case DONE: 13290 goto __38 13291 case BAD: 13292 goto __39 13293 case MEM: 13294 goto __40 13295 case SYNC: 13296 goto __41 13297 default: 13298 goto __42 13299 } 13300 goto __9 13301 __10: 13302 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) { 13303 goto __43 13304 } 13305 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 13306 goto __9 13307 __43: 13308 ; 13309 __44: 13310 __47: 13311 if !(bits < (uint32(16))) { 13312 goto __48 13313 } 13314 __49: 13315 if !(have == uint32(0)) { 13316 goto __52 13317 } 13318 goto inf_leave 13319 __52: 13320 ; 13321 have-- 13322 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13323 bits = bits + (uint32(8)) 13324 goto __50 13325 __50: 13326 if 0 != 0 { 13327 goto __49 13328 } 13329 goto __51 13330 __51: 13331 ; 13332 goto __47 13333 __48: 13334 ; 13335 goto __45 13336 __45: 13337 if 0 != 0 { 13338 goto __44 13339 } 13340 goto __46 13341 __46: 13342 ; 13343 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) != 0) && (hold == uint64(0x8b1f))) { 13344 goto __53 13345 } // gzip header 13346 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 13347 goto __54 13348 } 13349 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) 13350 __54: 13351 ; 13352 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 13353 __55: 13354 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13355 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13356 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13357 goto __56 13358 __56: 13359 if 0 != 0 { 13360 goto __55 13361 } 13362 goto __57 13363 __57: 13364 ; 13365 __58: 13366 hold = uint64(0) 13367 bits = uint32(0) 13368 goto __59 13369 __59: 13370 if 0 != 0 { 13371 goto __58 13372 } 13373 goto __60 13374 __60: 13375 ; 13376 (*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS 13377 goto __9 13378 __53: 13379 ; 13380 (*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header 13381 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13382 goto __61 13383 } 13384 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1 13385 __61: 13386 ; 13387 if !(!(((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) != 0) || ((((uint64((uint32(hold) & ((uint32(1) << (8)) - uint32(1))) << 8)) + (hold >> 8)) % uint64(31)) != 0)) { 13388 goto __62 13389 } 13390 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */ 13391 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13392 goto __9 13393 __62: 13394 ; 13395 if !((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) != uint32(Z_DEFLATED)) { 13396 goto __63 13397 } 13398 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 13399 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13400 goto __9 13401 __63: 13402 ; 13403 __64: 13404 hold >>= 4 13405 bits = bits - (uint32(4)) 13406 goto __65 13407 __65: 13408 if 0 != 0 { 13409 goto __64 13410 } 13411 goto __66 13412 __66: 13413 ; 13414 len = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(8)) 13415 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 13416 goto __67 13417 } 13418 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = len 13419 __67: 13420 ; 13421 if !((len > uint32(15)) || (len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits)) { 13422 goto __68 13423 } 13424 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */ 13425 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13426 goto __9 13427 __68: 13428 ; 13429 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = (uint32(1) << len) 13430 13431 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 13432 (*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 { 13433 if (hold & uint64(0x200)) != 0 { 13434 return DICTID 13435 } 13436 return TYPE 13437 }() 13438 __69: 13439 hold = uint64(0) 13440 bits = uint32(0) 13441 goto __70 13442 __70: 13443 if 0 != 0 { 13444 goto __69 13445 } 13446 goto __71 13447 __71: 13448 ; 13449 goto __9 13450 __11: 13451 __72: 13452 __75: 13453 if !(bits < (uint32(16))) { 13454 goto __76 13455 } 13456 __77: 13457 if !(have == uint32(0)) { 13458 goto __80 13459 } 13460 goto inf_leave 13461 __80: 13462 ; 13463 have-- 13464 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13465 bits = bits + (uint32(8)) 13466 goto __78 13467 __78: 13468 if 0 != 0 { 13469 goto __77 13470 } 13471 goto __79 13472 __79: 13473 ; 13474 goto __75 13475 __76: 13476 ; 13477 goto __73 13478 __73: 13479 if 0 != 0 { 13480 goto __72 13481 } 13482 goto __74 13483 __74: 13484 ; 13485 (*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold) 13486 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xff) != Z_DEFLATED) { 13487 goto __81 13488 } 13489 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 13490 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13491 goto __9 13492 __81: 13493 ; 13494 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xe000) != 0) { 13495 goto __82 13496 } 13497 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */ 13498 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13499 goto __9 13500 __82: 13501 ; 13502 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13503 goto __83 13504 } 13505 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = (int32((hold >> 8) & uint64(1))) 13506 __83: 13507 ; 13508 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13509 goto __84 13510 } 13511 __85: 13512 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13513 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13514 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13515 goto __86 13516 __86: 13517 if 0 != 0 { 13518 goto __85 13519 } 13520 goto __87 13521 __87: 13522 ; 13523 __84: 13524 ; 13525 __88: 13526 hold = uint64(0) 13527 bits = uint32(0) 13528 goto __89 13529 __89: 13530 if 0 != 0 { 13531 goto __88 13532 } 13533 goto __90 13534 __90: 13535 ; 13536 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME 13537 __12: 13538 __91: 13539 __94: 13540 if !(bits < (uint32(32))) { 13541 goto __95 13542 } 13543 __96: 13544 if !(have == uint32(0)) { 13545 goto __99 13546 } 13547 goto inf_leave 13548 __99: 13549 ; 13550 have-- 13551 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13552 bits = bits + (uint32(8)) 13553 goto __97 13554 __97: 13555 if 0 != 0 { 13556 goto __96 13557 } 13558 goto __98 13559 __98: 13560 ; 13561 goto __94 13562 __95: 13563 ; 13564 goto __92 13565 __92: 13566 if 0 != 0 { 13567 goto __91 13568 } 13569 goto __93 13570 __93: 13571 ; 13572 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13573 goto __100 13574 } 13575 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold 13576 __100: 13577 ; 13578 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13579 goto __101 13580 } 13581 __102: 13582 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13583 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13584 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 2)) = (uint8((hold) >> 16)) 13585 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 3)) = (uint8((hold) >> 24)) 13586 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(4)) 13587 goto __103 13588 __103: 13589 if 0 != 0 { 13590 goto __102 13591 } 13592 goto __104 13593 __104: 13594 ; 13595 __101: 13596 ; 13597 __105: 13598 hold = uint64(0) 13599 bits = uint32(0) 13600 goto __106 13601 __106: 13602 if 0 != 0 { 13603 goto __105 13604 } 13605 goto __107 13606 __107: 13607 ; 13608 (*Inflate_state)(unsafe.Pointer(state)).Fmode = OS 13609 __13: 13610 __108: 13611 __111: 13612 if !(bits < (uint32(16))) { 13613 goto __112 13614 } 13615 __113: 13616 if !(have == uint32(0)) { 13617 goto __116 13618 } 13619 goto inf_leave 13620 __116: 13621 ; 13622 have-- 13623 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13624 bits = bits + (uint32(8)) 13625 goto __114 13626 __114: 13627 if 0 != 0 { 13628 goto __113 13629 } 13630 goto __115 13631 __115: 13632 ; 13633 goto __111 13634 __112: 13635 ; 13636 goto __109 13637 __109: 13638 if 0 != 0 { 13639 goto __108 13640 } 13641 goto __110 13642 __110: 13643 ; 13644 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13645 goto __117 13646 } 13647 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = (int32(hold & uint64(0xff))) 13648 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = (int32(hold >> 8)) 13649 __117: 13650 ; 13651 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13652 goto __118 13653 } 13654 __119: 13655 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13656 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13657 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13658 goto __120 13659 __120: 13660 if 0 != 0 { 13661 goto __119 13662 } 13663 goto __121 13664 __121: 13665 ; 13666 __118: 13667 ; 13668 __122: 13669 hold = uint64(0) 13670 bits = uint32(0) 13671 goto __123 13672 __123: 13673 if 0 != 0 { 13674 goto __122 13675 } 13676 goto __124 13677 __124: 13678 ; 13679 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN 13680 __14: 13681 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 13682 goto __125 13683 } 13684 __127: 13685 __130: 13686 if !(bits < (uint32(16))) { 13687 goto __131 13688 } 13689 __132: 13690 if !(have == uint32(0)) { 13691 goto __135 13692 } 13693 goto inf_leave 13694 __135: 13695 ; 13696 have-- 13697 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13698 bits = bits + (uint32(8)) 13699 goto __133 13700 __133: 13701 if 0 != 0 { 13702 goto __132 13703 } 13704 goto __134 13705 __134: 13706 ; 13707 goto __130 13708 __131: 13709 ; 13710 goto __128 13711 __128: 13712 if 0 != 0 { 13713 goto __127 13714 } 13715 goto __129 13716 __129: 13717 ; 13718 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) 13719 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13720 goto __136 13721 } 13722 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) 13723 __136: 13724 ; 13725 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13726 goto __137 13727 } 13728 __138: 13729 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13730 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13731 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13732 goto __139 13733 __139: 13734 if 0 != 0 { 13735 goto __138 13736 } 13737 goto __140 13738 __140: 13739 ; 13740 __137: 13741 ; 13742 __141: 13743 hold = uint64(0) 13744 bits = uint32(0) 13745 goto __142 13746 __142: 13747 if 0 != 0 { 13748 goto __141 13749 } 13750 goto __143 13751 __143: 13752 ; 13753 goto __126 13754 __125: 13755 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13756 goto __144 13757 } 13758 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL) 13759 __144: 13760 ; 13761 __126: 13762 ; 13763 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA 13764 __15: 13765 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 13766 goto __145 13767 } 13768 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13769 if !(copy > have) { 13770 goto __146 13771 } 13772 copy = have 13773 __146: 13774 ; 13775 if !(copy != 0) { 13776 goto __147 13777 } 13778 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) && ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL))) { 13779 goto __148 13780 } 13781 len = ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength) 13782 libc.Xmemcpy(tls, ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra + uintptr(len)), next, 13783 func() uint64 { 13784 if (len + copy) > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { 13785 return (uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len)) 13786 } 13787 return uint64(copy) 13788 }()) 13789 __148: 13790 ; 13791 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13792 goto __149 13793 } 13794 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13795 __149: 13796 ; 13797 have = have - (copy) 13798 next += uintptr(copy) 13799 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 13800 __147: 13801 ; 13802 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) { 13803 goto __150 13804 } 13805 goto inf_leave 13806 __150: 13807 ; 13808 __145: 13809 ; 13810 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 13811 (*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME 13812 __16: 13813 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0800) != 0) { 13814 goto __151 13815 } 13816 if !(have == uint32(0)) { 13817 goto __153 13818 } 13819 goto inf_leave 13820 __153: 13821 ; 13822 copy = uint32(0) 13823 __154: 13824 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 13825 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)) { 13826 goto __157 13827 } 13828 *(*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) 13829 __157: 13830 ; 13831 goto __155 13832 __155: 13833 if (len != 0) && (copy < have) { 13834 goto __154 13835 } 13836 goto __156 13837 __156: 13838 ; 13839 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13840 goto __158 13841 } 13842 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13843 __158: 13844 ; 13845 have = have - (copy) 13846 next += uintptr(copy) 13847 if !(len != 0) { 13848 goto __159 13849 } 13850 goto inf_leave 13851 __159: 13852 ; 13853 goto __152 13854 __151: 13855 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13856 goto __160 13857 } 13858 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL) 13859 __160: 13860 ; 13861 __152: 13862 ; 13863 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 13864 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT 13865 __17: 13866 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x1000) != 0) { 13867 goto __161 13868 } 13869 if !(have == uint32(0)) { 13870 goto __163 13871 } 13872 goto inf_leave 13873 __163: 13874 ; 13875 copy = uint32(0) 13876 __164: 13877 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 13878 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)) { 13879 goto __167 13880 } 13881 *(*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) 13882 __167: 13883 ; 13884 goto __165 13885 __165: 13886 if (len != 0) && (copy < have) { 13887 goto __164 13888 } 13889 goto __166 13890 __166: 13891 ; 13892 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13893 goto __168 13894 } 13895 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13896 __168: 13897 ; 13898 have = have - (copy) 13899 next += uintptr(copy) 13900 if !(len != 0) { 13901 goto __169 13902 } 13903 goto inf_leave 13904 __169: 13905 ; 13906 goto __162 13907 __161: 13908 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13909 goto __170 13910 } 13911 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL) 13912 __170: 13913 ; 13914 __162: 13915 ; 13916 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC 13917 __18: 13918 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) { 13919 goto __171 13920 } 13921 __172: 13922 __175: 13923 if !(bits < (uint32(16))) { 13924 goto __176 13925 } 13926 __177: 13927 if !(have == uint32(0)) { 13928 goto __180 13929 } 13930 goto inf_leave 13931 __180: 13932 ; 13933 have-- 13934 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13935 bits = bits + (uint32(8)) 13936 goto __178 13937 __178: 13938 if 0 != 0 { 13939 goto __177 13940 } 13941 goto __179 13942 __179: 13943 ; 13944 goto __175 13945 __176: 13946 ; 13947 goto __173 13948 __173: 13949 if 0 != 0 { 13950 goto __172 13951 } 13952 goto __174 13953 __174: 13954 ; 13955 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (hold != ((*Inflate_state)(unsafe.Pointer(state)).Fcheck & uint64(0xffff)))) { 13956 goto __181 13957 } 13958 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */ 13959 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13960 goto __9 13961 __181: 13962 ; 13963 __182: 13964 hold = uint64(0) 13965 bits = uint32(0) 13966 goto __183 13967 __183: 13968 if 0 != 0 { 13969 goto __182 13970 } 13971 goto __184 13972 __184: 13973 ; 13974 __171: 13975 ; 13976 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13977 goto __185 13978 } 13979 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (((*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9) & 1) 13980 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1 13981 __185: 13982 ; 13983 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 13984 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 13985 goto __9 13986 __19: 13987 __186: 13988 __189: 13989 if !(bits < (uint32(32))) { 13990 goto __190 13991 } 13992 __191: 13993 if !(have == uint32(0)) { 13994 goto __194 13995 } 13996 goto inf_leave 13997 __194: 13998 ; 13999 have-- 14000 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14001 bits = bits + (uint32(8)) 14002 goto __192 14003 __192: 14004 if 0 != 0 { 14005 goto __191 14006 } 14007 goto __193 14008 __193: 14009 ; 14010 goto __189 14011 __190: 14012 ; 14013 goto __187 14014 __187: 14015 if 0 != 0 { 14016 goto __186 14017 } 14018 goto __188 14019 __188: 14020 ; 14021 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24))) 14022 __195: 14023 hold = uint64(0) 14024 bits = uint32(0) 14025 goto __196 14026 __196: 14027 if 0 != 0 { 14028 goto __195 14029 } 14030 goto __197 14031 __197: 14032 ; 14033 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT 14034 __20: 14035 if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) { 14036 goto __198 14037 } 14038 __199: 14039 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 14040 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 14041 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 14042 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 14043 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 14044 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 14045 goto __200 14046 __200: 14047 if 0 != 0 { 14048 goto __199 14049 } 14050 goto __201 14051 __201: 14052 ; 14053 return Z_NEED_DICT 14054 __198: 14055 ; 14056 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 14057 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14058 __21: 14059 if !((flush == Z_BLOCK) || (flush == Z_TREES)) { 14060 goto __202 14061 } 14062 goto inf_leave 14063 __202: 14064 ; 14065 __22: 14066 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 14067 goto __203 14068 } 14069 __204: 14070 hold >>= (bits & uint32(7)) 14071 bits = bits - (bits & uint32(7)) 14072 goto __205 14073 __205: 14074 if 0 != 0 { 14075 goto __204 14076 } 14077 goto __206 14078 __206: 14079 ; 14080 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK 14081 goto __9 14082 __203: 14083 ; 14084 __207: 14085 __210: 14086 if !(bits < (uint32(3))) { 14087 goto __211 14088 } 14089 __212: 14090 if !(have == uint32(0)) { 14091 goto __215 14092 } 14093 goto inf_leave 14094 __215: 14095 ; 14096 have-- 14097 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14098 bits = bits + (uint32(8)) 14099 goto __213 14100 __213: 14101 if 0 != 0 { 14102 goto __212 14103 } 14104 goto __214 14105 __214: 14106 ; 14107 goto __210 14108 __211: 14109 ; 14110 goto __208 14111 __208: 14112 if 0 != 0 { 14113 goto __207 14114 } 14115 goto __209 14116 __209: 14117 ; 14118 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 14119 __216: 14120 hold >>= 1 14121 bits = bits - (uint32(1)) 14122 goto __217 14123 __217: 14124 if 0 != 0 { 14125 goto __216 14126 } 14127 goto __218 14128 __218: 14129 ; 14130 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 14131 case uint32(0): 14132 goto __220 14133 case uint32(1): 14134 goto __221 14135 case uint32(2): 14136 goto __222 14137 case uint32(3): 14138 goto __223 14139 } 14140 goto __219 14141 __220: // stored block 14142 ; 14143 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 14144 goto __219 14145 __221: // fixed block 14146 fixedtables1(tls, state) 14147 14148 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes 14149 if !(flush == Z_TREES) { 14150 goto __224 14151 } 14152 __225: 14153 hold >>= 2 14154 bits = bits - (uint32(2)) 14155 goto __226 14156 __226: 14157 if 0 != 0 { 14158 goto __225 14159 } 14160 goto __227 14161 __227: 14162 ; 14163 goto inf_leave 14164 __224: 14165 ; 14166 goto __219 14167 __222: // dynamic block 14168 ; 14169 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 14170 goto __219 14171 __223: 14172 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 14173 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14174 __219: 14175 ; 14176 __228: 14177 hold >>= 2 14178 bits = bits - (uint32(2)) 14179 goto __229 14180 __229: 14181 if 0 != 0 { 14182 goto __228 14183 } 14184 goto __230 14185 __230: 14186 ; 14187 goto __9 14188 __23: 14189 __231: 14190 hold >>= (bits & uint32(7)) 14191 bits = bits - (bits & uint32(7)) 14192 goto __232 14193 __232: 14194 if 0 != 0 { 14195 goto __231 14196 } 14197 goto __233 14198 __233: 14199 ; // go to byte boundary 14200 __234: 14201 __237: 14202 if !(bits < (uint32(32))) { 14203 goto __238 14204 } 14205 __239: 14206 if !(have == uint32(0)) { 14207 goto __242 14208 } 14209 goto inf_leave 14210 __242: 14211 ; 14212 have-- 14213 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14214 bits = bits + (uint32(8)) 14215 goto __240 14216 __240: 14217 if 0 != 0 { 14218 goto __239 14219 } 14220 goto __241 14221 __241: 14222 ; 14223 goto __237 14224 __238: 14225 ; 14226 goto __235 14227 __235: 14228 if 0 != 0 { 14229 goto __234 14230 } 14231 goto __236 14232 __236: 14233 ; 14234 if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) { 14235 goto __243 14236 } 14237 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 14238 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14239 goto __9 14240 __243: 14241 ; 14242 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 14243 14244 __244: 14245 hold = uint64(0) 14246 bits = uint32(0) 14247 goto __245 14248 __245: 14249 if 0 != 0 { 14250 goto __244 14251 } 14252 goto __246 14253 __246: 14254 ; 14255 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_ 14256 if !(flush == Z_TREES) { 14257 goto __247 14258 } 14259 goto inf_leave 14260 __247: 14261 ; 14262 __24: 14263 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY 14264 __25: 14265 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 14266 if !(copy != 0) { 14267 goto __248 14268 } 14269 if !(copy > have) { 14270 goto __249 14271 } 14272 copy = have 14273 __249: 14274 ; 14275 if !(copy > left) { 14276 goto __250 14277 } 14278 copy = left 14279 __250: 14280 ; 14281 if !(copy == uint32(0)) { 14282 goto __251 14283 } 14284 goto inf_leave 14285 __251: 14286 ; 14287 libc.Xmemcpy(tls, put, next, uint64(copy)) 14288 have = have - (copy) 14289 next += uintptr(copy) 14290 left = left - (copy) 14291 put += uintptr(copy) 14292 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 14293 goto __9 14294 __248: 14295 ; 14296 14297 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14298 goto __9 14299 __26: 14300 __252: 14301 __255: 14302 if !(bits < (uint32(14))) { 14303 goto __256 14304 } 14305 __257: 14306 if !(have == uint32(0)) { 14307 goto __260 14308 } 14309 goto inf_leave 14310 __260: 14311 ; 14312 have-- 14313 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14314 bits = bits + (uint32(8)) 14315 goto __258 14316 __258: 14317 if 0 != 0 { 14318 goto __257 14319 } 14320 goto __259 14321 __259: 14322 ; 14323 goto __255 14324 __256: 14325 ; 14326 goto __253 14327 __253: 14328 if 0 != 0 { 14329 goto __252 14330 } 14331 goto __254 14332 __254: 14333 ; 14334 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 14335 __261: 14336 hold >>= 5 14337 bits = bits - (uint32(5)) 14338 goto __262 14339 __262: 14340 if 0 != 0 { 14341 goto __261 14342 } 14343 goto __263 14344 __263: 14345 ; 14346 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 14347 __264: 14348 hold >>= 5 14349 bits = bits - (uint32(5)) 14350 goto __265 14351 __265: 14352 if 0 != 0 { 14353 goto __264 14354 } 14355 goto __266 14356 __266: 14357 ; 14358 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 14359 __267: 14360 hold >>= 4 14361 bits = bits - (uint32(4)) 14362 goto __268 14363 __268: 14364 if 0 != 0 { 14365 goto __267 14366 } 14367 goto __269 14368 __269: 14369 ; 14370 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 14371 goto __270 14372 } 14373 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 14374 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14375 goto __9 14376 __270: 14377 ; 14378 14379 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14380 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS 14381 __27: 14382 __271: 14383 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 14384 goto __272 14385 } 14386 __273: 14387 __276: 14388 if !(bits < (uint32(3))) { 14389 goto __277 14390 } 14391 __278: 14392 if !(have == uint32(0)) { 14393 goto __281 14394 } 14395 goto inf_leave 14396 __281: 14397 ; 14398 have-- 14399 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14400 bits = bits + (uint32(8)) 14401 goto __279 14402 __279: 14403 if 0 != 0 { 14404 goto __278 14405 } 14406 goto __280 14407 __280: 14408 ; 14409 goto __276 14410 __277: 14411 ; 14412 goto __274 14413 __274: 14414 if 0 != 0 { 14415 goto __273 14416 } 14417 goto __275 14418 __275: 14419 ; 14420 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 14421 __282: 14422 hold >>= 3 14423 bits = bits - (uint32(3)) 14424 goto __283 14425 __283: 14426 if 0 != 0 { 14427 goto __282 14428 } 14429 goto __284 14430 __284: 14431 ; 14432 goto __271 14433 __272: 14434 ; 14435 __285: 14436 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 14437 goto __286 14438 } 14439 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 14440 goto __285 14441 __286: 14442 ; 14443 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 14444 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14445 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 14446 ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */), 14447 (state + 120 /* &.lenbits */), state+792 /* &.work */) 14448 if !(ret != 0) { 14449 goto __287 14450 } 14451 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 14452 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14453 goto __9 14454 __287: 14455 ; 14456 14457 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14458 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS 14459 __28: 14460 __288: 14461 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 14462 goto __289 14463 } 14464 __290: 14465 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 14466 if !((uint32(here.Fbits)) <= bits) { 14467 goto __293 14468 } 14469 goto __292 14470 __293: 14471 ; 14472 __294: 14473 if !(have == uint32(0)) { 14474 goto __297 14475 } 14476 goto inf_leave 14477 __297: 14478 ; 14479 have-- 14480 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14481 bits = bits + (uint32(8)) 14482 goto __295 14483 __295: 14484 if 0 != 0 { 14485 goto __294 14486 } 14487 goto __296 14488 __296: 14489 ; 14490 goto __291 14491 __291: 14492 goto __290 14493 goto __292 14494 __292: 14495 ; 14496 if !(int32(here.Fval) < 16) { 14497 goto __298 14498 } 14499 __300: 14500 hold >>= int32(here.Fbits) 14501 bits = bits - (uint32(here.Fbits)) 14502 goto __301 14503 __301: 14504 if 0 != 0 { 14505 goto __300 14506 } 14507 goto __302 14508 __302: 14509 ; 14510 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 14511 goto __299 14512 __298: 14513 if !(int32(here.Fval) == 16) { 14514 goto __303 14515 } 14516 __305: 14517 __308: 14518 if !(bits < (uint32(int32(here.Fbits) + 2))) { 14519 goto __309 14520 } 14521 __310: 14522 if !(have == uint32(0)) { 14523 goto __313 14524 } 14525 goto inf_leave 14526 __313: 14527 ; 14528 have-- 14529 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14530 bits = bits + (uint32(8)) 14531 goto __311 14532 __311: 14533 if 0 != 0 { 14534 goto __310 14535 } 14536 goto __312 14537 __312: 14538 ; 14539 goto __308 14540 __309: 14541 ; 14542 goto __306 14543 __306: 14544 if 0 != 0 { 14545 goto __305 14546 } 14547 goto __307 14548 __307: 14549 ; 14550 __314: 14551 hold >>= int32(here.Fbits) 14552 bits = bits - (uint32(here.Fbits)) 14553 goto __315 14554 __315: 14555 if 0 != 0 { 14556 goto __314 14557 } 14558 goto __316 14559 __316: 14560 ; 14561 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 14562 goto __317 14563 } 14564 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 14565 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14566 goto __289 14567 __317: 14568 ; 14569 len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 14570 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 14571 __318: 14572 hold >>= 2 14573 bits = bits - (uint32(2)) 14574 goto __319 14575 __319: 14576 if 0 != 0 { 14577 goto __318 14578 } 14579 goto __320 14580 __320: 14581 ; 14582 goto __304 14583 __303: 14584 if !(int32(here.Fval) == 17) { 14585 goto __321 14586 } 14587 __323: 14588 __326: 14589 if !(bits < (uint32(int32(here.Fbits) + 3))) { 14590 goto __327 14591 } 14592 __328: 14593 if !(have == uint32(0)) { 14594 goto __331 14595 } 14596 goto inf_leave 14597 __331: 14598 ; 14599 have-- 14600 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14601 bits = bits + (uint32(8)) 14602 goto __329 14603 __329: 14604 if 0 != 0 { 14605 goto __328 14606 } 14607 goto __330 14608 __330: 14609 ; 14610 goto __326 14611 __327: 14612 ; 14613 goto __324 14614 __324: 14615 if 0 != 0 { 14616 goto __323 14617 } 14618 goto __325 14619 __325: 14620 ; 14621 __332: 14622 hold >>= int32(here.Fbits) 14623 bits = bits - (uint32(here.Fbits)) 14624 goto __333 14625 __333: 14626 if 0 != 0 { 14627 goto __332 14628 } 14629 goto __334 14630 __334: 14631 ; 14632 len = uint32(0) 14633 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 14634 __335: 14635 hold >>= 3 14636 bits = bits - (uint32(3)) 14637 goto __336 14638 __336: 14639 if 0 != 0 { 14640 goto __335 14641 } 14642 goto __337 14643 __337: 14644 ; 14645 goto __322 14646 __321: 14647 __338: 14648 __341: 14649 if !(bits < (uint32(int32(here.Fbits) + 7))) { 14650 goto __342 14651 } 14652 __343: 14653 if !(have == uint32(0)) { 14654 goto __346 14655 } 14656 goto inf_leave 14657 __346: 14658 ; 14659 have-- 14660 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14661 bits = bits + (uint32(8)) 14662 goto __344 14663 __344: 14664 if 0 != 0 { 14665 goto __343 14666 } 14667 goto __345 14668 __345: 14669 ; 14670 goto __341 14671 __342: 14672 ; 14673 goto __339 14674 __339: 14675 if 0 != 0 { 14676 goto __338 14677 } 14678 goto __340 14679 __340: 14680 ; 14681 __347: 14682 hold >>= int32(here.Fbits) 14683 bits = bits - (uint32(here.Fbits)) 14684 goto __348 14685 __348: 14686 if 0 != 0 { 14687 goto __347 14688 } 14689 goto __349 14690 __349: 14691 ; 14692 len = uint32(0) 14693 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 14694 __350: 14695 hold >>= 7 14696 bits = bits - (uint32(7)) 14697 goto __351 14698 __351: 14699 if 0 != 0 { 14700 goto __350 14701 } 14702 goto __352 14703 __352: 14704 ; 14705 __322: 14706 ; 14707 __304: 14708 ; 14709 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 14710 goto __353 14711 } 14712 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 14713 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14714 goto __289 14715 __353: 14716 ; 14717 __354: 14718 if !(libc.PostDecUint32(©, 1) != 0) { 14719 goto __355 14720 } 14721 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 14722 goto __354 14723 __355: 14724 ; 14725 __299: 14726 ; 14727 goto __288 14728 __289: 14729 ; 14730 14731 // handle error breaks in while 14732 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 14733 goto __356 14734 } 14735 goto __9 14736 __356: 14737 ; 14738 14739 // check for end-of-block code (better have one) 14740 if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) { 14741 goto __357 14742 } 14743 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 14744 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14745 goto __9 14746 __357: 14747 ; 14748 14749 // build code tables -- note: do not change the lenbits or distbits 14750 // values here (9 and 6) without reading the comments in inftrees.h 14751 // concerning the ENOUGH constants, which depend on those values 14752 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 14753 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14754 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 14755 ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */), 14756 (state + 120 /* &.lenbits */), state+792 /* &.work */) 14757 if !(ret != 0) { 14758 goto __358 14759 } 14760 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 14761 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14762 goto __9 14763 __358: 14764 ; 14765 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14766 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 14767 ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 14768 (state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */) 14769 if !(ret != 0) { 14770 goto __359 14771 } 14772 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 14773 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14774 goto __9 14775 __359: 14776 ; 14777 14778 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ 14779 if !(flush == Z_TREES) { 14780 goto __360 14781 } 14782 goto inf_leave 14783 __360: 14784 ; 14785 __29: 14786 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 14787 __30: 14788 if !((have >= uint32(6)) && (left >= uint32(258))) { 14789 goto __361 14790 } 14791 __362: 14792 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 14793 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 14794 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 14795 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 14796 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 14797 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 14798 goto __363 14799 __363: 14800 if 0 != 0 { 14801 goto __362 14802 } 14803 goto __364 14804 __364: 14805 ; 14806 Xinflate_fast(tls, strm, out) 14807 __365: 14808 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 14809 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 14810 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 14811 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 14812 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 14813 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 14814 goto __366 14815 __366: 14816 if 0 != 0 { 14817 goto __365 14818 } 14819 goto __367 14820 __367: 14821 ; 14822 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 14823 goto __368 14824 } 14825 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 14826 __368: 14827 ; 14828 goto __9 14829 __361: 14830 ; 14831 (*Inflate_state)(unsafe.Pointer(state)).Fback = 0 14832 __369: 14833 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 14834 if !((uint32(here.Fbits)) <= bits) { 14835 goto __372 14836 } 14837 goto __371 14838 __372: 14839 ; 14840 __373: 14841 if !(have == uint32(0)) { 14842 goto __376 14843 } 14844 goto inf_leave 14845 __376: 14846 ; 14847 have-- 14848 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14849 bits = bits + (uint32(8)) 14850 goto __374 14851 __374: 14852 if 0 != 0 { 14853 goto __373 14854 } 14855 goto __375 14856 __375: 14857 ; 14858 goto __370 14859 __370: 14860 goto __369 14861 goto __371 14862 __371: 14863 ; 14864 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 14865 goto __377 14866 } 14867 last = here 14868 __378: 14869 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)) 14870 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 14871 goto __381 14872 } 14873 goto __380 14874 __381: 14875 ; 14876 __382: 14877 if !(have == uint32(0)) { 14878 goto __385 14879 } 14880 goto inf_leave 14881 __385: 14882 ; 14883 have-- 14884 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14885 bits = bits + (uint32(8)) 14886 goto __383 14887 __383: 14888 if 0 != 0 { 14889 goto __382 14890 } 14891 goto __384 14892 __384: 14893 ; 14894 goto __379 14895 __379: 14896 goto __378 14897 goto __380 14898 __380: 14899 ; 14900 __386: 14901 hold >>= int32(last.Fbits) 14902 bits = bits - (uint32(last.Fbits)) 14903 goto __387 14904 __387: 14905 if 0 != 0 { 14906 goto __386 14907 } 14908 goto __388 14909 __388: 14910 ; 14911 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits)) 14912 __377: 14913 ; 14914 __389: 14915 hold >>= int32(here.Fbits) 14916 bits = bits - (uint32(here.Fbits)) 14917 goto __390 14918 __390: 14919 if 0 != 0 { 14920 goto __389 14921 } 14922 goto __391 14923 __391: 14924 ; 14925 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits)) 14926 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 14927 if !((int32(here.Fop)) == 0) { 14928 goto __392 14929 } 14930 14931 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT 14932 goto __9 14933 __392: 14934 ; 14935 if !((int32(here.Fop) & 32) != 0) { 14936 goto __393 14937 } 14938 14939 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 14940 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14941 goto __9 14942 __393: 14943 ; 14944 if !((int32(here.Fop) & 64) != 0) { 14945 goto __394 14946 } 14947 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 14948 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14949 goto __9 14950 __394: 14951 ; 14952 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 14953 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT 14954 __31: 14955 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 14956 goto __395 14957 } 14958 __396: 14959 __399: 14960 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 14961 goto __400 14962 } 14963 __401: 14964 if !(have == uint32(0)) { 14965 goto __404 14966 } 14967 goto inf_leave 14968 __404: 14969 ; 14970 have-- 14971 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14972 bits = bits + (uint32(8)) 14973 goto __402 14974 __402: 14975 if 0 != 0 { 14976 goto __401 14977 } 14978 goto __403 14979 __403: 14980 ; 14981 goto __399 14982 __400: 14983 ; 14984 goto __397 14985 __397: 14986 if 0 != 0 { 14987 goto __396 14988 } 14989 goto __398 14990 __398: 14991 ; 14992 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 14993 __405: 14994 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 14995 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 14996 goto __406 14997 __406: 14998 if 0 != 0 { 14999 goto __405 15000 } 15001 goto __407 15002 __407: 15003 ; 15004 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 15005 __395: 15006 ; 15007 15008 (*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength 15009 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST 15010 __32: 15011 __408: 15012 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 15013 if !((uint32(here.Fbits)) <= bits) { 15014 goto __411 15015 } 15016 goto __410 15017 __411: 15018 ; 15019 __412: 15020 if !(have == uint32(0)) { 15021 goto __415 15022 } 15023 goto inf_leave 15024 __415: 15025 ; 15026 have-- 15027 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15028 bits = bits + (uint32(8)) 15029 goto __413 15030 __413: 15031 if 0 != 0 { 15032 goto __412 15033 } 15034 goto __414 15035 __414: 15036 ; 15037 goto __409 15038 __409: 15039 goto __408 15040 goto __410 15041 __410: 15042 ; 15043 if !((int32(here.Fop) & 0xf0) == 0) { 15044 goto __416 15045 } 15046 last = here 15047 __417: 15048 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)) 15049 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 15050 goto __420 15051 } 15052 goto __419 15053 __420: 15054 ; 15055 __421: 15056 if !(have == uint32(0)) { 15057 goto __424 15058 } 15059 goto inf_leave 15060 __424: 15061 ; 15062 have-- 15063 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15064 bits = bits + (uint32(8)) 15065 goto __422 15066 __422: 15067 if 0 != 0 { 15068 goto __421 15069 } 15070 goto __423 15071 __423: 15072 ; 15073 goto __418 15074 __418: 15075 goto __417 15076 goto __419 15077 __419: 15078 ; 15079 __425: 15080 hold >>= int32(last.Fbits) 15081 bits = bits - (uint32(last.Fbits)) 15082 goto __426 15083 __426: 15084 if 0 != 0 { 15085 goto __425 15086 } 15087 goto __427 15088 __427: 15089 ; 15090 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits)) 15091 __416: 15092 ; 15093 __428: 15094 hold >>= int32(here.Fbits) 15095 bits = bits - (uint32(here.Fbits)) 15096 goto __429 15097 __429: 15098 if 0 != 0 { 15099 goto __428 15100 } 15101 goto __430 15102 __430: 15103 ; 15104 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits)) 15105 if !((int32(here.Fop) & 64) != 0) { 15106 goto __431 15107 } 15108 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 15109 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15110 goto __9 15111 __431: 15112 ; 15113 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 15114 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 15115 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT 15116 __33: 15117 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 15118 goto __432 15119 } 15120 __433: 15121 __436: 15122 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 15123 goto __437 15124 } 15125 __438: 15126 if !(have == uint32(0)) { 15127 goto __441 15128 } 15129 goto inf_leave 15130 __441: 15131 ; 15132 have-- 15133 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15134 bits = bits + (uint32(8)) 15135 goto __439 15136 __439: 15137 if 0 != 0 { 15138 goto __438 15139 } 15140 goto __440 15141 __440: 15142 ; 15143 goto __436 15144 __437: 15145 ; 15146 goto __434 15147 __434: 15148 if 0 != 0 { 15149 goto __433 15150 } 15151 goto __435 15152 __435: 15153 ; 15154 *(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 15155 __442: 15156 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 15157 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 15158 goto __443 15159 __443: 15160 if 0 != 0 { 15161 goto __442 15162 } 15163 goto __444 15164 __444: 15165 ; 15166 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 15167 __432: 15168 ; 15169 15170 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH 15171 __34: 15172 if !(left == uint32(0)) { 15173 goto __445 15174 } 15175 goto inf_leave 15176 __445: 15177 ; 15178 copy = (out - left) 15179 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) { 15180 goto __446 15181 } // copy from window 15182 copy = ((*Inflate_state)(unsafe.Pointer(state)).Foffset - copy) 15183 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) { 15184 goto __448 15185 } 15186 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 15187 goto __449 15188 } 15189 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 15190 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15191 goto __9 15192 __449: 15193 ; 15194 __448: 15195 ; 15196 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) { 15197 goto __450 15198 } 15199 copy = copy - ((*Inflate_state)(unsafe.Pointer(state)).Fwnext) 15200 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwsize - copy))) 15201 goto __451 15202 __450: 15203 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwnext - copy))) 15204 __451: 15205 ; 15206 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 15207 goto __452 15208 } 15209 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 15210 __452: 15211 ; 15212 goto __447 15213 __446: // copy from output 15214 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 15215 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 15216 __447: 15217 ; 15218 if !(copy > left) { 15219 goto __453 15220 } 15221 copy = left 15222 __453: 15223 ; 15224 left = left - (copy) 15225 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 15226 __454: 15227 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 15228 goto __455 15229 __455: 15230 if libc.PreDecUint32(©, 1) != 0 { 15231 goto __454 15232 } 15233 goto __456 15234 __456: 15235 ; 15236 if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) { 15237 goto __457 15238 } 15239 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 15240 __457: 15241 ; 15242 goto __9 15243 __35: 15244 if !(left == uint32(0)) { 15245 goto __458 15246 } 15247 goto inf_leave 15248 __458: 15249 ; 15250 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 15251 left-- 15252 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 15253 goto __9 15254 __36: 15255 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) { 15256 goto __459 15257 } 15258 __460: 15259 __463: 15260 if !(bits < (uint32(32))) { 15261 goto __464 15262 } 15263 __465: 15264 if !(have == uint32(0)) { 15265 goto __468 15266 } 15267 goto inf_leave 15268 __468: 15269 ; 15270 have-- 15271 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15272 bits = bits + (uint32(8)) 15273 goto __466 15274 __466: 15275 if 0 != 0 { 15276 goto __465 15277 } 15278 goto __467 15279 __467: 15280 ; 15281 goto __463 15282 __464: 15283 ; 15284 goto __461 15285 __461: 15286 if 0 != 0 { 15287 goto __460 15288 } 15289 goto __462 15290 __462: 15291 ; 15292 out = out - (left) 15293 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out)) 15294 *(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out)) 15295 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 15296 goto __469 15297 } 15298 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 { 15299 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15300 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 15301 } 15302 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 15303 }()) 15304 __469: 15305 ; 15306 out = left 15307 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && ((func() uint64 { 15308 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15309 return hold 15310 } 15311 return ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24)) 15312 }()) != (*Inflate_state)(unsafe.Pointer(state)).Fcheck)) { 15313 goto __470 15314 } 15315 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */ 15316 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15317 goto __9 15318 __470: 15319 ; 15320 __471: 15321 hold = uint64(0) 15322 bits = uint32(0) 15323 goto __472 15324 __472: 15325 if 0 != 0 { 15326 goto __471 15327 } 15328 goto __473 15329 __473: 15330 ; 15331 15332 __459: 15333 ; 15334 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH 15335 __37: 15336 if !(((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fflags != 0)) { 15337 goto __474 15338 } 15339 __475: 15340 __478: 15341 if !(bits < (uint32(32))) { 15342 goto __479 15343 } 15344 __480: 15345 if !(have == uint32(0)) { 15346 goto __483 15347 } 15348 goto inf_leave 15349 __483: 15350 ; 15351 have-- 15352 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15353 bits = bits + (uint32(8)) 15354 goto __481 15355 __481: 15356 if 0 != 0 { 15357 goto __480 15358 } 15359 goto __482 15360 __482: 15361 ; 15362 goto __478 15363 __479: 15364 ; 15365 goto __476 15366 __476: 15367 if 0 != 0 { 15368 goto __475 15369 } 15370 goto __477 15371 __477: 15372 ; 15373 if !(hold != ((*Inflate_state)(unsafe.Pointer(state)).Ftotal & 0xffffffff)) { 15374 goto __484 15375 } 15376 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */ 15377 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15378 goto __9 15379 __484: 15380 ; 15381 __485: 15382 hold = uint64(0) 15383 bits = uint32(0) 15384 goto __486 15385 __486: 15386 if 0 != 0 { 15387 goto __485 15388 } 15389 goto __487 15390 __487: 15391 ; 15392 15393 __474: 15394 ; 15395 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 15396 __38: 15397 ret = Z_STREAM_END 15398 goto inf_leave 15399 __39: 15400 ret = -3 15401 goto inf_leave 15402 __40: 15403 return -4 15404 __41: 15405 __42: 15406 return -2 15407 __9: 15408 ; 15409 goto __7 15410 __7: 15411 goto __6 15412 goto __8 15413 __8: 15414 ; 15415 15416 // 15417 // Return from inflate(), updating the total counts and the check value. 15418 // If there was no progress during the inflate() call, return a buffer 15419 // error. Call updatewindow() to create and/or update the window state. 15420 // Note: a memory error from inflate() is non-recoverable. 15421 // 15422 inf_leave: 15423 __488: 15424 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 15425 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 15426 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 15427 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 15428 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 15429 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 15430 goto __489 15431 __489: 15432 if 0 != 0 { 15433 goto __488 15434 } 15435 goto __490 15436 __490: 15437 ; 15438 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)))) { 15439 goto __491 15440 } 15441 if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)) != 0) { 15442 goto __492 15443 } 15444 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 15445 return -4 15446 __492: 15447 ; 15448 __491: 15449 ; 15450 in = in - ((*Z_stream)(unsafe.Pointer(strm)).Favail_in) 15451 out = out - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 15452 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(in)) 15453 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out)) 15454 *(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out)) 15455 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 15456 goto __493 15457 } 15458 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 { 15459 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15460 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 15461 } 15462 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 15463 }()) 15464 __493: 15465 ; 15466 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = (((int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + (func() int32 { 15467 if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 { 15468 return 64 15469 } 15470 return 0 15471 }())) + (func() int32 { 15472 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE { 15473 return 128 15474 } 15475 return 0 15476 }())) + (func() int32 { 15477 if ((*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_) || ((*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_) { 15478 return 256 15479 } 15480 return 0 15481 }())) 15482 if !((((in == uint32(0)) && (out == uint32(0))) || (flush == Z_FINISH)) && (ret == Z_OK)) { 15483 goto __494 15484 } 15485 ret = -5 15486 __494: 15487 ; 15488 return ret 15489 } 15490 15491 var order1 = // permutation of code lengths 15492 [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 */ 15493 15494 func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */ 15495 var state uintptr 15496 if inflateStateCheck(tls, strm) != 0 { 15497 return -2 15498 } 15499 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15500 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 15501 (*struct { 15502 f func(*libc.TLS, Voidpf, Voidpf) 15503 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 15504 } 15505 (*struct { 15506 f func(*libc.TLS, Voidpf, Voidpf) 15507 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 15508 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 15509 15510 return Z_OK 15511 } 15512 15513 func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */ 15514 var state uintptr 15515 15516 // check state 15517 if inflateStateCheck(tls, strm) != 0 { 15518 return -2 15519 } 15520 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15521 15522 // copy dictionary 15523 if ((*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0) && (dictionary != uintptr(Z_NULL)) { 15524 libc.Xmemcpy(tls, dictionary, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 15525 (uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave - (*Inflate_state)(unsafe.Pointer(state)).Fwnext))) 15526 libc.Xmemcpy(tls, ((dictionary + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)) - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 15527 (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 15528 } 15529 if dictLength != uintptr(Z_NULL) { 15530 *(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 15531 } 15532 return Z_OK 15533 } 15534 15535 func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */ 15536 var state uintptr 15537 var dictid uint64 15538 var ret int32 15539 15540 // check state 15541 if inflateStateCheck(tls, strm) != 0 { 15542 return -2 15543 } 15544 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15545 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT) { 15546 return -2 15547 } 15548 15549 // check for correct dictionary identifier 15550 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT { 15551 dictid = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 15552 dictid = Xadler32(tls, dictid, dictionary, dictLength) 15553 if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck { 15554 return -3 15555 } 15556 } 15557 15558 // copy dictionary to window using updatewindow(), which will amend the 15559 // existing dictionary if appropriate 15560 ret = updatewindow(tls, strm, (dictionary + uintptr(dictLength)), dictLength) 15561 if ret != 0 { 15562 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 15563 return -4 15564 } 15565 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1 15566 15567 return Z_OK 15568 } 15569 15570 func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */ 15571 var state uintptr 15572 15573 // check state 15574 if inflateStateCheck(tls, strm) != 0 { 15575 return -2 15576 } 15577 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15578 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) == 0 { 15579 return -2 15580 } 15581 15582 // save header structure 15583 (*Inflate_state)(unsafe.Pointer(state)).Fhead = head 15584 (*Gz_header)(unsafe.Pointer(head)).Fdone = 0 15585 return Z_OK 15586 } 15587 15588 // 15589 // Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found 15590 // or when out of input. When called, *have is the number of pattern bytes 15591 // found in order so far, in 0..3. On return *have is updated to the new 15592 // state. If on return *have equals four, then the pattern was found and the 15593 // return value is how many bytes were read including the last byte of the 15594 // pattern. If *have is less than four, then the pattern has not been found 15595 // yet and the return value is len. In the latter case, syncsearch() can be 15596 // called again with more data and the *have state. *have is initialized to 15597 // zero for the first call. 15598 // 15599 func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */ 15600 var got uint32 15601 var next uint32 15602 15603 got = *(*uint32)(unsafe.Pointer(have)) 15604 next = uint32(0) 15605 for (next < len) && (got < uint32(4)) { 15606 if (int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next))))) == (func() int32 { 15607 if got < uint32(2) { 15608 return 0 15609 } 15610 return 0xff 15611 }()) { 15612 got++ 15613 } else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 { 15614 got = uint32(0) 15615 } else { 15616 got = (uint32(4) - got) 15617 } 15618 next++ 15619 } 15620 *(*uint32)(unsafe.Pointer(have)) = got 15621 return next 15622 } 15623 15624 func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */ 15625 bp := tls.Alloc(4) 15626 defer tls.Free(4) 15627 15628 var len uint32 // number of bytes to look at or looked at 15629 var in uint64 15630 var out uint64 // temporary to save total_in and total_out 15631 // var buf [4]uint8 at bp, 4 15632 // to restore bit buffer to byte string 15633 var state uintptr 15634 15635 // check parameters 15636 if inflateStateCheck(tls, strm) != 0 { 15637 return -2 15638 } 15639 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15640 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8)) { 15641 return -5 15642 } 15643 15644 // if first time, start search in bit buffer 15645 if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC { 15646 (*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC 15647 libc.AssignShlPtrUint64(state+80 /* &.hold */, int(((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)))) 15648 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= ((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)) 15649 len = uint32(0) 15650 for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { 15651 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold) 15652 libc.AssignShrPtrUint64(state+80 /* &.hold */, int(8)) 15653 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= (uint32(8)) 15654 } 15655 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 15656 syncsearch(tls, (state + 140 /* &.have */), bp /* &buf[0] */, len) 15657 } 15658 15659 // search available input 15660 len = syncsearch(tls, (state + 140 /* &.have */), (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 15661 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len) 15662 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 15663 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len)) 15664 15665 // return no joy or set up to restart inflate() on a new block 15666 if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { 15667 return -3 15668 } 15669 in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in 15670 out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out 15671 XinflateReset(tls, strm) 15672 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in 15673 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out 15674 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 15675 return Z_OK 15676 } 15677 15678 // 15679 // Returns true if inflate is currently at the end of a block generated by 15680 // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP 15681 // implementation to provide an additional safety check. PPP uses 15682 // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored 15683 // block. When decompressing, PPP checks that at the end of input packet, 15684 // inflate is waiting for these length bytes. 15685 // 15686 func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */ 15687 var state uintptr 15688 15689 if inflateStateCheck(tls, strm) != 0 { 15690 return -2 15691 } 15692 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15693 return (libc.Bool32(((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)))) 15694 } 15695 15696 func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */ 15697 var state uintptr 15698 var copy uintptr 15699 var window uintptr 15700 var wsize uint32 15701 15702 // check input 15703 if (inflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 15704 return -2 15705 } 15706 state = (*Z_stream)(unsafe.Pointer(source)).Fstate 15707 15708 // allocate space 15709 copy = (*struct { 15710 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 15711 })(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{}))) 15712 if copy == uintptr(Z_NULL) { 15713 return -4 15714 } 15715 window = uintptr(Z_NULL) 15716 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 15717 window = (*struct { 15718 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 15719 })(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)))) 15720 if window == uintptr(Z_NULL) { 15721 (*struct { 15722 f func(*libc.TLS, Voidpf, Voidpf) 15723 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((source))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy) 15724 return -4 15725 } 15726 } 15727 15728 // copy state 15729 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 15730 libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{}))) 15731 (*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest 15732 if ((*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1368 /* &.codes */) && ((*Inflate_state)(unsafe.Pointer(state)).Flencode <= (((state + 1368 /* &.codes */) + uintptr((ENOUGH_LENS+ENOUGH_DISTS))*4) - uintptr(1)*4)) { 15733 (*Inflate_state)(unsafe.Pointer(copy)).Flencode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1368 /* &.codes */))/4)))*4) 15734 (*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1368 /* &.codes */))/4)))*4) 15735 } 15736 (*Inflate_state)(unsafe.Pointer(copy)).Fnext = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1368 /* &.codes */))/4)))*4) 15737 if window != uintptr(Z_NULL) { 15738 wsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 15739 libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize)) 15740 } 15741 (*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window 15742 (*Z_stream)(unsafe.Pointer(dest)).Fstate = copy 15743 return Z_OK 15744 } 15745 15746 func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */ 15747 var state uintptr 15748 15749 if inflateStateCheck(tls, strm) != 0 { 15750 return -2 15751 } 15752 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15753 _ = subvert 15754 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 15755 return -3 15756 } 15757 15758 func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */ 15759 var state uintptr 15760 15761 if inflateStateCheck(tls, strm) != 0 { 15762 return -2 15763 } 15764 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15765 if check != 0 { 15766 *(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) |= (4) 15767 } else { 15768 *(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) &= (libc.CplInt32(4)) 15769 } 15770 return Z_OK 15771 } 15772 15773 func XinflateMark(tls *libc.TLS, strm Z_streamp) int64 { /* inflate.c:1541:14: */ 15774 var state uintptr 15775 15776 if inflateStateCheck(tls, strm) != 0 { 15777 return -(int64(1) << 16) 15778 } 15779 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15780 return ((int64((uint64(int64((*Inflate_state)(unsafe.Pointer(state)).Fback))) << 16)) + (func() int64 { 15781 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY { 15782 return int64((*Inflate_state)(unsafe.Pointer(state)).Flength) 15783 } 15784 return func() int64 { 15785 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH { 15786 return (int64((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)) 15787 } 15788 return int64(0) 15789 }() 15790 }())) 15791 } 15792 15793 func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint64 { /* inflate.c:1554:23: */ 15794 var state uintptr 15795 if inflateStateCheck(tls, strm) != 0 { 15796 return libc.Uint64(libc.Uint64FromInt32(-1)) 15797 } 15798 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15799 return (uint64(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1368 /* &.codes */)) / 4))) 15800 } 15801 15802 var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828 /* " inflate 1.2.11 ..." */)) /* inftrees.c:11:12 */ 15803 15804 // 15805 // If you use the zlib library in a product, an acknowledgment is welcome 15806 // in the documentation of your product. If for some reason you cannot 15807 // include such an acknowledgment, I would appreciate that you keep this 15808 // copyright string in the executable of your product. 15809 // 15810 15811 // 15812 // Build a set of tables to decode the provided canonical Huffman code. 15813 // The code lengths are lens[0..codes-1]. The result starts at *table, 15814 // whose indices are 0..2^bits-1. work is a writable array of at least 15815 // lens shorts, which is used as a work area. type is the type of code 15816 // to be generated, CODES, LENS, or DISTS. On return, zero is success, 15817 // -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 15818 // on return points to the next available entry's address. bits is the 15819 // requested root table index bits, and on return it is the actual root 15820 // table index bits. It will differ if the request is greater than the 15821 // longest code or if it is less than the shortest code. 15822 // 15823 func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */ 15824 bp := tls.Alloc(64) 15825 defer tls.Free(64) 15826 15827 var len uint32 // a code's length in bits 15828 var sym uint32 // index of code symbols 15829 var min uint32 15830 var max uint32 // minimum and maximum code lengths 15831 var root uint32 // number of index bits for root table 15832 var curr uint32 // number of index bits for current table 15833 var drop uint32 // code bits to drop for sub-table 15834 var left int32 // number of prefix codes available 15835 var used uint32 // code entries in table used 15836 var huff uint32 // Huffman code 15837 var incr uint32 // for incrementing code, index 15838 var fill uint32 // index for replicating entries 15839 var low uint32 // low bits for current root entry 15840 var mask uint32 // mask for low root bits 15841 var here Code // table entry for duplication 15842 var next uintptr // next available space in table 15843 var base uintptr // base value table to use 15844 var extra uintptr // extra bits table to use 15845 var match uint32 // use base and extra for symbol >= match 15846 // var count [16]uint16 at bp, 32 15847 // number of codes of each length 15848 // var offs [16]uint16 at bp+32, 32 15849 15850 // 15851 // Process a set of code lengths to create a canonical Huffman code. The 15852 // code lengths are lens[0..codes-1]. Each length corresponds to the 15853 // symbols 0..codes-1. The Huffman code is generated by first sorting the 15854 // symbols by length from short to long, and retaining the symbol order 15855 // for codes with equal lengths. Then the code starts with all zero bits 15856 // for the first code of the shortest length, and the codes are integer 15857 // increments for the same length, and zeros are appended as the length 15858 // increases. For the deflate format, these bits are stored backwards 15859 // from their more natural integer increment ordering, and so when the 15860 // decoding tables are built in the large loop below, the integer codes 15861 // are incremented backwards. 15862 // 15863 // This routine assumes, but does not check, that all of the entries in 15864 // lens[] are in the range 0..MAXBITS. The caller must assure this. 15865 // 1..MAXBITS is interpreted as that code length. zero means that that 15866 // symbol does not occur in this code. 15867 // 15868 // The codes are sorted by computing a count of codes for each length, 15869 // creating from that a table of starting indices for each length in the 15870 // sorted table, and then entering the symbols in order in the sorted 15871 // table. The sorted table is work[], with that space being provided by 15872 // the caller. 15873 // 15874 // The length counts are used for other purposes as well, i.e. finding 15875 // the minimum and maximum length codes, determining if there are any 15876 // codes at all, checking for a valid set of lengths, and looking ahead 15877 // at length counts to determine sub-table sizes when building the 15878 // decoding tables. 15879 // 15880 15881 // accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) 15882 for len = uint32(0); len <= uint32(MAXBITS); len++ { 15883 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)) = uint16(0) 15884 } 15885 for sym = uint32(0); sym < codes; sym++ { 15886 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++ 15887 } 15888 15889 // bound code lengths, force root to be within code lengths 15890 root = *(*uint32)(unsafe.Pointer(bits)) 15891 for max = uint32(MAXBITS); max >= uint32(1); max-- { 15892 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(max)*2))) != 0 { 15893 break 15894 } 15895 } 15896 if root > max { 15897 root = max 15898 } 15899 if max == uint32(0) { // no symbols to code at all 15900 here.Fop = uint8(64) // invalid code marker 15901 here.Fbits = uint8(1) 15902 here.Fval = uint16(0) 15903 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here // make a table to force an error 15904 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here 15905 *(*uint32)(unsafe.Pointer(bits)) = uint32(1) 15906 return 0 // no symbols, but wait for decoding to report error 15907 } 15908 for min = uint32(1); min < max; min++ { 15909 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(min)*2))) != 0 { 15910 break 15911 } 15912 } 15913 if root < min { 15914 root = min 15915 } 15916 15917 // check for an over-subscribed or incomplete set of lengths 15918 left = 1 15919 for len = uint32(1); len <= uint32(MAXBITS); len++ { 15920 left <<= 1 15921 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)))) 15922 if left < 0 { 15923 return -1 15924 } // over-subscribed 15925 } 15926 if (left > 0) && ((type1 == CODES) || (max != uint32(1))) { 15927 return -1 15928 } // incomplete set 15929 15930 // generate offsets into symbol table for each length for sorting 15931 *(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + 1*2)) = uint16(0) 15932 for len = uint32(1); len < uint32(MAXBITS); len++ { 15933 *(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + uintptr((len+uint32(1)))*2)) = (uint16(int32(*(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + uintptr(len)*2))) + int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))))) 15934 } 15935 15936 // sort symbols by length, by symbol order within each length 15937 for sym = uint32(0); sym < codes; sym++ { 15938 if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { 15939 *(*uint16)(unsafe.Pointer(work + uintptr(libc.PostIncUint16(&*(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2)), 1))*2)) = uint16(sym) 15940 } 15941 } 15942 15943 // 15944 // Create and fill in decoding tables. In this loop, the table being 15945 // filled is at next and has curr index bits. The code being used is huff 15946 // with length len. That code is converted to an index by dropping drop 15947 // bits off of the bottom. For codes where len is less than drop + curr, 15948 // those top drop + curr - len bits are incremented through all values to 15949 // fill the table with replicated entries. 15950 // 15951 // root is the number of index bits for the root table. When len exceeds 15952 // root, sub-tables are created pointed to by the root entry with an index 15953 // of the low root bits of huff. This is saved in low to check for when a 15954 // new sub-table should be started. drop is zero when the root table is 15955 // being filled, and drop is root when sub-tables are being filled. 15956 // 15957 // When a new sub-table is needed, it is necessary to look ahead in the 15958 // code lengths to determine what size sub-table is needed. The length 15959 // counts are used for this, and so count[] is decremented as codes are 15960 // entered in the tables. 15961 // 15962 // used keeps track of how many table entries have been allocated from the 15963 // provided *table space. It is checked for LENS and DIST tables against 15964 // the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in 15965 // the initial root table size constants. See the comments in inftrees.h 15966 // for more information. 15967 // 15968 // sym increments through all symbols, and the loop terminates when 15969 // all codes of length max, i.e. all codes, have been processed. This 15970 // routine permits incomplete codes, so another loop after this one fills 15971 // in the rest of the decoding tables with invalid code markers. 15972 // 15973 15974 // set up for code type 15975 switch type1 { 15976 case CODES: 15977 base = libc.AssignUintptr(&extra, work) // dummy value--not used 15978 match = uint32(20) 15979 break 15980 case LENS: 15981 base = uintptr(unsafe.Pointer(&lbase)) 15982 extra = uintptr(unsafe.Pointer(&lext)) 15983 match = uint32(257) 15984 break 15985 default: // DISTS 15986 base = uintptr(unsafe.Pointer(&dbase)) 15987 extra = uintptr(unsafe.Pointer(&dext)) 15988 match = uint32(0) 15989 } 15990 15991 // initialize state for loop 15992 huff = uint32(0) // starting code 15993 sym = uint32(0) // starting code symbol 15994 len = min // starting code length 15995 next = *(*uintptr)(unsafe.Pointer(table)) // current table to fill in 15996 curr = root // current table index bits 15997 drop = uint32(0) // current bits to drop from code for index 15998 low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root 15999 used = (uint32(1) << root) // use root table entries 16000 mask = (used - uint32(1)) // mask for comparing low 16001 16002 // check available table space 16003 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 16004 return 1 16005 } 16006 16007 // process all codes and make table entries 16008 for { 16009 // create table entry 16010 here.Fbits = (uint8(len - drop)) 16011 if (uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) + 1) < match { 16012 here.Fop = uint8(0) 16013 here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) 16014 } else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { 16015 here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2))) 16016 here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2)) 16017 } else { 16018 here.Fop = (uint8(32 + 64)) // end of block 16019 here.Fval = uint16(0) 16020 } 16021 16022 // replicate for those indices with low len bits equal to huff 16023 incr = (uint32(1) << (len - drop)) 16024 fill = (uint32(1) << curr) 16025 min = fill // save offset to next table 16026 for ok := true; ok; ok = (fill != uint32(0)) { 16027 fill = fill - (incr) 16028 *(*Code)(unsafe.Pointer(next + uintptr(((huff>>drop)+fill))*4)) = here 16029 } 16030 16031 // backwards increment the len-bit code huff 16032 incr = (uint32(1) << (len - uint32(1))) 16033 for (huff & incr) != 0 { 16034 incr >>= 1 16035 } 16036 if incr != uint32(0) { 16037 huff = huff & (incr - uint32(1)) 16038 huff = huff + (incr) 16039 } else { 16040 huff = uint32(0) 16041 } 16042 16043 // go to next symbol, update count, len 16044 sym++ 16045 if int32(libc.PreDecUint16(&(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))), 1)) == 0 { 16046 if len == max { 16047 break 16048 } 16049 len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) 16050 } 16051 16052 // create new sub-table if needed 16053 if (len > root) && ((huff & mask) != low) { 16054 // if first time, transition to sub-tables 16055 if drop == uint32(0) { 16056 drop = root 16057 } 16058 16059 // increment past last table 16060 next += 4 * (uintptr(min)) // here min is 1 << curr 16061 16062 // determine length of next table 16063 curr = (len - drop) 16064 left = (int32(1) << curr) 16065 for (curr + drop) < max { 16066 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr((curr+drop))*2)))) 16067 if left <= 0 { 16068 break 16069 } 16070 curr++ 16071 left <<= 1 16072 } 16073 16074 // check for enough space 16075 used = used + (uint32(1) << curr) 16076 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 16077 return 1 16078 } 16079 16080 // point entry in root table to sub-table 16081 low = (huff & mask) 16082 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fop = uint8(curr) 16083 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fbits = uint8(root) 16084 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fval = (uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4)) 16085 } 16086 } 16087 16088 // fill in remaining table entry if code is incomplete (guaranteed to have 16089 // at most one remaining entry, since if the code is incomplete, the 16090 // maximum code length that was allowed to get this far is one bit) 16091 if huff != uint32(0) { 16092 here.Fop = uint8(64) // invalid code marker 16093 here.Fbits = (uint8(len - drop)) 16094 here.Fval = uint16(0) 16095 *(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here 16096 } 16097 16098 // set return parameters 16099 *(*uintptr)(unsafe.Pointer(table)) += (uintptr(used)) * 4 16100 *(*uint32)(unsafe.Pointer(bits)) = root 16101 return 0 16102 } 16103 16104 var lbase = [31]uint16{ // Length codes 257..285 base 16105 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), 16106 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 */ 16107 var lext = [31]uint16{ // Length codes 257..285 extra 16108 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), 16109 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 */ 16110 var dbase = [32]uint16{ // Distance codes 0..29 base 16111 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), 16112 uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145), 16113 uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */ 16114 var dext = [32]uint16{ // Distance codes 0..29 extra 16115 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), 16116 uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27), 16117 uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */ 16118 16119 type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */ 16120 16121 // =========================================================================== 16122 // Constants 16123 16124 // Bit length codes must not exceed MAX_BL_BITS bits 16125 16126 // end of block literal code 16127 16128 // repeat previous bit length 3-6 times (2 bits of repeat count) 16129 16130 // repeat a zero length 3-10 times (3 bits of repeat count) 16131 16132 // repeat a zero length 11-138 times (7 bits of repeat count) 16133 16134 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 */ 16135 16136 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 */ 16137 16138 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 */ 16139 16140 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 */ 16141 // The lengths of the bit length codes are sent in order of decreasing 16142 // probability, to avoid transmitting the lengths for unused bit length codes. 16143 16144 // =========================================================================== 16145 // Local data. These are initialized only once. 16146 16147 // header created automatically with -DGEN_TREES_H 16148 16149 var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) { 16150 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 16151 return r 16152 }(), Fdl: func() (r struct{ Fdad Ush }) { 16153 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16154 return r 16155 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16156 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140) 16157 return r 16158 }(), Fdl: func() (r struct{ Fdad Ush }) { 16159 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16160 return r 16161 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16162 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76) 16163 return r 16164 }(), Fdl: func() (r struct{ Fdad Ush }) { 16165 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16166 return r 16167 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16168 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204) 16169 return r 16170 }(), Fdl: func() (r struct{ Fdad Ush }) { 16171 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16172 return r 16173 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16174 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44) 16175 return r 16176 }(), Fdl: func() (r struct{ Fdad Ush }) { 16177 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16178 return r 16179 }()}, 16180 {Ffc: func() (r struct{ Ffreq Ush }) { 16181 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172) 16182 return r 16183 }(), Fdl: func() (r struct{ Fdad Ush }) { 16184 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16185 return r 16186 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16187 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108) 16188 return r 16189 }(), Fdl: func() (r struct{ Fdad Ush }) { 16190 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16191 return r 16192 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16193 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236) 16194 return r 16195 }(), Fdl: func() (r struct{ Fdad Ush }) { 16196 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16197 return r 16198 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16199 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 16200 return r 16201 }(), Fdl: func() (r struct{ Fdad Ush }) { 16202 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16203 return r 16204 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16205 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156) 16206 return r 16207 }(), Fdl: func() (r struct{ Fdad Ush }) { 16208 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16209 return r 16210 }()}, 16211 {Ffc: func() (r struct{ Ffreq Ush }) { 16212 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92) 16213 return r 16214 }(), Fdl: func() (r struct{ Fdad Ush }) { 16215 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16216 return r 16217 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16218 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220) 16219 return r 16220 }(), Fdl: func() (r struct{ Fdad Ush }) { 16221 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16222 return r 16223 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16224 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60) 16225 return r 16226 }(), Fdl: func() (r struct{ Fdad Ush }) { 16227 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16228 return r 16229 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16230 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188) 16231 return r 16232 }(), Fdl: func() (r struct{ Fdad Ush }) { 16233 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16234 return r 16235 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16236 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124) 16237 return r 16238 }(), Fdl: func() (r struct{ Fdad Ush }) { 16239 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16240 return r 16241 }()}, 16242 {Ffc: func() (r struct{ Ffreq Ush }) { 16243 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252) 16244 return r 16245 }(), Fdl: func() (r struct{ Fdad Ush }) { 16246 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16247 return r 16248 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16249 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 16250 return r 16251 }(), Fdl: func() (r struct{ Fdad Ush }) { 16252 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16253 return r 16254 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16255 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130) 16256 return r 16257 }(), Fdl: func() (r struct{ Fdad Ush }) { 16258 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16259 return r 16260 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16261 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66) 16262 return r 16263 }(), Fdl: func() (r struct{ Fdad Ush }) { 16264 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16265 return r 16266 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16267 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194) 16268 return r 16269 }(), Fdl: func() (r struct{ Fdad Ush }) { 16270 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16271 return r 16272 }()}, 16273 {Ffc: func() (r struct{ Ffreq Ush }) { 16274 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34) 16275 return r 16276 }(), Fdl: func() (r struct{ Fdad Ush }) { 16277 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16278 return r 16279 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16280 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162) 16281 return r 16282 }(), Fdl: func() (r struct{ Fdad Ush }) { 16283 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16284 return r 16285 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16286 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98) 16287 return r 16288 }(), Fdl: func() (r struct{ Fdad Ush }) { 16289 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16290 return r 16291 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16292 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226) 16293 return r 16294 }(), Fdl: func() (r struct{ Fdad Ush }) { 16295 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16296 return r 16297 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16298 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 16299 return r 16300 }(), Fdl: func() (r struct{ Fdad Ush }) { 16301 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16302 return r 16303 }()}, 16304 {Ffc: func() (r struct{ Ffreq Ush }) { 16305 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146) 16306 return r 16307 }(), Fdl: func() (r struct{ Fdad Ush }) { 16308 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16309 return r 16310 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16311 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82) 16312 return r 16313 }(), Fdl: func() (r struct{ Fdad Ush }) { 16314 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16315 return r 16316 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16317 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210) 16318 return r 16319 }(), Fdl: func() (r struct{ Fdad Ush }) { 16320 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16321 return r 16322 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16323 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50) 16324 return r 16325 }(), Fdl: func() (r struct{ Fdad Ush }) { 16326 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16327 return r 16328 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16329 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178) 16330 return r 16331 }(), Fdl: func() (r struct{ Fdad Ush }) { 16332 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16333 return r 16334 }()}, 16335 {Ffc: func() (r struct{ Ffreq Ush }) { 16336 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114) 16337 return r 16338 }(), Fdl: func() (r struct{ Fdad Ush }) { 16339 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16340 return r 16341 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16342 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242) 16343 return r 16344 }(), Fdl: func() (r struct{ Fdad Ush }) { 16345 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16346 return r 16347 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16348 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 16349 return r 16350 }(), Fdl: func() (r struct{ Fdad Ush }) { 16351 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16352 return r 16353 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16354 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138) 16355 return r 16356 }(), Fdl: func() (r struct{ Fdad Ush }) { 16357 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16358 return r 16359 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16360 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74) 16361 return r 16362 }(), Fdl: func() (r struct{ Fdad Ush }) { 16363 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16364 return r 16365 }()}, 16366 {Ffc: func() (r struct{ Ffreq Ush }) { 16367 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202) 16368 return r 16369 }(), Fdl: func() (r struct{ Fdad Ush }) { 16370 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16371 return r 16372 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16373 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42) 16374 return r 16375 }(), Fdl: func() (r struct{ Fdad Ush }) { 16376 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16377 return r 16378 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16379 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170) 16380 return r 16381 }(), Fdl: func() (r struct{ Fdad Ush }) { 16382 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16383 return r 16384 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16385 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106) 16386 return r 16387 }(), Fdl: func() (r struct{ Fdad Ush }) { 16388 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16389 return r 16390 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16391 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234) 16392 return r 16393 }(), Fdl: func() (r struct{ Fdad Ush }) { 16394 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16395 return r 16396 }()}, 16397 {Ffc: func() (r struct{ Ffreq Ush }) { 16398 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 16399 return r 16400 }(), Fdl: func() (r struct{ Fdad Ush }) { 16401 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16402 return r 16403 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16404 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154) 16405 return r 16406 }(), Fdl: func() (r struct{ Fdad Ush }) { 16407 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16408 return r 16409 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16410 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90) 16411 return r 16412 }(), Fdl: func() (r struct{ Fdad Ush }) { 16413 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16414 return r 16415 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16416 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218) 16417 return r 16418 }(), Fdl: func() (r struct{ Fdad Ush }) { 16419 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16420 return r 16421 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16422 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58) 16423 return r 16424 }(), Fdl: func() (r struct{ Fdad Ush }) { 16425 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16426 return r 16427 }()}, 16428 {Ffc: func() (r struct{ Ffreq Ush }) { 16429 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186) 16430 return r 16431 }(), Fdl: func() (r struct{ Fdad Ush }) { 16432 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16433 return r 16434 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16435 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122) 16436 return r 16437 }(), Fdl: func() (r struct{ Fdad Ush }) { 16438 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16439 return r 16440 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16441 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250) 16442 return r 16443 }(), Fdl: func() (r struct{ Fdad Ush }) { 16444 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16445 return r 16446 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16447 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 16448 return r 16449 }(), Fdl: func() (r struct{ Fdad Ush }) { 16450 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16451 return r 16452 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16453 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134) 16454 return r 16455 }(), Fdl: func() (r struct{ Fdad Ush }) { 16456 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16457 return r 16458 }()}, 16459 {Ffc: func() (r struct{ Ffreq Ush }) { 16460 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70) 16461 return r 16462 }(), Fdl: func() (r struct{ Fdad Ush }) { 16463 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16464 return r 16465 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16466 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198) 16467 return r 16468 }(), Fdl: func() (r struct{ Fdad Ush }) { 16469 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16470 return r 16471 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16472 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38) 16473 return r 16474 }(), Fdl: func() (r struct{ Fdad Ush }) { 16475 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16476 return r 16477 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16478 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166) 16479 return r 16480 }(), Fdl: func() (r struct{ Fdad Ush }) { 16481 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16482 return r 16483 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16484 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102) 16485 return r 16486 }(), Fdl: func() (r struct{ Fdad Ush }) { 16487 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16488 return r 16489 }()}, 16490 {Ffc: func() (r struct{ Ffreq Ush }) { 16491 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230) 16492 return r 16493 }(), Fdl: func() (r struct{ Fdad Ush }) { 16494 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16495 return r 16496 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16497 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 16498 return r 16499 }(), Fdl: func() (r struct{ Fdad Ush }) { 16500 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16501 return r 16502 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16503 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150) 16504 return r 16505 }(), Fdl: func() (r struct{ Fdad Ush }) { 16506 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16507 return r 16508 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16509 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86) 16510 return r 16511 }(), Fdl: func() (r struct{ Fdad Ush }) { 16512 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16513 return r 16514 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16515 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214) 16516 return r 16517 }(), Fdl: func() (r struct{ Fdad Ush }) { 16518 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16519 return r 16520 }()}, 16521 {Ffc: func() (r struct{ Ffreq Ush }) { 16522 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54) 16523 return r 16524 }(), Fdl: func() (r struct{ Fdad Ush }) { 16525 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16526 return r 16527 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16528 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182) 16529 return r 16530 }(), Fdl: func() (r struct{ Fdad Ush }) { 16531 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16532 return r 16533 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16534 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118) 16535 return r 16536 }(), Fdl: func() (r struct{ Fdad Ush }) { 16537 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16538 return r 16539 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16540 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246) 16541 return r 16542 }(), Fdl: func() (r struct{ Fdad Ush }) { 16543 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16544 return r 16545 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16546 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 16547 return r 16548 }(), Fdl: func() (r struct{ Fdad Ush }) { 16549 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16550 return r 16551 }()}, 16552 {Ffc: func() (r struct{ Ffreq Ush }) { 16553 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142) 16554 return r 16555 }(), Fdl: func() (r struct{ Fdad Ush }) { 16556 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16557 return r 16558 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16559 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78) 16560 return r 16561 }(), Fdl: func() (r struct{ Fdad Ush }) { 16562 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16563 return r 16564 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16565 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206) 16566 return r 16567 }(), Fdl: func() (r struct{ Fdad Ush }) { 16568 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16569 return r 16570 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16571 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46) 16572 return r 16573 }(), Fdl: func() (r struct{ Fdad Ush }) { 16574 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16575 return r 16576 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16577 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174) 16578 return r 16579 }(), Fdl: func() (r struct{ Fdad Ush }) { 16580 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16581 return r 16582 }()}, 16583 {Ffc: func() (r struct{ Ffreq Ush }) { 16584 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110) 16585 return r 16586 }(), Fdl: func() (r struct{ Fdad Ush }) { 16587 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16588 return r 16589 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16590 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238) 16591 return r 16592 }(), Fdl: func() (r struct{ Fdad Ush }) { 16593 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16594 return r 16595 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16596 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 16597 return r 16598 }(), Fdl: func() (r struct{ Fdad Ush }) { 16599 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16600 return r 16601 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16602 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158) 16603 return r 16604 }(), Fdl: func() (r struct{ Fdad Ush }) { 16605 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16606 return r 16607 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16608 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94) 16609 return r 16610 }(), Fdl: func() (r struct{ Fdad Ush }) { 16611 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16612 return r 16613 }()}, 16614 {Ffc: func() (r struct{ Ffreq Ush }) { 16615 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222) 16616 return r 16617 }(), Fdl: func() (r struct{ Fdad Ush }) { 16618 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16619 return r 16620 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16621 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62) 16622 return r 16623 }(), Fdl: func() (r struct{ Fdad Ush }) { 16624 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16625 return r 16626 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16627 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190) 16628 return r 16629 }(), Fdl: func() (r struct{ Fdad Ush }) { 16630 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16631 return r 16632 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16633 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126) 16634 return r 16635 }(), Fdl: func() (r struct{ Fdad Ush }) { 16636 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16637 return r 16638 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16639 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254) 16640 return r 16641 }(), Fdl: func() (r struct{ Fdad Ush }) { 16642 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16643 return r 16644 }()}, 16645 {Ffc: func() (r struct{ Ffreq Ush }) { 16646 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 16647 return r 16648 }(), Fdl: func() (r struct{ Fdad Ush }) { 16649 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16650 return r 16651 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16652 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129) 16653 return r 16654 }(), Fdl: func() (r struct{ Fdad Ush }) { 16655 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16656 return r 16657 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16658 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65) 16659 return r 16660 }(), Fdl: func() (r struct{ Fdad Ush }) { 16661 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16662 return r 16663 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16664 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193) 16665 return r 16666 }(), Fdl: func() (r struct{ Fdad Ush }) { 16667 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16668 return r 16669 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16670 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33) 16671 return r 16672 }(), Fdl: func() (r struct{ Fdad Ush }) { 16673 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16674 return r 16675 }()}, 16676 {Ffc: func() (r struct{ Ffreq Ush }) { 16677 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161) 16678 return r 16679 }(), Fdl: func() (r struct{ Fdad Ush }) { 16680 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16681 return r 16682 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16683 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97) 16684 return r 16685 }(), Fdl: func() (r struct{ Fdad Ush }) { 16686 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16687 return r 16688 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16689 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225) 16690 return r 16691 }(), Fdl: func() (r struct{ Fdad Ush }) { 16692 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16693 return r 16694 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16695 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 16696 return r 16697 }(), Fdl: func() (r struct{ Fdad Ush }) { 16698 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16699 return r 16700 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16701 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145) 16702 return r 16703 }(), Fdl: func() (r struct{ Fdad Ush }) { 16704 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16705 return r 16706 }()}, 16707 {Ffc: func() (r struct{ Ffreq Ush }) { 16708 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81) 16709 return r 16710 }(), Fdl: func() (r struct{ Fdad Ush }) { 16711 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16712 return r 16713 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16714 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209) 16715 return r 16716 }(), Fdl: func() (r struct{ Fdad Ush }) { 16717 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16718 return r 16719 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16720 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49) 16721 return r 16722 }(), Fdl: func() (r struct{ Fdad Ush }) { 16723 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16724 return r 16725 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16726 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177) 16727 return r 16728 }(), Fdl: func() (r struct{ Fdad Ush }) { 16729 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16730 return r 16731 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16732 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113) 16733 return r 16734 }(), Fdl: func() (r struct{ Fdad Ush }) { 16735 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16736 return r 16737 }()}, 16738 {Ffc: func() (r struct{ Ffreq Ush }) { 16739 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241) 16740 return r 16741 }(), Fdl: func() (r struct{ Fdad Ush }) { 16742 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16743 return r 16744 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16745 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16746 return r 16747 }(), Fdl: func() (r struct{ Fdad Ush }) { 16748 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16749 return r 16750 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16751 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137) 16752 return r 16753 }(), Fdl: func() (r struct{ Fdad Ush }) { 16754 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16755 return r 16756 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16757 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73) 16758 return r 16759 }(), Fdl: func() (r struct{ Fdad Ush }) { 16760 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16761 return r 16762 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16763 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201) 16764 return r 16765 }(), Fdl: func() (r struct{ Fdad Ush }) { 16766 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16767 return r 16768 }()}, 16769 {Ffc: func() (r struct{ Ffreq Ush }) { 16770 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41) 16771 return r 16772 }(), Fdl: func() (r struct{ Fdad Ush }) { 16773 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16774 return r 16775 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16776 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169) 16777 return r 16778 }(), Fdl: func() (r struct{ Fdad Ush }) { 16779 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16780 return r 16781 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16782 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105) 16783 return r 16784 }(), Fdl: func() (r struct{ Fdad Ush }) { 16785 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16786 return r 16787 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16788 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233) 16789 return r 16790 }(), Fdl: func() (r struct{ Fdad Ush }) { 16791 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16792 return r 16793 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16794 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 16795 return r 16796 }(), Fdl: func() (r struct{ Fdad Ush }) { 16797 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16798 return r 16799 }()}, 16800 {Ffc: func() (r struct{ Ffreq Ush }) { 16801 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153) 16802 return r 16803 }(), Fdl: func() (r struct{ Fdad Ush }) { 16804 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16805 return r 16806 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16807 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89) 16808 return r 16809 }(), Fdl: func() (r struct{ Fdad Ush }) { 16810 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16811 return r 16812 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16813 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217) 16814 return r 16815 }(), Fdl: func() (r struct{ Fdad Ush }) { 16816 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16817 return r 16818 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16819 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57) 16820 return r 16821 }(), Fdl: func() (r struct{ Fdad Ush }) { 16822 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16823 return r 16824 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16825 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185) 16826 return r 16827 }(), Fdl: func() (r struct{ Fdad Ush }) { 16828 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16829 return r 16830 }()}, 16831 {Ffc: func() (r struct{ Ffreq Ush }) { 16832 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121) 16833 return r 16834 }(), Fdl: func() (r struct{ Fdad Ush }) { 16835 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16836 return r 16837 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16838 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249) 16839 return r 16840 }(), Fdl: func() (r struct{ Fdad Ush }) { 16841 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16842 return r 16843 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16844 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16845 return r 16846 }(), Fdl: func() (r struct{ Fdad Ush }) { 16847 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16848 return r 16849 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16850 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133) 16851 return r 16852 }(), Fdl: func() (r struct{ Fdad Ush }) { 16853 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16854 return r 16855 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16856 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69) 16857 return r 16858 }(), Fdl: func() (r struct{ Fdad Ush }) { 16859 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16860 return r 16861 }()}, 16862 {Ffc: func() (r struct{ Ffreq Ush }) { 16863 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197) 16864 return r 16865 }(), Fdl: func() (r struct{ Fdad Ush }) { 16866 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16867 return r 16868 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16869 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37) 16870 return r 16871 }(), Fdl: func() (r struct{ Fdad Ush }) { 16872 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16873 return r 16874 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16875 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165) 16876 return r 16877 }(), Fdl: func() (r struct{ Fdad Ush }) { 16878 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16879 return r 16880 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16881 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101) 16882 return r 16883 }(), Fdl: func() (r struct{ Fdad Ush }) { 16884 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16885 return r 16886 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16887 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229) 16888 return r 16889 }(), Fdl: func() (r struct{ Fdad Ush }) { 16890 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16891 return r 16892 }()}, 16893 {Ffc: func() (r struct{ Ffreq Ush }) { 16894 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 16895 return r 16896 }(), Fdl: func() (r struct{ Fdad Ush }) { 16897 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16898 return r 16899 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16900 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149) 16901 return r 16902 }(), Fdl: func() (r struct{ Fdad Ush }) { 16903 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16904 return r 16905 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16906 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85) 16907 return r 16908 }(), Fdl: func() (r struct{ Fdad Ush }) { 16909 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16910 return r 16911 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16912 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213) 16913 return r 16914 }(), Fdl: func() (r struct{ Fdad Ush }) { 16915 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16916 return r 16917 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16918 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53) 16919 return r 16920 }(), Fdl: func() (r struct{ Fdad Ush }) { 16921 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16922 return r 16923 }()}, 16924 {Ffc: func() (r struct{ Ffreq Ush }) { 16925 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181) 16926 return r 16927 }(), Fdl: func() (r struct{ Fdad Ush }) { 16928 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16929 return r 16930 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16931 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117) 16932 return r 16933 }(), Fdl: func() (r struct{ Fdad Ush }) { 16934 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16935 return r 16936 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245) 16938 return r 16939 }(), Fdl: func() (r struct{ Fdad Ush }) { 16940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16941 return r 16942 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16943 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 16944 return r 16945 }(), Fdl: func() (r struct{ Fdad Ush }) { 16946 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16947 return r 16948 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16949 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141) 16950 return r 16951 }(), Fdl: func() (r struct{ Fdad Ush }) { 16952 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16953 return r 16954 }()}, 16955 {Ffc: func() (r struct{ Ffreq Ush }) { 16956 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77) 16957 return r 16958 }(), Fdl: func() (r struct{ Fdad Ush }) { 16959 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16960 return r 16961 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16962 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205) 16963 return r 16964 }(), Fdl: func() (r struct{ Fdad Ush }) { 16965 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16966 return r 16967 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45) 16969 return r 16970 }(), Fdl: func() (r struct{ Fdad Ush }) { 16971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16972 return r 16973 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16974 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173) 16975 return r 16976 }(), Fdl: func() (r struct{ Fdad Ush }) { 16977 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16978 return r 16979 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16980 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109) 16981 return r 16982 }(), Fdl: func() (r struct{ Fdad Ush }) { 16983 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16984 return r 16985 }()}, 16986 {Ffc: func() (r struct{ Ffreq Ush }) { 16987 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237) 16988 return r 16989 }(), Fdl: func() (r struct{ Fdad Ush }) { 16990 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16991 return r 16992 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16993 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 16994 return r 16995 }(), Fdl: func() (r struct{ Fdad Ush }) { 16996 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16997 return r 16998 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157) 17000 return r 17001 }(), Fdl: func() (r struct{ Fdad Ush }) { 17002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17003 return r 17004 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17005 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93) 17006 return r 17007 }(), Fdl: func() (r struct{ Fdad Ush }) { 17008 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17009 return r 17010 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17011 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221) 17012 return r 17013 }(), Fdl: func() (r struct{ Fdad Ush }) { 17014 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17015 return r 17016 }()}, 17017 {Ffc: func() (r struct{ Ffreq Ush }) { 17018 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61) 17019 return r 17020 }(), Fdl: func() (r struct{ Fdad Ush }) { 17021 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17022 return r 17023 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17024 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189) 17025 return r 17026 }(), Fdl: func() (r struct{ Fdad Ush }) { 17027 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17028 return r 17029 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17030 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125) 17031 return r 17032 }(), Fdl: func() (r struct{ Fdad Ush }) { 17033 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17034 return r 17035 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17036 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253) 17037 return r 17038 }(), Fdl: func() (r struct{ Fdad Ush }) { 17039 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17040 return r 17041 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17042 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 17043 return r 17044 }(), Fdl: func() (r struct{ Fdad Ush }) { 17045 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17046 return r 17047 }()}, 17048 {Ffc: func() (r struct{ Ffreq Ush }) { 17049 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275) 17050 return r 17051 }(), Fdl: func() (r struct{ Fdad Ush }) { 17052 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17053 return r 17054 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17055 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147) 17056 return r 17057 }(), Fdl: func() (r struct{ Fdad Ush }) { 17058 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17059 return r 17060 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17061 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403) 17062 return r 17063 }(), Fdl: func() (r struct{ Fdad Ush }) { 17064 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17065 return r 17066 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17067 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83) 17068 return r 17069 }(), Fdl: func() (r struct{ Fdad Ush }) { 17070 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17071 return r 17072 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17073 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339) 17074 return r 17075 }(), Fdl: func() (r struct{ Fdad Ush }) { 17076 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17077 return r 17078 }()}, 17079 {Ffc: func() (r struct{ Ffreq Ush }) { 17080 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211) 17081 return r 17082 }(), Fdl: func() (r struct{ Fdad Ush }) { 17083 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17084 return r 17085 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17086 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467) 17087 return r 17088 }(), Fdl: func() (r struct{ Fdad Ush }) { 17089 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17090 return r 17091 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17092 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51) 17093 return r 17094 }(), Fdl: func() (r struct{ Fdad Ush }) { 17095 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17096 return r 17097 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17098 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307) 17099 return r 17100 }(), Fdl: func() (r struct{ Fdad Ush }) { 17101 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17102 return r 17103 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17104 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179) 17105 return r 17106 }(), Fdl: func() (r struct{ Fdad Ush }) { 17107 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17108 return r 17109 }()}, 17110 {Ffc: func() (r struct{ Ffreq Ush }) { 17111 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435) 17112 return r 17113 }(), Fdl: func() (r struct{ Fdad Ush }) { 17114 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17115 return r 17116 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17117 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115) 17118 return r 17119 }(), Fdl: func() (r struct{ Fdad Ush }) { 17120 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17121 return r 17122 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17123 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371) 17124 return r 17125 }(), Fdl: func() (r struct{ Fdad Ush }) { 17126 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17127 return r 17128 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17129 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243) 17130 return r 17131 }(), Fdl: func() (r struct{ Fdad Ush }) { 17132 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17133 return r 17134 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17135 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499) 17136 return r 17137 }(), Fdl: func() (r struct{ Fdad Ush }) { 17138 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17139 return r 17140 }()}, 17141 {Ffc: func() (r struct{ Ffreq Ush }) { 17142 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 17143 return r 17144 }(), Fdl: func() (r struct{ Fdad Ush }) { 17145 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17146 return r 17147 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17148 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267) 17149 return r 17150 }(), Fdl: func() (r struct{ Fdad Ush }) { 17151 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17152 return r 17153 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17154 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139) 17155 return r 17156 }(), Fdl: func() (r struct{ Fdad Ush }) { 17157 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17158 return r 17159 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17160 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395) 17161 return r 17162 }(), Fdl: func() (r struct{ Fdad Ush }) { 17163 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17164 return r 17165 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17166 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75) 17167 return r 17168 }(), Fdl: func() (r struct{ Fdad Ush }) { 17169 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17170 return r 17171 }()}, 17172 {Ffc: func() (r struct{ Ffreq Ush }) { 17173 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331) 17174 return r 17175 }(), Fdl: func() (r struct{ Fdad Ush }) { 17176 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17177 return r 17178 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17179 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203) 17180 return r 17181 }(), Fdl: func() (r struct{ Fdad Ush }) { 17182 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17183 return r 17184 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17185 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459) 17186 return r 17187 }(), Fdl: func() (r struct{ Fdad Ush }) { 17188 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17189 return r 17190 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17191 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43) 17192 return r 17193 }(), Fdl: func() (r struct{ Fdad Ush }) { 17194 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17195 return r 17196 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17197 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299) 17198 return r 17199 }(), Fdl: func() (r struct{ Fdad Ush }) { 17200 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17201 return r 17202 }()}, 17203 {Ffc: func() (r struct{ Ffreq Ush }) { 17204 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171) 17205 return r 17206 }(), Fdl: func() (r struct{ Fdad Ush }) { 17207 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17208 return r 17209 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17210 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427) 17211 return r 17212 }(), Fdl: func() (r struct{ Fdad Ush }) { 17213 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17214 return r 17215 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17216 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107) 17217 return r 17218 }(), Fdl: func() (r struct{ Fdad Ush }) { 17219 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17220 return r 17221 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17222 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363) 17223 return r 17224 }(), Fdl: func() (r struct{ Fdad Ush }) { 17225 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17226 return r 17227 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17228 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235) 17229 return r 17230 }(), Fdl: func() (r struct{ Fdad Ush }) { 17231 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17232 return r 17233 }()}, 17234 {Ffc: func() (r struct{ Ffreq Ush }) { 17235 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491) 17236 return r 17237 }(), Fdl: func() (r struct{ Fdad Ush }) { 17238 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17239 return r 17240 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17241 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 17242 return r 17243 }(), Fdl: func() (r struct{ Fdad Ush }) { 17244 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17245 return r 17246 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17247 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283) 17248 return r 17249 }(), Fdl: func() (r struct{ Fdad Ush }) { 17250 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17251 return r 17252 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17253 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155) 17254 return r 17255 }(), Fdl: func() (r struct{ Fdad Ush }) { 17256 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17257 return r 17258 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17259 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411) 17260 return r 17261 }(), Fdl: func() (r struct{ Fdad Ush }) { 17262 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17263 return r 17264 }()}, 17265 {Ffc: func() (r struct{ Ffreq Ush }) { 17266 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91) 17267 return r 17268 }(), Fdl: func() (r struct{ Fdad Ush }) { 17269 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17270 return r 17271 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17272 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347) 17273 return r 17274 }(), Fdl: func() (r struct{ Fdad Ush }) { 17275 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17276 return r 17277 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17278 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219) 17279 return r 17280 }(), Fdl: func() (r struct{ Fdad Ush }) { 17281 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17282 return r 17283 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17284 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475) 17285 return r 17286 }(), Fdl: func() (r struct{ Fdad Ush }) { 17287 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17288 return r 17289 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17290 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59) 17291 return r 17292 }(), Fdl: func() (r struct{ Fdad Ush }) { 17293 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17294 return r 17295 }()}, 17296 {Ffc: func() (r struct{ Ffreq Ush }) { 17297 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315) 17298 return r 17299 }(), Fdl: func() (r struct{ Fdad Ush }) { 17300 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17301 return r 17302 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17303 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187) 17304 return r 17305 }(), Fdl: func() (r struct{ Fdad Ush }) { 17306 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17307 return r 17308 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17309 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443) 17310 return r 17311 }(), Fdl: func() (r struct{ Fdad Ush }) { 17312 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17313 return r 17314 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17315 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123) 17316 return r 17317 }(), Fdl: func() (r struct{ Fdad Ush }) { 17318 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17319 return r 17320 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17321 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379) 17322 return r 17323 }(), Fdl: func() (r struct{ Fdad Ush }) { 17324 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17325 return r 17326 }()}, 17327 {Ffc: func() (r struct{ Ffreq Ush }) { 17328 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251) 17329 return r 17330 }(), Fdl: func() (r struct{ Fdad Ush }) { 17331 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17332 return r 17333 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17334 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507) 17335 return r 17336 }(), Fdl: func() (r struct{ Fdad Ush }) { 17337 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17338 return r 17339 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17340 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17341 return r 17342 }(), Fdl: func() (r struct{ Fdad Ush }) { 17343 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17344 return r 17345 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17346 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263) 17347 return r 17348 }(), Fdl: func() (r struct{ Fdad Ush }) { 17349 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17350 return r 17351 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17352 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135) 17353 return r 17354 }(), Fdl: func() (r struct{ Fdad Ush }) { 17355 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17356 return r 17357 }()}, 17358 {Ffc: func() (r struct{ Ffreq Ush }) { 17359 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391) 17360 return r 17361 }(), Fdl: func() (r struct{ Fdad Ush }) { 17362 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17363 return r 17364 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17365 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71) 17366 return r 17367 }(), Fdl: func() (r struct{ Fdad Ush }) { 17368 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17369 return r 17370 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17371 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327) 17372 return r 17373 }(), Fdl: func() (r struct{ Fdad Ush }) { 17374 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17375 return r 17376 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17377 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199) 17378 return r 17379 }(), Fdl: func() (r struct{ Fdad Ush }) { 17380 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17381 return r 17382 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17383 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455) 17384 return r 17385 }(), Fdl: func() (r struct{ Fdad Ush }) { 17386 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17387 return r 17388 }()}, 17389 {Ffc: func() (r struct{ Ffreq Ush }) { 17390 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39) 17391 return r 17392 }(), Fdl: func() (r struct{ Fdad Ush }) { 17393 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17394 return r 17395 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17396 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295) 17397 return r 17398 }(), Fdl: func() (r struct{ Fdad Ush }) { 17399 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17400 return r 17401 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17402 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167) 17403 return r 17404 }(), Fdl: func() (r struct{ Fdad Ush }) { 17405 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17406 return r 17407 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17408 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423) 17409 return r 17410 }(), Fdl: func() (r struct{ Fdad Ush }) { 17411 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17412 return r 17413 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17414 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103) 17415 return r 17416 }(), Fdl: func() (r struct{ Fdad Ush }) { 17417 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17418 return r 17419 }()}, 17420 {Ffc: func() (r struct{ Ffreq Ush }) { 17421 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359) 17422 return r 17423 }(), Fdl: func() (r struct{ Fdad Ush }) { 17424 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17425 return r 17426 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17427 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231) 17428 return r 17429 }(), Fdl: func() (r struct{ Fdad Ush }) { 17430 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17431 return r 17432 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17433 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487) 17434 return r 17435 }(), Fdl: func() (r struct{ Fdad Ush }) { 17436 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17437 return r 17438 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17439 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 17440 return r 17441 }(), Fdl: func() (r struct{ Fdad Ush }) { 17442 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17443 return r 17444 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17445 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279) 17446 return r 17447 }(), Fdl: func() (r struct{ Fdad Ush }) { 17448 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17449 return r 17450 }()}, 17451 {Ffc: func() (r struct{ Ffreq Ush }) { 17452 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151) 17453 return r 17454 }(), Fdl: func() (r struct{ Fdad Ush }) { 17455 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17456 return r 17457 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17458 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407) 17459 return r 17460 }(), Fdl: func() (r struct{ Fdad Ush }) { 17461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17462 return r 17463 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87) 17465 return r 17466 }(), Fdl: func() (r struct{ Fdad Ush }) { 17467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17468 return r 17469 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17470 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343) 17471 return r 17472 }(), Fdl: func() (r struct{ Fdad Ush }) { 17473 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17474 return r 17475 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17476 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215) 17477 return r 17478 }(), Fdl: func() (r struct{ Fdad Ush }) { 17479 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17480 return r 17481 }()}, 17482 {Ffc: func() (r struct{ Ffreq Ush }) { 17483 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471) 17484 return r 17485 }(), Fdl: func() (r struct{ Fdad Ush }) { 17486 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17487 return r 17488 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17489 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55) 17490 return r 17491 }(), Fdl: func() (r struct{ Fdad Ush }) { 17492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17493 return r 17494 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311) 17496 return r 17497 }(), Fdl: func() (r struct{ Fdad Ush }) { 17498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17499 return r 17500 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17501 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183) 17502 return r 17503 }(), Fdl: func() (r struct{ Fdad Ush }) { 17504 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17505 return r 17506 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17507 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439) 17508 return r 17509 }(), Fdl: func() (r struct{ Fdad Ush }) { 17510 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17511 return r 17512 }()}, 17513 {Ffc: func() (r struct{ Ffreq Ush }) { 17514 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119) 17515 return r 17516 }(), Fdl: func() (r struct{ Fdad Ush }) { 17517 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17518 return r 17519 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17520 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375) 17521 return r 17522 }(), Fdl: func() (r struct{ Fdad Ush }) { 17523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17524 return r 17525 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17526 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247) 17527 return r 17528 }(), Fdl: func() (r struct{ Fdad Ush }) { 17529 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17530 return r 17531 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17532 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503) 17533 return r 17534 }(), Fdl: func() (r struct{ Fdad Ush }) { 17535 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17536 return r 17537 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17538 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15) 17539 return r 17540 }(), Fdl: func() (r struct{ Fdad Ush }) { 17541 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17542 return r 17543 }()}, 17544 {Ffc: func() (r struct{ Ffreq Ush }) { 17545 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271) 17546 return r 17547 }(), Fdl: func() (r struct{ Fdad Ush }) { 17548 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17549 return r 17550 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17551 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143) 17552 return r 17553 }(), Fdl: func() (r struct{ Fdad Ush }) { 17554 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17555 return r 17556 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17557 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399) 17558 return r 17559 }(), Fdl: func() (r struct{ Fdad Ush }) { 17560 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17561 return r 17562 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17563 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79) 17564 return r 17565 }(), Fdl: func() (r struct{ Fdad Ush }) { 17566 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17567 return r 17568 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17569 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335) 17570 return r 17571 }(), Fdl: func() (r struct{ Fdad Ush }) { 17572 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17573 return r 17574 }()}, 17575 {Ffc: func() (r struct{ Ffreq Ush }) { 17576 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207) 17577 return r 17578 }(), Fdl: func() (r struct{ Fdad Ush }) { 17579 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17580 return r 17581 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17582 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463) 17583 return r 17584 }(), Fdl: func() (r struct{ Fdad Ush }) { 17585 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17586 return r 17587 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17588 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47) 17589 return r 17590 }(), Fdl: func() (r struct{ Fdad Ush }) { 17591 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17592 return r 17593 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17594 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303) 17595 return r 17596 }(), Fdl: func() (r struct{ Fdad Ush }) { 17597 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17598 return r 17599 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17600 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175) 17601 return r 17602 }(), Fdl: func() (r struct{ Fdad Ush }) { 17603 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17604 return r 17605 }()}, 17606 {Ffc: func() (r struct{ Ffreq Ush }) { 17607 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431) 17608 return r 17609 }(), Fdl: func() (r struct{ Fdad Ush }) { 17610 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17611 return r 17612 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17613 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111) 17614 return r 17615 }(), Fdl: func() (r struct{ Fdad Ush }) { 17616 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17617 return r 17618 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17619 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367) 17620 return r 17621 }(), Fdl: func() (r struct{ Fdad Ush }) { 17622 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17623 return r 17624 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17625 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239) 17626 return r 17627 }(), Fdl: func() (r struct{ Fdad Ush }) { 17628 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17629 return r 17630 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17631 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495) 17632 return r 17633 }(), Fdl: func() (r struct{ Fdad Ush }) { 17634 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17635 return r 17636 }()}, 17637 {Ffc: func() (r struct{ Ffreq Ush }) { 17638 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31) 17639 return r 17640 }(), Fdl: func() (r struct{ Fdad Ush }) { 17641 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17642 return r 17643 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17644 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287) 17645 return r 17646 }(), Fdl: func() (r struct{ Fdad Ush }) { 17647 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17648 return r 17649 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17650 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159) 17651 return r 17652 }(), Fdl: func() (r struct{ Fdad Ush }) { 17653 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17654 return r 17655 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17656 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415) 17657 return r 17658 }(), Fdl: func() (r struct{ Fdad Ush }) { 17659 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17660 return r 17661 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17662 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95) 17663 return r 17664 }(), Fdl: func() (r struct{ Fdad Ush }) { 17665 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17666 return r 17667 }()}, 17668 {Ffc: func() (r struct{ Ffreq Ush }) { 17669 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351) 17670 return r 17671 }(), Fdl: func() (r struct{ Fdad Ush }) { 17672 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17673 return r 17674 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17675 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223) 17676 return r 17677 }(), Fdl: func() (r struct{ Fdad Ush }) { 17678 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17679 return r 17680 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17681 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479) 17682 return r 17683 }(), Fdl: func() (r struct{ Fdad Ush }) { 17684 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17685 return r 17686 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17687 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63) 17688 return r 17689 }(), Fdl: func() (r struct{ Fdad Ush }) { 17690 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17691 return r 17692 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17693 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319) 17694 return r 17695 }(), Fdl: func() (r struct{ Fdad Ush }) { 17696 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17697 return r 17698 }()}, 17699 {Ffc: func() (r struct{ Ffreq Ush }) { 17700 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191) 17701 return r 17702 }(), Fdl: func() (r struct{ Fdad Ush }) { 17703 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17704 return r 17705 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17706 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447) 17707 return r 17708 }(), Fdl: func() (r struct{ Fdad Ush }) { 17709 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17710 return r 17711 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17712 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127) 17713 return r 17714 }(), Fdl: func() (r struct{ Fdad Ush }) { 17715 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17716 return r 17717 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17718 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383) 17719 return r 17720 }(), Fdl: func() (r struct{ Fdad Ush }) { 17721 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17722 return r 17723 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17724 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255) 17725 return r 17726 }(), Fdl: func() (r struct{ Fdad Ush }) { 17727 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17728 return r 17729 }()}, 17730 {Ffc: func() (r struct{ Ffreq Ush }) { 17731 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511) 17732 return r 17733 }(), Fdl: func() (r struct{ Fdad Ush }) { 17734 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17735 return r 17736 }()}, {Fdl: func() (r struct{ Fdad Ush }) { 17737 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17738 return r 17739 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17740 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64) 17741 return r 17742 }(), Fdl: func() (r struct{ Fdad Ush }) { 17743 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17744 return r 17745 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17746 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32) 17747 return r 17748 }(), Fdl: func() (r struct{ Fdad Ush }) { 17749 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17750 return r 17751 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17752 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96) 17753 return r 17754 }(), Fdl: func() (r struct{ Fdad Ush }) { 17755 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17756 return r 17757 }()}, 17758 {Ffc: func() (r struct{ Ffreq Ush }) { 17759 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 17760 return r 17761 }(), Fdl: func() (r struct{ Fdad Ush }) { 17762 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17763 return r 17764 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17765 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80) 17766 return r 17767 }(), Fdl: func() (r struct{ Fdad Ush }) { 17768 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17769 return r 17770 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17771 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48) 17772 return r 17773 }(), Fdl: func() (r struct{ Fdad Ush }) { 17774 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17775 return r 17776 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17777 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112) 17778 return r 17779 }(), Fdl: func() (r struct{ Fdad Ush }) { 17780 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17781 return r 17782 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17783 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17784 return r 17785 }(), Fdl: func() (r struct{ Fdad Ush }) { 17786 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17787 return r 17788 }()}, 17789 {Ffc: func() (r struct{ Ffreq Ush }) { 17790 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72) 17791 return r 17792 }(), Fdl: func() (r struct{ Fdad Ush }) { 17793 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17794 return r 17795 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17796 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40) 17797 return r 17798 }(), Fdl: func() (r struct{ Fdad Ush }) { 17799 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17800 return r 17801 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17802 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104) 17803 return r 17804 }(), Fdl: func() (r struct{ Fdad Ush }) { 17805 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17806 return r 17807 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17808 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 17809 return r 17810 }(), Fdl: func() (r struct{ Fdad Ush }) { 17811 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17812 return r 17813 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17814 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88) 17815 return r 17816 }(), Fdl: func() (r struct{ Fdad Ush }) { 17817 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17818 return r 17819 }()}, 17820 {Ffc: func() (r struct{ Ffreq Ush }) { 17821 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56) 17822 return r 17823 }(), Fdl: func() (r struct{ Fdad Ush }) { 17824 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17825 return r 17826 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17827 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120) 17828 return r 17829 }(), Fdl: func() (r struct{ Fdad Ush }) { 17830 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17831 return r 17832 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17833 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 17834 return r 17835 }(), Fdl: func() (r struct{ Fdad Ush }) { 17836 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17837 return r 17838 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17839 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68) 17840 return r 17841 }(), Fdl: func() (r struct{ Fdad Ush }) { 17842 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17843 return r 17844 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17845 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36) 17846 return r 17847 }(), Fdl: func() (r struct{ Fdad Ush }) { 17848 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17849 return r 17850 }()}, 17851 {Ffc: func() (r struct{ Ffreq Ush }) { 17852 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100) 17853 return r 17854 }(), Fdl: func() (r struct{ Fdad Ush }) { 17855 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17856 return r 17857 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17858 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 17859 return r 17860 }(), Fdl: func() (r struct{ Fdad Ush }) { 17861 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17862 return r 17863 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17864 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84) 17865 return r 17866 }(), Fdl: func() (r struct{ Fdad Ush }) { 17867 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17868 return r 17869 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17870 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52) 17871 return r 17872 }(), Fdl: func() (r struct{ Fdad Ush }) { 17873 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17874 return r 17875 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17876 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116) 17877 return r 17878 }(), Fdl: func() (r struct{ Fdad Ush }) { 17879 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17880 return r 17881 }()}, 17882 {Ffc: func() (r struct{ Ffreq Ush }) { 17883 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 17884 return r 17885 }(), Fdl: func() (r struct{ Fdad Ush }) { 17886 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17887 return r 17888 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17889 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131) 17890 return r 17891 }(), Fdl: func() (r struct{ Fdad Ush }) { 17892 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17893 return r 17894 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17895 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67) 17896 return r 17897 }(), Fdl: func() (r struct{ Fdad Ush }) { 17898 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17899 return r 17900 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17901 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195) 17902 return r 17903 }(), Fdl: func() (r struct{ Fdad Ush }) { 17904 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17905 return r 17906 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17907 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35) 17908 return r 17909 }(), Fdl: func() (r struct{ Fdad Ush }) { 17910 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17911 return r 17912 }()}, 17913 {Ffc: func() (r struct{ Ffreq Ush }) { 17914 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163) 17915 return r 17916 }(), Fdl: func() (r struct{ Fdad Ush }) { 17917 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17918 return r 17919 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17920 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99) 17921 return r 17922 }(), Fdl: func() (r struct{ Fdad Ush }) { 17923 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17924 return r 17925 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17926 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227) 17927 return r 17928 }(), Fdl: func() (r struct{ Fdad Ush }) { 17929 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17930 return r 17931 }()}} /* trees.h:3:21 */ 17932 17933 var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) { 17934 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17935 return r 17936 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 17938 return r 17939 }(), Fdl: func() (r struct{ Fdad Ush }) { 17940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17941 return r 17942 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17943 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17944 return r 17945 }(), Fdl: func() (r struct{ Fdad Ush }) { 17946 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17947 return r 17948 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17949 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 17950 return r 17951 }(), Fdl: func() (r struct{ Fdad Ush }) { 17952 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17953 return r 17954 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17955 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 17956 return r 17957 }(), Fdl: func() (r struct{ Fdad Ush }) { 17958 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17959 return r 17960 }()}, 17961 {Ffc: func() (r struct{ Ffreq Ush }) { 17962 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 17963 return r 17964 }(), Fdl: func() (r struct{ Fdad Ush }) { 17965 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17966 return r 17967 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 17969 return r 17970 }(), Fdl: func() (r struct{ Fdad Ush }) { 17971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17972 return r 17973 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17974 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 17975 return r 17976 }(), Fdl: func() (r struct{ Fdad Ush }) { 17977 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17978 return r 17979 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17980 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 17981 return r 17982 }(), Fdl: func() (r struct{ Fdad Ush }) { 17983 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17984 return r 17985 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17986 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 17987 return r 17988 }(), Fdl: func() (r struct{ Fdad Ush }) { 17989 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17990 return r 17991 }()}, 17992 {Ffc: func() (r struct{ Ffreq Ush }) { 17993 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 17994 return r 17995 }(), Fdl: func() (r struct{ Fdad Ush }) { 17996 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17997 return r 17998 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 18000 return r 18001 }(), Fdl: func() (r struct{ Fdad Ush }) { 18002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18003 return r 18004 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18005 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 18006 return r 18007 }(), Fdl: func() (r struct{ Fdad Ush }) { 18008 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18009 return r 18010 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18011 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 18012 return r 18013 }(), Fdl: func() (r struct{ Fdad Ush }) { 18014 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18015 return r 18016 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18017 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 18018 return r 18019 }(), Fdl: func() (r struct{ Fdad Ush }) { 18020 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18021 return r 18022 }()}, 18023 {Ffc: func() (r struct{ Ffreq Ush }) { 18024 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 18025 return r 18026 }(), Fdl: func() (r struct{ Fdad Ush }) { 18027 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18028 return r 18029 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18030 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 18031 return r 18032 }(), Fdl: func() (r struct{ Fdad Ush }) { 18033 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18034 return r 18035 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18036 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 18037 return r 18038 }(), Fdl: func() (r struct{ Fdad Ush }) { 18039 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18040 return r 18041 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18042 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 18043 return r 18044 }(), Fdl: func() (r struct{ Fdad Ush }) { 18045 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18046 return r 18047 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18048 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 18049 return r 18050 }(), Fdl: func() (r struct{ Fdad Ush }) { 18051 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18052 return r 18053 }()}, 18054 {Ffc: func() (r struct{ Ffreq Ush }) { 18055 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18056 return r 18057 }(), Fdl: func() (r struct{ Fdad Ush }) { 18058 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18059 return r 18060 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18061 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 18062 return r 18063 }(), Fdl: func() (r struct{ Fdad Ush }) { 18064 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18065 return r 18066 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18067 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 18068 return r 18069 }(), Fdl: func() (r struct{ Fdad Ush }) { 18070 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18071 return r 18072 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18073 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 18074 return r 18075 }(), Fdl: func() (r struct{ Fdad Ush }) { 18076 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18077 return r 18078 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18079 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 18080 return r 18081 }(), Fdl: func() (r struct{ Fdad Ush }) { 18082 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18083 return r 18084 }()}, 18085 {Ffc: func() (r struct{ Ffreq Ush }) { 18086 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 18087 return r 18088 }(), Fdl: func() (r struct{ Fdad Ush }) { 18089 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18090 return r 18091 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18092 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 18093 return r 18094 }(), Fdl: func() (r struct{ Fdad Ush }) { 18095 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18096 return r 18097 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18098 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 18099 return r 18100 }(), Fdl: func() (r struct{ Fdad Ush }) { 18101 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18102 return r 18103 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18104 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 18105 return r 18106 }(), Fdl: func() (r struct{ Fdad Ush }) { 18107 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18108 return r 18109 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18110 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 18111 return r 18112 }(), Fdl: func() (r struct{ Fdad Ush }) { 18113 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18114 return r 18115 }()}} /* trees.h:64:21 */ 18116 18117 var X_dist_code = [512]Uch{ 18118 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), 18119 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), 18120 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), 18121 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), 18122 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), 18123 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), 18124 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), 18125 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), 18126 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), 18127 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), 18128 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), 18129 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), 18130 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), 18131 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), 18132 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), 18133 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), 18134 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), 18135 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), 18136 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), 18137 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), 18138 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), 18139 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), 18140 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), 18141 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), 18142 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), 18143 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 18144 } /* trees.h:73:25 */ 18145 18146 var X_length_code = [256]Uch{ 18147 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), 18148 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), 18149 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), 18150 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), 18151 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), 18152 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), 18153 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), 18154 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), 18155 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), 18156 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), 18157 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), 18158 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), 18159 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), 18160 } /* trees.h:102:25 */ 18161 18162 var base_length = [29]int32{ 18163 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 18164 64, 80, 96, 112, 128, 160, 192, 224, 0, 18165 } /* trees.h:118:17 */ 18166 18167 var base_dist = [30]int32{ 18168 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 18169 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 18170 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 18171 } /* trees.h:123:17 */ 18172 18173 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 */ 18174 18175 var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */ 18176 18177 var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */ 18178 18179 // Send a code of the given tree. c and tree must not have side effects 18180 18181 // =========================================================================== 18182 // Output a short LSB first on the stream. 18183 // IN assertion: there is enough room in pendingBuf. 18184 18185 // =========================================================================== 18186 // Send a value on a given number of bits. 18187 // IN assertion: length <= 16 and value fits in length bits. 18188 18189 // the arguments must not have side effects 18190 18191 // =========================================================================== 18192 // Initialize the various 'constant' tables. 18193 func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */ 18194 } 18195 18196 // =========================================================================== 18197 // Genererate the file trees.h describing the static trees. 18198 18199 // =========================================================================== 18200 // Initialize the tree data structures for a new zlib stream. 18201 func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */ 18202 tr_static_init(tls) 18203 18204 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 212 /* &.dyn_ltree */ 18205 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc)) 18206 18207 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2504 /* &.dyn_dtree */ 18208 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc)) 18209 18210 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2748 /* &.bl_tree */ 18211 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc)) 18212 18213 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 18214 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 18215 18216 // Initialize the first block of the first file: 18217 init_block(tls, s) 18218 } 18219 18220 // =========================================================================== 18221 // Initialize a new block. 18222 func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */ 18223 var n int32 // iterates over tree elements 18224 18225 // Initialize the trees. 18226 for n = 0; n < ((LITERALS + 1) + LENGTH_CODES); n++ { 18227 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 18228 } 18229 for n = 0; n < D_CODES; n++ { 18230 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 18231 } 18232 for n = 0; n < BL_CODES; n++ { 18233 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 18234 } 18235 18236 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 256*4 /* &.fc */)) = Ush(1) 18237 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint64(s+5920 /* &.static_len */, uint64(0)) 18238 (*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5928 /* &.matches */, UInt(0)) 18239 } 18240 18241 // Index within the heap array of least frequent node in the Huffman tree 18242 18243 // =========================================================================== 18244 // Remove the smallest element from the heap and recreate the heap with 18245 // one less element. Updates heap and heap_len. 18246 18247 // =========================================================================== 18248 // Compares to subtrees, using the tree depth as tie breaker when 18249 // the subtrees have equal frequency. This minimizes the worst case length. 18250 18251 // =========================================================================== 18252 // Restore the heap property by moving down the tree starting at node k, 18253 // exchanging a node with the smallest of its two sons if necessary, stopping 18254 // when the heap property is re-established (each father smaller than its 18255 // two sons). 18256 func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */ 18257 var v int32 = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) 18258 var j int32 = (k << 1) // left son of k 18259 for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len { 18260 // Set j to the smallest of the two sons: 18261 if (j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len) && ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))))) <= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4))))))))) { 18262 j++ 18263 } 18264 // Exit if v is smaller than both sons 18265 if (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))))))) { 18266 break 18267 } 18268 18269 // Exchange v with the smallest son 18270 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)) 18271 k = j 18272 18273 // And continue down the tree, setting j to the left son of k 18274 j <<= 1 18275 } 18276 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = v 18277 } 18278 18279 // =========================================================================== 18280 // Compute the optimal bit lengths for a tree and update the total bit length 18281 // for the current block. 18282 // IN assertion: the fields freq and dad are set, heap[heap_max] and 18283 // above are the tree nodes sorted by increasing frequency. 18284 // OUT assertions: the field len is set to the optimal bit length, the 18285 // array bl_count contains the frequencies for each bit length. 18286 // The length opt_len is updated; static_len is also updated if stree is 18287 // not null. 18288 func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */ 18289 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 18290 var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code 18291 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 18292 var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits 18293 var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base 18294 var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length 18295 var h int32 // heap index 18296 var n int32 18297 var m int32 // iterate over the tree elements 18298 var bits int32 // bit length 18299 var xbits int32 // extra bits 18300 var f Ush // frequency 18301 var overflow int32 = 0 // number of elements with bit length too large 18302 18303 for bits = 0; bits <= MAX_BITS; bits++ { 18304 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2)) = Ush(0) 18305 } 18306 18307 // In a first pass, compute the optimal bit lengths (which may 18308 // overflow in the case of the bit length tree). 18309 *(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2 /* &.dl */)) = Ush(0) // root of the heap 18310 18311 for h = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1); h < ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1); h++ { 18312 n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(h)*4)) 18313 bits = (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)))*4 + 2 /* &.dl */))) + 1) 18314 if bits > max_length { 18315 bits = max_length 18316 overflow++ 18317 } 18318 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(bits) 18319 // We overwrite tree[n].Dad which is no longer needed 18320 18321 if n > max_code { 18322 continue 18323 } // not a leaf node 18324 18325 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))++ 18326 xbits = 0 18327 if n >= base { 18328 xbits = *(*Intf)(unsafe.Pointer(extra + uintptr((n-base))*4)) 18329 } 18330 f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */)) 18331 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += (Ulg(f) * Ulg((uint32(bits + xbits)))) 18332 if stree != 0 { 18333 *(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) += (Ulg(f) * Ulg((uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2 /* &.dl */))) + xbits)))) 18334 } 18335 } 18336 if overflow == 0 { 18337 return 18338 } 18339 18340 // This happens for example on obj2 and pic of the Calgary corpus 18341 18342 // Find the first bit length which could increase: 18343 for ok := true; ok; ok = (overflow > 0) { 18344 bits = (max_length - 1) 18345 for int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) == 0 { 18346 bits-- 18347 } 18348 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))-- // move one leaf down the tree 18349 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr((bits+1))*2)) += Ush((2)) // move one overflow item as its brother 18350 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(max_length)*2))-- 18351 // The brother of the overflow item also moves one step up, 18352 // but this does not affect bl_count[max_length] 18353 overflow = overflow - (2) 18354 } 18355 18356 // Now recompute all bit lengths, scanning in increasing frequency. 18357 // h is still equal to HEAP_SIZE. (It is simpler to reconstruct all 18358 // lengths instead of fixing only the wrong ones. This idea is taken 18359 // from 'ar' written by Haruhiko Okumura.) 18360 for bits = max_length; bits != 0; bits-- { 18361 n = int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) 18362 for n != 0 { 18363 m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&h, 1))*4)) 18364 if m > max_code { 18365 continue 18366 } 18367 if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */))) != uint32(bits) { 18368 18369 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 /* &.fc */)))) 18370 *(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)) = Ush(bits) 18371 } 18372 n-- 18373 } 18374 } 18375 } 18376 18377 // =========================================================================== 18378 // Generate the codes for a given tree and bit counts (which need not be 18379 // optimal). 18380 // IN assertion: the array bl_count contains the bit length statistics for 18381 // the given tree and the field len is set for all tree elements. 18382 // OUT assertion: the field code is set for all tree elements of non 18383 // zero code length. 18384 func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */ 18385 bp := tls.Alloc(32) 18386 defer tls.Free(32) 18387 18388 // var next_code [16]Ush at bp, 32 18389 // next code value for each bit length 18390 var code uint32 = uint32(0) // running code value 18391 var bits int32 // bit index 18392 var n int32 // code index 18393 18394 // The distribution counts are first used to generate the code values 18395 // without bit reversal. 18396 for bits = 1; bits <= MAX_BITS; bits++ { 18397 code = ((code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr((bits-1))*2)))) << 1) 18398 *(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(bits)*2)) = Ush(code) 18399 } 18400 // Check that the bit counts in bl_count are consistent. The last code 18401 // must be all ones. 18402 18403 for n = 0; n <= max_code; n++ { 18404 var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */))) 18405 if len == 0 { 18406 continue 18407 } 18408 // Now reverse the bits 18409 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(len)*2)), 1)), len)) 18410 18411 } 18412 } 18413 18414 // =========================================================================== 18415 // Construct one Huffman tree and assigns the code bit strings and lengths. 18416 // Update the total bit length for the current block. 18417 // IN assertion: the field freq is set for all tree elements. 18418 // OUT assertions: the fields len and code are set to the optimal bit length 18419 // and corresponding code. The length opt_len is updated; static_len is 18420 // also updated if stree is not null. The field max_code is set. 18421 func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */ 18422 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 18423 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 18424 var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems 18425 var n int32 18426 var m int32 // iterate over heap elements 18427 var max_code int32 = -1 // largest code with non zero frequency 18428 var node int32 // new node being created 18429 18430 // Construct the initial heap, with least frequent element in 18431 // heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. 18432 // heap[0] is not used. 18433 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0 18434 (*Deflate_state)(unsafe.Pointer(s)).Fheap_max = ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1) 18435 18436 for n = 0; n < elems; n++ { 18437 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) != 0 { 18438 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4)) = libc.AssignInt32(&max_code, n) 18439 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n))) = Uch(0) 18440 } else { 18441 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(0) 18442 } 18443 } 18444 18445 // The pkzip format requires that at least one distance code exists, 18446 // and that at least one bit should be sent even if there is only one 18447 // possible code. So to avoid special checks later on we force at least 18448 // two codes of non zero frequency. 18449 for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 { 18450 node = libc.AssignPtrInt32((s+3008 /* &.heap */)+uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4, func() int32 { 18451 if max_code < 2 { 18452 return libc.PreIncInt32(&max_code, 1) 18453 } 18454 return 0 18455 }()) 18456 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = Ush(1) 18457 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = Uch(0) 18458 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len-- 18459 if stree != 0 { 18460 *(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) -= (Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2 /* &.dl */)))) 18461 } 18462 // node is 0 or 1 so it does not have extra bits 18463 } 18464 (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code 18465 18466 // The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, 18467 // establish sub-heaps of increasing lengths: 18468 for n = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2); n >= 1; n-- { 18469 pqdownheap(tls, s, tree, n) 18470 } 18471 18472 // Construct the Huffman tree by repeatedly combining the least two 18473 // frequent nodes. 18474 node = elems // next internal node of the tree 18475 for ok := true; ok; ok = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2) { 18476 { 18477 n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) 18478 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) 18479 pqdownheap(tls, s, tree, SMALLEST) 18480 } 18481 // n = node of least frequency 18482 m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) // m = node of next least frequency 18483 18484 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = n // keep the nodes sorted by frequency 18485 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = m 18486 18487 // Create a new node father of n and m 18488 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = (Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 /* &.fc */))))) 18489 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = (Uch((func() int32 { 18490 if int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) { 18491 return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) 18492 } 18493 return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) 18494 }()) + 1)) 18495 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2 /* &.dl */ /* &.dad */, Ush(node)) 18496 // and insert the new node in the heap 18497 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = libc.PostIncInt32(&node, 1) 18498 pqdownheap(tls, s, tree, SMALLEST) 18499 18500 } 18501 18502 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) 18503 18504 // At this point, the fields freq and dad are set. We can now 18505 // generate the bit lengths. 18506 gen_bitlen(tls, s, desc) 18507 18508 // The field len is now set, we can generate the bit codes 18509 gen_codes(tls, tree, max_code, s+2976 /* &.bl_count */) 18510 } 18511 18512 // =========================================================================== 18513 // Scan a literal or distance tree to determine the frequencies of the codes 18514 // in the bit length tree. 18515 func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */ 18516 var n int32 // iterates over all tree elements 18517 var prevlen int32 = -1 // last emitted length 18518 var curlen int32 // length of current code 18519 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 18520 var count int32 = 0 // repeat count of the current code 18521 var max_count int32 = 7 // max repeat count 18522 var min_count int32 = 4 // min repeat count 18523 18524 if nextlen == 0 { 18525 max_count = 138 18526 min_count = 3 18527 } 18528 *(*Ush)(unsafe.Pointer(tree + uintptr((max_code+1))*4 + 2 /* &.dl */)) = Ush(0xffff) // guard 18529 18530 for n = 0; n <= max_code; n++ { 18531 curlen = nextlen 18532 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 18533 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 18534 continue 18535 } else if count < min_count { 18536 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */ /* &.freq */)) += Ush((count)) 18537 } else if curlen != 0 { 18538 if curlen != prevlen { 18539 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))++ 18540 } 18541 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))++ 18542 } else if count <= 10 { 18543 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))++ 18544 } else { 18545 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))++ 18546 } 18547 count = 0 18548 prevlen = curlen 18549 if nextlen == 0 { 18550 max_count = 138 18551 min_count = 3 18552 } else if curlen == nextlen { 18553 max_count = 6 18554 min_count = 3 18555 } else { 18556 max_count = 7 18557 min_count = 4 18558 } 18559 } 18560 } 18561 18562 // =========================================================================== 18563 // Send a literal or distance tree in compressed form, using the codes in 18564 // bl_tree. 18565 func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */ 18566 var n int32 // iterates over all tree elements 18567 var prevlen int32 = -1 // last emitted length 18568 var curlen int32 // length of current code 18569 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 18570 var count int32 = 0 // repeat count of the current code 18571 var max_count int32 = 7 // max repeat count 18572 var min_count int32 = 4 // min repeat count 18573 18574 /* tree[max_code+1].Len = -1; */ // guard already set 18575 if nextlen == 0 { 18576 max_count = 138 18577 min_count = 3 18578 } 18579 18580 for n = 0; n <= max_code; n++ { 18581 curlen = nextlen 18582 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 18583 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 18584 continue 18585 } else if count < min_count { 18586 for ok := true; ok; ok = (libc.PreDecInt32(&count, 1) != 0) { 18587 { 18588 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 18589 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18590 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 18591 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18592 { 18593 { 18594 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18595 } 18596 { 18597 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18598 } 18599 18600 } 18601 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18602 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18603 } else { 18604 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18605 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18606 } 18607 } 18608 } 18609 18610 } else if curlen != 0 { 18611 if curlen != prevlen { 18612 { 18613 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 18614 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18615 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 18616 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18617 { 18618 { 18619 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18620 } 18621 { 18622 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18623 } 18624 18625 } 18626 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18627 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18628 } else { 18629 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18630 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18631 } 18632 } 18633 count-- 18634 } 18635 18636 { 18637 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 + 2 /* &.dl */))) 18638 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18639 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))) 18640 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18641 { 18642 { 18643 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18644 } 18645 { 18646 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18647 } 18648 18649 } 18650 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18651 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18652 } else { 18653 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18654 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18655 } 18656 } 18657 { 18658 var len int32 = 2 18659 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18660 var val int32 = (count - 3) 18661 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18662 { 18663 { 18664 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18665 } 18666 { 18667 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18668 } 18669 18670 } 18671 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18672 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18673 } else { 18674 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18675 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18676 } 18677 } 18678 18679 } else if count <= 10 { 18680 { 18681 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 + 2 /* &.dl */))) 18682 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18683 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))) 18684 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18685 { 18686 { 18687 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18688 } 18689 { 18690 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18691 } 18692 18693 } 18694 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18695 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18696 } else { 18697 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18698 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18699 } 18700 } 18701 { 18702 var len int32 = 3 18703 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18704 var val int32 = (count - 3) 18705 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18706 { 18707 { 18708 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18709 } 18710 { 18711 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18712 } 18713 18714 } 18715 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18716 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18717 } else { 18718 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18719 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18720 } 18721 } 18722 18723 } else { 18724 { 18725 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 + 2 /* &.dl */))) 18726 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18727 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))) 18728 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18729 { 18730 { 18731 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18732 } 18733 { 18734 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18735 } 18736 18737 } 18738 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18739 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18740 } else { 18741 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18742 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18743 } 18744 } 18745 { 18746 var len int32 = 7 18747 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18748 var val int32 = (count - 11) 18749 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18750 { 18751 { 18752 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18753 } 18754 { 18755 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18756 } 18757 18758 } 18759 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18760 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18761 } else { 18762 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 11))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18763 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18764 } 18765 } 18766 18767 } 18768 count = 0 18769 prevlen = curlen 18770 if nextlen == 0 { 18771 max_count = 138 18772 min_count = 3 18773 } else if curlen == nextlen { 18774 max_count = 6 18775 min_count = 3 18776 } else { 18777 max_count = 7 18778 min_count = 4 18779 } 18780 } 18781 } 18782 18783 // =========================================================================== 18784 // Construct the Huffman tree for the bit lengths and return the index in 18785 // bl_order of the last bit length code to send. 18786 func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */ 18787 var max_blindex int32 // index of last bit length code of non zero freq 18788 18789 // Determine the bit length frequencies for literal and distance trees 18790 scan_tree(tls, s, s+212 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) 18791 scan_tree(tls, s, s+2504 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) 18792 18793 // Build the bit length tree: 18794 build_tree(tls, s, (s + 2952 /* &.bl_desc */)) 18795 // opt_len now includes the length of the tree representations, except 18796 // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. 18797 18798 // Determine the number of bit length codes to send. The pkzip format 18799 // requires that at least 4 bit length codes be sent. (appnote.txt says 18800 // 3 but the actual value used is 4.) 18801 for max_blindex = (BL_CODES - 1); max_blindex >= 3; max_blindex-- { 18802 if int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[max_blindex])*4 + 2 /* &.dl */))) != 0 { 18803 break 18804 } 18805 } 18806 // Update opt_len to include the bit length tree and counts 18807 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((((uint64(3) * (Ulg(max_blindex) + uint64(1))) + uint64(5)) + uint64(5)) + uint64(4)) 18808 18809 return max_blindex 18810 } 18811 18812 // =========================================================================== 18813 // Send the header for a block using dynamic Huffman trees: the counts, the 18814 // lengths of the bit length codes, the literal tree and the distance tree. 18815 // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. 18816 func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */ 18817 var rank int32 // index in bl_order 18818 18819 { 18820 var len int32 = 5 18821 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18822 var val int32 = (lcodes - 257) 18823 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18824 { 18825 { 18826 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18827 } 18828 { 18829 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18830 } 18831 18832 } 18833 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18834 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18835 } else { 18836 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lcodes - 257))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18837 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18838 } 18839 } 18840 /* not +255 as stated in appnote.txt */ 18841 { 18842 var len int32 = 5 18843 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18844 var val int32 = (dcodes - 1) 18845 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18846 { 18847 { 18848 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18849 } 18850 { 18851 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18852 } 18853 18854 } 18855 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18856 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18857 } else { 18858 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dcodes - 1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18859 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18860 } 18861 } 18862 18863 { 18864 var len int32 = 4 18865 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18866 var val int32 = (blcodes - 4) 18867 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18868 { 18869 { 18870 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18871 } 18872 { 18873 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18874 } 18875 18876 } 18877 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18878 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18879 } else { 18880 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(blcodes - 4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18881 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18882 } 18883 } 18884 // not -3 as stated in appnote.txt 18885 for rank = 0; rank < blcodes; rank++ { 18886 18887 { 18888 var len int32 = 3 18889 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18890 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */))) 18891 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18892 { 18893 { 18894 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18895 } 18896 { 18897 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18898 } 18899 18900 } 18901 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18902 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18903 } else { 18904 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18905 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18906 } 18907 } 18908 18909 } 18910 18911 send_tree(tls, s, s+212 /* &.dyn_ltree */, (lcodes - 1)) // literal tree 18912 18913 send_tree(tls, s, s+2504 /* &.dyn_dtree */, (dcodes - 1)) // distance tree 18914 18915 } 18916 18917 // =========================================================================== 18918 // Send a stored block 18919 func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */ 18920 { 18921 var len int32 = 3 18922 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18923 var val int32 = ((int32(STORED_BLOCK) << 1) + last) 18924 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18925 { 18926 { 18927 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18928 } 18929 { 18930 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18931 } 18932 18933 } 18934 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18935 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18936 } else { 18937 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STORED_BLOCK) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18938 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18939 } 18940 } 18941 // send block type 18942 bi_windup(tls, s) /* align on byte boundary */ 18943 { 18944 { 18945 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(stored_len))) & 0xff)) 18946 } 18947 { 18948 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(stored_len))) >> 8)) 18949 } 18950 18951 } 18952 18953 { 18954 { 18955 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(^stored_len))) & 0xff)) 18956 } 18957 { 18958 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(^stored_len))) >> 8)) 18959 } 18960 18961 } 18962 18963 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), buf, stored_len) 18964 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (stored_len) 18965 } 18966 18967 // =========================================================================== 18968 // Flush the bits in the bit buffer to pending output (leaves at most 7 bits) 18969 func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */ 18970 bi_flush(tls, s) 18971 } 18972 18973 // =========================================================================== 18974 // Send one empty static block to give enough lookahead for inflate. 18975 // This takes 10 bits, of which 7 may remain in the bit buffer. 18976 func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */ 18977 { 18978 var len int32 = 3 18979 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18980 var val int32 = (int32(STATIC_TREES) << 1) 18981 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18982 { 18983 { 18984 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18985 } 18986 { 18987 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18988 } 18989 18990 } 18991 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18992 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18993 } else { 18994 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(int32((Ush(int32(STATIC_TREES) << 1)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18995 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18996 } 18997 } 18998 18999 { 19000 var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2 /* &.dl */))) 19001 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19002 var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */))) 19003 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19004 { 19005 { 19006 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19007 } 19008 { 19009 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19010 } 19011 19012 } 19013 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19014 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19015 } else { 19016 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19017 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19018 } 19019 } 19020 19021 bi_flush(tls, s) 19022 } 19023 19024 // =========================================================================== 19025 // Determine the best encoding for the current block: dynamic trees, static 19026 // trees or store, and write out the encoded block. 19027 func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */ 19028 var opt_lenb Ulg 19029 var static_lenb Ulg // opt_len and static_len in bytes 19030 var max_blindex int32 = 0 // index of last bit length code of non zero freq 19031 19032 // Build the Huffman trees unless a stored block is forced 19033 if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 { 19034 19035 // Check if the file is binary or text 19036 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN { 19037 (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s) 19038 } 19039 19040 // Construct the literal and distance trees 19041 build_tree(tls, s, (s + 2904 /* &.l_desc */)) 19042 19043 build_tree(tls, s, (s + 2928 /* &.d_desc */)) 19044 19045 // At this point, opt_len and static_len are the total bit lengths of 19046 // the compressed block data, excluding the tree representations. 19047 19048 // Build the bit length tree for the above two trees, and get the index 19049 // in bl_order of the last bit length code to send. 19050 max_blindex = build_bl_tree(tls, s) 19051 19052 // Determine the best encoding. Compute the block lengths in bytes. 19053 opt_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + uint64(3)) + uint64(7)) >> 3) 19054 static_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + uint64(3)) + uint64(7)) >> 3) 19055 19056 if static_lenb <= opt_lenb { 19057 opt_lenb = static_lenb 19058 } 19059 19060 } else { 19061 19062 opt_lenb = libc.AssignUint64(&static_lenb, (stored_len + uint64(5))) // force a stored block 19063 } 19064 19065 if ((stored_len + uint64(4)) <= opt_lenb) && (buf != uintptr(0)) { 19066 // 4: two words for the lengths 19067 // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. 19068 // Otherwise we can't have processed more than WSIZE input bytes since 19069 // the last block flush, because compression would have been 19070 // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 19071 // transform a block into a stored block. 19072 X_tr_stored_block(tls, s, buf, stored_len, last) 19073 19074 } else if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED) || (static_lenb == opt_lenb) { 19075 { 19076 var len int32 = 3 19077 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19078 var val int32 = ((int32(STATIC_TREES) << 1) + last) 19079 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19080 { 19081 { 19082 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19083 } 19084 { 19085 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19086 } 19087 19088 } 19089 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19090 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19091 } else { 19092 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STATIC_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19093 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19094 } 19095 } 19096 19097 compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))), 19098 uintptr(uintptr(unsafe.Pointer(&static_dtree)))) 19099 } else { 19100 { 19101 var len int32 = 3 19102 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19103 var val int32 = ((int32(DYN_TREES) << 1) + last) 19104 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19105 { 19106 { 19107 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19108 } 19109 { 19110 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19111 } 19112 19113 } 19114 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19115 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19116 } else { 19117 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(DYN_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19118 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19119 } 19120 } 19121 19122 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), 19123 (max_blindex + 1)) 19124 compress_block(tls, s, s+212, /* &.dyn_ltree */ 19125 s+2504 /* &.dyn_dtree */) 19126 } 19127 19128 // The above check is made mod 2^32, for files larger than 512 MB 19129 // and uLong implemented on 32 bits. 19130 init_block(tls, s) 19131 19132 if last != 0 { 19133 bi_windup(tls, s) 19134 } 19135 19136 } 19137 19138 // =========================================================================== 19139 // Save the match info and tally the frequency counts. Return true if 19140 // the current block must be flushed. 19141 func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */ 19142 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist) 19143 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc) 19144 if dist == uint32(0) { 19145 // lc is the unmatched char 19146 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(lc)*4 /* &.fc */))++ 19147 } else { 19148 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 19149 // Here, lc is the match length - MIN_MATCH 19150 dist-- // dist = match distance - 1 19151 19152 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[lc])+LITERALS)+1))*4 /* &.fc */))++ 19153 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 19154 if (dist) < uint32(256) { 19155 return int32(X_dist_code[dist]) 19156 } 19157 return int32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 19158 }()))*4 /* &.fc */))++ 19159 } 19160 19161 return (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 19162 // We avoid equality with lit_bufsize because of wraparound at 64K 19163 // on 16 bit machines and because stored blocks are restricted to 19164 // 64K-1 bytes. 19165 } 19166 19167 // =========================================================================== 19168 // Send the block data compressed using the given Huffman trees 19169 func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */ 19170 var dist uint32 // distance of matched string 19171 var lc int32 // match length or unmatched char (if dist == 0) 19172 var lx uint32 = uint32(0) // running index in l_buf 19173 var code uint32 // the code to send 19174 var extra int32 // number of extra bits to send 19175 19176 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) { 19177 for ok := true; ok; ok = (lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit) { 19178 dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2))) 19179 lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1))))) 19180 if dist == uint32(0) { 19181 { 19182 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2 /* &.dl */))) 19183 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19184 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */))) 19185 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19186 { 19187 { 19188 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19189 } 19190 { 19191 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19192 } 19193 19194 } 19195 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19196 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19197 } else { 19198 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19199 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19200 } 19201 } 19202 // send a literal byte 19203 19204 } else { 19205 // Here, lc is the match length - MIN_MATCH 19206 code = uint32(X_length_code[lc]) 19207 { 19208 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 + 2 /* &.dl */))) 19209 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19210 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */))) 19211 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19212 { 19213 { 19214 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19215 } 19216 { 19217 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19218 } 19219 19220 } 19221 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19222 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19223 } else { 19224 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19225 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19226 } 19227 } 19228 // send the length code 19229 extra = extra_lbits[code] 19230 if extra != 0 { 19231 lc = lc - (base_length[code]) 19232 { 19233 var len int32 = extra 19234 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19235 var val int32 = lc 19236 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19237 { 19238 { 19239 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19240 } 19241 { 19242 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19243 } 19244 19245 } 19246 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19247 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19248 } else { 19249 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lc))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19250 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19251 } 19252 } 19253 // send the extra length bits 19254 } 19255 dist-- // dist is now the match distance - 1 19256 code = func() uint32 { 19257 if (dist) < uint32(256) { 19258 return uint32(X_dist_code[dist]) 19259 } 19260 return uint32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 19261 }() 19262 19263 { 19264 var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2 /* &.dl */))) 19265 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19266 var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */))) 19267 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19268 { 19269 { 19270 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19271 } 19272 { 19273 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19274 } 19275 19276 } 19277 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19278 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19279 } else { 19280 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19281 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19282 } 19283 } 19284 // send the distance code 19285 extra = extra_dbits[code] 19286 if extra != 0 { 19287 dist = dist - (uint32(base_dist[code])) 19288 { 19289 var len int32 = extra 19290 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19291 var val int32 = int32(dist) 19292 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19293 { 19294 { 19295 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19296 } 19297 { 19298 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19299 } 19300 19301 } 19302 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19303 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19304 } else { 19305 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dist))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19306 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19307 } 19308 } 19309 // send the extra distance bits 19310 } 19311 } // literal or match pair ? 19312 19313 // Check that the overlay between pending_buf and d_buf+l_buf is ok: 19314 19315 } 19316 } 19317 19318 { 19319 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2 /* &.dl */))) 19320 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19321 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */))) 19322 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19323 { 19324 { 19325 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19326 } 19327 { 19328 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19329 } 19330 19331 } 19332 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19333 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19334 } else { 19335 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19336 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19337 } 19338 } 19339 19340 } 19341 19342 // =========================================================================== 19343 // Check if the data type is TEXT or BINARY, using the following algorithm: 19344 // - TEXT if the two conditions below are satisfied: 19345 // a) There are no non-portable control characters belonging to the 19346 // "black list" (0..6, 14..25, 28..31). 19347 // b) There is at least one printable character belonging to the 19348 // "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). 19349 // - BINARY otherwise. 19350 // - The following partially-portable control characters form a 19351 // "gray list" that is ignored in this detection algorithm: 19352 // (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). 19353 // IN assertion: the fields Freq of dyn_ltree are set. 19354 func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */ 19355 // black_mask is the bit mask of black-listed bytes 19356 // set bits 0..6, 14..25, and 28..31 19357 // 0xf3ffc07f = binary 11110011111111111100000001111111 19358 var black_mask uint64 = 0xf3ffc07f 19359 var n int32 19360 19361 // Check for non-textual ("black-listed") bytes. 19362 n = 0 19363 __1: 19364 if !(n <= 31) { 19365 goto __3 19366 } 19367 if ((black_mask & uint64(1)) != 0) && (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0) { 19368 return Z_BINARY 19369 } 19370 goto __2 19371 __2: 19372 n++ 19373 black_mask >>= 1 19374 goto __1 19375 goto __3 19376 __3: 19377 ; 19378 19379 // Check for textual ("white-listed") bytes. 19380 if ((int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 9*4 /* &.fc */))) != 0) || (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 10*4 /* &.fc */))) != 0)) || 19381 (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 13*4 /* &.fc */))) != 0) { 19382 return Z_TEXT 19383 } 19384 for n = 32; n < LITERALS; n++ { 19385 if int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0 { 19386 return Z_TEXT 19387 } 19388 } 19389 19390 // There are no "black-listed" or "white-listed" bytes: 19391 // this stream either is empty or has tolerated ("gray-listed") bytes only. 19392 return Z_BINARY 19393 } 19394 19395 // =========================================================================== 19396 // Reverse the first len bits of a code, using straightforward code (a faster 19397 // method would use a table) 19398 // IN assertion: 1 <= len <= 15 19399 func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */ 19400 var res uint32 = uint32(0) 19401 for ok := true; ok; ok = (libc.PreDecInt32(&len, 1) > 0) { 19402 res = res | (code & uint32(1)) 19403 code >>= 1 19404 res <<= 1 19405 } 19406 return (res >> 1) 19407 } 19408 19409 // =========================================================================== 19410 // Flush the bit buffer, keeping at most 7 bits in it. 19411 func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */ 19412 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 { 19413 { 19414 { 19415 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19416 } 19417 { 19418 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19419 } 19420 19421 } 19422 19423 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 19424 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 19425 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 { 19426 { 19427 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 19428 } 19429 19430 libc.AssignShrPtrUint16(s+5936 /* &.bi_buf */, int(8)) 19431 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) -= (8) 19432 } 19433 } 19434 19435 // =========================================================================== 19436 // Flush the bit buffer and align the output on a byte boundary 19437 func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */ 19438 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 { 19439 { 19440 { 19441 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19442 } 19443 { 19444 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19445 } 19446 19447 } 19448 19449 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { 19450 { 19451 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 19452 } 19453 19454 } 19455 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 19456 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 19457 } 19458 19459 // =========================================================================== 19460 // Decompresses the source buffer into the destination buffer. *sourceLen is 19461 // the byte length of the source buffer. Upon entry, *destLen is the total size 19462 // of the destination buffer, which must be large enough to hold the entire 19463 // uncompressed data. (The size of the uncompressed data must have been saved 19464 // previously by the compressor and transmitted to the decompressor by some 19465 // mechanism outside the scope of this compression library.) Upon exit, 19466 // *destLen is the size of the decompressed data and *sourceLen is the number 19467 // of source bytes consumed. Upon return, source + *sourceLen points to the 19468 // first unused input byte. 19469 // 19470 // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough 19471 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or 19472 // Z_DATA_ERROR if the input data was corrupted, including if the input data is 19473 // an incomplete zlib stream. 19474 func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */ 19475 bp := tls.Alloc(120) 19476 defer tls.Free(120) 19477 19478 // var stream Z_stream at bp+8, 112 19479 19480 var err int32 19481 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 19482 var len ULong 19483 var left ULong 19484 // var buf [1]Byte at bp, 1 19485 // for detection of incomplete stream when *destLen == 0 19486 19487 len = *(*ULong)(unsafe.Pointer(sourceLen)) 19488 if *(*ULongf)(unsafe.Pointer(destLen)) != 0 { 19489 left = *(*ULongf)(unsafe.Pointer(destLen)) 19490 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 19491 } else { 19492 left = uint64(1) 19493 dest = bp /* &buf[0] */ 19494 } 19495 19496 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source 19497 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0) 19498 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0) 19499 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0) 19500 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0) 19501 19502 err = XinflateInit_(tls, bp+8 /* &stream */, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 19503 if err != Z_OK { 19504 return err 19505 } 19506 19507 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest 19508 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0) 19509 19510 for ok := true; ok; ok = (err == Z_OK) { 19511 if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out == UInt(0) { 19512 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 { 19513 if left > ULong(max) { 19514 return max 19515 } 19516 return UInt(left) 19517 }() 19518 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out)) 19519 } 19520 if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in == UInt(0) { 19521 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 { 19522 if len > ULong(max) { 19523 return max 19524 } 19525 return UInt(len) 19526 }() 19527 len = len - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in)) 19528 } 19529 err = Xinflate(tls, bp+8 /* &stream */, Z_NO_FLUSH) 19530 } 19531 19532 *(*ULong)(unsafe.Pointer(sourceLen)) -= (len + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in)) 19533 if dest != bp /* buf */ { 19534 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out 19535 } else if ((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Ftotal_out != 0) && (err == (-5)) { 19536 left = uint64(1) 19537 } 19538 19539 XinflateEnd(tls, bp+8 /* &stream */) 19540 if err == Z_STREAM_END { 19541 return Z_OK 19542 } 19543 if err == Z_NEED_DICT { 19544 return -3 19545 } 19546 if (err == (-5)) && ((left + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out)) != 0) { 19547 return -3 19548 } 19549 return err 19550 } 19551 19552 func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */ 19553 bp := tls.Alloc(8) 19554 defer tls.Free(8) 19555 *(*ULong)(unsafe.Pointer(bp)) = sourceLen 19556 19557 return Xuncompress2(tls, dest, destLen, source, bp /* &sourceLen */) 19558 } 19559 19560 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 19561 // value -- needed when comparing unsigned to z_off64_t, which is signed 19562 // (possible z_off64_t types off_t, off64_t, and long are all signed) 19563 19564 var Xz_errmsg = [10]uintptr{ 19565 uintptr(ts + 876 /* "need dictionary" */), // Z_NEED_DICT 2 19566 uintptr(ts + 892 /* "stream end" */), // Z_STREAM_END 1 19567 uintptr(ts + 101 /* "" */), // Z_OK 0 19568 uintptr(ts + 903 /* "file error" */), // Z_ERRNO (-1) 19569 uintptr(ts + 914 /* "stream error" */), // Z_STREAM_ERROR (-2) 19570 uintptr(ts + 927 /* "data error" */), // Z_DATA_ERROR (-3) 19571 uintptr(ts + 938 /* "insufficient mem..." */), // Z_MEM_ERROR (-4) 19572 uintptr(ts + 958 /* "buffer error" */), // Z_BUF_ERROR (-5) 19573 uintptr(ts + 971 /* "incompatible ver..." */), // Z_VERSION_ERROR (-6) 19574 uintptr(ts + 101 /* "" */), 19575 } /* zutil.c:13:14 */ 19576 19577 func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */ 19578 return ts /* "1.2.11" */ 19579 } 19580 19581 func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */ 19582 var flags ULong 19583 19584 flags = uint64(0) 19585 switch int32(unsafe.Sizeof(UInt(0))) { 19586 case 2: 19587 break 19588 case 4: 19589 flags = flags + (uint64(1)) 19590 break 19591 case 8: 19592 flags = flags + (uint64(2)) 19593 break 19594 default: 19595 flags = flags + (uint64(3)) 19596 } 19597 switch int32(unsafe.Sizeof(ULong(0))) { 19598 case 2: 19599 break 19600 case 4: 19601 flags = flags + (uint64(int32(1) << 2)) 19602 break 19603 case 8: 19604 flags = flags + (uint64(int32(2) << 2)) 19605 break 19606 default: 19607 flags = flags + (uint64(int32(3) << 2)) 19608 } 19609 switch int32(unsafe.Sizeof(Voidpf(0))) { 19610 case 2: 19611 break 19612 case 4: 19613 flags = flags + (uint64(int32(1) << 4)) 19614 break 19615 case 8: 19616 flags = flags + (uint64(int32(2) << 4)) 19617 break 19618 default: 19619 flags = flags + (uint64(int32(3) << 4)) 19620 } 19621 switch int32(unsafe.Sizeof(Off_t(0))) { 19622 case 2: 19623 break 19624 case 4: 19625 flags = flags + (uint64(int32(1) << 6)) 19626 break 19627 case 8: 19628 flags = flags + (uint64(int32(2) << 6)) 19629 break 19630 default: 19631 flags = flags + (uint64(int32(3) << 6)) 19632 } 19633 return flags 19634 } 19635 19636 // exported to allow conversion of error code to string for compress() and 19637 // uncompress() 19638 func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */ 19639 return Xz_errmsg[(Z_NEED_DICT - (err))] 19640 } 19641 19642 func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */ 19643 _ = opaque 19644 if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) { 19645 return libc.Xmalloc(tls, (uint64(items * size))) 19646 } 19647 return libc.Xcalloc(tls, uint64(items), uint64(size)) 19648 } 19649 19650 func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */ 19651 _ = opaque 19652 libc.Xfree(tls, ptr) 19653 } 19654 19655 func init() { 19656 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8 /* .func */)) = deflate_stored // deflate.c:136:29: 19657 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24 /* .func */)) = deflate_fast // deflate.c:137:29: 19658 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40 /* .func */)) = deflate_fast // deflate.c:138:29: 19659 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56 /* .func */)) = deflate_fast // deflate.c:139:29: 19660 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72 /* .func */)) = deflate_slow // deflate.c:141:29: 19661 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88 /* .func */)) = deflate_slow // deflate.c:142:29: 19662 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104 /* .func */)) = deflate_slow // deflate.c:143:29: 19663 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120 /* .func */)) = deflate_slow // deflate.c:144:29: 19664 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136 /* .func */)) = deflate_slow // deflate.c:145:30: 19665 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152 /* .func */)) = deflate_slow // deflate.c:146:30: 19666 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22: 19667 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2: 19668 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits)) // trees.c:129:16: 19669 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2: 19670 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits)) // trees.c:126:16: 19671 } 19672 19673 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" 19674 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data