modernc.org/z@v1.7.4/lib/z_linux_386.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_386.go -pkgname z -trace-translation-units /tmp/go-generate-2415789340/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 = 2147483647 60 LONG_MIN = -2147483648 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 = 2147483647 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 = 4294967295 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_ILP32 = 1 203 X_LARGEFILE64_SOURCE = 1 204 X_LFS64_ASYNCHRONOUS_IO = 1 205 X_LFS64_LARGEFILE = 1 206 X_LFS64_STDIO = 1 207 X_LFS_ASYNCHRONOUS_IO = 1 208 X_LFS_LARGEFILE = 1 209 X_LIBC_LIMITS_H_ = 1 210 X_LIMITS_H___ = 0 211 X_LINUX_LIMITS_H = 0 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_ILP32_OFF32 = 1 315 X_POSIX_V6_ILP32_OFFBIG = 1 316 X_POSIX_V7_ILP32_OFF32 = 1 317 X_POSIX_V7_ILP32_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_ILP32_OFF32 = 1 362 X_XBS5_ILP32_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 I386 = 1 375 Linux = 1 376 Unix = 1 377 Z_const = 0 378 BYFOUR = 0 379 GF2_DIM = 32 380 TBLS = 8 381 BL_CODES = 19 382 BUSY_STATE = 113 383 Buf_size = 16 384 COMMENT_STATE = 91 385 DEFLATE_H = 0 386 D_CODES = 30 387 EXTRA_STATE = 69 388 FINISH_STATE = 666 389 GZIP = 0 390 GZIP_STATE = 57 391 HCRC_STATE = 103 392 HEAP_SIZE = 573 393 INIT_STATE = 42 394 LENGTH_CODES = 29 395 LITERALS = 256 396 L_CODES = 286 397 MAX_BITS = 15 398 MAX_STORED = 65535 399 MIN_LOOKAHEAD = 262 400 NAME_STATE = 73 401 NIL = 0 402 TOO_FAR = 4096 403 WIN_INIT = 258 404 AT_EACCESS = 0x200 405 AT_FDCWD = -100 406 AT_REMOVEDIR = 0x200 407 AT_SYMLINK_FOLLOW = 0x400 408 AT_SYMLINK_NOFOLLOW = 0x100 409 BUFSIZ = 8192 410 COPY1 = 1 411 E2BIG = 7 412 EACCES = 13 413 EADDRINUSE = 98 414 EADDRNOTAVAIL = 99 415 EADV = 68 416 EAFNOSUPPORT = 97 417 EAGAIN = 11 418 EALREADY = 114 419 EBADE = 52 420 EBADF = 9 421 EBADFD = 77 422 EBADMSG = 74 423 EBADR = 53 424 EBADRQC = 56 425 EBADSLT = 57 426 EBFONT = 59 427 EBUSY = 16 428 ECANCELED = 125 429 ECHILD = 10 430 ECHRNG = 44 431 ECOMM = 70 432 ECONNABORTED = 103 433 ECONNREFUSED = 111 434 ECONNRESET = 104 435 EDEADLK = 35 436 EDEADLOCK = 35 437 EDESTADDRREQ = 89 438 EDOM = 33 439 EDOTDOT = 73 440 EDQUOT = 122 441 EEXIST = 17 442 EFAULT = 14 443 EFBIG = 27 444 EHOSTDOWN = 112 445 EHOSTUNREACH = 113 446 EHWPOISON = 133 447 EIDRM = 43 448 EILSEQ = 84 449 EINPROGRESS = 115 450 EINTR = 4 451 EINVAL = 22 452 EIO = 5 453 EISCONN = 106 454 EISDIR = 21 455 EISNAM = 120 456 EKEYEXPIRED = 127 457 EKEYREJECTED = 129 458 EKEYREVOKED = 128 459 EL2HLT = 51 460 EL2NSYNC = 45 461 EL3HLT = 46 462 EL3RST = 47 463 ELIBACC = 79 464 ELIBBAD = 80 465 ELIBEXEC = 83 466 ELIBMAX = 82 467 ELIBSCN = 81 468 ELNRNG = 48 469 ELOOP = 40 470 EMEDIUMTYPE = 124 471 EMFILE = 24 472 EMLINK = 31 473 EMSGSIZE = 90 474 EMULTIHOP = 72 475 ENAMETOOLONG = 36 476 ENAVAIL = 119 477 ENETDOWN = 100 478 ENETRESET = 102 479 ENETUNREACH = 101 480 ENFILE = 23 481 ENOANO = 55 482 ENOBUFS = 105 483 ENOCSI = 50 484 ENODATA = 61 485 ENODEV = 19 486 ENOENT = 2 487 ENOEXEC = 8 488 ENOKEY = 126 489 ENOLCK = 37 490 ENOLINK = 67 491 ENOMEDIUM = 123 492 ENOMEM = 12 493 ENOMSG = 42 494 ENONET = 64 495 ENOPKG = 65 496 ENOPROTOOPT = 92 497 ENOSPC = 28 498 ENOSR = 63 499 ENOSTR = 60 500 ENOSYS = 38 501 ENOTBLK = 15 502 ENOTCONN = 107 503 ENOTDIR = 20 504 ENOTEMPTY = 39 505 ENOTNAM = 118 506 ENOTRECOVERABLE = 131 507 ENOTSOCK = 88 508 ENOTSUP = 95 509 ENOTTY = 25 510 ENOTUNIQ = 76 511 ENXIO = 6 512 EOF = -1 513 EOPNOTSUPP = 95 514 EOVERFLOW = 75 515 EOWNERDEAD = 130 516 EPERM = 1 517 EPFNOSUPPORT = 96 518 EPIPE = 32 519 EPROTO = 71 520 EPROTONOSUPPORT = 93 521 EPROTOTYPE = 91 522 ERANGE = 34 523 EREMCHG = 78 524 EREMOTE = 66 525 EREMOTEIO = 121 526 ERESTART = 85 527 ERFKILL = 132 528 EROFS = 30 529 ESHUTDOWN = 108 530 ESOCKTNOSUPPORT = 94 531 ESPIPE = 29 532 ESRCH = 3 533 ESRMNT = 69 534 ESTALE = 116 535 ESTRPIPE = 86 536 ETIME = 62 537 ETIMEDOUT = 110 538 ETOOMANYREFS = 109 539 ETXTBSY = 26 540 EUCLEAN = 117 541 EUNATCH = 49 542 EUSERS = 87 543 EWOULDBLOCK = 11 544 EXDEV = 18 545 EXFULL = 54 546 FAPPEND = 1024 547 FASYNC = 8192 548 FD_CLOEXEC = 1 549 FFSYNC = 1052672 550 FILENAME_MAX = 4096 551 FNDELAY = 2048 552 FNONBLOCK = 2048 553 FOPEN_MAX = 16 554 F_DUPFD = 0 555 F_DUPFD_CLOEXEC = 1030 556 F_EXLCK = 4 557 F_GETFD = 1 558 F_GETFL = 3 559 F_GETLK = 5 560 F_GETLK64 = 12 561 F_GETOWN = 9 562 F_RDLCK = 0 563 F_SETFD = 2 564 F_SETFL = 4 565 F_SETLK = 6 566 F_SETLK64 = 13 567 F_SETLKW = 7 568 F_SETLKW64 = 14 569 F_SETOWN = 8 570 F_SHLCK = 8 571 F_UNLCK = 2 572 F_WRLCK = 1 573 GZBUFSIZE = 8192 574 GZ_APPEND = 1 575 GZ_NONE = 0 576 GZ_READ = 7247 577 GZ_WRITE = 31153 578 HAVE_VSNPRINTF = 0 579 LOCK_EX = 2 580 LOCK_NB = 4 581 LOCK_SH = 1 582 LOCK_UN = 8 583 LOOK = 0 584 L_ctermid = 9 585 L_tmpnam = 20 586 O_ACCMODE = 0003 587 O_APPEND = 02000 588 O_ASYNC = 020000 589 O_CLOEXEC = 524288 590 O_CREAT = 0100 591 O_DIRECTORY = 65536 592 O_DSYNC = 4096 593 O_EXCL = 0200 594 O_FSYNC = 1052672 595 O_LARGEFILE = 32768 596 O_NDELAY = 2048 597 O_NOCTTY = 0400 598 O_NOFOLLOW = 131072 599 O_NONBLOCK = 04000 600 O_RDONLY = 00 601 O_RDWR = 02 602 O_RSYNC = 1052672 603 O_SYNC = 04010000 604 O_TRUNC = 01000 605 O_WRONLY = 01 606 POSIX_FADV_DONTNEED = 4 607 POSIX_FADV_NOREUSE = 5 608 POSIX_FADV_NORMAL = 0 609 POSIX_FADV_RANDOM = 1 610 POSIX_FADV_SEQUENTIAL = 2 611 POSIX_FADV_WILLNEED = 3 612 P_tmpdir = "/tmp" 613 S_IFBLK = 24576 614 S_IFCHR = 8192 615 S_IFDIR = 16384 616 S_IFIFO = 4096 617 S_IFLNK = 40960 618 S_IFMT = 61440 619 S_IFREG = 32768 620 S_IFSOCK = 49152 621 S_IRGRP = 32 622 S_IROTH = 4 623 S_IRUSR = 256 624 S_IRWXG = 56 625 S_IRWXO = 7 626 S_IRWXU = 448 627 S_ISGID = 1024 628 S_ISUID = 2048 629 S_ISVTX = 512 630 S_IWGRP = 16 631 S_IWOTH = 2 632 S_IWUSR = 128 633 S_IXGRP = 8 634 S_IXOTH = 1 635 S_IXUSR = 64 636 TMP_MAX = 238328 637 UTIME_NOW = 1073741823 638 UTIME_OMIT = 1073741822 639 X_ASM_GENERIC_ERRNO_BASE_H = 0 640 X_ASM_GENERIC_ERRNO_H = 0 641 X_BITS_ERRNO_H = 1 642 X_BITS_STAT_H = 1 643 X_BITS_STDIO_LIM_H = 1 644 X_ERRNO_H = 1 645 X_FCNTL_H = 1 646 X_IOFBF = 0 647 X_IOLBF = 1 648 X_IONBF = 2 649 X_IO_EOF_SEEN = 0x0010 650 X_IO_ERR_SEEN = 0x0020 651 X_IO_USER_LOCK = 0x8000 652 X_LARGEFILE_SOURCE = 1 653 X_MKNOD_VER = 1 654 X_MKNOD_VER_LINUX = 1 655 X_MKNOD_VER_SVR4 = 2 656 X_STATBUF_ST_BLKSIZE = 0 657 X_STATBUF_ST_NSEC = 0 658 X_STATBUF_ST_RDEV = 0 659 X_STAT_VER = 3 660 X_STAT_VER_KERNEL = 1 661 X_STAT_VER_LINUX = 3 662 X_STAT_VER_LINUX_OLD = 1 663 X_STAT_VER_SVR4 = 2 664 X_STDIO_H = 1 665 ENOUGH = 1444 666 ENOUGH_DISTS = 592 667 ENOUGH_LENS = 852 668 GUNZIP = 0 669 MAXBITS = 15 670 DIST_CODE_LEN = 512 671 END_BLOCK = 256 672 MAX_BL_BITS = 7 673 REPZ_11_138 = 18 674 REPZ_3_10 = 17 675 REP_3_6 = 16 676 SMALLEST = 1 677 ) 678 679 // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; 680 // the `_SC_*' symbols for the NAME argument to `sysconf'; 681 // and the `_CS_*' symbols for the NAME argument to `confstr'. 682 // `sysconf', `pathconf', and `confstr' NAME values. Generic version. 683 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 684 // This file is part of the GNU C Library. 685 // 686 // The GNU C Library is free software; you can redistribute it and/or 687 // modify it under the terms of the GNU Lesser General Public 688 // License as published by the Free Software Foundation; either 689 // version 2.1 of the License, or (at your option) any later version. 690 // 691 // The GNU C Library is distributed in the hope that it will be useful, 692 // but WITHOUT ANY WARRANTY; without even the implied warranty of 693 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 694 // Lesser General Public License for more details. 695 // 696 // You should have received a copy of the GNU Lesser General Public 697 // License along with the GNU C Library; if not, see 698 // <https://www.gnu.org/licenses/>. 699 700 // Values for the NAME argument to `pathconf' and `fpathconf'. 701 const ( /* confname.h:24:1: */ 702 X_PC_LINK_MAX = 0 703 X_PC_MAX_CANON = 1 704 X_PC_MAX_INPUT = 2 705 X_PC_NAME_MAX = 3 706 X_PC_PATH_MAX = 4 707 X_PC_PIPE_BUF = 5 708 X_PC_CHOWN_RESTRICTED = 6 709 X_PC_NO_TRUNC = 7 710 X_PC_VDISABLE = 8 711 X_PC_SYNC_IO = 9 712 X_PC_ASYNC_IO = 10 713 X_PC_PRIO_IO = 11 714 X_PC_SOCK_MAXBUF = 12 715 X_PC_FILESIZEBITS = 13 716 X_PC_REC_INCR_XFER_SIZE = 14 717 X_PC_REC_MAX_XFER_SIZE = 15 718 X_PC_REC_MIN_XFER_SIZE = 16 719 X_PC_REC_XFER_ALIGN = 17 720 X_PC_ALLOC_SIZE_MIN = 18 721 X_PC_SYMLINK_MAX = 19 722 X_PC_2_SYMLINKS = 20 723 ) 724 725 // Values for the NAME argument to `confstr'. 726 const ( /* confname.h:533:1: */ 727 X_CS_PATH = 0 // The default search path. 728 729 X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 730 731 X_CS_GNU_LIBC_VERSION = 2 732 X_CS_GNU_LIBPTHREAD_VERSION = 3 733 734 X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 735 736 X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 737 738 X_CS_LFS_CFLAGS = 1000 739 X_CS_LFS_LDFLAGS = 1001 740 X_CS_LFS_LIBS = 1002 741 X_CS_LFS_LINTFLAGS = 1003 742 X_CS_LFS64_CFLAGS = 1004 743 X_CS_LFS64_LDFLAGS = 1005 744 X_CS_LFS64_LIBS = 1006 745 X_CS_LFS64_LINTFLAGS = 1007 746 747 X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 748 X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 749 X_CS_XBS5_ILP32_OFF32_LIBS = 1102 750 X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 751 X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 752 X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 753 X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 754 X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 755 X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 756 X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 757 X_CS_XBS5_LP64_OFF64_LIBS = 1110 758 X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 759 X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 760 X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 761 X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 762 X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 763 764 X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 765 X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 766 X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 767 X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 768 X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 769 X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 770 X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 771 X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 772 X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 773 X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 774 X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 775 X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 776 X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 777 X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 778 X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 779 X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 780 781 X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 782 X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 783 X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 784 X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 785 X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 786 X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 787 X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 788 X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 789 X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 790 X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 791 X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 792 X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 793 X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 794 X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 795 X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 796 X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 797 798 X_CS_V6_ENV = 1148 799 X_CS_V7_ENV = 1149 800 ) 801 802 // Values for the argument to `sysconf'. 803 const ( /* confname.h:71:1: */ 804 X_SC_ARG_MAX = 0 805 X_SC_CHILD_MAX = 1 806 X_SC_CLK_TCK = 2 807 X_SC_NGROUPS_MAX = 3 808 X_SC_OPEN_MAX = 4 809 X_SC_STREAM_MAX = 5 810 X_SC_TZNAME_MAX = 6 811 X_SC_JOB_CONTROL = 7 812 X_SC_SAVED_IDS = 8 813 X_SC_REALTIME_SIGNALS = 9 814 X_SC_PRIORITY_SCHEDULING = 10 815 X_SC_TIMERS = 11 816 X_SC_ASYNCHRONOUS_IO = 12 817 X_SC_PRIORITIZED_IO = 13 818 X_SC_SYNCHRONIZED_IO = 14 819 X_SC_FSYNC = 15 820 X_SC_MAPPED_FILES = 16 821 X_SC_MEMLOCK = 17 822 X_SC_MEMLOCK_RANGE = 18 823 X_SC_MEMORY_PROTECTION = 19 824 X_SC_MESSAGE_PASSING = 20 825 X_SC_SEMAPHORES = 21 826 X_SC_SHARED_MEMORY_OBJECTS = 22 827 X_SC_AIO_LISTIO_MAX = 23 828 X_SC_AIO_MAX = 24 829 X_SC_AIO_PRIO_DELTA_MAX = 25 830 X_SC_DELAYTIMER_MAX = 26 831 X_SC_MQ_OPEN_MAX = 27 832 X_SC_MQ_PRIO_MAX = 28 833 X_SC_VERSION = 29 834 X_SC_PAGESIZE = 30 835 X_SC_RTSIG_MAX = 31 836 X_SC_SEM_NSEMS_MAX = 32 837 X_SC_SEM_VALUE_MAX = 33 838 X_SC_SIGQUEUE_MAX = 34 839 X_SC_TIMER_MAX = 35 840 841 // Values for the argument to `sysconf' 842 // corresponding to _POSIX2_* symbols. 843 X_SC_BC_BASE_MAX = 36 844 X_SC_BC_DIM_MAX = 37 845 X_SC_BC_SCALE_MAX = 38 846 X_SC_BC_STRING_MAX = 39 847 X_SC_COLL_WEIGHTS_MAX = 40 848 X_SC_EQUIV_CLASS_MAX = 41 849 X_SC_EXPR_NEST_MAX = 42 850 X_SC_LINE_MAX = 43 851 X_SC_RE_DUP_MAX = 44 852 X_SC_CHARCLASS_NAME_MAX = 45 853 854 X_SC_2_VERSION = 46 855 X_SC_2_C_BIND = 47 856 X_SC_2_C_DEV = 48 857 X_SC_2_FORT_DEV = 49 858 X_SC_2_FORT_RUN = 50 859 X_SC_2_SW_DEV = 51 860 X_SC_2_LOCALEDEF = 52 861 862 X_SC_PII = 53 863 X_SC_PII_XTI = 54 864 X_SC_PII_SOCKET = 55 865 X_SC_PII_INTERNET = 56 866 X_SC_PII_OSI = 57 867 X_SC_POLL = 58 868 X_SC_SELECT = 59 869 X_SC_UIO_MAXIOV = 60 870 X_SC_IOV_MAX = 60 871 X_SC_PII_INTERNET_STREAM = 61 872 X_SC_PII_INTERNET_DGRAM = 62 873 X_SC_PII_OSI_COTS = 63 874 X_SC_PII_OSI_CLTS = 64 875 X_SC_PII_OSI_M = 65 876 X_SC_T_IOV_MAX = 66 877 878 // Values according to POSIX 1003.1c (POSIX threads). 879 X_SC_THREADS = 67 880 X_SC_THREAD_SAFE_FUNCTIONS = 68 881 X_SC_GETGR_R_SIZE_MAX = 69 882 X_SC_GETPW_R_SIZE_MAX = 70 883 X_SC_LOGIN_NAME_MAX = 71 884 X_SC_TTY_NAME_MAX = 72 885 X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 886 X_SC_THREAD_KEYS_MAX = 74 887 X_SC_THREAD_STACK_MIN = 75 888 X_SC_THREAD_THREADS_MAX = 76 889 X_SC_THREAD_ATTR_STACKADDR = 77 890 X_SC_THREAD_ATTR_STACKSIZE = 78 891 X_SC_THREAD_PRIORITY_SCHEDULING = 79 892 X_SC_THREAD_PRIO_INHERIT = 80 893 X_SC_THREAD_PRIO_PROTECT = 81 894 X_SC_THREAD_PROCESS_SHARED = 82 895 896 X_SC_NPROCESSORS_CONF = 83 897 X_SC_NPROCESSORS_ONLN = 84 898 X_SC_PHYS_PAGES = 85 899 X_SC_AVPHYS_PAGES = 86 900 X_SC_ATEXIT_MAX = 87 901 X_SC_PASS_MAX = 88 902 903 X_SC_XOPEN_VERSION = 89 904 X_SC_XOPEN_XCU_VERSION = 90 905 X_SC_XOPEN_UNIX = 91 906 X_SC_XOPEN_CRYPT = 92 907 X_SC_XOPEN_ENH_I18N = 93 908 X_SC_XOPEN_SHM = 94 909 910 X_SC_2_CHAR_TERM = 95 911 X_SC_2_C_VERSION = 96 912 X_SC_2_UPE = 97 913 914 X_SC_XOPEN_XPG2 = 98 915 X_SC_XOPEN_XPG3 = 99 916 X_SC_XOPEN_XPG4 = 100 917 918 X_SC_CHAR_BIT = 101 919 X_SC_CHAR_MAX = 102 920 X_SC_CHAR_MIN = 103 921 X_SC_INT_MAX = 104 922 X_SC_INT_MIN = 105 923 X_SC_LONG_BIT = 106 924 X_SC_WORD_BIT = 107 925 X_SC_MB_LEN_MAX = 108 926 X_SC_NZERO = 109 927 X_SC_SSIZE_MAX = 110 928 X_SC_SCHAR_MAX = 111 929 X_SC_SCHAR_MIN = 112 930 X_SC_SHRT_MAX = 113 931 X_SC_SHRT_MIN = 114 932 X_SC_UCHAR_MAX = 115 933 X_SC_UINT_MAX = 116 934 X_SC_ULONG_MAX = 117 935 X_SC_USHRT_MAX = 118 936 937 X_SC_NL_ARGMAX = 119 938 X_SC_NL_LANGMAX = 120 939 X_SC_NL_MSGMAX = 121 940 X_SC_NL_NMAX = 122 941 X_SC_NL_SETMAX = 123 942 X_SC_NL_TEXTMAX = 124 943 944 X_SC_XBS5_ILP32_OFF32 = 125 945 X_SC_XBS5_ILP32_OFFBIG = 126 946 X_SC_XBS5_LP64_OFF64 = 127 947 X_SC_XBS5_LPBIG_OFFBIG = 128 948 949 X_SC_XOPEN_LEGACY = 129 950 X_SC_XOPEN_REALTIME = 130 951 X_SC_XOPEN_REALTIME_THREADS = 131 952 953 X_SC_ADVISORY_INFO = 132 954 X_SC_BARRIERS = 133 955 X_SC_BASE = 134 956 X_SC_C_LANG_SUPPORT = 135 957 X_SC_C_LANG_SUPPORT_R = 136 958 X_SC_CLOCK_SELECTION = 137 959 X_SC_CPUTIME = 138 960 X_SC_THREAD_CPUTIME = 139 961 X_SC_DEVICE_IO = 140 962 X_SC_DEVICE_SPECIFIC = 141 963 X_SC_DEVICE_SPECIFIC_R = 142 964 X_SC_FD_MGMT = 143 965 X_SC_FIFO = 144 966 X_SC_PIPE = 145 967 X_SC_FILE_ATTRIBUTES = 146 968 X_SC_FILE_LOCKING = 147 969 X_SC_FILE_SYSTEM = 148 970 X_SC_MONOTONIC_CLOCK = 149 971 X_SC_MULTI_PROCESS = 150 972 X_SC_SINGLE_PROCESS = 151 973 X_SC_NETWORKING = 152 974 X_SC_READER_WRITER_LOCKS = 153 975 X_SC_SPIN_LOCKS = 154 976 X_SC_REGEXP = 155 977 X_SC_REGEX_VERSION = 156 978 X_SC_SHELL = 157 979 X_SC_SIGNALS = 158 980 X_SC_SPAWN = 159 981 X_SC_SPORADIC_SERVER = 160 982 X_SC_THREAD_SPORADIC_SERVER = 161 983 X_SC_SYSTEM_DATABASE = 162 984 X_SC_SYSTEM_DATABASE_R = 163 985 X_SC_TIMEOUTS = 164 986 X_SC_TYPED_MEMORY_OBJECTS = 165 987 X_SC_USER_GROUPS = 166 988 X_SC_USER_GROUPS_R = 167 989 X_SC_2_PBS = 168 990 X_SC_2_PBS_ACCOUNTING = 169 991 X_SC_2_PBS_LOCATE = 170 992 X_SC_2_PBS_MESSAGE = 171 993 X_SC_2_PBS_TRACK = 172 994 X_SC_SYMLOOP_MAX = 173 995 X_SC_STREAMS = 174 996 X_SC_2_PBS_CHECKPOINT = 175 997 998 X_SC_V6_ILP32_OFF32 = 176 999 X_SC_V6_ILP32_OFFBIG = 177 1000 X_SC_V6_LP64_OFF64 = 178 1001 X_SC_V6_LPBIG_OFFBIG = 179 1002 1003 X_SC_HOST_NAME_MAX = 180 1004 X_SC_TRACE = 181 1005 X_SC_TRACE_EVENT_FILTER = 182 1006 X_SC_TRACE_INHERIT = 183 1007 X_SC_TRACE_LOG = 184 1008 1009 X_SC_LEVEL1_ICACHE_SIZE = 185 1010 X_SC_LEVEL1_ICACHE_ASSOC = 186 1011 X_SC_LEVEL1_ICACHE_LINESIZE = 187 1012 X_SC_LEVEL1_DCACHE_SIZE = 188 1013 X_SC_LEVEL1_DCACHE_ASSOC = 189 1014 X_SC_LEVEL1_DCACHE_LINESIZE = 190 1015 X_SC_LEVEL2_CACHE_SIZE = 191 1016 X_SC_LEVEL2_CACHE_ASSOC = 192 1017 X_SC_LEVEL2_CACHE_LINESIZE = 193 1018 X_SC_LEVEL3_CACHE_SIZE = 194 1019 X_SC_LEVEL3_CACHE_ASSOC = 195 1020 X_SC_LEVEL3_CACHE_LINESIZE = 196 1021 X_SC_LEVEL4_CACHE_SIZE = 197 1022 X_SC_LEVEL4_CACHE_ASSOC = 198 1023 X_SC_LEVEL4_CACHE_LINESIZE = 199 1024 // Leave room here, maybe we need a few more cache levels some day. 1025 1026 X_SC_IPV6 = 235 1027 X_SC_RAW_SOCKETS = 236 1028 1029 X_SC_V7_ILP32_OFF32 = 237 1030 X_SC_V7_ILP32_OFFBIG = 238 1031 X_SC_V7_LP64_OFF64 = 239 1032 X_SC_V7_LPBIG_OFFBIG = 240 1033 1034 X_SC_SS_REPL_MAX = 241 1035 1036 X_SC_TRACE_EVENT_NAME_MAX = 242 1037 X_SC_TRACE_NAME_MAX = 243 1038 X_SC_TRACE_SYS_MAX = 244 1039 X_SC_TRACE_USER_EVENT_MAX = 245 1040 1041 X_SC_XOPEN_STREAMS = 246 1042 1043 X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 1044 X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 1045 ) 1046 1047 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1048 // This file is part of the GNU C Library. 1049 // 1050 // The GNU C Library is free software; you can redistribute it and/or 1051 // modify it under the terms of the GNU Lesser General Public 1052 // License as published by the Free Software Foundation; either 1053 // version 2.1 of the License, or (at your option) any later version. 1054 // 1055 // The GNU C Library is distributed in the hope that it will be useful, 1056 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1057 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1058 // Lesser General Public License for more details. 1059 // 1060 // You should have received a copy of the GNU Lesser General Public 1061 // License along with the GNU C Library; if not, see 1062 // <https://www.gnu.org/licenses/>. 1063 1064 // ISO C99 Standard: 7.20 General utilities <stdlib.h> 1065 1066 // Handle feature test macros at the start of a header. 1067 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1068 // This file is part of the GNU C Library. 1069 // 1070 // The GNU C Library is free software; you can redistribute it and/or 1071 // modify it under the terms of the GNU Lesser General Public 1072 // License as published by the Free Software Foundation; either 1073 // version 2.1 of the License, or (at your option) any later version. 1074 // 1075 // The GNU C Library is distributed in the hope that it will be useful, 1076 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1077 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1078 // Lesser General Public License for more details. 1079 // 1080 // You should have received a copy of the GNU Lesser General Public 1081 // License along with the GNU C Library; if not, see 1082 // <https://www.gnu.org/licenses/>. 1083 1084 // This header is internal to glibc and should not be included outside 1085 // of glibc headers. Headers including it must define 1086 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1087 // cannot have multiple include guards because ISO C feature test 1088 // macros depend on the definition of the macro when an affected 1089 // header is included, not when the first system header is 1090 // included. 1091 1092 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1093 // This file is part of the GNU C Library. 1094 // 1095 // The GNU C Library is free software; you can redistribute it and/or 1096 // modify it under the terms of the GNU Lesser General Public 1097 // License as published by the Free Software Foundation; either 1098 // version 2.1 of the License, or (at your option) any later version. 1099 // 1100 // The GNU C Library is distributed in the hope that it will be useful, 1101 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1102 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1103 // Lesser General Public License for more details. 1104 // 1105 // You should have received a copy of the GNU Lesser General Public 1106 // License along with the GNU C Library; if not, see 1107 // <https://www.gnu.org/licenses/>. 1108 1109 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1110 // macro. 1111 1112 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1113 // macro. Most but not all symbols enabled by that macro in TS 1114 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1115 // still require that macro in C2X. 1116 1117 // ISO/IEC TS 18661-4:2015 defines the 1118 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1119 // functions, the symbols from this TS are enabled unconditionally in 1120 // C2X. 1121 1122 // ISO/IEC TS 18661-3:2015 defines the 1123 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1124 1125 // Get size_t, wchar_t and NULL from <stddef.h>. 1126 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 1127 // 1128 // This file is part of GCC. 1129 // 1130 // GCC is free software; you can redistribute it and/or modify 1131 // it under the terms of the GNU General Public License as published by 1132 // the Free Software Foundation; either version 3, or (at your option) 1133 // any later version. 1134 // 1135 // GCC is distributed in the hope that it will be useful, 1136 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1137 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1138 // GNU General Public License for more details. 1139 // 1140 // Under Section 7 of GPL version 3, you are granted additional 1141 // permissions described in the GCC Runtime Library Exception, version 1142 // 3.1, as published by the Free Software Foundation. 1143 // 1144 // You should have received a copy of the GNU General Public License and 1145 // a copy of the GCC Runtime Library Exception along with this program; 1146 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1147 // <http://www.gnu.org/licenses/>. 1148 1149 // ISO C Standard: 7.17 Common definitions <stddef.h> 1150 1151 // Any one of these symbols __need_* means that GNU libc 1152 // wants us just to define one data type. So don't define 1153 // the symbols that indicate this file's entire job has been done. 1154 1155 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1156 // There's no way to win with the other order! Sun lossage. 1157 1158 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1159 // Just ignore it. 1160 1161 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1162 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1163 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1164 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1165 // If we find that the macros are still defined at this point, we must 1166 // invoke them so that the type is defined as expected. 1167 1168 // In case nobody has defined these types, but we aren't running under 1169 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1170 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1171 // parts of GCC is compiled by an older compiler, that actually 1172 // include gstddef.h, such as collect2. 1173 1174 // Signed type of difference of two pointers. 1175 1176 // Define this type if we are doing the whole job, 1177 // or if we want this type in particular. 1178 1179 // If this symbol has done its job, get rid of it. 1180 1181 // Unsigned type of `sizeof' something. 1182 1183 // Define this type if we are doing the whole job, 1184 // or if we want this type in particular. 1185 1186 // Wide character type. 1187 // Locale-writers should change this as necessary to 1188 // be big enough to hold unique values not between 0 and 127, 1189 // and not (wchar_t) -1, for each defined multibyte character. 1190 1191 // Define this type if we are doing the whole job, 1192 // or if we want this type in particular. 1193 1194 // A null pointer constant. 1195 1196 // Offset of member MEMBER in a struct of type TYPE. 1197 1198 // XPG requires a few symbols from <sys/wait.h> being defined. 1199 // Definitions of flag bits for `waitpid' et al. 1200 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1201 // This file is part of the GNU C Library. 1202 // 1203 // The GNU C Library is free software; you can redistribute it and/or 1204 // modify it under the terms of the GNU Lesser General Public 1205 // License as published by the Free Software Foundation; either 1206 // version 2.1 of the License, or (at your option) any later version. 1207 // 1208 // The GNU C Library is distributed in the hope that it will be useful, 1209 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1210 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1211 // Lesser General Public License for more details. 1212 // 1213 // You should have received a copy of the GNU Lesser General Public 1214 // License along with the GNU C Library; if not, see 1215 // <https://www.gnu.org/licenses/>. 1216 1217 // Bits in the third argument to `waitpid'. 1218 1219 // Bits in the fourth argument to `waitid'. 1220 1221 // The following values are used by the `waitid' function. 1222 1223 // The Linux kernel defines these bare, rather than an enum, 1224 // which causes a conflict if the include order is reversed. 1225 1226 const ( /* waitflags.h:52:1: */ 1227 P_ALL = 0 // Wait for any child. 1228 P_PID = 1 // Wait for specified process. 1229 P_PGID = 2 1230 ) 1231 1232 // 1233 // If you use the zlib library in a product, an acknowledgment is welcome 1234 // in the documentation of your product. If for some reason you cannot 1235 // include such an acknowledgment, I would appreciate that you keep this 1236 // copyright string in the executable of your product. 1237 // 1238 1239 // =========================================================================== 1240 // Function prototypes. 1241 const ( /* deflate.c:66:1: */ 1242 Need_more = 0 // block not completed, need more input or more output 1243 Block_done = 1 // block flush performed 1244 Finish_started = 2 // finish started, need only more output at next deflate 1245 Finish_done = 3 1246 ) 1247 1248 // inflate.h -- internal inflate state definition 1249 // Copyright (C) 1995-2016 Mark Adler 1250 // For conditions of distribution and use, see copyright notice in zlib.h 1251 1252 // WARNING: this file should *not* be used by applications. It is 1253 // part of the implementation of the compression library and is 1254 // subject to change. Applications should only use zlib.h. 1255 // 1256 1257 // define NO_GZIP when compiling if you want to disable gzip header and 1258 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 1259 // the crc code when it is not needed. For shared libraries, gzip decoding 1260 // should be left enabled. 1261 1262 // Possible inflate modes between inflate() calls 1263 const ( /* inflate.h:20:1: */ 1264 HEAD = 16180 // i: waiting for magic header 1265 FLAGS = 16181 // i: waiting for method and flags (gzip) 1266 TIME = 16182 // i: waiting for modification time (gzip) 1267 OS = 16183 // i: waiting for extra flags and operating system (gzip) 1268 EXLEN = 16184 // i: waiting for extra length (gzip) 1269 EXTRA = 16185 // i: waiting for extra bytes (gzip) 1270 NAME = 16186 // i: waiting for end of file name (gzip) 1271 COMMENT = 16187 // i: waiting for end of comment (gzip) 1272 HCRC = 16188 // i: waiting for header crc (gzip) 1273 DICTID = 16189 // i: waiting for dictionary check value 1274 DICT = 16190 // waiting for inflateSetDictionary() call 1275 TYPE = 16191 // i: waiting for type bits, including last-flag bit 1276 TYPEDO = 16192 // i: same, but skip check to exit inflate on new block 1277 STORED = 16193 // i: waiting for stored size (length and complement) 1278 COPY_ = 16194 // i/o: same as COPY below, but only first time in 1279 COPY = 16195 // i/o: waiting for input or output to copy stored block 1280 TABLE = 16196 // i: waiting for dynamic block table lengths 1281 LENLENS = 16197 // i: waiting for code length code lengths 1282 CODELENS = 16198 // i: waiting for length/lit and distance code lengths 1283 LEN_ = 16199 // i: same as LEN below, but only first time in 1284 LEN = 16200 // i: waiting for length/lit/eob code 1285 LENEXT = 16201 // i: waiting for length extra bits 1286 DIST = 16202 // i: waiting for distance code 1287 DISTEXT = 16203 // i: waiting for distance extra bits 1288 MATCH = 16204 // o: waiting for output space to copy string 1289 LIT = 16205 // o: waiting for output space to write literal 1290 CHECK = 16206 // i: waiting for 32-bit check value 1291 LENGTH = 16207 // i: waiting for 32-bit length (gzip) 1292 DONE = 16208 // finished check, done -- remain here until reset 1293 BAD = 16209 // got a data error -- remain here until reset 1294 MEM = 16210 // got an inflate() memory error -- remain here until reset 1295 SYNC = 16211 1296 ) 1297 1298 // op values as set by inflate_table(): 1299 // 00000000 - literal 1300 // 0000tttt - table link, tttt != 0 is the number of table index bits 1301 // 0001eeee - length or distance, eeee is the number of extra bits 1302 // 01100000 - end of block 1303 // 01000000 - invalid code 1304 // 1305 1306 // Maximum size of the dynamic table. The maximum number of code structures is 1307 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 1308 // codes. These values were found by exhaustive searches using the program 1309 // examples/enough.c found in the zlib distribtution. The arguments to that 1310 // program are the number of symbols, the initial root table size, and the 1311 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 1312 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 1313 // The initial root table size (9 or 6) is found in the fifth argument of the 1314 // inflate_table() calls in inflate.c and infback.c. If the root table size is 1315 // changed, then these maximum sizes would be need to be recalculated and 1316 // updated. 1317 1318 // Type of code to build for inflate_table() 1319 const ( /* inftrees.h:54:1: */ 1320 CODES = 0 1321 LENS = 1 1322 DISTS = 2 1323 ) 1324 1325 type Ptrdiff_t = int32 /* <builtin>:3:26 */ 1326 1327 type Size_t = uint32 /* <builtin>:9:23 */ 1328 1329 type Wchar_t = int32 /* <builtin>:15:24 */ 1330 1331 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 1332 type X__float128 = float64 /* <builtin>:47:21 */ 1333 1334 // A null pointer constant. 1335 1336 // Offset of member MEMBER in a struct of type TYPE. 1337 1338 // Type whose alignment is supported in every context and is at least 1339 // as great as that of any standard type not using alignment 1340 // specifiers. 1341 type Max_align_t = struct { 1342 F__max_align_ll int64 1343 F__max_align_ld float64 1344 F__max_align_f128 X__float128 1345 } /* stddef.h:426:3 */ 1346 1347 type Z_size_t = Size_t /* zconf.h:248:21 */ 1348 1349 // Maximum value for memLevel in deflateInit2 1350 1351 // Maximum value for windowBits in deflateInit2 and inflateInit2. 1352 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 1353 // created by gzip. (Files created by minigzip can still be extracted by 1354 // gzip.) 1355 1356 // The memory requirements for deflate are (in bytes): 1357 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 1358 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 1359 // plus a few kilobytes for small objects. For example, if you want to reduce 1360 // the default memory requirements from 256K to 128K, compile with 1361 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 1362 // Of course this will generally degrade compression (there's no free lunch). 1363 // 1364 // The memory requirements for inflate are (in bytes) 1 << windowBits 1365 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 1366 // for small objects. 1367 1368 // Type declarations 1369 1370 // The following definitions for FAR are needed only for MSDOS mixed 1371 // model programming (small or medium model with some far allocations). 1372 // This was tested only with MSC; for other MSDOS compilers you may have 1373 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 1374 // just define FAR to be empty. 1375 1376 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 1377 type UInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 1378 type ULong = uint32 /* zconf.h:394:24 */ // 32 bits or more 1379 1380 type Bytef = Byte /* zconf.h:400:22 */ 1381 type Charf = int8 /* zconf.h:402:19 */ 1382 type Intf = int32 /* zconf.h:403:19 */ 1383 type UIntf = UInt /* zconf.h:404:19 */ 1384 type ULongf = ULong /* zconf.h:405:19 */ 1385 1386 type Voidpc = uintptr /* zconf.h:408:23 */ 1387 type Voidpf = uintptr /* zconf.h:409:23 */ 1388 type Voidp = uintptr /* zconf.h:410:23 */ 1389 1390 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1391 // 1392 // This file is part of GCC. 1393 // 1394 // GCC is free software; you can redistribute it and/or modify it under 1395 // the terms of the GNU General Public License as published by the Free 1396 // Software Foundation; either version 3, or (at your option) any later 1397 // version. 1398 // 1399 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 1400 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 1401 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1402 // for more details. 1403 // 1404 // Under Section 7 of GPL version 3, you are granted additional 1405 // permissions described in the GCC Runtime Library Exception, version 1406 // 3.1, as published by the Free Software Foundation. 1407 // 1408 // You should have received a copy of the GNU General Public License and 1409 // a copy of the GCC Runtime Library Exception along with this program; 1410 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1411 // <http://www.gnu.org/licenses/>. 1412 1413 // This administrivia gets added to the beginning of limits.h 1414 // if the system has its own version of limits.h. 1415 1416 // We use _GCC_LIMITS_H_ because we want this not to match 1417 // any macros that the system's limits.h uses for its own purposes. 1418 1419 // Use "..." so that we find syslimits.h only in this same directory. 1420 // syslimits.h stands for the system's own limits.h file. 1421 // If we can use it ok unmodified, then we install this text. 1422 // If fixincludes fixes it, then the fixed version is installed 1423 // instead of this text. 1424 1425 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1426 // This file is part of the GNU C Library. 1427 // 1428 // The GNU C Library is free software; you can redistribute it and/or 1429 // modify it under the terms of the GNU Lesser General Public 1430 // License as published by the Free Software Foundation; either 1431 // version 2.1 of the License, or (at your option) any later version. 1432 // 1433 // The GNU C Library is distributed in the hope that it will be useful, 1434 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1435 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1436 // Lesser General Public License for more details. 1437 // 1438 // You should have received a copy of the GNU Lesser General Public 1439 // License along with the GNU C Library; if not, see 1440 // <https://www.gnu.org/licenses/>. 1441 1442 // ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> 1443 1444 // Handle feature test macros at the start of a header. 1445 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1446 // This file is part of the GNU C Library. 1447 // 1448 // The GNU C Library is free software; you can redistribute it and/or 1449 // modify it under the terms of the GNU Lesser General Public 1450 // License as published by the Free Software Foundation; either 1451 // version 2.1 of the License, or (at your option) any later version. 1452 // 1453 // The GNU C Library is distributed in the hope that it will be useful, 1454 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1455 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1456 // Lesser General Public License for more details. 1457 // 1458 // You should have received a copy of the GNU Lesser General Public 1459 // License along with the GNU C Library; if not, see 1460 // <https://www.gnu.org/licenses/>. 1461 1462 // This header is internal to glibc and should not be included outside 1463 // of glibc headers. Headers including it must define 1464 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1465 // cannot have multiple include guards because ISO C feature test 1466 // macros depend on the definition of the macro when an affected 1467 // header is included, not when the first system header is 1468 // included. 1469 1470 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1471 // This file is part of the GNU C Library. 1472 // 1473 // The GNU C Library is free software; you can redistribute it and/or 1474 // modify it under the terms of the GNU Lesser General Public 1475 // License as published by the Free Software Foundation; either 1476 // version 2.1 of the License, or (at your option) any later version. 1477 // 1478 // The GNU C Library is distributed in the hope that it will be useful, 1479 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1480 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1481 // Lesser General Public License for more details. 1482 // 1483 // You should have received a copy of the GNU Lesser General Public 1484 // License along with the GNU C Library; if not, see 1485 // <https://www.gnu.org/licenses/>. 1486 1487 // These are defined by the user (or the compiler) 1488 // to specify the desired environment: 1489 // 1490 // __STRICT_ANSI__ ISO Standard C. 1491 // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. 1492 // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. 1493 // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. 1494 // __STDC_WANT_LIB_EXT2__ 1495 // Extensions to ISO C99 from TR 27431-2:2010. 1496 // __STDC_WANT_IEC_60559_BFP_EXT__ 1497 // Extensions to ISO C11 from TS 18661-1:2014. 1498 // __STDC_WANT_IEC_60559_FUNCS_EXT__ 1499 // Extensions to ISO C11 from TS 18661-4:2015. 1500 // __STDC_WANT_IEC_60559_TYPES_EXT__ 1501 // Extensions to ISO C11 from TS 18661-3:2015. 1502 // 1503 // _POSIX_SOURCE IEEE Std 1003.1. 1504 // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; 1505 // if >=199309L, add IEEE Std 1003.1b-1993; 1506 // if >=199506L, add IEEE Std 1003.1c-1995; 1507 // if >=200112L, all of IEEE 1003.1-2004 1508 // if >=200809L, all of IEEE 1003.1-2008 1509 // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if 1510 // Single Unix conformance is wanted, to 600 for the 1511 // sixth revision, to 700 for the seventh revision. 1512 // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. 1513 // _LARGEFILE_SOURCE Some more functions for correct standard I/O. 1514 // _LARGEFILE64_SOURCE Additional functionality from LFS for large files. 1515 // _FILE_OFFSET_BITS=N Select default filesystem interface. 1516 // _ATFILE_SOURCE Additional *at interfaces. 1517 // _GNU_SOURCE All of the above, plus GNU extensions. 1518 // _DEFAULT_SOURCE The default set of features (taking precedence over 1519 // __STRICT_ANSI__). 1520 // 1521 // _FORTIFY_SOURCE Add security hardening to many library functions. 1522 // Set to 1 or 2; 2 performs stricter checks than 1. 1523 // 1524 // _REENTRANT, _THREAD_SAFE 1525 // Obsolete; equivalent to _POSIX_C_SOURCE=199506L. 1526 // 1527 // The `-ansi' switch to the GNU C compiler, and standards conformance 1528 // options such as `-std=c99', define __STRICT_ANSI__. If none of 1529 // these are defined, or if _DEFAULT_SOURCE is defined, the default is 1530 // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 1531 // 200809L, as well as enabling miscellaneous functions from BSD and 1532 // SVID. If more than one of these are defined, they accumulate. For 1533 // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together 1534 // give you ISO C, 1003.1, and 1003.2, but nothing else. 1535 // 1536 // These are defined by this file and are used by the 1537 // header files to decide what to declare or define: 1538 // 1539 // __GLIBC_USE (F) Define things from feature set F. This is defined 1540 // to 1 or 0; the subsequent macros are either defined 1541 // or undefined, and those tests should be moved to 1542 // __GLIBC_USE. 1543 // __USE_ISOC11 Define ISO C11 things. 1544 // __USE_ISOC99 Define ISO C99 things. 1545 // __USE_ISOC95 Define ISO C90 AMD1 (C95) things. 1546 // __USE_ISOCXX11 Define ISO C++11 things. 1547 // __USE_POSIX Define IEEE Std 1003.1 things. 1548 // __USE_POSIX2 Define IEEE Std 1003.2 things. 1549 // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. 1550 // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. 1551 // __USE_XOPEN Define XPG things. 1552 // __USE_XOPEN_EXTENDED Define X/Open Unix things. 1553 // __USE_UNIX98 Define Single Unix V2 things. 1554 // __USE_XOPEN2K Define XPG6 things. 1555 // __USE_XOPEN2KXSI Define XPG6 XSI things. 1556 // __USE_XOPEN2K8 Define XPG7 things. 1557 // __USE_XOPEN2K8XSI Define XPG7 XSI things. 1558 // __USE_LARGEFILE Define correct standard I/O things. 1559 // __USE_LARGEFILE64 Define LFS things with separate names. 1560 // __USE_FILE_OFFSET64 Define 64bit interface as default. 1561 // __USE_MISC Define things from 4.3BSD or System V Unix. 1562 // __USE_ATFILE Define *at interfaces and AT_* constants for them. 1563 // __USE_GNU Define GNU extensions. 1564 // __USE_FORTIFY_LEVEL Additional security measures used, according to level. 1565 // 1566 // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are 1567 // defined by this file unconditionally. `__GNU_LIBRARY__' is provided 1568 // only for compatibility. All new code should use the other symbols 1569 // to test for features. 1570 // 1571 // All macros listed above as possibly being defined by this file are 1572 // explicitly undefined if they are not explicitly defined. 1573 // Feature-test macros that are not defined by the user or compiler 1574 // but are implied by the other feature-test macros defined (or by the 1575 // lack of any definitions) are defined by the file. 1576 // 1577 // ISO C feature test macros depend on the definition of the macro 1578 // when an affected header is included, not when the first system 1579 // header is included, and so they are handled in 1580 // <bits/libc-header-start.h>, which does not have a multiple include 1581 // guard. Feature test macros that can be handled from the first 1582 // system header included are handled here. 1583 1584 // Undefine everything, so we get a clean slate. 1585 1586 // Suppress kernel-name space pollution unless user expressedly asks 1587 // for it. 1588 1589 // Convenience macro to test the version of gcc. 1590 // Use like this: 1591 // #if __GNUC_PREREQ (2,8) 1592 // ... code requiring gcc 2.8 or later ... 1593 // #endif 1594 // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was 1595 // added in 2.0. 1596 1597 // Similarly for clang. Features added to GCC after version 4.2 may 1598 // or may not also be available in clang, and clang's definitions of 1599 // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such 1600 // features can be queried via __has_extension/__has_feature. 1601 1602 // Whether to use feature set F. 1603 1604 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for 1605 // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not 1606 // issue a warning; the expectation is that the source is being 1607 // transitioned to use the new macro. 1608 1609 // If _GNU_SOURCE was defined by the user, turn on all the other features. 1610 1611 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, 1612 // define _DEFAULT_SOURCE. 1613 1614 // This is to enable the ISO C2X extension. 1615 1616 // This is to enable the ISO C11 extension. 1617 1618 // This is to enable the ISO C99 extension. 1619 1620 // This is to enable the ISO C90 Amendment 1:1995 extension. 1621 1622 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE 1623 // is defined, use POSIX.1-2008 (or another version depending on 1624 // _XOPEN_SOURCE). 1625 1626 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be 1627 // defined in all multithreaded code. GNU libc has not required this 1628 // for many years. We now treat them as compatibility synonyms for 1629 // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with 1630 // comprehensive support for multithreaded code. Using them never 1631 // lowers the selected level of POSIX conformance, only raises it. 1632 1633 // The function 'gets' existed in C89, but is impossible to use 1634 // safely. It has been removed from ISO C11 and ISO C++14. Note: for 1635 // compatibility with various implementations of <cstdio>, this test 1636 // must consider only the value of __cplusplus when compiling C++. 1637 1638 // GNU formerly extended the scanf functions with modified format 1639 // specifiers %as, %aS, and %a[...] that allocate a buffer for the 1640 // input using malloc. This extension conflicts with ISO C99, which 1641 // defines %a as a standalone format specifier that reads a floating- 1642 // point number; moreover, POSIX.1-2008 provides the same feature 1643 // using the modifier letter 'm' instead (%ms, %mS, %m[...]). 1644 // 1645 // We now follow C99 unless GNU extensions are active and the compiler 1646 // is specifically in C89 or C++98 mode (strict or not). For 1647 // instance, with GCC, -std=gnu11 will have C99-compliant scanf with 1648 // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the 1649 // old extension. 1650 1651 // Get definitions of __STDC_* predefined macros, if the compiler has 1652 // not preincluded this header automatically. 1653 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1654 // This file is part of the GNU C Library. 1655 // 1656 // The GNU C Library is free software; you can redistribute it and/or 1657 // modify it under the terms of the GNU Lesser General Public 1658 // License as published by the Free Software Foundation; either 1659 // version 2.1 of the License, or (at your option) any later version. 1660 // 1661 // The GNU C Library is distributed in the hope that it will be useful, 1662 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1663 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1664 // Lesser General Public License for more details. 1665 // 1666 // You should have received a copy of the GNU Lesser General Public 1667 // License along with the GNU C Library; if not, see 1668 // <https://www.gnu.org/licenses/>. 1669 1670 // This macro indicates that the installed library is the GNU C Library. 1671 // For historic reasons the value now is 6 and this will stay from now 1672 // on. The use of this variable is deprecated. Use __GLIBC__ and 1673 // __GLIBC_MINOR__ now (see below) when you want to test for a specific 1674 // GNU C library version and use the values in <gnu/lib-names.h> to get 1675 // the sonames of the shared libraries. 1676 1677 // Major and minor version number of the GNU C library package. Use 1678 // these macros to test for features in specific releases. 1679 1680 // This is here only because every header file already includes this one. 1681 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1682 // This file is part of the GNU C Library. 1683 // 1684 // The GNU C Library is free software; you can redistribute it and/or 1685 // modify it under the terms of the GNU Lesser General Public 1686 // License as published by the Free Software Foundation; either 1687 // version 2.1 of the License, or (at your option) any later version. 1688 // 1689 // The GNU C Library is distributed in the hope that it will be useful, 1690 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1691 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1692 // Lesser General Public License for more details. 1693 // 1694 // You should have received a copy of the GNU Lesser General Public 1695 // License along with the GNU C Library; if not, see 1696 // <https://www.gnu.org/licenses/>. 1697 1698 // We are almost always included from features.h. 1699 1700 // The GNU libc does not support any K&R compilers or the traditional mode 1701 // of ISO C compilers anymore. Check for some of the combinations not 1702 // anymore supported. 1703 1704 // Some user header file might have defined this before. 1705 1706 // All functions, except those with callbacks or those that 1707 // synchronize memory, are leaf functions. 1708 1709 // GCC can always grok prototypes. For C++ programs we add throw() 1710 // to help it optimize the function calls. But this works only with 1711 // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions 1712 // as non-throwing using a function attribute since programs can use 1713 // the -fexceptions options for C code as well. 1714 1715 // Compilers that are not clang may object to 1716 // #if defined __clang__ && __has_extension(...) 1717 // even though they do not need to evaluate the right-hand side of the &&. 1718 1719 // These two macros are not used in glibc anymore. They are kept here 1720 // only because some other projects expect the macros to be defined. 1721 1722 // For these things, GCC behaves the ANSI way normally, 1723 // and the non-ANSI way under -traditional. 1724 1725 // This is not a typedef so `const __ptr_t' does the right thing. 1726 1727 // C++ needs to know that types and declarations are C, not C++. 1728 1729 // Fortify support. 1730 1731 // Support for flexible arrays. 1732 // Headers that should use flexible arrays only if they're "real" 1733 // (e.g. only if they won't affect sizeof()) should test 1734 // #if __glibc_c99_flexarr_available. 1735 1736 // __asm__ ("xyz") is used throughout the headers to rename functions 1737 // at the assembly language level. This is wrapped by the __REDIRECT 1738 // macro, in order to support compilers that can do this some other 1739 // way. When compilers don't support asm-names at all, we have to do 1740 // preprocessor tricks instead (which don't have exactly the right 1741 // semantics, but it's the best we can do). 1742 // 1743 // Example: 1744 // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); 1745 1746 // 1747 // #elif __SOME_OTHER_COMPILER__ 1748 // 1749 // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) 1750 1751 // GCC has various useful declarations that can be made with the 1752 // `__attribute__' syntax. All of the ways we use this do fine if 1753 // they are omitted for compilers that don't understand it. 1754 1755 // At some point during the gcc 2.96 development the `malloc' attribute 1756 // for functions was introduced. We don't want to use it unconditionally 1757 // (although this would be possible) since it generates warnings. 1758 1759 // Tell the compiler which arguments to an allocation function 1760 // indicate the size of the allocation. 1761 1762 // At some point during the gcc 2.96 development the `pure' attribute 1763 // for functions was introduced. We don't want to use it unconditionally 1764 // (although this would be possible) since it generates warnings. 1765 1766 // This declaration tells the compiler that the value is constant. 1767 1768 // At some point during the gcc 3.1 development the `used' attribute 1769 // for functions was introduced. We don't want to use it unconditionally 1770 // (although this would be possible) since it generates warnings. 1771 1772 // Since version 3.2, gcc allows marking deprecated functions. 1773 1774 // Since version 4.5, gcc also allows one to specify the message printed 1775 // when a deprecated function is used. clang claims to be gcc 4.2, but 1776 // may also support this feature. 1777 1778 // At some point during the gcc 2.8 development the `format_arg' attribute 1779 // for functions was introduced. We don't want to use it unconditionally 1780 // (although this would be possible) since it generates warnings. 1781 // If several `format_arg' attributes are given for the same function, in 1782 // gcc-3.0 and older, all but the last one are ignored. In newer gccs, 1783 // all designated arguments are considered. 1784 1785 // At some point during the gcc 2.97 development the `strfmon' format 1786 // attribute for functions was introduced. We don't want to use it 1787 // unconditionally (although this would be possible) since it 1788 // generates warnings. 1789 1790 // The nonull function attribute allows to mark pointer parameters which 1791 // must not be NULL. 1792 1793 // If fortification mode, we warn about unused results of certain 1794 // function calls which can lead to problems. 1795 1796 // Forces a function to be always inlined. 1797 // The Linux kernel defines __always_inline in stddef.h (283d7573), and 1798 // it conflicts with this definition. Therefore undefine it first to 1799 // allow either header to be included first. 1800 1801 // Associate error messages with the source location of the call site rather 1802 // than with the source location inside the function. 1803 1804 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 1805 // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ 1806 // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions 1807 // older than 4.3 may define these macros and still not guarantee GNU inlining 1808 // semantics. 1809 // 1810 // clang++ identifies itself as gcc-4.2, but has support for GNU inlining 1811 // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and 1812 // __GNUC_GNU_INLINE__ macro definitions. 1813 1814 // GCC 4.3 and above allow passing all anonymous arguments of an 1815 // __extern_always_inline function to some other vararg function. 1816 1817 // It is possible to compile containing GCC extensions even if GCC is 1818 // run in pedantic mode if the uses are carefully marked using the 1819 // `__extension__' keyword. But this is not generally available before 1820 // version 2.8. 1821 1822 // __restrict is known in EGCS 1.2 and above. 1823 1824 // ISO C99 also allows to declare arrays as non-overlapping. The syntax is 1825 // array_name[restrict] 1826 // GCC 3.1 supports this. 1827 1828 // Describes a char array whose address can safely be passed as the first 1829 // argument to strncpy and strncat, as the char array is not necessarily 1830 // a NUL-terminated string. 1831 1832 // Undefine (also defined in libc-symbols.h). 1833 // Copies attributes from the declaration or type referenced by 1834 // the argument. 1835 1836 // Determine the wordsize from the preprocessor defines. 1837 1838 // Properties of long double type. ldbl-96 version. 1839 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1840 // This file is part of the GNU C Library. 1841 // 1842 // The GNU C Library is free software; you can redistribute it and/or 1843 // modify it under the terms of the GNU Lesser General Public 1844 // License published by the Free Software Foundation; either 1845 // version 2.1 of the License, or (at your option) any later version. 1846 // 1847 // The GNU C Library is distributed in the hope that it will be useful, 1848 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1849 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1850 // Lesser General Public License for more details. 1851 // 1852 // You should have received a copy of the GNU Lesser General Public 1853 // License along with the GNU C Library; if not, see 1854 // <https://www.gnu.org/licenses/>. 1855 1856 // long double is distinct from double, so there is nothing to 1857 // define here. 1858 1859 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is 1860 // intended for use in preprocessor macros. 1861 // 1862 // Note: MESSAGE must be a _single_ string; concatenation of string 1863 // literals is not supported. 1864 1865 // Generic selection (ISO C11) is a C-only feature, available in GCC 1866 // since version 4.9. Previous versions do not provide generic 1867 // selection, even though they might set __STDC_VERSION__ to 201112L, 1868 // when in -std=c11 mode. Thus, we must check for !defined __GNUC__ 1869 // when testing __STDC_VERSION__ for generic selection support. 1870 // On the other hand, Clang also defines __GNUC__, so a clang-specific 1871 // check is required to enable the use of generic selection. 1872 1873 // If we don't have __REDIRECT, prototypes will be missing if 1874 // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. 1875 1876 // Decide whether we can define 'extern inline' functions in headers. 1877 1878 // This is here only because every header file already includes this one. 1879 // Get the definitions of all the appropriate `__stub_FUNCTION' symbols. 1880 // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub 1881 // that will always return failure (and set errno to ENOSYS). 1882 // This file is automatically generated. 1883 // This file selects the right generated file of `__stub_FUNCTION' macros 1884 // based on the architecture being compiled for. 1885 1886 // This file is automatically generated. 1887 // It defines a symbol `__stub_FUNCTION' for each function 1888 // in the C library which is a stub, meaning it will fail 1889 // every time called, usually setting errno to ENOSYS. 1890 1891 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1892 // macro. 1893 1894 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1895 // macro. Most but not all symbols enabled by that macro in TS 1896 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1897 // still require that macro in C2X. 1898 1899 // ISO/IEC TS 18661-4:2015 defines the 1900 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1901 // functions, the symbols from this TS are enabled unconditionally in 1902 // C2X. 1903 1904 // ISO/IEC TS 18661-3:2015 defines the 1905 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1906 1907 // Maximum length of any multibyte character in any locale. 1908 // We define this value here since the gcc header does not define 1909 // the correct value. 1910 1911 // If we are not using GNU CC we have to define all the symbols ourself. 1912 // Otherwise use gcc's definitions (see below). 1913 1914 // Get the compiler's limits.h, which defines almost all the ISO constants. 1915 // 1916 // We put this #include_next outside the double inclusion check because 1917 // it should be possible to include this file more than once and still get 1918 // the definitions from gcc's header. 1919 1920 // The <limits.h> files in some gcc versions don't define LLONG_MIN, 1921 // LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for 1922 // ages are available. 1923 1924 // The integer width macros are not defined by GCC's <limits.h> before 1925 // GCC 7, or if _GNU_SOURCE rather than 1926 // __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. 1927 1928 // POSIX adds things to <limits.h>. 1929 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1930 // This file is part of the GNU C Library. 1931 // 1932 // The GNU C Library is free software; you can redistribute it and/or 1933 // modify it under the terms of the GNU Lesser General Public 1934 // License as published by the Free Software Foundation; either 1935 // version 2.1 of the License, or (at your option) any later version. 1936 // 1937 // The GNU C Library is distributed in the hope that it will be useful, 1938 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1939 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1940 // Lesser General Public License for more details. 1941 // 1942 // You should have received a copy of the GNU Lesser General Public 1943 // License along with the GNU C Library; if not, see 1944 // <https://www.gnu.org/licenses/>. 1945 1946 // POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> 1947 // 1948 // Never include this file directly; use <limits.h> instead. 1949 1950 // Determine the wordsize from the preprocessor defines. 1951 1952 // These are the standard-mandated minimum values. 1953 1954 // Minimum number of operations in one list I/O call. 1955 1956 // Minimal number of outstanding asynchronous I/O operations. 1957 1958 // Maximum length of arguments to `execve', including environment. 1959 1960 // Maximum simultaneous processes per real user ID. 1961 1962 // Minimal number of timer expiration overruns. 1963 1964 // Maximum length of a host name (not including the terminating null) 1965 // as returned from the GETHOSTNAME function. 1966 1967 // Maximum link count of a file. 1968 1969 // Maximum length of login name. 1970 1971 // Number of bytes in a terminal canonical input queue. 1972 1973 // Number of bytes for which space will be 1974 // available in a terminal input queue. 1975 1976 // Maximum number of message queues open for a process. 1977 1978 // Maximum number of supported message priorities. 1979 1980 // Number of bytes in a filename. 1981 1982 // Number of simultaneous supplementary group IDs per process. 1983 1984 // Number of files one process can have open at once. 1985 1986 // Number of bytes in a pathname. 1987 1988 // Number of bytes than can be written atomically to a pipe. 1989 1990 // The number of repeated occurrences of a BRE permitted by the 1991 // REGEXEC and REGCOMP functions when using the interval notation. 1992 1993 // Minimal number of realtime signals reserved for the application. 1994 1995 // Number of semaphores a process can have. 1996 1997 // Maximal value of a semaphore. 1998 1999 // Number of pending realtime signals. 2000 2001 // Largest value of a `ssize_t'. 2002 2003 // Number of streams a process can have open at once. 2004 2005 // The number of bytes in a symbolic link. 2006 2007 // The number of symbolic links that can be traversed in the 2008 // resolution of a pathname in the absence of a loop. 2009 2010 // Number of timer for a process. 2011 2012 // Maximum number of characters in a tty name. 2013 2014 // Maximum length of a timezone name (element of `tzname'). 2015 2016 // Maximum clock resolution in nanoseconds. 2017 2018 // Get the implementation-specific values for the above. 2019 // Minimum guaranteed maximum values for system limits. Linux version. 2020 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 2021 // This file is part of the GNU C Library. 2022 // 2023 // The GNU C Library is free software; you can redistribute it and/or 2024 // modify it under the terms of the GNU Lesser General Public License as 2025 // published by the Free Software Foundation; either version 2.1 of the 2026 // License, or (at your option) any later version. 2027 // 2028 // The GNU C Library is distributed in the hope that it will be useful, 2029 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2030 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2031 // Lesser General Public License for more details. 2032 // 2033 // You should have received a copy of the GNU Lesser General Public 2034 // License along with the GNU C Library; see the file COPYING.LIB. If 2035 // not, see <https://www.gnu.org/licenses/>. 2036 2037 // The kernel header pollutes the namespace with the NR_OPEN symbol 2038 // and defines LINK_MAX although filesystems have different maxima. A 2039 // similar thing is true for OPEN_MAX: the limit can be changed at 2040 // runtime and therefore the macro must not be defined. Remove this 2041 // after including the header if necessary. 2042 2043 // The kernel sources contain a file with all the needed information. 2044 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 2045 2046 // Have to remove NR_OPEN? 2047 // Have to remove LINK_MAX? 2048 // Have to remove OPEN_MAX? 2049 // Have to remove ARG_MAX? 2050 2051 // The number of data keys per process. 2052 // This is the value this implementation supports. 2053 2054 // Controlling the iterations of destructors for thread-specific data. 2055 // Number of iterations this implementation does. 2056 2057 // The number of threads per process. 2058 // We have no predefined limit on the number of threads. 2059 2060 // Maximum amount by which a process can descrease its asynchronous I/O 2061 // priority level. 2062 2063 // Minimum size for a thread. We are free to choose a reasonable value. 2064 2065 // Maximum number of timer expiration overruns. 2066 2067 // Maximum tty name length. 2068 2069 // Maximum login name length. This is arbitrary. 2070 2071 // Maximum host name length. 2072 2073 // Maximum message queue priority level. 2074 2075 // Maximum value the semaphore can have. 2076 2077 // ssize_t is not formally required to be the signed type 2078 // corresponding to size_t, but it is for all configurations supported 2079 // by glibc. 2080 2081 // This value is a guaranteed minimum maximum. 2082 // The current maximum can be got from `sysconf'. 2083 2084 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2085 // This file is part of the GNU C Library. 2086 // 2087 // The GNU C Library is free software; you can redistribute it and/or 2088 // modify it under the terms of the GNU Lesser General Public 2089 // License as published by the Free Software Foundation; either 2090 // version 2.1 of the License, or (at your option) any later version. 2091 // 2092 // The GNU C Library is distributed in the hope that it will be useful, 2093 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2094 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2095 // Lesser General Public License for more details. 2096 // 2097 // You should have received a copy of the GNU Lesser General Public 2098 // License along with the GNU C Library; if not, see 2099 // <https://www.gnu.org/licenses/>. 2100 2101 // Never include this file directly; include <limits.h> instead. 2102 2103 // The maximum `ibase' and `obase' values allowed by the `bc' utility. 2104 2105 // The maximum number of elements allowed in an array by the `bc' utility. 2106 2107 // The maximum `scale' value allowed by the `bc' utility. 2108 2109 // The maximum length of a string constant accepted by the `bc' utility. 2110 2111 // The maximum number of weights that can be assigned to an entry of 2112 // the LC_COLLATE `order' keyword in the locale definition file. 2113 2114 // The maximum number of expressions that can be nested 2115 // within parentheses by the `expr' utility. 2116 2117 // The maximum length, in bytes, of an input line. 2118 2119 // The maximum number of repeated occurrences of a regular expression 2120 // permitted when using the interval notation `\{M,N\}'. 2121 2122 // The maximum number of bytes in a character class name. We have no 2123 // fixed limit, 2048 is a high number. 2124 2125 // These values are implementation-specific, 2126 // and may vary within the implementation. 2127 // Their precise values can be obtained from sysconf. 2128 2129 // This value is defined like this in regex.h. 2130 2131 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2132 // 2133 // This file is part of GCC. 2134 // 2135 // GCC is free software; you can redistribute it and/or modify it under 2136 // the terms of the GNU General Public License as published by the Free 2137 // Software Foundation; either version 3, or (at your option) any later 2138 // version. 2139 // 2140 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 2141 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 2142 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2143 // for more details. 2144 // 2145 // Under Section 7 of GPL version 3, you are granted additional 2146 // permissions described in the GCC Runtime Library Exception, version 2147 // 3.1, as published by the Free Software Foundation. 2148 // 2149 // You should have received a copy of the GNU General Public License and 2150 // a copy of the GCC Runtime Library Exception along with this program; 2151 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2152 // <http://www.gnu.org/licenses/>. 2153 2154 // Number of bits in a `char'. 2155 2156 // Maximum length of a multibyte character. 2157 2158 // Minimum and maximum values a `signed char' can hold. 2159 2160 // Maximum value an `unsigned char' can hold. (Minimum is 0). 2161 2162 // Minimum and maximum values a `char' can hold. 2163 2164 // Minimum and maximum values a `signed short int' can hold. 2165 2166 // Maximum value an `unsigned short int' can hold. (Minimum is 0). 2167 2168 // Minimum and maximum values a `signed int' can hold. 2169 2170 // Maximum value an `unsigned int' can hold. (Minimum is 0). 2171 2172 // Minimum and maximum values a `signed long int' can hold. 2173 // (Same as `int'). 2174 2175 // Maximum value an `unsigned long int' can hold. (Minimum is 0). 2176 2177 // Minimum and maximum values a `signed long long int' can hold. 2178 2179 // Maximum value an `unsigned long long int' can hold. (Minimum is 0). 2180 2181 // This administrivia gets added to the end of limits.h 2182 // if the system has its own version of limits.h. 2183 2184 type Z_crc_t = uint32 /* zconf.h:429:17 */ 2185 2186 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2187 // This file is part of the GNU C Library. 2188 // 2189 // The GNU C Library is free software; you can redistribute it and/or 2190 // modify it under the terms of the GNU Lesser General Public 2191 // License as published by the Free Software Foundation; either 2192 // version 2.1 of the License, or (at your option) any later version. 2193 // 2194 // The GNU C Library is distributed in the hope that it will be useful, 2195 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2196 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2197 // Lesser General Public License for more details. 2198 // 2199 // You should have received a copy of the GNU Lesser General Public 2200 // License along with the GNU C Library; if not, see 2201 // <https://www.gnu.org/licenses/>. 2202 2203 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 2204 2205 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2206 // This file is part of the GNU C Library. 2207 // 2208 // The GNU C Library is free software; you can redistribute it and/or 2209 // modify it under the terms of the GNU Lesser General Public 2210 // License as published by the Free Software Foundation; either 2211 // version 2.1 of the License, or (at your option) any later version. 2212 // 2213 // The GNU C Library is distributed in the hope that it will be useful, 2214 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2215 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2216 // Lesser General Public License for more details. 2217 // 2218 // You should have received a copy of the GNU Lesser General Public 2219 // License along with the GNU C Library; if not, see 2220 // <https://www.gnu.org/licenses/>. 2221 2222 // bits/types.h -- definitions of __*_t types underlying *_t types. 2223 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2224 // This file is part of the GNU C Library. 2225 // 2226 // The GNU C Library is free software; you can redistribute it and/or 2227 // modify it under the terms of the GNU Lesser General Public 2228 // License as published by the Free Software Foundation; either 2229 // version 2.1 of the License, or (at your option) any later version. 2230 // 2231 // The GNU C Library is distributed in the hope that it will be useful, 2232 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2233 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2234 // Lesser General Public License for more details. 2235 // 2236 // You should have received a copy of the GNU Lesser General Public 2237 // License along with the GNU C Library; if not, see 2238 // <https://www.gnu.org/licenses/>. 2239 2240 // Never include this file directly; use <sys/types.h> instead. 2241 2242 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2243 // This file is part of the GNU C Library. 2244 // 2245 // The GNU C Library is free software; you can redistribute it and/or 2246 // modify it under the terms of the GNU Lesser General Public 2247 // License as published by the Free Software Foundation; either 2248 // version 2.1 of the License, or (at your option) any later version. 2249 // 2250 // The GNU C Library is distributed in the hope that it will be useful, 2251 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2252 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2253 // Lesser General Public License for more details. 2254 // 2255 // You should have received a copy of the GNU Lesser General Public 2256 // License along with the GNU C Library; if not, see 2257 // <https://www.gnu.org/licenses/>. 2258 2259 // Determine the wordsize from the preprocessor defines. 2260 2261 // Bit size of the time_t type at glibc build time, x86-64 and x32 case. 2262 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2263 // This file is part of the GNU C Library. 2264 // 2265 // The GNU C Library is free software; you can redistribute it and/or 2266 // modify it under the terms of the GNU Lesser General Public 2267 // License as published by the Free Software Foundation; either 2268 // version 2.1 of the License, or (at your option) any later version. 2269 // 2270 // The GNU C Library is distributed in the hope that it will be useful, 2271 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2272 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2273 // Lesser General Public License for more details. 2274 // 2275 // You should have received a copy of the GNU Lesser General Public 2276 // License along with the GNU C Library; if not, see 2277 // <https://www.gnu.org/licenses/>. 2278 2279 // For others, time size is word size. 2280 2281 // Convenience types. 2282 type X__u_char = uint8 /* types.h:31:23 */ 2283 type X__u_short = uint16 /* types.h:32:28 */ 2284 type X__u_int = uint32 /* types.h:33:22 */ 2285 type X__u_long = uint32 /* types.h:34:27 */ 2286 2287 // Fixed-size types, underlying types depend on word size and compiler. 2288 type X__int8_t = int8 /* types.h:37:21 */ 2289 type X__uint8_t = uint8 /* types.h:38:23 */ 2290 type X__int16_t = int16 /* types.h:39:26 */ 2291 type X__uint16_t = uint16 /* types.h:40:28 */ 2292 type X__int32_t = int32 /* types.h:41:20 */ 2293 type X__uint32_t = uint32 /* types.h:42:22 */ 2294 type X__int64_t = int64 /* types.h:47:44 */ 2295 type X__uint64_t = uint64 /* types.h:48:46 */ 2296 2297 // Smallest types with at least a given width. 2298 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 2299 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 2300 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 2301 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 2302 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 2303 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 2304 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 2305 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 2306 2307 // quad_t is also 64 bits. 2308 type X__quad_t = int64 /* types.h:66:37 */ 2309 type X__u_quad_t = uint64 /* types.h:67:46 */ 2310 2311 // Largest integral types. 2312 type X__intmax_t = int64 /* types.h:75:37 */ 2313 type X__uintmax_t = uint64 /* types.h:76:46 */ 2314 2315 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 2316 // macros for each of the OS types we define below. The definitions 2317 // of those macros must use the following macros for underlying types. 2318 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 2319 // variants of each of the following integer types on this machine. 2320 // 2321 // 16 -- "natural" 16-bit type (always short) 2322 // 32 -- "natural" 32-bit type (always int) 2323 // 64 -- "natural" 64-bit type (long or long long) 2324 // LONG32 -- 32-bit type, traditionally long 2325 // QUAD -- 64-bit type, traditionally long long 2326 // WORD -- natural type of __WORDSIZE bits (int or long) 2327 // LONGWORD -- type of __WORDSIZE bits, traditionally long 2328 // 2329 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 2330 // conventional uses of `long' or `long long' type modifiers match the 2331 // types we define, even when a less-adorned type would be the same size. 2332 // This matters for (somewhat) portably writing printf/scanf formats for 2333 // these types, where using the appropriate l or ll format modifiers can 2334 // make the typedefs and the formats match up across all GNU platforms. If 2335 // we used `long' when it's 64 bits where `long long' is expected, then the 2336 // compiler would warn about the formats not matching the argument types, 2337 // and the programmer changing them to shut up the compiler would break the 2338 // program's portability. 2339 // 2340 // Here we assume what is presently the case in all the GCC configurations 2341 // we support: long long is always 64 bits, long is always word/address size, 2342 // and int is always 32 bits. 2343 2344 // We want __extension__ before typedef's that use nonstandard base types 2345 // such as `long long' in C89 mode. 2346 // bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. 2347 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 2348 // This file is part of the GNU C Library. 2349 // 2350 // The GNU C Library is free software; you can redistribute it and/or 2351 // modify it under the terms of the GNU Lesser General Public 2352 // License as published by the Free Software Foundation; either 2353 // version 2.1 of the License, or (at your option) any later version. 2354 // 2355 // The GNU C Library is distributed in the hope that it will be useful, 2356 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2357 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2358 // Lesser General Public License for more details. 2359 // 2360 // You should have received a copy of the GNU Lesser General Public 2361 // License along with the GNU C Library; if not, see 2362 // <https://www.gnu.org/licenses/>. 2363 2364 // See <bits/types.h> for the meaning of these macros. This file exists so 2365 // that <bits/types.h> need not vary across different GNU platforms. 2366 2367 // X32 kernel interface is 64-bit. 2368 2369 // Number of descriptors that can fit in an `fd_set'. 2370 2371 // bits/time64.h -- underlying types for __time64_t. Generic version. 2372 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2373 // This file is part of the GNU C Library. 2374 // 2375 // The GNU C Library is free software; you can redistribute it and/or 2376 // modify it under the terms of the GNU Lesser General Public 2377 // License as published by the Free Software Foundation; either 2378 // version 2.1 of the License, or (at your option) any later version. 2379 // 2380 // The GNU C Library is distributed in the hope that it will be useful, 2381 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2382 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2383 // Lesser General Public License for more details. 2384 // 2385 // You should have received a copy of the GNU Lesser General Public 2386 // License along with the GNU C Library; if not, see 2387 // <https://www.gnu.org/licenses/>. 2388 2389 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 2390 2391 // Define a 64-bit time type alongsize the 32-bit one. 2392 2393 type X__dev_t = X__uint64_t /* types.h:145:25 */ // Type of device numbers. 2394 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 2395 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 2396 type X__ino_t = uint32 /* types.h:148:25 */ // Type of file serial numbers. 2397 type X__ino64_t = X__uint64_t /* types.h:149:27 */ // Type of file serial numbers (LFS). 2398 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 2399 type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. 2400 type X__off_t = int32 /* types.h:152:25 */ // Type of file sizes and offsets. 2401 type X__off64_t = X__int64_t /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 2402 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 2403 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 2404 type X__clock_t = int32 /* types.h:156:27 */ // Type of CPU usage counts. 2405 type X__rlim_t = uint32 /* types.h:157:26 */ // Type for resource measurement. 2406 type X__rlim64_t = X__uint64_t /* types.h:158:28 */ // Type for resource measurement (LFS). 2407 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 2408 type X__time_t = int32 /* types.h:160:26 */ // Seconds since the Epoch. 2409 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 2410 type X__suseconds_t = int32 /* types.h:162:31 */ // Signed count of microseconds. 2411 2412 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. 2413 type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. 2414 2415 // Clock ID used in clock and timer functions. 2416 type X__clockid_t = int32 /* types.h:168:29 */ 2417 2418 // Timer ID returned by `timer_create'. 2419 type X__timer_t = uintptr /* types.h:171:12 */ 2420 2421 // Type to represent block size. 2422 type X__blksize_t = int32 /* types.h:174:29 */ 2423 2424 // Types from the Large File Support interface. 2425 2426 // Type to count number of disk blocks. 2427 type X__blkcnt_t = int32 /* types.h:179:28 */ 2428 type X__blkcnt64_t = X__int64_t /* types.h:180:30 */ 2429 2430 // Type to count file system blocks. 2431 type X__fsblkcnt_t = uint32 /* types.h:183:30 */ 2432 type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */ 2433 2434 // Type to count file system nodes. 2435 type X__fsfilcnt_t = uint32 /* types.h:187:30 */ 2436 type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */ 2437 2438 // Type of miscellaneous file system fields. 2439 type X__fsword_t = int32 /* types.h:191:28 */ 2440 2441 type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error. 2442 2443 // Signed long type used in system calls. 2444 type X__syscall_slong_t = int32 /* types.h:196:33 */ 2445 // Unsigned long type used in system calls. 2446 type X__syscall_ulong_t = uint32 /* types.h:198:33 */ 2447 2448 // These few don't really vary by system, they always correspond 2449 // to one of the other defined types. 2450 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). 2451 type X__caddr_t = uintptr /* types.h:203:14 */ 2452 2453 // Duplicates info from stdint.h but this is used in unistd.h. 2454 type X__intptr_t = int32 /* types.h:206:25 */ 2455 2456 // Duplicate info from sys/socket.h. 2457 type X__socklen_t = uint32 /* types.h:209:23 */ 2458 2459 // C99: An integer type that can be accessed as an atomic entity, 2460 // even in the presence of asynchronous interrupts. 2461 // It is not currently necessary for this to be machine-specific. 2462 type X__sig_atomic_t = int32 /* types.h:214:13 */ 2463 2464 // Seconds since the Epoch, visible to user code when time_t is too 2465 // narrow only for consistency with the old way of widening too-narrow 2466 // types. User code should never use __time64_t. 2467 type X__time64_t = X__int64_t /* types.h:222:28 */ 2468 2469 type U_char = X__u_char /* types.h:33:18 */ 2470 type U_short = X__u_short /* types.h:34:19 */ 2471 type U_int = X__u_int /* types.h:35:17 */ 2472 type U_long = X__u_long /* types.h:36:18 */ 2473 type Quad_t = X__quad_t /* types.h:37:18 */ 2474 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 2475 type Fsid_t = X__fsid_t /* types.h:39:18 */ 2476 type Loff_t = X__loff_t /* types.h:42:18 */ 2477 2478 type Ino_t = X__ino64_t /* types.h:49:19 */ 2479 type Ino64_t = X__ino64_t /* types.h:54:19 */ 2480 2481 type Dev_t = X__dev_t /* types.h:59:17 */ 2482 2483 type Gid_t = X__gid_t /* types.h:64:17 */ 2484 2485 type Mode_t = X__mode_t /* types.h:69:18 */ 2486 2487 type Nlink_t = X__nlink_t /* types.h:74:19 */ 2488 2489 type Uid_t = X__uid_t /* types.h:79:17 */ 2490 2491 type Off_t = X__off64_t /* types.h:87:19 */ 2492 type Off64_t = X__off64_t /* types.h:92:19 */ 2493 2494 type Pid_t = X__pid_t /* types.h:97:17 */ 2495 2496 type Id_t = X__id_t /* types.h:103:16 */ 2497 2498 type Ssize_t = X__ssize_t /* types.h:108:19 */ 2499 2500 type Daddr_t = X__daddr_t /* types.h:114:19 */ 2501 type Caddr_t = X__caddr_t /* types.h:115:19 */ 2502 2503 type Key_t = X__key_t /* types.h:121:17 */ 2504 2505 // bits/types.h -- definitions of __*_t types underlying *_t types. 2506 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2507 // This file is part of the GNU C Library. 2508 // 2509 // The GNU C Library is free software; you can redistribute it and/or 2510 // modify it under the terms of the GNU Lesser General Public 2511 // License as published by the Free Software Foundation; either 2512 // version 2.1 of the License, or (at your option) any later version. 2513 // 2514 // The GNU C Library is distributed in the hope that it will be useful, 2515 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2516 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2517 // Lesser General Public License for more details. 2518 // 2519 // You should have received a copy of the GNU Lesser General Public 2520 // License along with the GNU C Library; if not, see 2521 // <https://www.gnu.org/licenses/>. 2522 2523 // Never include this file directly; use <sys/types.h> instead. 2524 2525 // Returned by `clock'. 2526 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 2527 2528 // bits/types.h -- definitions of __*_t types underlying *_t types. 2529 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2530 // This file is part of the GNU C Library. 2531 // 2532 // The GNU C Library is free software; you can redistribute it and/or 2533 // modify it under the terms of the GNU Lesser General Public 2534 // License as published by the Free Software Foundation; either 2535 // version 2.1 of the License, or (at your option) any later version. 2536 // 2537 // The GNU C Library is distributed in the hope that it will be useful, 2538 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2539 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2540 // Lesser General Public License for more details. 2541 // 2542 // You should have received a copy of the GNU Lesser General Public 2543 // License along with the GNU C Library; if not, see 2544 // <https://www.gnu.org/licenses/>. 2545 2546 // Never include this file directly; use <sys/types.h> instead. 2547 2548 // Clock ID used in clock and timer functions. 2549 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 2550 2551 // bits/types.h -- definitions of __*_t types underlying *_t types. 2552 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2553 // This file is part of the GNU C Library. 2554 // 2555 // The GNU C Library is free software; you can redistribute it and/or 2556 // modify it under the terms of the GNU Lesser General Public 2557 // License as published by the Free Software Foundation; either 2558 // version 2.1 of the License, or (at your option) any later version. 2559 // 2560 // The GNU C Library is distributed in the hope that it will be useful, 2561 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2562 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2563 // Lesser General Public License for more details. 2564 // 2565 // You should have received a copy of the GNU Lesser General Public 2566 // License along with the GNU C Library; if not, see 2567 // <https://www.gnu.org/licenses/>. 2568 2569 // Never include this file directly; use <sys/types.h> instead. 2570 2571 // Returned by `time'. 2572 type Time_t = X__time_t /* time_t.h:7:18 */ 2573 2574 // bits/types.h -- definitions of __*_t types underlying *_t types. 2575 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2576 // This file is part of the GNU C Library. 2577 // 2578 // The GNU C Library is free software; you can redistribute it and/or 2579 // modify it under the terms of the GNU Lesser General Public 2580 // License as published by the Free Software Foundation; either 2581 // version 2.1 of the License, or (at your option) any later version. 2582 // 2583 // The GNU C Library is distributed in the hope that it will be useful, 2584 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2585 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2586 // Lesser General Public License for more details. 2587 // 2588 // You should have received a copy of the GNU Lesser General Public 2589 // License along with the GNU C Library; if not, see 2590 // <https://www.gnu.org/licenses/>. 2591 2592 // Never include this file directly; use <sys/types.h> instead. 2593 2594 // Timer ID returned by `timer_create'. 2595 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 2596 2597 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 2598 // 2599 // This file is part of GCC. 2600 // 2601 // GCC is free software; you can redistribute it and/or modify 2602 // it under the terms of the GNU General Public License as published by 2603 // the Free Software Foundation; either version 3, or (at your option) 2604 // any later version. 2605 // 2606 // GCC is distributed in the hope that it will be useful, 2607 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2608 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2609 // GNU General Public License for more details. 2610 // 2611 // Under Section 7 of GPL version 3, you are granted additional 2612 // permissions described in the GCC Runtime Library Exception, version 2613 // 3.1, as published by the Free Software Foundation. 2614 // 2615 // You should have received a copy of the GNU General Public License and 2616 // a copy of the GCC Runtime Library Exception along with this program; 2617 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2618 // <http://www.gnu.org/licenses/>. 2619 2620 // ISO C Standard: 7.17 Common definitions <stddef.h> 2621 2622 // Any one of these symbols __need_* means that GNU libc 2623 // wants us just to define one data type. So don't define 2624 // the symbols that indicate this file's entire job has been done. 2625 2626 // This avoids lossage on SunOS but only if stdtypes.h comes first. 2627 // There's no way to win with the other order! Sun lossage. 2628 2629 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 2630 // Just ignore it. 2631 2632 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 2633 // _TYPE_size_t which will typedef size_t. fixincludes patched the 2634 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 2635 // not defined, and so that defining this macro defines _GCC_SIZE_T. 2636 // If we find that the macros are still defined at this point, we must 2637 // invoke them so that the type is defined as expected. 2638 2639 // In case nobody has defined these types, but we aren't running under 2640 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 2641 // __WCHAR_TYPE__ have reasonable values. This can happen if the 2642 // parts of GCC is compiled by an older compiler, that actually 2643 // include gstddef.h, such as collect2. 2644 2645 // Signed type of difference of two pointers. 2646 2647 // Define this type if we are doing the whole job, 2648 // or if we want this type in particular. 2649 2650 // If this symbol has done its job, get rid of it. 2651 2652 // Unsigned type of `sizeof' something. 2653 2654 // Define this type if we are doing the whole job, 2655 // or if we want this type in particular. 2656 2657 // Wide character type. 2658 // Locale-writers should change this as necessary to 2659 // be big enough to hold unique values not between 0 and 127, 2660 // and not (wchar_t) -1, for each defined multibyte character. 2661 2662 // Define this type if we are doing the whole job, 2663 // or if we want this type in particular. 2664 2665 // A null pointer constant. 2666 2667 // Offset of member MEMBER in a struct of type TYPE. 2668 2669 // Old compatibility names for C types. 2670 type Ulong = uint32 /* types.h:148:27 */ 2671 type Ushort = uint16 /* types.h:149:28 */ 2672 type Uint = uint32 /* types.h:150:22 */ 2673 2674 // These size-specific names are used by some of the inet code. 2675 2676 // Define intN_t types. 2677 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2678 // This file is part of the GNU C Library. 2679 // 2680 // The GNU C Library is free software; you can redistribute it and/or 2681 // modify it under the terms of the GNU Lesser General Public 2682 // License as published by the Free Software Foundation; either 2683 // version 2.1 of the License, or (at your option) any later version. 2684 // 2685 // The GNU C Library is distributed in the hope that it will be useful, 2686 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2687 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2688 // Lesser General Public License for more details. 2689 // 2690 // You should have received a copy of the GNU Lesser General Public 2691 // License along with the GNU C Library; if not, see 2692 // <https://www.gnu.org/licenses/>. 2693 2694 // bits/types.h -- definitions of __*_t types underlying *_t types. 2695 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2696 // This file is part of the GNU C Library. 2697 // 2698 // The GNU C Library is free software; you can redistribute it and/or 2699 // modify it under the terms of the GNU Lesser General Public 2700 // License as published by the Free Software Foundation; either 2701 // version 2.1 of the License, or (at your option) any later version. 2702 // 2703 // The GNU C Library is distributed in the hope that it will be useful, 2704 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2705 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2706 // Lesser General Public License for more details. 2707 // 2708 // You should have received a copy of the GNU Lesser General Public 2709 // License along with the GNU C Library; if not, see 2710 // <https://www.gnu.org/licenses/>. 2711 2712 // Never include this file directly; use <sys/types.h> instead. 2713 2714 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 2715 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 2716 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 2717 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 2718 2719 // These were defined by ISO C without the first `_'. 2720 type U_int8_t = X__uint8_t /* types.h:158:19 */ 2721 type U_int16_t = X__uint16_t /* types.h:159:20 */ 2722 type U_int32_t = X__uint32_t /* types.h:160:20 */ 2723 type U_int64_t = X__uint64_t /* types.h:161:20 */ 2724 2725 type Register_t = int32 /* types.h:164:13 */ 2726 2727 // It also defines `fd_set' and the FD_* macros for `select'. 2728 // `fd_set' type and related macros, and `select'/`pselect' declarations. 2729 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 2730 // This file is part of the GNU C Library. 2731 // 2732 // The GNU C Library is free software; you can redistribute it and/or 2733 // modify it under the terms of the GNU Lesser General Public 2734 // License as published by the Free Software Foundation; either 2735 // version 2.1 of the License, or (at your option) any later version. 2736 // 2737 // The GNU C Library is distributed in the hope that it will be useful, 2738 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2739 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2740 // Lesser General Public License for more details. 2741 // 2742 // You should have received a copy of the GNU Lesser General Public 2743 // License along with the GNU C Library; if not, see 2744 // <https://www.gnu.org/licenses/>. 2745 2746 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 2747 2748 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2749 // This file is part of the GNU C Library. 2750 // 2751 // The GNU C Library is free software; you can redistribute it and/or 2752 // modify it under the terms of the GNU Lesser General Public 2753 // License as published by the Free Software Foundation; either 2754 // version 2.1 of the License, or (at your option) any later version. 2755 // 2756 // The GNU C Library is distributed in the hope that it will be useful, 2757 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2758 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2759 // Lesser General Public License for more details. 2760 // 2761 // You should have received a copy of the GNU Lesser General Public 2762 // License along with the GNU C Library; if not, see 2763 // <https://www.gnu.org/licenses/>. 2764 2765 // Get definition of needed basic types. 2766 // bits/types.h -- definitions of __*_t types underlying *_t types. 2767 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2768 // This file is part of the GNU C Library. 2769 // 2770 // The GNU C Library is free software; you can redistribute it and/or 2771 // modify it under the terms of the GNU Lesser General Public 2772 // License as published by the Free Software Foundation; either 2773 // version 2.1 of the License, or (at your option) any later version. 2774 // 2775 // The GNU C Library is distributed in the hope that it will be useful, 2776 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2777 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2778 // Lesser General Public License for more details. 2779 // 2780 // You should have received a copy of the GNU Lesser General Public 2781 // License along with the GNU C Library; if not, see 2782 // <https://www.gnu.org/licenses/>. 2783 2784 // Never include this file directly; use <sys/types.h> instead. 2785 2786 // Get __FD_* definitions. 2787 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 2788 // This file is part of the GNU C Library. 2789 // 2790 // The GNU C Library is free software; you can redistribute it and/or 2791 // modify it under the terms of the GNU Lesser General Public 2792 // License as published by the Free Software Foundation; either 2793 // version 2.1 of the License, or (at your option) any later version. 2794 // 2795 // The GNU C Library is distributed in the hope that it will be useful, 2796 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2797 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2798 // Lesser General Public License for more details. 2799 // 2800 // You should have received a copy of the GNU Lesser General Public 2801 // License along with the GNU C Library; if not, see 2802 // <https://www.gnu.org/licenses/>. 2803 2804 // Determine the wordsize from the preprocessor defines. 2805 2806 // Get sigset_t. 2807 2808 type X__sigset_t = struct{ F__val [32]uint32 } /* __sigset_t.h:8:3 */ 2809 2810 // A set of signals to be blocked, unblocked, or waited for. 2811 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 2812 2813 // Get definition of timer specification structures. 2814 2815 // bits/types.h -- definitions of __*_t types underlying *_t types. 2816 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2817 // This file is part of the GNU C Library. 2818 // 2819 // The GNU C Library is free software; you can redistribute it and/or 2820 // modify it under the terms of the GNU Lesser General Public 2821 // License as published by the Free Software Foundation; either 2822 // version 2.1 of the License, or (at your option) any later version. 2823 // 2824 // The GNU C Library is distributed in the hope that it will be useful, 2825 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2826 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2827 // Lesser General Public License for more details. 2828 // 2829 // You should have received a copy of the GNU Lesser General Public 2830 // License along with the GNU C Library; if not, see 2831 // <https://www.gnu.org/licenses/>. 2832 2833 // Never include this file directly; use <sys/types.h> instead. 2834 2835 // A time value that is accurate to the nearest 2836 // microsecond but also has a range of years. 2837 type Timeval = struct { 2838 Ftv_sec X__time_t 2839 Ftv_usec X__suseconds_t 2840 } /* struct_timeval.h:8:1 */ 2841 2842 // NB: Include guard matches what <linux/time.h> uses. 2843 2844 // bits/types.h -- definitions of __*_t types underlying *_t types. 2845 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2846 // This file is part of the GNU C Library. 2847 // 2848 // The GNU C Library is free software; you can redistribute it and/or 2849 // modify it under the terms of the GNU Lesser General Public 2850 // License as published by the Free Software Foundation; either 2851 // version 2.1 of the License, or (at your option) any later version. 2852 // 2853 // The GNU C Library is distributed in the hope that it will be useful, 2854 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2855 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2856 // Lesser General Public License for more details. 2857 // 2858 // You should have received a copy of the GNU Lesser General Public 2859 // License along with the GNU C Library; if not, see 2860 // <https://www.gnu.org/licenses/>. 2861 2862 // Never include this file directly; use <sys/types.h> instead. 2863 2864 // Endian macros for string.h functions 2865 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 2866 // This file is part of the GNU C Library. 2867 // 2868 // The GNU C Library is free software; you can redistribute it and/or 2869 // modify it under the terms of the GNU Lesser General Public 2870 // License as published by the Free Software Foundation; either 2871 // version 2.1 of the License, or (at your option) any later version. 2872 // 2873 // The GNU C Library is distributed in the hope that it will be useful, 2874 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2875 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2876 // Lesser General Public License for more details. 2877 // 2878 // You should have received a copy of the GNU Lesser General Public 2879 // License along with the GNU C Library; if not, see 2880 // <http://www.gnu.org/licenses/>. 2881 2882 // POSIX.1b structure for a time value. This is like a `struct timeval' but 2883 // has nanoseconds instead of microseconds. 2884 type Timespec = struct { 2885 Ftv_sec X__time_t 2886 Ftv_nsec X__syscall_slong_t 2887 } /* struct_timespec.h:10:1 */ 2888 2889 type Suseconds_t = X__suseconds_t /* select.h:43:23 */ 2890 2891 // The fd_set member is required to be an array of longs. 2892 type X__fd_mask = int32 /* select.h:49:18 */ 2893 2894 // Some versions of <linux/posix_types.h> define this macros. 2895 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 2896 2897 // fd_set for select and pselect. 2898 type Fd_set = struct{ F__fds_bits [32]X__fd_mask } /* select.h:70:5 */ 2899 2900 // Maximum number of file descriptors in `fd_set'. 2901 2902 // Sometimes the fd_set member is assumed to have this type. 2903 type Fd_mask = X__fd_mask /* select.h:77:19 */ 2904 2905 // Define some inlines helping to catch common problems. 2906 2907 type Blksize_t = X__blksize_t /* types.h:185:21 */ 2908 2909 // Types from the Large File Support interface. 2910 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 2911 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 2912 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 2913 2914 type Blkcnt64_t = X__blkcnt64_t /* types.h:219:22 */ // Type to count number of disk blocks. 2915 type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks. 2916 type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes. 2917 2918 // Now add the thread types. 2919 // Declaration of common pthread types for all architectures. 2920 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2921 // This file is part of the GNU C Library. 2922 // 2923 // The GNU C Library is free software; you can redistribute it and/or 2924 // modify it under the terms of the GNU Lesser General Public 2925 // License as published by the Free Software Foundation; either 2926 // version 2.1 of the License, or (at your option) any later version. 2927 // 2928 // The GNU C Library is distributed in the hope that it will be useful, 2929 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2930 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2931 // Lesser General Public License for more details. 2932 // 2933 // You should have received a copy of the GNU Lesser General Public 2934 // License along with the GNU C Library; if not, see 2935 // <https://www.gnu.org/licenses/>. 2936 2937 // For internal mutex and condition variable definitions. 2938 // Common threading primitives definitions for both POSIX and C11. 2939 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2940 // This file is part of the GNU C Library. 2941 // 2942 // The GNU C Library is free software; you can redistribute it and/or 2943 // modify it under the terms of the GNU Lesser General Public 2944 // License as published by the Free Software Foundation; either 2945 // version 2.1 of the License, or (at your option) any later version. 2946 // 2947 // The GNU C Library is distributed in the hope that it will be useful, 2948 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2949 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2950 // Lesser General Public License for more details. 2951 // 2952 // You should have received a copy of the GNU Lesser General Public 2953 // License along with the GNU C Library; if not, see 2954 // <https://www.gnu.org/licenses/>. 2955 2956 // Arch-specific definitions. Each architecture must define the following 2957 // macros to define the expected sizes of pthread data types: 2958 // 2959 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 2960 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 2961 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 2962 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 2963 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 2964 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 2965 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 2966 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 2967 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 2968 // 2969 // The additional macro defines any constraint for the lock alignment 2970 // inside the thread structures: 2971 // 2972 // __LOCK_ALIGNMENT - for internal lock/futex usage. 2973 // 2974 // Same idea but for the once locking primitive: 2975 // 2976 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 2977 2978 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2979 // This file is part of the GNU C Library. 2980 // 2981 // The GNU C Library is free software; you can redistribute it and/or 2982 // modify it under the terms of the GNU Lesser General Public 2983 // License as published by the Free Software Foundation; either 2984 // version 2.1 of the License, or (at your option) any later version. 2985 // 2986 // The GNU C Library is distributed in the hope that it will be useful, 2987 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2988 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2989 // Lesser General Public License for more details. 2990 // 2991 // You should have received a copy of the GNU Lesser General Public 2992 // License along with the GNU C Library; if not, see 2993 // <https://www.gnu.org/licenses/>. 2994 2995 // Determine the wordsize from the preprocessor defines. 2996 2997 // Extra attributes for the cleanup functions. 2998 2999 // Common definition of pthread_mutex_t. 3000 3001 type X__pthread_internal_list = struct { 3002 F__prev uintptr 3003 F__next uintptr 3004 } /* thread-shared-types.h:49:9 */ 3005 3006 // Type to count file system inodes. 3007 3008 // Now add the thread types. 3009 // Declaration of common pthread types for all architectures. 3010 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3011 // This file is part of the GNU C Library. 3012 // 3013 // The GNU C Library is free software; you can redistribute it and/or 3014 // modify it under the terms of the GNU Lesser General Public 3015 // License as published by the Free Software Foundation; either 3016 // version 2.1 of the License, or (at your option) any later version. 3017 // 3018 // The GNU C Library is distributed in the hope that it will be useful, 3019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3021 // Lesser General Public License for more details. 3022 // 3023 // You should have received a copy of the GNU Lesser General Public 3024 // License along with the GNU C Library; if not, see 3025 // <https://www.gnu.org/licenses/>. 3026 3027 // For internal mutex and condition variable definitions. 3028 // Common threading primitives definitions for both POSIX and C11. 3029 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3030 // This file is part of the GNU C Library. 3031 // 3032 // The GNU C Library is free software; you can redistribute it and/or 3033 // modify it under the terms of the GNU Lesser General Public 3034 // License as published by the Free Software Foundation; either 3035 // version 2.1 of the License, or (at your option) any later version. 3036 // 3037 // The GNU C Library is distributed in the hope that it will be useful, 3038 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3039 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3040 // Lesser General Public License for more details. 3041 // 3042 // You should have received a copy of the GNU Lesser General Public 3043 // License along with the GNU C Library; if not, see 3044 // <https://www.gnu.org/licenses/>. 3045 3046 // Arch-specific definitions. Each architecture must define the following 3047 // macros to define the expected sizes of pthread data types: 3048 // 3049 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 3050 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 3051 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 3052 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 3053 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 3054 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 3055 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 3056 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 3057 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 3058 // 3059 // The additional macro defines any constraint for the lock alignment 3060 // inside the thread structures: 3061 // 3062 // __LOCK_ALIGNMENT - for internal lock/futex usage. 3063 // 3064 // Same idea but for the once locking primitive: 3065 // 3066 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 3067 3068 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3069 // This file is part of the GNU C Library. 3070 // 3071 // The GNU C Library is free software; you can redistribute it and/or 3072 // modify it under the terms of the GNU Lesser General Public 3073 // License as published by the Free Software Foundation; either 3074 // version 2.1 of the License, or (at your option) any later version. 3075 // 3076 // The GNU C Library is distributed in the hope that it will be useful, 3077 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3078 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3079 // Lesser General Public License for more details. 3080 // 3081 // You should have received a copy of the GNU Lesser General Public 3082 // License along with the GNU C Library; if not, see 3083 // <https://www.gnu.org/licenses/>. 3084 3085 // Determine the wordsize from the preprocessor defines. 3086 3087 // Extra attributes for the cleanup functions. 3088 3089 // Common definition of pthread_mutex_t. 3090 3091 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 3092 3093 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 3094 3095 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 3096 3097 // Arch-specific mutex definitions. A generic implementation is provided 3098 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 3099 // can override it by defining: 3100 // 3101 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 3102 // definition). It should contains at least the internal members 3103 // defined in the generic version. 3104 // 3105 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 3106 // atomic operations. 3107 // 3108 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 3109 // It should initialize the mutex internal flag. 3110 3111 // x86 internal mutex struct definitions. 3112 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3113 // This file is part of the GNU C Library. 3114 // 3115 // The GNU C Library is free software; you can redistribute it and/or 3116 // modify it under the terms of the GNU Lesser General Public 3117 // License as published by the Free Software Foundation; either 3118 // version 2.1 of the License, or (at your option) any later version. 3119 // 3120 // The GNU C Library is distributed in the hope that it will be useful, 3121 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3122 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3123 // Lesser General Public License for more details. 3124 // 3125 // You should have received a copy of the GNU Lesser General Public 3126 // License along with the GNU C Library; if not, see 3127 // <http://www.gnu.org/licenses/>. 3128 3129 type X__pthread_mutex_s = struct { 3130 F__lock int32 3131 F__count uint32 3132 F__owner int32 3133 F__kind int32 3134 F__nusers uint32 3135 F__20 struct { 3136 F__ccgo_pad1 [0]uint32 3137 F__elision_data struct { 3138 F__espins int16 3139 F__eelision int16 3140 } 3141 } 3142 } /* struct_mutex.h:22:1 */ 3143 3144 // Arch-sepecific read-write lock definitions. A generic implementation is 3145 // provided by struct_rwlock.h. If required, an architecture can override it 3146 // by defining: 3147 // 3148 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 3149 // It should contain at least the internal members defined in the 3150 // generic version. 3151 // 3152 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 3153 // It should initialize the rwlock internal type. 3154 3155 // x86 internal rwlock struct definitions. 3156 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3157 // 3158 // This file is part of the GNU C Library. 3159 // 3160 // The GNU C Library is free software; you can redistribute it and/or 3161 // modify it under the terms of the GNU Lesser General Public 3162 // License as published by the Free Software Foundation; either 3163 // version 2.1 of the License, or (at your option) any later version. 3164 // 3165 // The GNU C Library is distributed in the hope that it will be useful, 3166 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3167 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3168 // Lesser General Public License for more details. 3169 // 3170 // You should have received a copy of the GNU Lesser General Public 3171 // License along with the GNU C Library; if not, see 3172 // <http://www.gnu.org/licenses/>. 3173 3174 type X__pthread_rwlock_arch_t = struct { 3175 F__readers uint32 3176 F__writers uint32 3177 F__wrphase_futex uint32 3178 F__writers_futex uint32 3179 F__pad3 uint32 3180 F__pad4 uint32 3181 F__flags uint8 3182 F__shared uint8 3183 F__rwelision int8 3184 F__pad2 uint8 3185 F__cur_writer int32 3186 } /* struct_rwlock.h:23:1 */ 3187 3188 // Common definition of pthread_cond_t. 3189 3190 type X__pthread_cond_s = struct { 3191 F__0 struct{ F__wseq uint64 } 3192 F__8 struct{ F__g1_start uint64 } 3193 F__g_refs [2]uint32 3194 F__g_size [2]uint32 3195 F__g1_orig_size uint32 3196 F__wrefs uint32 3197 F__g_signals [2]uint32 3198 } /* thread-shared-types.h:92:1 */ 3199 3200 // Thread identifiers. The structure of the attribute type is not 3201 // exposed on purpose. 3202 type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ 3203 3204 // Data structures for mutex handling. The structure of the attribute 3205 // type is not exposed on purpose. 3206 type Pthread_mutexattr_t = struct { 3207 F__ccgo_pad1 [0]uint32 3208 F__size [4]int8 3209 } /* pthreadtypes.h:36:3 */ 3210 3211 // Data structure for condition variable handling. The structure of 3212 // the attribute type is not exposed on purpose. 3213 type Pthread_condattr_t = struct { 3214 F__ccgo_pad1 [0]uint32 3215 F__size [4]int8 3216 } /* pthreadtypes.h:45:3 */ 3217 3218 // Keys for thread-specific data 3219 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 3220 3221 // Once-only execution 3222 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 3223 3224 type Pthread_attr_t1 = struct { 3225 F__ccgo_pad1 [0]uint32 3226 F__size [36]int8 3227 } /* pthreadtypes.h:56:1 */ 3228 3229 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 3230 3231 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 3232 3233 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 3234 3235 // Data structure for reader-writer lock variable handling. The 3236 // structure of the attribute type is deliberately not exposed. 3237 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 3238 3239 type Pthread_rwlockattr_t = struct { 3240 F__ccgo_pad1 [0]uint32 3241 F__size [8]int8 3242 } /* pthreadtypes.h:97:3 */ 3243 3244 // POSIX spinlock data type. 3245 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 3246 3247 // POSIX barriers data type. The structure of the type is 3248 // deliberately not exposed. 3249 type Pthread_barrier_t = struct { 3250 F__ccgo_pad1 [0]uint32 3251 F__size [20]int8 3252 } /* pthreadtypes.h:112:3 */ 3253 3254 type Pthread_barrierattr_t = struct { 3255 F__ccgo_pad1 [0]uint32 3256 F__size [4]int8 3257 } /* pthreadtypes.h:118:3 */ 3258 3259 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 3260 // 3261 // This file is part of GCC. 3262 // 3263 // GCC is free software; you can redistribute it and/or modify 3264 // it under the terms of the GNU General Public License as published by 3265 // the Free Software Foundation; either version 3, or (at your option) 3266 // any later version. 3267 // 3268 // GCC is distributed in the hope that it will be useful, 3269 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3270 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3271 // GNU General Public License for more details. 3272 // 3273 // Under Section 7 of GPL version 3, you are granted additional 3274 // permissions described in the GCC Runtime Library Exception, version 3275 // 3.1, as published by the Free Software Foundation. 3276 // 3277 // You should have received a copy of the GNU General Public License and 3278 // a copy of the GCC Runtime Library Exception along with this program; 3279 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3280 // <http://www.gnu.org/licenses/>. 3281 3282 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 3283 3284 // Define __gnuc_va_list. 3285 3286 type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ 3287 3288 // Define the standard macros for the user, 3289 // if this invocation was from the user program. 3290 3291 // Define va_list, if desired, from __gnuc_va_list. 3292 // We deliberately do not define va_list when called from 3293 // stdio.h, because ANSI C says that stdio.h is not supposed to define 3294 // va_list. stdio.h needs to have access to that data type, 3295 // but must not use that name. It should use the name __gnuc_va_list, 3296 // which is safe because it is reserved for the implementation. 3297 3298 // The macro _VA_LIST_ is the same thing used by this file in Ultrix. 3299 // But on BSD NET2 we must not test or define or undef it. 3300 // (Note that the comments in NET 2's ansi.h 3301 // are incorrect for _VA_LIST_--see stdio.h!) 3302 // The macro _VA_LIST_DEFINED is used in Windows NT 3.5 3303 // The macro _VA_LIST is used in SCO Unix 3.2. 3304 // The macro _VA_LIST_T_H is used in the Bull dpx2 3305 // The macro __va_list__ is used by BeOS. 3306 type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */ 3307 3308 // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 3309 // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 3310 // though the former does not conform to the LFS document), but considering 3311 // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 3312 // equivalently requesting no 64-bit operations 3313 3314 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3315 // This file is part of the GNU C Library. 3316 // 3317 // The GNU C Library is free software; you can redistribute it and/or 3318 // modify it under the terms of the GNU Lesser General Public 3319 // License as published by the Free Software Foundation; either 3320 // version 2.1 of the License, or (at your option) any later version. 3321 // 3322 // The GNU C Library is distributed in the hope that it will be useful, 3323 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3324 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3325 // Lesser General Public License for more details. 3326 // 3327 // You should have received a copy of the GNU Lesser General Public 3328 // License along with the GNU C Library; if not, see 3329 // <https://www.gnu.org/licenses/>. 3330 3331 // POSIX Standard: 2.10 Symbolic Constants <unistd.h> 3332 3333 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3334 // This file is part of the GNU C Library. 3335 // 3336 // The GNU C Library is free software; you can redistribute it and/or 3337 // modify it under the terms of the GNU Lesser General Public 3338 // License as published by the Free Software Foundation; either 3339 // version 2.1 of the License, or (at your option) any later version. 3340 // 3341 // The GNU C Library is distributed in the hope that it will be useful, 3342 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3343 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3344 // Lesser General Public License for more details. 3345 // 3346 // You should have received a copy of the GNU Lesser General Public 3347 // License along with the GNU C Library; if not, see 3348 // <https://www.gnu.org/licenses/>. 3349 3350 // These may be used to determine what facilities are present at compile time. 3351 // Their values can be obtained at run time from `sysconf'. 3352 3353 // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. 3354 3355 // These are not #ifdef __USE_POSIX2 because they are 3356 // in the theoretically application-owned namespace. 3357 3358 // The utilities on GNU systems also correspond to this version. 3359 3360 // The utilities on GNU systems also correspond to this version. 3361 3362 // This symbol was required until the 2001 edition of POSIX. 3363 3364 // If defined, the implementation supports the 3365 // C Language Bindings Option. 3366 3367 // If defined, the implementation supports the 3368 // C Language Development Utilities Option. 3369 3370 // If defined, the implementation supports the 3371 // Software Development Utilities Option. 3372 3373 // If defined, the implementation supports the 3374 // creation of locales with the localedef utility. 3375 3376 // X/Open version number to which the library conforms. It is selectable. 3377 3378 // Commands and utilities from XPG4 are available. 3379 3380 // We are compatible with the old published standards as well. 3381 3382 // The X/Open Unix extensions are available. 3383 3384 // The enhanced internationalization capabilities according to XPG4.2 3385 // are present. 3386 3387 // The legacy interfaces are also available. 3388 3389 // Get values of POSIX options: 3390 // 3391 // If these symbols are defined, the corresponding features are 3392 // always available. If not, they may be available sometimes. 3393 // The current values can be obtained with `sysconf'. 3394 // 3395 // _POSIX_JOB_CONTROL Job control is supported. 3396 // _POSIX_SAVED_IDS Processes have a saved set-user-ID 3397 // and a saved set-group-ID. 3398 // _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. 3399 // _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. 3400 // _POSIX_TIMERS POSIX.4 clocks and timers are supported. 3401 // _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. 3402 // _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. 3403 // _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. 3404 // _POSIX_FSYNC The fsync function is present. 3405 // _POSIX_MAPPED_FILES Mapping of files to memory is supported. 3406 // _POSIX_MEMLOCK Locking of all memory is supported. 3407 // _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. 3408 // _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. 3409 // _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. 3410 // _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. 3411 // _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. 3412 // _POSIX_THREADS POSIX.1c pthreads are supported. 3413 // _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. 3414 // _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. 3415 // _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. 3416 // _POSIX_THREAD_PRIORITY_SCHEDULING 3417 // POSIX.1c thread execution scheduling supported. 3418 // _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. 3419 // _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. 3420 // _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. 3421 // _POSIX_PII Protocol-independent interfaces are supported. 3422 // _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. 3423 // _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. 3424 // _POSIX_PII_INTERNET Internet family of protocols supported. 3425 // _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. 3426 // _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. 3427 // _POSIX_PII_OSI ISO/OSI family of protocols supported. 3428 // _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. 3429 // _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. 3430 // _POSIX_POLL Implementation supports `poll' function. 3431 // _POSIX_SELECT Implementation supports `select' and `pselect'. 3432 // 3433 // _XOPEN_REALTIME X/Open realtime support is available. 3434 // _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. 3435 // _XOPEN_SHM Shared memory interface according to XPG4.2. 3436 // 3437 // _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit 3438 // int, long, pointer, and off_t types. 3439 // _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit 3440 // int, long, and pointer and off_t with at least 3441 // 64 bits. 3442 // _XBS5_LP64_OFF64 Implementation provides environment with 32-bit 3443 // int, and 64-bit long, pointer, and off_t types. 3444 // _XBS5_LPBIG_OFFBIG Implementation provides environment with at 3445 // least 32 bits int and long, pointer, and off_t 3446 // with at least 64 bits. 3447 // 3448 // If any of these symbols is defined as -1, the corresponding option is not 3449 // true for any file. If any is defined as other than -1, the corresponding 3450 // option is true for all files. If a symbol is not defined at all, the value 3451 // for a specific file can be obtained from `pathconf' and `fpathconf'. 3452 // 3453 // _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change 3454 // the owner of a file. `chown' can only be used 3455 // to change the group ID of a file to a group of 3456 // which the calling process is a member. 3457 // _POSIX_NO_TRUNC Pathname components longer than 3458 // NAME_MAX generate an error. 3459 // _POSIX_VDISABLE If defined, if the value of an element of the 3460 // `c_cc' member of `struct termios' is 3461 // _POSIX_VDISABLE, no character will have the 3462 // effect associated with that element. 3463 // _POSIX_SYNC_IO Synchronous I/O may be performed. 3464 // _POSIX_ASYNC_IO Asynchronous I/O may be performed. 3465 // _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. 3466 // 3467 // Support for the Large File Support interface is not generally available. 3468 // If it is available the following constants are defined to one. 3469 // _LFS64_LARGEFILE Low-level I/O supports large files. 3470 // _LFS64_STDIO Standard I/O supports large files. 3471 // 3472 3473 // Define POSIX options for Linux. 3474 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 3475 // This file is part of the GNU C Library. 3476 // 3477 // The GNU C Library is free software; you can redistribute it and/or 3478 // modify it under the terms of the GNU Lesser General Public License as 3479 // published by the Free Software Foundation; either version 2.1 of the 3480 // License, or (at your option) any later version. 3481 // 3482 // The GNU C Library is distributed in the hope that it will be useful, 3483 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3484 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3485 // Lesser General Public License for more details. 3486 // 3487 // You should have received a copy of the GNU Lesser General Public 3488 // License along with the GNU C Library; see the file COPYING.LIB. If 3489 // not, see <https://www.gnu.org/licenses/>. 3490 3491 // Job control is supported. 3492 3493 // Processes have a saved set-user-ID and a saved set-group-ID. 3494 3495 // Priority scheduling is not supported with the correct semantics, 3496 // but GNU/Linux applications expect that the corresponding interfaces 3497 // are available, even though the semantics do not meet the POSIX 3498 // requirements. See glibc bug 14829. 3499 3500 // Synchronizing file data is supported. 3501 3502 // The fsync function is present. 3503 3504 // Mapping of files to memory is supported. 3505 3506 // Locking of all memory is supported. 3507 3508 // Locking of ranges of memory is supported. 3509 3510 // Setting of memory protections is supported. 3511 3512 // Some filesystems allow all users to change file ownership. 3513 3514 // `c_cc' member of 'struct termios' structure can be disabled by 3515 // using the value _POSIX_VDISABLE. 3516 3517 // Filenames are not silently truncated. 3518 3519 // X/Open realtime support is available. 3520 3521 // X/Open thread realtime support is available. 3522 3523 // XPG4.2 shared memory is supported. 3524 3525 // Tell we have POSIX threads. 3526 3527 // We have the reentrant functions described in POSIX. 3528 3529 // We provide priority scheduling for threads. 3530 3531 // We support user-defined stack sizes. 3532 3533 // We support user-defined stacks. 3534 3535 // We support priority inheritence. 3536 3537 // We support priority protection, though only for non-robust 3538 // mutexes. 3539 3540 // We support priority inheritence for robust mutexes. 3541 3542 // We do not support priority protection for robust mutexes. 3543 3544 // We support POSIX.1b semaphores. 3545 3546 // Real-time signals are supported. 3547 3548 // We support asynchronous I/O. 3549 // Alternative name for Unix98. 3550 // Support for prioritization is also available. 3551 3552 // The LFS support in asynchronous I/O is also available. 3553 3554 // The rest of the LFS is also available. 3555 3556 // POSIX shared memory objects are implemented. 3557 3558 // CPU-time clocks support needs to be checked at runtime. 3559 3560 // Clock support in threads must be also checked at runtime. 3561 3562 // GNU libc provides regular expression handling. 3563 3564 // Reader/Writer locks are available. 3565 3566 // We have a POSIX shell. 3567 3568 // We support the Timeouts option. 3569 3570 // We support spinlocks. 3571 3572 // The `spawn' function family is supported. 3573 3574 // We have POSIX timers. 3575 3576 // The barrier functions are available. 3577 3578 // POSIX message queues are available. 3579 3580 // Thread process-shared synchronization is supported. 3581 3582 // The monotonic clock might be available. 3583 3584 // The clock selection interfaces are available. 3585 3586 // Advisory information interfaces are available. 3587 3588 // IPv6 support is available. 3589 3590 // Raw socket support is available. 3591 3592 // We have at least one terminal. 3593 3594 // Neither process nor thread sporadic server interfaces is available. 3595 3596 // trace.h is not available. 3597 3598 // Typed memory objects are not available. 3599 3600 // Get the environment definitions from Unix98. 3601 // Copyright (C) 1999-2020 Free Software Foundation, Inc. 3602 // This file is part of the GNU C Library. 3603 // 3604 // The GNU C Library is free software; you can redistribute it and/or 3605 // modify it under the terms of the GNU Lesser General Public 3606 // License as published by the Free Software Foundation; either 3607 // version 2.1 of the License, or (at your option) any later version. 3608 // 3609 // The GNU C Library is distributed in the hope that it will be useful, 3610 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3611 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3612 // Lesser General Public License for more details. 3613 // 3614 // You should have received a copy of the GNU Lesser General Public 3615 // License along with the GNU C Library; if not, see 3616 // <https://www.gnu.org/licenses/>. 3617 3618 // Determine the wordsize from the preprocessor defines. 3619 3620 // This header should define the following symbols under the described 3621 // situations. A value `1' means that the model is always supported, 3622 // `-1' means it is never supported. Undefined means it cannot be 3623 // statically decided. 3624 // 3625 // _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type 3626 // _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type 3627 // 3628 // _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type 3629 // _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type 3630 // 3631 // The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, 3632 // _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, 3633 // _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were 3634 // used in previous versions of the Unix standard and are available 3635 // only for compatibility. 3636 3637 // We have 32-bit wide `int', `long int' and pointers and all platforms 3638 // support LFS. -mx32 has 64-bit wide `off_t'. 3639 3640 // -m32 has 32-bit wide `off_t'. 3641 3642 // We optionally provide an environment with the above size but an 64-bit 3643 // side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. 3644 3645 // Environments with 64-bit wide pointers can be provided, 3646 // so these macros aren't defined: 3647 // # undef _POSIX_V7_LP64_OFF64 3648 // # undef _POSIX_V7_LPBIG_OFFBIG 3649 // # undef _POSIX_V6_LP64_OFF64 3650 // # undef _POSIX_V6_LPBIG_OFFBIG 3651 // # undef _XBS5_LP64_OFF64 3652 // # undef _XBS5_LPBIG_OFFBIG 3653 // and sysconf tests for it at runtime. 3654 3655 // Standard file descriptors. 3656 3657 // All functions that are not declared anywhere else. 3658 3659 // bits/types.h -- definitions of __*_t types underlying *_t types. 3660 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3661 // This file is part of the GNU C Library. 3662 // 3663 // The GNU C Library is free software; you can redistribute it and/or 3664 // modify it under the terms of the GNU Lesser General Public 3665 // License as published by the Free Software Foundation; either 3666 // version 2.1 of the License, or (at your option) any later version. 3667 // 3668 // The GNU C Library is distributed in the hope that it will be useful, 3669 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3670 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3671 // Lesser General Public License for more details. 3672 // 3673 // You should have received a copy of the GNU Lesser General Public 3674 // License along with the GNU C Library; if not, see 3675 // <https://www.gnu.org/licenses/>. 3676 3677 // Never include this file directly; use <sys/types.h> instead. 3678 3679 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 3680 // 3681 // This file is part of GCC. 3682 // 3683 // GCC is free software; you can redistribute it and/or modify 3684 // it under the terms of the GNU General Public License as published by 3685 // the Free Software Foundation; either version 3, or (at your option) 3686 // any later version. 3687 // 3688 // GCC is distributed in the hope that it will be useful, 3689 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3690 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3691 // GNU General Public License for more details. 3692 // 3693 // Under Section 7 of GPL version 3, you are granted additional 3694 // permissions described in the GCC Runtime Library Exception, version 3695 // 3.1, as published by the Free Software Foundation. 3696 // 3697 // You should have received a copy of the GNU General Public License and 3698 // a copy of the GCC Runtime Library Exception along with this program; 3699 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3700 // <http://www.gnu.org/licenses/>. 3701 3702 // ISO C Standard: 7.17 Common definitions <stddef.h> 3703 3704 // Any one of these symbols __need_* means that GNU libc 3705 // wants us just to define one data type. So don't define 3706 // the symbols that indicate this file's entire job has been done. 3707 3708 // This avoids lossage on SunOS but only if stdtypes.h comes first. 3709 // There's no way to win with the other order! Sun lossage. 3710 3711 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 3712 // Just ignore it. 3713 3714 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 3715 // _TYPE_size_t which will typedef size_t. fixincludes patched the 3716 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 3717 // not defined, and so that defining this macro defines _GCC_SIZE_T. 3718 // If we find that the macros are still defined at this point, we must 3719 // invoke them so that the type is defined as expected. 3720 3721 // In case nobody has defined these types, but we aren't running under 3722 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 3723 // __WCHAR_TYPE__ have reasonable values. This can happen if the 3724 // parts of GCC is compiled by an older compiler, that actually 3725 // include gstddef.h, such as collect2. 3726 3727 // Signed type of difference of two pointers. 3728 3729 // Define this type if we are doing the whole job, 3730 // or if we want this type in particular. 3731 3732 // If this symbol has done its job, get rid of it. 3733 3734 // Unsigned type of `sizeof' something. 3735 3736 // Define this type if we are doing the whole job, 3737 // or if we want this type in particular. 3738 3739 // Wide character type. 3740 // Locale-writers should change this as necessary to 3741 // be big enough to hold unique values not between 0 and 127, 3742 // and not (wchar_t) -1, for each defined multibyte character. 3743 3744 // Define this type if we are doing the whole job, 3745 // or if we want this type in particular. 3746 3747 // A null pointer constant. 3748 3749 // Offset of member MEMBER in a struct of type TYPE. 3750 3751 // The Single Unix specification says that some more types are 3752 // available here. 3753 3754 type Useconds_t = X__useconds_t /* unistd.h:255:22 */ 3755 3756 type Intptr_t = X__intptr_t /* unistd.h:267:20 */ 3757 3758 type Socklen_t = X__socklen_t /* unistd.h:274:21 */ 3759 3760 // Define some macros helping to catch buffer overflows. 3761 3762 // System-specific extensions. 3763 // System-specific extensions of <unistd.h>, Linux version. 3764 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3765 // This file is part of the GNU C Library. 3766 // 3767 // The GNU C Library is free software; you can redistribute it and/or 3768 // modify it under the terms of the GNU Lesser General Public 3769 // License as published by the Free Software Foundation; either 3770 // version 2.1 of the License, or (at your option) any later version. 3771 // 3772 // The GNU C Library is distributed in the hope that it will be useful, 3773 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3774 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3775 // Lesser General Public License for more details. 3776 // 3777 // You should have received a copy of the GNU Lesser General Public 3778 // License along with the GNU C Library; if not, see 3779 // <https://www.gnu.org/licenses/>. 3780 3781 // MVS linker does not support external names larger than 8 bytes 3782 3783 // 3784 // The 'zlib' compression library provides in-memory compression and 3785 // decompression functions, including integrity checks of the uncompressed data. 3786 // This version of the library supports only one compression method (deflation) 3787 // but other algorithms will be added later and will have the same stream 3788 // interface. 3789 // 3790 // Compression can be done in a single step if the buffers are large enough, 3791 // or can be done by repeated calls of the compression function. In the latter 3792 // case, the application must provide more input and/or consume the output 3793 // (providing more output space) before each call. 3794 // 3795 // The compressed data format used by default by the in-memory functions is 3796 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 3797 // around a deflate stream, which is itself documented in RFC 1951. 3798 // 3799 // The library also supports reading and writing files in gzip (.gz) format 3800 // with an interface similar to that of stdio using the functions that start 3801 // with "gz". The gzip format is different from the zlib format. gzip is a 3802 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 3803 // 3804 // This library can optionally read and write gzip and raw deflate streams in 3805 // memory as well. 3806 // 3807 // The zlib format was designed to be compact and fast for use in memory 3808 // and on communications channels. The gzip format was designed for single- 3809 // file compression on file systems, has a larger header than zlib to maintain 3810 // directory information, and uses a different, slower check method than zlib. 3811 // 3812 // The library does not install any signal handler. The decoder checks 3813 // the consistency of the compressed data, so the library should never crash 3814 // even in the case of corrupted input. 3815 3816 type Alloc_func = uintptr /* zlib.h:81:16 */ 3817 type Free_func = uintptr /* zlib.h:82:16 */ 3818 3819 type Internal_state = struct { 3820 Fstrm Z_streamp 3821 Fstatus int32 3822 Fpending_buf uintptr 3823 Fpending_buf_size Ulg 3824 Fpending_out uintptr 3825 Fpending Ulg 3826 Fwrap int32 3827 Fgzhead Gz_headerp 3828 Fgzindex Ulg 3829 Fmethod Byte 3830 F__ccgo_pad1 [3]byte 3831 Flast_flush int32 3832 Fw_size UInt 3833 Fw_bits UInt 3834 Fw_mask UInt 3835 Fwindow uintptr 3836 Fwindow_size Ulg 3837 Fprev uintptr 3838 Fhead uintptr 3839 Fins_h UInt 3840 Fhash_size UInt 3841 Fhash_bits UInt 3842 Fhash_mask UInt 3843 Fhash_shift UInt 3844 Fblock_start int32 3845 Fmatch_length UInt 3846 Fprev_match IPos 3847 Fmatch_available int32 3848 Fstrstart UInt 3849 Fmatch_start UInt 3850 Flookahead UInt 3851 Fprev_length UInt 3852 Fmax_chain_length UInt 3853 Fmax_lazy_match UInt 3854 Flevel int32 3855 Fstrategy int32 3856 Fgood_match UInt 3857 Fnice_match int32 3858 Fdyn_ltree [573]struct { 3859 Ffc struct{ Ffreq Ush } 3860 Fdl struct{ Fdad Ush } 3861 } 3862 Fdyn_dtree [61]struct { 3863 Ffc struct{ Ffreq Ush } 3864 Fdl struct{ Fdad Ush } 3865 } 3866 Fbl_tree [39]struct { 3867 Ffc struct{ Ffreq Ush } 3868 Fdl struct{ Fdad Ush } 3869 } 3870 Fl_desc struct { 3871 Fdyn_tree uintptr 3872 Fmax_code int32 3873 Fstat_desc uintptr 3874 } 3875 Fd_desc struct { 3876 Fdyn_tree uintptr 3877 Fmax_code int32 3878 Fstat_desc uintptr 3879 } 3880 Fbl_desc struct { 3881 Fdyn_tree uintptr 3882 Fmax_code int32 3883 Fstat_desc uintptr 3884 } 3885 Fbl_count [16]Ush 3886 Fheap [573]int32 3887 Fheap_len int32 3888 Fheap_max int32 3889 Fdepth [573]Uch 3890 F__ccgo_pad2 [3]byte 3891 Fl_buf uintptr 3892 Flit_bufsize UInt 3893 Flast_lit UInt 3894 Fd_buf uintptr 3895 Fopt_len Ulg 3896 Fstatic_len Ulg 3897 Fmatches UInt 3898 Finsert UInt 3899 Fbi_buf Ush 3900 F__ccgo_pad3 [2]byte 3901 Fbi_valid int32 3902 Fhigh_water Ulg 3903 } /* zlib.h:84:1 */ 3904 3905 type Z_stream_s = struct { 3906 Fnext_in uintptr 3907 Favail_in UInt 3908 Ftotal_in ULong 3909 Fnext_out uintptr 3910 Favail_out UInt 3911 Ftotal_out ULong 3912 Fmsg uintptr 3913 Fstate uintptr 3914 Fzalloc Alloc_func 3915 Fzfree Free_func 3916 Fopaque Voidpf 3917 Fdata_type int32 3918 Fadler ULong 3919 Freserved ULong 3920 } /* zlib.h:86:9 */ 3921 3922 type Z_stream = Z_stream_s /* zlib.h:106:3 */ 3923 3924 type Z_streamp = uintptr /* zlib.h:108:22 */ 3925 3926 // 3927 // gzip header information passed to and from zlib routines. See RFC 1952 3928 // for more details on the meanings of these fields. 3929 type Gz_header_s = struct { 3930 Ftext int32 3931 Ftime ULong 3932 Fxflags int32 3933 Fos int32 3934 Fextra uintptr 3935 Fextra_len UInt 3936 Fextra_max UInt 3937 Fname uintptr 3938 Fname_max UInt 3939 Fcomment uintptr 3940 Fcomm_max UInt 3941 Fhcrc int32 3942 Fdone int32 3943 } /* zlib.h:114:9 */ 3944 3945 // 3946 // gzip header information passed to and from zlib routines. See RFC 1952 3947 // for more details on the meanings of these fields. 3948 type Gz_header = Gz_header_s /* zlib.h:129:3 */ 3949 3950 type Gz_headerp = uintptr /* zlib.h:131:23 */ 3951 // 3952 // inflateGetHeader() requests that gzip header information be stored in the 3953 // provided gz_header structure. inflateGetHeader() may be called after 3954 // inflateInit2() or inflateReset(), and before the first call of inflate(). 3955 // As inflate() processes the gzip stream, head->done is zero until the header 3956 // is completed, at which time head->done is set to one. If a zlib stream is 3957 // being decoded, then head->done is set to -1 to indicate that there will be 3958 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 3959 // used to force inflate() to return immediately after header processing is 3960 // complete and before any actual data is decompressed. 3961 // 3962 // The text, time, xflags, and os fields are filled in with the gzip header 3963 // contents. hcrc is set to true if there is a header CRC. (The header CRC 3964 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 3965 // contains the maximum number of bytes to write to extra. Once done is true, 3966 // extra_len contains the actual extra field length, and extra contains the 3967 // extra field, or that field truncated if extra_max is less than extra_len. 3968 // If name is not Z_NULL, then up to name_max characters are written there, 3969 // terminated with a zero unless the length is greater than name_max. If 3970 // comment is not Z_NULL, then up to comm_max characters are written there, 3971 // terminated with a zero unless the length is greater than comm_max. When any 3972 // of extra, name, or comment are not Z_NULL and the respective field is not 3973 // present in the header, then that field is set to Z_NULL to signal its 3974 // absence. This allows the use of deflateSetHeader() with the returned 3975 // structure to duplicate the header. However if those fields are set to 3976 // allocated memory, then the application will need to save those pointers 3977 // elsewhere so that they can be eventually freed. 3978 // 3979 // If inflateGetHeader is not used, then the header information is simply 3980 // discarded. The header is always checked for validity, including the header 3981 // CRC if present. inflateReset() will reset the process to discard the header 3982 // information. The application would need to call inflateGetHeader() again to 3983 // retrieve the header from the next gzip stream. 3984 // 3985 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 3986 // stream state was inconsistent. 3987 3988 // 3989 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 3990 // unsigned char FAR *window)); 3991 // 3992 // Initialize the internal stream state for decompression using inflateBack() 3993 // calls. The fields zalloc, zfree and opaque in strm must be initialized 3994 // before the call. If zalloc and zfree are Z_NULL, then the default library- 3995 // derived memory allocation routines are used. windowBits is the base two 3996 // logarithm of the window size, in the range 8..15. window is a caller 3997 // supplied buffer of that size. Except for special applications where it is 3998 // assured that deflate was used with small window sizes, windowBits must be 15 3999 // and a 32K byte window must be supplied to be able to decompress general 4000 // deflate streams. 4001 // 4002 // See inflateBack() for the usage of these routines. 4003 // 4004 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 4005 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 4006 // allocated, or Z_VERSION_ERROR if the version of the library does not match 4007 // the version of the header file. 4008 4009 type In_func = uintptr /* zlib.h:1092:18 */ 4010 type Out_func = uintptr /* zlib.h:1094:13 */ 4011 // 4012 // Same as uncompress, except that sourceLen is a pointer, where the 4013 // length of the source is *sourceLen. On return, *sourceLen is the number of 4014 // source bytes consumed. 4015 4016 // gzip file access functions 4017 4018 // 4019 // This library supports reading and writing files in gzip (.gz) format with 4020 // an interface similar to that of stdio, using the functions that start with 4021 // "gz". The gzip format is different from the zlib format. gzip is a gzip 4022 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 4023 4024 type GzFile_s = struct { 4025 Fhave uint32 4026 Fnext uintptr 4027 Fpos Off64_t 4028 } /* zlib.h:1300:9 */ 4029 4030 // 4031 // Same as uncompress, except that sourceLen is a pointer, where the 4032 // length of the source is *sourceLen. On return, *sourceLen is the number of 4033 // source bytes consumed. 4034 4035 // gzip file access functions 4036 4037 // 4038 // This library supports reading and writing files in gzip (.gz) format with 4039 // an interface similar to that of stdio, using the functions that start with 4040 // "gz". The gzip format is different from the zlib format. gzip is a gzip 4041 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 4042 4043 type GzFile = uintptr /* zlib.h:1300:25 */ 4044 4045 // POSIX.1-2008 extended locale interface (see locale.h). 4046 // Definition of locale_t. 4047 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4048 // This file is part of the GNU C Library. 4049 // 4050 // The GNU C Library is free software; you can redistribute it and/or 4051 // modify it under the terms of the GNU Lesser General Public 4052 // License as published by the Free Software Foundation; either 4053 // version 2.1 of the License, or (at your option) any later version. 4054 // 4055 // The GNU C Library is distributed in the hope that it will be useful, 4056 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4057 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4058 // Lesser General Public License for more details. 4059 // 4060 // You should have received a copy of the GNU Lesser General Public 4061 // License along with the GNU C Library; if not, see 4062 // <https://www.gnu.org/licenses/>. 4063 4064 // Definition of struct __locale_struct and __locale_t. 4065 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 4066 // This file is part of the GNU C Library. 4067 // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 4068 // 4069 // The GNU C Library is free software; you can redistribute it and/or 4070 // modify it under the terms of the GNU Lesser General Public 4071 // License as published by the Free Software Foundation; either 4072 // version 2.1 of the License, or (at your option) any later version. 4073 // 4074 // The GNU C Library is distributed in the hope that it will be useful, 4075 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4076 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4077 // Lesser General Public License for more details. 4078 // 4079 // You should have received a copy of the GNU Lesser General Public 4080 // License along with the GNU C Library; if not, see 4081 // <https://www.gnu.org/licenses/>. 4082 4083 // POSIX.1-2008: the locale_t type, representing a locale context 4084 // (implementation-namespace version). This type should be treated 4085 // as opaque by applications; some details are exposed for the sake of 4086 // efficiency in e.g. ctype functions. 4087 4088 type X__locale_struct = struct { 4089 F__locales [13]uintptr 4090 F__ctype_b uintptr 4091 F__ctype_tolower uintptr 4092 F__ctype_toupper uintptr 4093 F__names [13]uintptr 4094 } /* __locale_t.h:28:1 */ 4095 4096 type X__locale_t = uintptr /* __locale_t.h:42:32 */ 4097 4098 type Locale_t = X__locale_t /* locale_t.h:24:20 */ 4099 4100 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4101 // This file is part of the GNU C Library. 4102 // 4103 // The GNU C Library is free software; you can redistribute it and/or 4104 // modify it under the terms of the GNU Lesser General Public 4105 // License as published by the Free Software Foundation; either 4106 // version 2.1 of the License, or (at your option) any later version. 4107 // 4108 // The GNU C Library is distributed in the hope that it will be useful, 4109 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4110 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4111 // Lesser General Public License for more details. 4112 // 4113 // You should have received a copy of the GNU Lesser General Public 4114 // License along with the GNU C Library; if not, see 4115 // <https://www.gnu.org/licenses/>. 4116 4117 // ISO C99 Standard: 7.20 General utilities <stdlib.h> 4118 4119 // Handle feature test macros at the start of a header. 4120 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4121 // This file is part of the GNU C Library. 4122 // 4123 // The GNU C Library is free software; you can redistribute it and/or 4124 // modify it under the terms of the GNU Lesser General Public 4125 // License as published by the Free Software Foundation; either 4126 // version 2.1 of the License, or (at your option) any later version. 4127 // 4128 // The GNU C Library is distributed in the hope that it will be useful, 4129 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4130 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4131 // Lesser General Public License for more details. 4132 // 4133 // You should have received a copy of the GNU Lesser General Public 4134 // License along with the GNU C Library; if not, see 4135 // <https://www.gnu.org/licenses/>. 4136 4137 // This header is internal to glibc and should not be included outside 4138 // of glibc headers. Headers including it must define 4139 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 4140 // cannot have multiple include guards because ISO C feature test 4141 // macros depend on the definition of the macro when an affected 4142 // header is included, not when the first system header is 4143 // included. 4144 4145 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4146 // This file is part of the GNU C Library. 4147 // 4148 // The GNU C Library is free software; you can redistribute it and/or 4149 // modify it under the terms of the GNU Lesser General Public 4150 // License as published by the Free Software Foundation; either 4151 // version 2.1 of the License, or (at your option) any later version. 4152 // 4153 // The GNU C Library is distributed in the hope that it will be useful, 4154 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4155 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4156 // Lesser General Public License for more details. 4157 // 4158 // You should have received a copy of the GNU Lesser General Public 4159 // License along with the GNU C Library; if not, see 4160 // <https://www.gnu.org/licenses/>. 4161 4162 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 4163 // macro. 4164 4165 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 4166 // macro. Most but not all symbols enabled by that macro in TS 4167 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 4168 // still require that macro in C2X. 4169 4170 // ISO/IEC TS 18661-4:2015 defines the 4171 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 4172 // functions, the symbols from this TS are enabled unconditionally in 4173 // C2X. 4174 4175 // ISO/IEC TS 18661-3:2015 defines the 4176 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 4177 4178 // Get size_t, wchar_t and NULL from <stddef.h>. 4179 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 4180 // 4181 // This file is part of GCC. 4182 // 4183 // GCC is free software; you can redistribute it and/or modify 4184 // it under the terms of the GNU General Public License as published by 4185 // the Free Software Foundation; either version 3, or (at your option) 4186 // any later version. 4187 // 4188 // GCC is distributed in the hope that it will be useful, 4189 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4190 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4191 // GNU General Public License for more details. 4192 // 4193 // Under Section 7 of GPL version 3, you are granted additional 4194 // permissions described in the GCC Runtime Library Exception, version 4195 // 3.1, as published by the Free Software Foundation. 4196 // 4197 // You should have received a copy of the GNU General Public License and 4198 // a copy of the GCC Runtime Library Exception along with this program; 4199 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 4200 // <http://www.gnu.org/licenses/>. 4201 4202 // ISO C Standard: 7.17 Common definitions <stddef.h> 4203 4204 // Any one of these symbols __need_* means that GNU libc 4205 // wants us just to define one data type. So don't define 4206 // the symbols that indicate this file's entire job has been done. 4207 4208 // This avoids lossage on SunOS but only if stdtypes.h comes first. 4209 // There's no way to win with the other order! Sun lossage. 4210 4211 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 4212 // Just ignore it. 4213 4214 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 4215 // _TYPE_size_t which will typedef size_t. fixincludes patched the 4216 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 4217 // not defined, and so that defining this macro defines _GCC_SIZE_T. 4218 // If we find that the macros are still defined at this point, we must 4219 // invoke them so that the type is defined as expected. 4220 4221 // In case nobody has defined these types, but we aren't running under 4222 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 4223 // __WCHAR_TYPE__ have reasonable values. This can happen if the 4224 // parts of GCC is compiled by an older compiler, that actually 4225 // include gstddef.h, such as collect2. 4226 4227 // Signed type of difference of two pointers. 4228 4229 // Define this type if we are doing the whole job, 4230 // or if we want this type in particular. 4231 4232 // If this symbol has done its job, get rid of it. 4233 4234 // Unsigned type of `sizeof' something. 4235 4236 // Define this type if we are doing the whole job, 4237 // or if we want this type in particular. 4238 4239 // Wide character type. 4240 // Locale-writers should change this as necessary to 4241 // be big enough to hold unique values not between 0 and 127, 4242 // and not (wchar_t) -1, for each defined multibyte character. 4243 4244 // Define this type if we are doing the whole job, 4245 // or if we want this type in particular. 4246 4247 // A null pointer constant. 4248 4249 // Offset of member MEMBER in a struct of type TYPE. 4250 4251 // XPG requires a few symbols from <sys/wait.h> being defined. 4252 // Definitions of flag bits for `waitpid' et al. 4253 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 4254 // This file is part of the GNU C Library. 4255 // 4256 // The GNU C Library is free software; you can redistribute it and/or 4257 // modify it under the terms of the GNU Lesser General Public 4258 // License as published by the Free Software Foundation; either 4259 // version 2.1 of the License, or (at your option) any later version. 4260 // 4261 // The GNU C Library is distributed in the hope that it will be useful, 4262 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4263 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4264 // Lesser General Public License for more details. 4265 // 4266 // You should have received a copy of the GNU Lesser General Public 4267 // License along with the GNU C Library; if not, see 4268 // <https://www.gnu.org/licenses/>. 4269 4270 // Bits in the third argument to `waitpid'. 4271 4272 // Bits in the fourth argument to `waitid'. 4273 4274 // The following values are used by the `waitid' function. 4275 4276 // The Linux kernel defines these bare, rather than an enum, 4277 // which causes a conflict if the include order is reversed. 4278 4279 type Idtype_t = uint32 /* waitflags.h:57:3 */ 4280 // Definitions of status bits for `wait' 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 // Everything extant so far uses these same bits. 4299 4300 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 4301 4302 // If WIFSIGNALED(STATUS), the terminating signal. 4303 4304 // If WIFSTOPPED(STATUS), the signal that stopped the child. 4305 4306 // Nonzero if STATUS indicates normal termination. 4307 4308 // Nonzero if STATUS indicates termination by a signal. 4309 4310 // Nonzero if STATUS indicates the child is stopped. 4311 4312 // Nonzero if STATUS indicates the child continued after a stop. We only 4313 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 4314 4315 // Nonzero if STATUS indicates the child dumped core. 4316 4317 // Macros for constructing status values. 4318 4319 // Define the macros <sys/wait.h> also would define this way. 4320 4321 // _FloatN API tests for enablement. 4322 // Macros to control TS 18661-3 glibc features on x86. 4323 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4324 // This file is part of the GNU C Library. 4325 // 4326 // The GNU C Library is free software; you can redistribute it and/or 4327 // modify it under the terms of the GNU Lesser General Public 4328 // License as published by the Free Software Foundation; either 4329 // version 2.1 of the License, or (at your option) any later version. 4330 // 4331 // The GNU C Library is distributed in the hope that it will be useful, 4332 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4333 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4334 // Lesser General Public License for more details. 4335 // 4336 // You should have received a copy of the GNU Lesser General Public 4337 // License along with the GNU C Library; if not, see 4338 // <https://www.gnu.org/licenses/>. 4339 4340 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4341 // This file is part of the GNU C Library. 4342 // 4343 // The GNU C Library is free software; you can redistribute it and/or 4344 // modify it under the terms of the GNU Lesser General Public 4345 // License as published by the Free Software Foundation; either 4346 // version 2.1 of the License, or (at your option) any later version. 4347 // 4348 // The GNU C Library is distributed in the hope that it will be useful, 4349 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4350 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4351 // Lesser General Public License for more details. 4352 // 4353 // You should have received a copy of the GNU Lesser General Public 4354 // License along with the GNU C Library; if not, see 4355 // <https://www.gnu.org/licenses/>. 4356 4357 // Defined to 1 if the current compiler invocation provides a 4358 // floating-point type with the IEEE 754 binary128 format, and this 4359 // glibc includes corresponding *f128 interfaces for it. The required 4360 // libgcc support was added some time after the basic compiler 4361 // support, for x86_64 and x86. 4362 4363 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 4364 // from the default float, double and long double types in this glibc. 4365 4366 // Defined to 1 if the current compiler invocation provides a 4367 // floating-point type with the right format for _Float64x, and this 4368 // glibc includes corresponding *f64x interfaces for it. 4369 4370 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 4371 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 4372 // the format of _Float128, which must be different from that of long 4373 // double. 4374 4375 // Defined to concatenate the literal suffix to be used with _Float128 4376 // types, if __HAVE_FLOAT128 is 1. 4377 4378 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 4379 4380 // The remaining of this file provides support for older compilers. 4381 4382 // The type _Float128 exists only since GCC 7.0. 4383 4384 // __builtin_huge_valf128 doesn't exist before GCC 7.0. 4385 4386 // Older GCC has only a subset of built-in functions for _Float128 on 4387 // x86, and __builtin_infq is not usable in static initializers. 4388 // Converting a narrower sNaN to _Float128 produces a quiet NaN, so 4389 // attempts to use _Float128 sNaNs will not work properly with older 4390 // compilers. 4391 4392 // In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, 4393 // e.g.: __builtin_signbitf128, before GCC 6. However, there has never 4394 // been a __builtin_signbitf128 in GCC and the type-generic builtin is 4395 // only available since GCC 6. 4396 4397 // Macros to control TS 18661-3 glibc features where the same 4398 // definitions are appropriate for all platforms. 4399 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4400 // This file is part of the GNU C Library. 4401 // 4402 // The GNU C Library is free software; you can redistribute it and/or 4403 // modify it under the terms of the GNU Lesser General Public 4404 // License as published by the Free Software Foundation; either 4405 // version 2.1 of the License, or (at your option) any later version. 4406 // 4407 // The GNU C Library is distributed in the hope that it will be useful, 4408 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4409 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4410 // Lesser General Public License for more details. 4411 // 4412 // You should have received a copy of the GNU Lesser General Public 4413 // License along with the GNU C Library; if not, see 4414 // <https://www.gnu.org/licenses/>. 4415 4416 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4417 // This file is part of the GNU C Library. 4418 // 4419 // The GNU C Library is free software; you can redistribute it and/or 4420 // modify it under the terms of the GNU Lesser General Public 4421 // License as published by the Free Software Foundation; either 4422 // version 2.1 of the License, or (at your option) any later version. 4423 // 4424 // The GNU C Library is distributed in the hope that it will be useful, 4425 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4426 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4427 // Lesser General Public License for more details. 4428 // 4429 // You should have received a copy of the GNU Lesser General Public 4430 // License along with the GNU C Library; if not, see 4431 // <https://www.gnu.org/licenses/>. 4432 4433 // Properties of long double type. ldbl-96 version. 4434 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4435 // This file is part of the GNU C Library. 4436 // 4437 // The GNU C Library is free software; you can redistribute it and/or 4438 // modify it under the terms of the GNU Lesser General Public 4439 // License published by the Free Software Foundation; either 4440 // version 2.1 of the License, or (at your option) any later version. 4441 // 4442 // The GNU C Library is distributed in the hope that it will be useful, 4443 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4444 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4445 // Lesser General Public License for more details. 4446 // 4447 // You should have received a copy of the GNU Lesser General Public 4448 // License along with the GNU C Library; if not, see 4449 // <https://www.gnu.org/licenses/>. 4450 4451 // long double is distinct from double, so there is nothing to 4452 // define here. 4453 4454 // This header should be included at the bottom of each bits/floatn.h. 4455 // It defines the following macros for each _FloatN and _FloatNx type, 4456 // where the same definitions, or definitions based only on the macros 4457 // in bits/floatn.h, are appropriate for all glibc configurations. 4458 4459 // Defined to 1 if the current compiler invocation provides a 4460 // floating-point type with the right format for this type, and this 4461 // glibc includes corresponding *fN or *fNx interfaces for it. 4462 4463 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 4464 // type is the first with its format in the sequence of (the default 4465 // choices for) float, double, long double, _Float16, _Float32, 4466 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 4467 // glibc; that is, if functions present once per floating-point format 4468 // rather than once per type are present for this type. 4469 // 4470 // All configurations supported by glibc have _Float32 the same format 4471 // as float, _Float64 and _Float32x the same format as double, the 4472 // _Float64x the same format as either long double or _Float128. No 4473 // configurations support _Float128x or, as of GCC 7, have compiler 4474 // support for a type meeting the requirements for _Float128x. 4475 4476 // Defined to 1 if the corresponding _FloatN type is not binary compatible 4477 // with the corresponding ISO C type in the current compilation unit as 4478 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 4479 // in glibc. 4480 4481 // Defined to 1 if any _FloatN or _FloatNx types that are not 4482 // ABI-distinct are however distinct types at the C language level (so 4483 // for the purposes of __builtin_types_compatible_p and _Generic). 4484 4485 // Defined to concatenate the literal suffix to be used with _FloatN 4486 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 4487 // literal suffixes exist since GCC 7, for C only. 4488 4489 // Defined to a complex type if __HAVE_<type> is 1. 4490 4491 // The remaining of this file provides support for older compilers. 4492 4493 // If double, long double and _Float64 all have the same set of 4494 // values, TS 18661-3 requires the usual arithmetic conversions on 4495 // long double and _Float64 to produce _Float64. For this to be the 4496 // case when building with a compiler without a distinct _Float64 4497 // type, _Float64 must be a typedef for long double, not for 4498 // double. 4499 4500 // Returned by `div'. 4501 type Div_t = struct { 4502 Fquot int32 4503 Frem int32 4504 } /* stdlib.h:62:5 */ 4505 4506 // Returned by `ldiv'. 4507 type Ldiv_t = struct { 4508 Fquot int32 4509 Frem int32 4510 } /* stdlib.h:70:5 */ 4511 4512 // Returned by `lldiv'. 4513 type Lldiv_t = struct { 4514 Fquot int64 4515 Frem int64 4516 } /* stdlib.h:80:5 */ 4517 4518 // Reentrant versions of the `random' family of functions. 4519 // These functions all use the following data structure to contain 4520 // state, rather than global state variables. 4521 4522 type Random_data = struct { 4523 Ffptr uintptr 4524 Frptr uintptr 4525 Fstate uintptr 4526 Frand_type int32 4527 Frand_deg int32 4528 Frand_sep int32 4529 Fend_ptr uintptr 4530 } /* stdlib.h:423:1 */ 4531 4532 // Data structure for communication with thread safe versions. This 4533 // type is to be regarded as opaque. It's only exported because users 4534 // have to allocate objects of this type. 4535 type Drand48_data = struct { 4536 F__x [3]uint16 4537 F__old_x [3]uint16 4538 F__c uint16 4539 F__init uint16 4540 F__a uint64 4541 } /* stdlib.h:490:1 */ 4542 4543 // Shorthand for type of comparison functions. 4544 type X__compar_fn_t = uintptr /* stdlib.h:808:13 */ 4545 4546 // Floating-point inline functions for stdlib.h. 4547 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 4548 // This file is part of the GNU C Library. 4549 // 4550 // The GNU C Library is free software; you can redistribute it and/or 4551 // modify it under the terms of the GNU Lesser General Public 4552 // License as published by the Free Software Foundation; either 4553 // version 2.1 of the License, or (at your option) any later version. 4554 // 4555 // The GNU C Library is distributed in the hope that it will be useful, 4556 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4557 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4558 // Lesser General Public License for more details. 4559 // 4560 // You should have received a copy of the GNU Lesser General Public 4561 // License along with the GNU C Library; if not, see 4562 // <https://www.gnu.org/licenses/>. 4563 4564 // Define some macros helping to catch buffer overflows. 4565 4566 // since "static" is used to mean two completely different things in C, we 4567 // define "local" for the non-static meaning of "static", for readability 4568 // (compile with -Dlocal if your debugger can't find static symbols) 4569 4570 type Uch = uint8 /* zutil.h:43:24 */ 4571 type Uchf = Uch /* zutil.h:44:17 */ 4572 type Ush = uint16 /* zutil.h:45:24 */ 4573 type Ushf = Ush /* zutil.h:46:17 */ 4574 type Ulg = uint32 /* zutil.h:47:24 */ 4575 4576 // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 4577 4578 // use NO_DIVIDE if your processor does not do division in hardware -- 4579 // try it both ways to see which is faster 4580 4581 // ========================================================================= 4582 func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */ 4583 var sum2 uint32 4584 var n uint32 4585 4586 // split Adler-32 into component sums 4587 sum2 = ((adler >> 16) & ULong(0xffff)) 4588 adler = adler & (ULong(0xffff)) 4589 4590 // in case user likes doing a byte at a time, keep it fast 4591 if len == Z_size_t(1) { 4592 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(buf)))) 4593 if adler >= BASE { 4594 adler = adler - (BASE) 4595 } 4596 sum2 = sum2 + (adler) 4597 if sum2 >= BASE { 4598 sum2 = sum2 - (BASE) 4599 } 4600 return (adler | (sum2 << 16)) 4601 } 4602 4603 // initial Adler-32 value (deferred check for len == 1 speed) 4604 if buf == uintptr(Z_NULL) { 4605 return ULong(1) 4606 } 4607 4608 // in case short lengths are provided, keep it somewhat fast 4609 if len < Z_size_t(16) { 4610 for libc.PostDecUint32(&len, 1) != 0 { 4611 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 4612 sum2 = sum2 + (adler) 4613 } 4614 if adler >= BASE { 4615 adler = adler - (BASE) 4616 } 4617 sum2 = sum2 % (BASE) // only added so many BASE's 4618 return (adler | (sum2 << 16)) 4619 } 4620 4621 // do length NMAX blocks -- requires just one modulo operation 4622 for len >= Z_size_t(NMAX) { 4623 len = len - (Z_size_t(NMAX)) 4624 n = (uint32(NMAX / 16)) // NMAX is divisible by 16 4625 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 4626 { 4627 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 4628 sum2 = sum2 + (adler) 4629 } 4630 { 4631 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 4632 sum2 = sum2 + (adler) 4633 } 4634 4635 { 4636 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 4637 sum2 = sum2 + (adler) 4638 } 4639 { 4640 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 4641 sum2 = sum2 + (adler) 4642 } 4643 4644 { 4645 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 4646 sum2 = sum2 + (adler) 4647 } 4648 { 4649 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 4650 sum2 = sum2 + (adler) 4651 } 4652 4653 { 4654 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 4655 sum2 = sum2 + (adler) 4656 } 4657 { 4658 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 4659 sum2 = sum2 + (adler) 4660 } 4661 4662 { 4663 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 4664 sum2 = sum2 + (adler) 4665 } 4666 { 4667 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 4668 sum2 = sum2 + (adler) 4669 } 4670 4671 { 4672 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 4673 sum2 = sum2 + (adler) 4674 } 4675 { 4676 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 4677 sum2 = sum2 + (adler) 4678 } 4679 4680 { 4681 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 4682 sum2 = sum2 + (adler) 4683 } 4684 { 4685 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 4686 sum2 = sum2 + (adler) 4687 } 4688 4689 { 4690 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 4691 sum2 = sum2 + (adler) 4692 } 4693 { 4694 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 4695 sum2 = sum2 + (adler) 4696 } 4697 4698 // 16 sums unrolled 4699 buf += uintptr(16) 4700 } 4701 adler = adler % (BASE) 4702 sum2 = sum2 % (BASE) 4703 } 4704 4705 // do remaining bytes (less than NMAX, still just one modulo) 4706 if len != 0 { // avoid modulos if none remaining 4707 for len >= Z_size_t(16) { 4708 len = len - (Z_size_t(16)) 4709 { 4710 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 4711 sum2 = sum2 + (adler) 4712 } 4713 { 4714 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 4715 sum2 = sum2 + (adler) 4716 } 4717 4718 { 4719 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 4720 sum2 = sum2 + (adler) 4721 } 4722 { 4723 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 4724 sum2 = sum2 + (adler) 4725 } 4726 4727 { 4728 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 4729 sum2 = sum2 + (adler) 4730 } 4731 { 4732 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 4733 sum2 = sum2 + (adler) 4734 } 4735 4736 { 4737 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 4738 sum2 = sum2 + (adler) 4739 } 4740 { 4741 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 4742 sum2 = sum2 + (adler) 4743 } 4744 4745 { 4746 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 4747 sum2 = sum2 + (adler) 4748 } 4749 { 4750 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 4751 sum2 = sum2 + (adler) 4752 } 4753 4754 { 4755 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 4756 sum2 = sum2 + (adler) 4757 } 4758 { 4759 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 4760 sum2 = sum2 + (adler) 4761 } 4762 4763 { 4764 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 4765 sum2 = sum2 + (adler) 4766 } 4767 { 4768 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 4769 sum2 = sum2 + (adler) 4770 } 4771 4772 { 4773 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 4774 sum2 = sum2 + (adler) 4775 } 4776 { 4777 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 4778 sum2 = sum2 + (adler) 4779 } 4780 4781 buf += uintptr(16) 4782 } 4783 for libc.PostDecUint32(&len, 1) != 0 { 4784 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 4785 sum2 = sum2 + (adler) 4786 } 4787 adler = adler % (BASE) 4788 sum2 = sum2 % (BASE) 4789 } 4790 4791 // return recombined sums 4792 return (adler | (sum2 << 16)) 4793 } 4794 4795 // ========================================================================= 4796 func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */ 4797 return Xadler32_z(tls, adler, buf, len) 4798 } 4799 4800 // ========================================================================= 4801 func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:143:13: */ 4802 var sum1 uint32 4803 var sum2 uint32 4804 var rem uint32 4805 4806 // for negative len, return invalid adler32 as a clue for debugging 4807 if len2 < int64(0) { 4808 return 0xffffffff 4809 } 4810 4811 // the derivation of this formula is left as an exercise for the reader 4812 len2 = len2 % (int64(BASE)) // assumes len2 >= 0 4813 rem = uint32(len2) 4814 sum1 = (adler1 & ULong(0xffff)) 4815 sum2 = (uint32(rem) * sum1) 4816 sum2 = sum2 % (BASE) 4817 sum1 = sum1 + (((adler2 & ULong(0xffff)) + BASE) - ULong(1)) 4818 sum2 = sum2 + (((((adler1 >> 16) & ULong(0xffff)) + ((adler2 >> 16) & ULong(0xffff))) + BASE) - ULong(rem)) 4819 if sum1 >= BASE { 4820 sum1 = sum1 - (BASE) 4821 } 4822 if sum1 >= BASE { 4823 sum1 = sum1 - (BASE) 4824 } 4825 if sum2 >= (uint32(BASE) << 1) { 4826 sum2 = sum2 - (uint32(BASE) << 1) 4827 } 4828 if sum2 >= BASE { 4829 sum2 = sum2 - (BASE) 4830 } 4831 return (sum1 | (sum2 << 16)) 4832 } 4833 4834 // ========================================================================= 4835 func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */ 4836 return adler32_combine_(tls, adler1, adler2, len2) 4837 } 4838 4839 func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:180:15: */ 4840 return adler32_combine_(tls, adler1, adler2, len2) 4841 } 4842 4843 // =========================================================================== 4844 // Compresses the source buffer into the destination buffer. The level 4845 // parameter has the same meaning as in deflateInit. sourceLen is the byte 4846 // length of the source buffer. Upon entry, destLen is the total size of the 4847 // destination buffer, which must be at least 0.1% larger than sourceLen plus 4848 // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 4849 // 4850 // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 4851 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, 4852 // Z_STREAM_ERROR if the level parameter is invalid. 4853 func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */ 4854 bp := tls.Alloc(56) 4855 defer tls.Free(56) 4856 4857 // var stream Z_stream at bp, 56 4858 4859 var err int32 4860 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 4861 var left ULong 4862 4863 left = *(*ULongf)(unsafe.Pointer(destLen)) 4864 *(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0) 4865 4866 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0) 4867 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0) 4868 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0) 4869 4870 err = XdeflateInit_(tls, bp /* &stream */, level, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 4871 if err != Z_OK { 4872 return err 4873 } 4874 4875 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest 4876 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0) 4877 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source 4878 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0) 4879 4880 for ok := true; ok; ok = (err == Z_OK) { 4881 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out == UInt(0) { 4882 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 { 4883 if left > ULong(max) { 4884 return max 4885 } 4886 return UInt(left) 4887 }() 4888 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out)) 4889 } 4890 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in == UInt(0) { 4891 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 { 4892 if sourceLen > ULong(max) { 4893 return max 4894 } 4895 return UInt(sourceLen) 4896 }() 4897 sourceLen = sourceLen - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in)) 4898 } 4899 err = Xdeflate(tls, bp /* &stream */, func() int32 { 4900 if sourceLen != 0 { 4901 return Z_NO_FLUSH 4902 } 4903 return Z_FINISH 4904 }()) 4905 } 4906 4907 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out 4908 XdeflateEnd(tls, bp /* &stream */) 4909 if err == Z_STREAM_END { 4910 return Z_OK 4911 } 4912 return err 4913 } 4914 4915 // =========================================================================== 4916 func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */ 4917 return Xcompress2(tls, dest, destLen, source, sourceLen, -1) 4918 } 4919 4920 // =========================================================================== 4921 // If the default memLevel or windowBits for deflateInit() is changed, then 4922 // this function needs to be updated. 4923 // 4924 func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */ 4925 return ((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + ULong(13)) 4926 } 4927 4928 // ======================================================================== 4929 // Tables of CRC-32s of all single-byte values, made by make_crc_table(). 4930 // crc32.h -- tables for rapid CRC calculation 4931 // Generated automatically by crc32.c 4932 4933 var crc_table = [8][256]Z_crc_t{ 4934 { 4935 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 4936 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 4937 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 4938 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 4939 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 4940 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 4941 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 4942 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 4943 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 4944 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 4945 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 4946 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 4947 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 4948 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 4949 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 4950 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 4951 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 4952 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 4953 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 4954 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 4955 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 4956 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 4957 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 4958 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 4959 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 4960 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 4961 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 4962 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 4963 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 4964 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 4965 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 4966 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 4967 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 4968 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 4969 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 4970 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 4971 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 4972 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 4973 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 4974 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 4975 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 4976 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 4977 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 4978 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 4979 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 4980 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 4981 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 4982 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 4983 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 4984 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 4985 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 4986 0x2d02ef8d, 4987 }, 4988 { 4989 0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, 4990 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, 4991 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, 4992 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, 4993 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, 4994 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, 4995 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, 4996 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, 4997 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, 4998 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, 4999 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, 5000 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, 5001 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, 5002 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, 5003 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, 5004 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, 5005 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, 5006 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, 5007 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, 5008 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, 5009 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, 5010 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, 5011 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, 5012 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, 5013 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, 5014 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, 5015 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, 5016 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, 5017 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, 5018 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, 5019 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, 5020 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, 5021 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, 5022 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, 5023 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, 5024 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, 5025 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, 5026 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, 5027 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, 5028 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, 5029 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, 5030 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, 5031 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, 5032 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, 5033 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, 5034 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, 5035 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, 5036 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, 5037 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, 5038 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, 5039 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, 5040 0x9324fd72, 5041 }, 5042 { 5043 0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, 5044 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, 5045 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, 5046 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, 5047 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, 5048 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, 5049 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, 5050 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, 5051 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, 5052 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, 5053 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, 5054 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, 5055 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, 5056 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, 5057 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, 5058 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, 5059 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, 5060 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, 5061 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, 5062 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, 5063 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, 5064 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, 5065 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, 5066 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, 5067 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, 5068 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, 5069 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, 5070 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, 5071 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, 5072 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, 5073 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, 5074 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, 5075 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, 5076 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, 5077 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, 5078 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, 5079 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, 5080 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, 5081 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, 5082 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, 5083 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, 5084 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, 5085 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, 5086 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, 5087 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, 5088 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, 5089 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, 5090 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, 5091 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, 5092 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, 5093 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, 5094 0xbe9834ed, 5095 }, 5096 { 5097 0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, 5098 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, 5099 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, 5100 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, 5101 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, 5102 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, 5103 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, 5104 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, 5105 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, 5106 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, 5107 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, 5108 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, 5109 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, 5110 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, 5111 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, 5112 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, 5113 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, 5114 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, 5115 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, 5116 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, 5117 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, 5118 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, 5119 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, 5120 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, 5121 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, 5122 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, 5123 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, 5124 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, 5125 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, 5126 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, 5127 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, 5128 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, 5129 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, 5130 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, 5131 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, 5132 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, 5133 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, 5134 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, 5135 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, 5136 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, 5137 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, 5138 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, 5139 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, 5140 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, 5141 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, 5142 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, 5143 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, 5144 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, 5145 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, 5146 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, 5147 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, 5148 0xde0506f1, 5149 }, 5150 { 5151 0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, 5152 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, 5153 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, 5154 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, 5155 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, 5156 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, 5157 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, 5158 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, 5159 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, 5160 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, 5161 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, 5162 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, 5163 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, 5164 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, 5165 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, 5166 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, 5167 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, 5168 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, 5169 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, 5170 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, 5171 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, 5172 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, 5173 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, 5174 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, 5175 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, 5176 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, 5177 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, 5178 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, 5179 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, 5180 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, 5181 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, 5182 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, 5183 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, 5184 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, 5185 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, 5186 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, 5187 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, 5188 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, 5189 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, 5190 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, 5191 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, 5192 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, 5193 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, 5194 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, 5195 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, 5196 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, 5197 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, 5198 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, 5199 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, 5200 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, 5201 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, 5202 0x8def022d, 5203 }, 5204 { 5205 0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64, 5206 0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1, 5207 0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e, 5208 0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61, 5209 0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82, 5210 0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff, 5211 0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7, 5212 0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da, 5213 0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139, 5214 0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6, 5215 0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89, 5216 0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c, 5217 0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0, 5218 0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d, 5219 0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a, 5220 0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177, 5221 0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de, 5222 0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b, 5223 0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824, 5224 0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e, 5225 0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad, 5226 0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0, 5227 0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d, 5228 0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60, 5229 0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83, 5230 0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822, 5231 0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d, 5232 0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8, 5233 0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171, 5234 0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c, 5235 0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b, 5236 0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6, 5237 0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca, 5238 0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f, 5239 0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430, 5240 0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf, 5241 0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c, 5242 0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51, 5243 0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9, 5244 0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84, 5245 0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67, 5246 0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398, 5247 0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7, 5248 0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62, 5249 0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e, 5250 0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923, 5251 0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4, 5252 0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9, 5253 0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070, 5254 0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5, 5255 0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a, 5256 0x72fd2493, 5257 }, 5258 { 5259 0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907, 5260 0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f, 5261 0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a, 5262 0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e, 5263 0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512, 5264 0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14, 5265 0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b, 5266 0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d, 5267 0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731, 5268 0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925, 5269 0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620, 5270 0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28, 5271 0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70, 5272 0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176, 5273 0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d, 5274 0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b, 5275 0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b, 5276 0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63, 5277 0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266, 5278 0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a, 5279 0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446, 5280 0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40, 5281 0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557, 5282 0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51, 5283 0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d, 5284 0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0, 5285 0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5, 5286 0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed, 5287 0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd, 5288 0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb, 5289 0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0, 5290 0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6, 5291 0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de, 5292 0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6, 5293 0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3, 5294 0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7, 5295 0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb, 5296 0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd, 5297 0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92, 5298 0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094, 5299 0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598, 5300 0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c, 5301 0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489, 5302 0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81, 5303 0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9, 5304 0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af, 5305 0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4, 5306 0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2, 5307 0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2, 5308 0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba, 5309 0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf, 5310 0xed3498be, 5311 }, 5312 { 5313 0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f, 5314 0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d, 5315 0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0, 5316 0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42, 5317 0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95, 5318 0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2, 5319 0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a, 5320 0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d, 5321 0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea, 5322 0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748, 5323 0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5, 5324 0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27, 5325 0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b, 5326 0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac, 5327 0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4, 5328 0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3, 5329 0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44, 5330 0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6, 5331 0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b, 5332 0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329, 5333 0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe, 5334 0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9, 5335 0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1, 5336 0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6, 5337 0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921, 5338 0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555, 5339 0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8, 5340 0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a, 5341 0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd, 5342 0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a, 5343 0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2, 5344 0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5, 5345 0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2, 5346 0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330, 5347 0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad, 5348 0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f, 5349 0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8, 5350 0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef, 5351 0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc, 5352 0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb, 5353 0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c, 5354 0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e, 5355 0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03, 5356 0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1, 5357 0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6, 5358 0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1, 5359 0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9, 5360 0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e, 5361 0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409, 5362 0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb, 5363 0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966, 5364 0xf10605de, 5365 }, 5366 } /* crc32.h:5:25 */ 5367 5368 // ========================================================================= 5369 // This function can be used by asm versions of crc32() 5370 func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */ 5371 return uintptr(uintptr(unsafe.Pointer(&crc_table))) 5372 } 5373 5374 // ========================================================================= 5375 5376 // ========================================================================= 5377 func Xcrc32_z(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:202:23: */ 5378 bp := tls.Alloc(4) 5379 defer tls.Free(4) 5380 5381 if buf == uintptr(Z_NULL) { 5382 return 0 5383 } 5384 5385 if uint32(unsafe.Sizeof(uintptr(0))) == uint32(unsafe.Sizeof(Ptrdiff_t(0))) { 5386 // var endian Z_crc_t at bp, 4 5387 5388 *(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1) 5389 if *(*uint8)(unsafe.Pointer(bp /* &endian */)) != 0 { 5390 return crc32_little(tls, crc, buf, len) 5391 } else { 5392 return crc32_big(tls, crc, buf, len) 5393 } 5394 } 5395 crc = (crc ^ 0xffffffff) 5396 for len >= Z_size_t(8) { 5397 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5398 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5399 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5400 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5401 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5402 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5403 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5404 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5405 len = len - (Z_size_t(8)) 5406 } 5407 if len != 0 { 5408 for ok := true; ok; ok = libc.PreDecUint32(&len, 1) != 0 { 5409 crc = (uint32(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5410 } 5411 } 5412 return (crc ^ 0xffffffff) 5413 } 5414 5415 // ========================================================================= 5416 func Xcrc32(tls *libc.TLS, crc uint32, buf uintptr, len UInt) uint32 { /* crc32.c:237:23: */ 5417 return Xcrc32_z(tls, crc, buf, len) 5418 } 5419 5420 // 5421 // This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit 5422 // integer pointer type. This violates the strict aliasing rule, where a 5423 // compiler can assume, for optimization purposes, that two pointers to 5424 // fundamentally different types won't ever point to the same memory. This can 5425 // manifest as a problem only if one of the pointers is written to. This code 5426 // only reads from those pointers. So long as this code remains isolated in 5427 // this compilation unit, there won't be a problem. For this reason, this code 5428 // should not be copied and pasted into a compilation unit in which other code 5429 // writes to the buffer that is passed to these routines. 5430 // 5431 5432 // ========================================================================= 5433 5434 // ========================================================================= 5435 func crc32_little(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:266:21: */ 5436 var c Z_crc_t 5437 var buf4 uintptr 5438 5439 c = Z_crc_t(crc) 5440 c = ^c 5441 for (len != 0) && ((Ptrdiff_t(buf) & 3) != 0) { 5442 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)) 5443 len-- 5444 } 5445 5446 buf4 = buf 5447 for len >= Z_size_t(32) { 5448 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5449 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))) 5450 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5451 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))) 5452 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5453 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))) 5454 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5455 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))) 5456 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5457 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))) 5458 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5459 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))) 5460 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5461 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))) 5462 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5463 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))) 5464 len = len - (Z_size_t(32)) 5465 } 5466 for len >= Z_size_t(4) { 5467 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5468 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))) 5469 len = len - (Z_size_t(4)) 5470 } 5471 buf = buf4 5472 5473 if len != 0 { 5474 for ok := true; ok; ok = libc.PreDecUint32(&len, 1) != 0 { 5475 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)) 5476 } 5477 } 5478 c = ^c 5479 return uint32(c) 5480 } 5481 5482 // ========================================================================= 5483 5484 // ========================================================================= 5485 func crc32_big(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:306:21: */ 5486 var c Z_crc_t 5487 var buf4 uintptr 5488 5489 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)) 5490 c = ^c 5491 for (len != 0) && ((Ptrdiff_t(buf) & 3) != 0) { 5492 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)) 5493 len-- 5494 } 5495 5496 buf4 = buf 5497 for len >= Z_size_t(32) { 5498 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5499 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))) 5500 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5501 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))) 5502 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5503 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))) 5504 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5505 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))) 5506 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5507 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))) 5508 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5509 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))) 5510 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5511 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))) 5512 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5513 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))) 5514 len = len - (Z_size_t(32)) 5515 } 5516 for len >= Z_size_t(4) { 5517 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5518 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))) 5519 len = len - (Z_size_t(4)) 5520 } 5521 buf = buf4 5522 5523 if len != 0 { 5524 for ok := true; ok; ok = libc.PreDecUint32(&len, 1) != 0 { 5525 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)) 5526 } 5527 } 5528 c = ^c 5529 return (uint32((((((c) >> 24) & Z_crc_t(0xff)) + (((c) >> 8) & Z_crc_t(0xff00))) + (((c) & Z_crc_t(0xff00)) << 8)) + (((c) & Z_crc_t(0xff)) << 24))) 5530 } 5531 5532 // ========================================================================= 5533 func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint32) uint32 { /* crc32.c:344:21: */ 5534 var sum uint32 5535 5536 sum = uint32(0) 5537 for vec != 0 { 5538 if (vec & uint32(1)) != 0 { 5539 sum = sum ^ (*(*uint32)(unsafe.Pointer(mat))) 5540 } 5541 vec >>= 1 5542 mat += 4 5543 } 5544 return sum 5545 } 5546 5547 // ========================================================================= 5548 func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */ 5549 var n int32 5550 5551 for n = 0; n < GF2_DIM; n++ { 5552 *(*uint32)(unsafe.Pointer(square + uintptr(n)*4)) = gf2_matrix_times(tls, mat, *(*uint32)(unsafe.Pointer(mat + uintptr(n)*4))) 5553 } 5554 } 5555 5556 // ========================================================================= 5557 func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:372:13: */ 5558 bp := tls.Alloc(256) 5559 defer tls.Free(256) 5560 5561 var n int32 5562 var row uint32 5563 // var even [32]uint32 at bp+128, 128 5564 // even-power-of-two zeros operator 5565 // var odd [32]uint32 at bp, 128 5566 // odd-power-of-two zeros operator 5567 5568 // degenerate case (also disallow negative lengths) 5569 if len2 <= int64(0) { 5570 return crc1 5571 } 5572 5573 // put operator for one zero bit in odd 5574 *(*uint32)(unsafe.Pointer(bp /* &odd[0] */)) = 0xedb88320 // CRC-32 polynomial 5575 row = uint32(1) 5576 for n = 1; n < GF2_DIM; n++ { 5577 *(*uint32)(unsafe.Pointer(bp /* &odd[0] */ + uintptr(n)*4)) = row 5578 row <<= 1 5579 } 5580 5581 // put operator for two zero bits in even 5582 gf2_matrix_square(tls, bp+128 /* &even[0] */, bp /* &odd[0] */) 5583 5584 // put operator for four zero bits in odd 5585 gf2_matrix_square(tls, bp /* &odd[0] */, bp+128 /* &even[0] */) 5586 5587 // apply len2 zeros to crc1 (first square will put the operator for one 5588 // zero byte, eight zero bits, in even) 5589 for ok := true; ok; ok = (len2 != int64(0)) { 5590 // apply zeros operator for this bit of len2 5591 gf2_matrix_square(tls, bp+128 /* &even[0] */, bp /* &odd[0] */) 5592 if (len2 & int64(1)) != 0 { 5593 crc1 = gf2_matrix_times(tls, bp+128 /* &even[0] */, crc1) 5594 } 5595 len2 >>= 1 5596 5597 // if no more bits set, then done 5598 if len2 == int64(0) { 5599 break 5600 } 5601 5602 // another iteration of the loop with odd and even swapped 5603 gf2_matrix_square(tls, bp /* &odd[0] */, bp+128 /* &even[0] */) 5604 if (len2 & int64(1)) != 0 { 5605 crc1 = gf2_matrix_times(tls, bp /* &odd[0] */, crc1) 5606 } 5607 len2 >>= 1 5608 5609 // if no more bits set, then done 5610 } 5611 5612 // return combined crc 5613 crc1 = crc1 ^ (crc2) 5614 return crc1 5615 } 5616 5617 // ========================================================================= 5618 func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */ 5619 return crc32_combine_(tls, crc1, crc2, len2) 5620 } 5621 5622 func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:436:15: */ 5623 return crc32_combine_(tls, crc1, crc2, len2) 5624 } 5625 5626 // Reverse the bytes in a 32-bit value 5627 5628 // define NO_GZIP when compiling if you want to disable gzip header and 5629 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 5630 // the crc code when it is not needed. For shared libraries, gzip encoding 5631 // should be left enabled. 5632 5633 // =========================================================================== 5634 // Internal compression state. 5635 5636 // number of length codes, not counting the special END_BLOCK code 5637 5638 // number of literal bytes 0..255 5639 5640 // number of Literal or Length codes, including the END_BLOCK code 5641 5642 // number of distance codes 5643 5644 // number of codes used to transfer the bit lengths 5645 5646 // maximum heap size 5647 5648 // All codes must not exceed MAX_BITS bits 5649 5650 // size of bit buffer in bi_buf 5651 5652 // Stream status 5653 5654 // Data structure describing a single value and its code string. 5655 type Ct_data_s = struct { 5656 Ffc struct{ Ffreq Ush } 5657 Fdl struct{ Fdad Ush } 5658 } /* zlib.h:84:1 */ 5659 5660 // Reverse the bytes in a 32-bit value 5661 5662 // define NO_GZIP when compiling if you want to disable gzip header and 5663 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 5664 // the crc code when it is not needed. For shared libraries, gzip encoding 5665 // should be left enabled. 5666 5667 // =========================================================================== 5668 // Internal compression state. 5669 5670 // number of length codes, not counting the special END_BLOCK code 5671 5672 // number of literal bytes 0..255 5673 5674 // number of Literal or Length codes, including the END_BLOCK code 5675 5676 // number of distance codes 5677 5678 // number of codes used to transfer the bit lengths 5679 5680 // maximum heap size 5681 5682 // All codes must not exceed MAX_BITS bits 5683 5684 // size of bit buffer in bi_buf 5685 5686 // Stream status 5687 5688 // Data structure describing a single value and its code string. 5689 type Ct_data = Ct_data_s /* deflate.h:77:7 */ 5690 5691 type Static_tree_desc_s = struct { 5692 Fstatic_tree uintptr 5693 Fextra_bits uintptr 5694 Fextra_base int32 5695 Felems int32 5696 Fmax_length int32 5697 } /* deflate.h:84:9 */ 5698 5699 type Tree_desc_s = struct { 5700 Fdyn_tree uintptr 5701 Fmax_code int32 5702 Fstat_desc uintptr 5703 } /* zlib.h:84:1 */ 5704 5705 type Tree_desc = Tree_desc_s /* deflate.h:90:7 */ 5706 5707 type Pos = Ush /* deflate.h:92:13 */ 5708 type Posf = Pos /* deflate.h:93:17 */ 5709 type IPos = uint32 /* deflate.h:94:18 */ 5710 5711 // A Pos is an index in the character window. We use short instead of int to 5712 // save space in the various tables. IPos is used only for parameter passing. 5713 5714 type Deflate_state = Internal_state /* deflate.h:276:7 */ 5715 5716 var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7 /* " deflate 1.2.11 ..." */)) /* deflate.c:54:12 */ 5717 // 5718 // If you use the zlib library in a product, an acknowledgment is welcome 5719 // in the documentation of your product. If for some reason you cannot 5720 // include such an acknowledgment, I would appreciate that you keep this 5721 // copyright string in the executable of your product. 5722 // 5723 5724 // =========================================================================== 5725 // Function prototypes. 5726 type Block_state = uint32 /* deflate.c:71:3 */ 5727 5728 type Compress_func = uintptr /* deflate.c:73:21 */ 5729 5730 // =========================================================================== 5731 // Local data 5732 5733 // Tail of hash chains 5734 5735 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 5736 5737 // Values for max_lazy_match, good_match and max_chain_length, depending on 5738 // the desired pack level (0..9). The values given below have been tuned to 5739 // exclude worst case performance for pathological files. Better values may be 5740 // found for specific files. 5741 type Config_s = struct { 5742 Fgood_length Ush 5743 Fmax_lazy Ush 5744 Fnice_length Ush 5745 Fmax_chain Ush 5746 Ffunc Compress_func 5747 } /* deflate.c:120:9 */ 5748 5749 // =========================================================================== 5750 // Local data 5751 5752 // Tail of hash chains 5753 5754 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 5755 5756 // Values for max_lazy_match, good_match and max_chain_length, depending on 5757 // the desired pack level (0..9). The values given below have been tuned to 5758 // exclude worst case performance for pathological files. Better values may be 5759 // found for specific files. 5760 type Config = Config_s /* deflate.c:126:3 */ 5761 5762 var configuration_table = [10]Config{ 5763 // good lazy nice chain 5764 /* 0 */ {Ffunc: 0}, // store only 5765 /* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches 5766 /* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0}, 5767 /* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 5768 5769 /* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches 5770 /* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 5771 /* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0}, 5772 /* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0}, 5773 /* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0}, 5774 /* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */ 5775 5776 // max compression 5777 5778 // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 5779 // For deflate_fast() (levels <= 3) good is ignored and lazy has a different 5780 // meaning. 5781 5782 // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH 5783 5784 // =========================================================================== 5785 // Update a hash value with the given input byte 5786 // IN assertion: all calls to UPDATE_HASH are made with consecutive input 5787 // characters, so that a running hash key can be computed from the previous 5788 // key instead of complete recalculation each time. 5789 5790 // =========================================================================== 5791 // Insert string str in the dictionary and set match_head to the previous head 5792 // of the hash chain (the most recent string with same hash key). Return 5793 // the previous length of the hash chain. 5794 // If this file is compiled with -DFASTEST, the compression level is forced 5795 // to 1, and no hash chains are maintained. 5796 // IN assertion: all calls to INSERT_STRING are made with consecutive input 5797 // characters and the first MIN_MATCH bytes of str are valid (except for 5798 // the last MIN_MATCH-1 bytes of the input file). 5799 5800 // =========================================================================== 5801 // Initialize the hash table (avoiding 64K overflow for 16 bit systems). 5802 // prev[] will be initialized on the fly. 5803 5804 // =========================================================================== 5805 // Slide the hash table when sliding the window down (could be avoided with 32 5806 // bit values at the expense of memory usage). We slide even when level == 0 to 5807 // keep the hash table consistent if we switch back to level > 0 later. 5808 func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */ 5809 var n uint32 5810 var m uint32 5811 var p uintptr 5812 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5813 5814 n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size 5815 p = ((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2) 5816 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 5817 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 5818 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 5819 if m >= wsize { 5820 return (uint16(m - wsize)) 5821 } 5822 return uint16(NIL) 5823 }() 5824 } 5825 n = wsize 5826 p = ((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2) 5827 for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 { 5828 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 5829 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 5830 if m >= wsize { 5831 return (uint16(m - wsize)) 5832 } 5833 return uint16(NIL) 5834 }() 5835 // If n is not on any hash chain, prev[n] is garbage but 5836 // its value will never be used. 5837 } 5838 } 5839 5840 // ========================================================================= 5841 func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */ 5842 return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, 5843 Z_DEFAULT_STRATEGY, version, stream_size) 5844 // To do: ignore strm->next_in if we use it as window 5845 } 5846 5847 // ========================================================================= 5848 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: */ 5849 var s uintptr 5850 var wrap int32 = 1 5851 var overlay uintptr 5852 // We overlay pending_buf and d_buf+l_buf. This works since the average 5853 // output size for (length,distance) codes is <= 24 bits. 5854 5855 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]))) || (uint32(stream_size) != uint32(unsafe.Sizeof(Z_stream{}))) { 5856 return -6 5857 } 5858 if strm == uintptr(Z_NULL) { 5859 return -2 5860 } 5861 5862 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 5863 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 5864 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 5865 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 5866 }{Xzcalloc})) 5867 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 5868 } 5869 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 5870 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 5871 f func(*libc.TLS, Voidpf, Voidpf) 5872 }{Xzcfree})) 5873 } 5874 5875 if level == (-1) { 5876 level = 6 5877 } 5878 5879 if windowBits < 0 { // suppress zlib wrapper 5880 wrap = 0 5881 windowBits = -windowBits 5882 } else if windowBits > 15 { 5883 wrap = 2 // write gzip wrapper instead 5884 windowBits = windowBits - (16) 5885 } 5886 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)) { 5887 return -2 5888 } 5889 if windowBits == 8 { 5890 windowBits = 9 5891 } // until 256-byte window bug fixed 5892 s = (*struct { 5893 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5894 })(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{}))) 5895 if s == uintptr(Z_NULL) { 5896 return -4 5897 } 5898 (*Z_stream)(unsafe.Pointer(strm)).Fstate = s 5899 (*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm 5900 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset() 5901 5902 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 5903 (*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL) 5904 (*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits) 5905 (*Deflate_state)(unsafe.Pointer(s)).Fw_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)) 5906 (*Deflate_state)(unsafe.Pointer(s)).Fw_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)) 5907 5908 (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = (UInt(memLevel) + UInt(7)) 5909 (*Deflate_state)(unsafe.Pointer(s)).Fhash_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)) 5910 (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) 5911 (*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH)) - UInt(1)) / UInt(MIN_MATCH)) 5912 5913 (*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct { 5914 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5915 })(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(2) * uint32(unsafe.Sizeof(Byte(0))))) 5916 (*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct { 5917 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5918 })(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)))) 5919 (*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct { 5920 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5921 })(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)))) 5922 5923 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg(0) // nothing written to s->window yet 5924 5925 (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = (UInt(int32(1) << (memLevel + 6))) // 16K elements by default 5926 5927 overlay = (*struct { 5928 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5929 })(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(unsafe.Sizeof(Ush(0))) + uint32(2))) 5930 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay 5931 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint32(unsafe.Sizeof(Ush(0))) + uint32(2))) 5932 5933 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)) { 5934 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 5935 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-4))] 5936 XdeflateEnd(tls, strm) 5937 return -4 5938 } 5939 (*Deflate_state)(unsafe.Pointer(s)).Fd_buf = (overlay + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize/UInt(unsafe.Sizeof(Ush(0)))))*2) 5940 (*Deflate_state)(unsafe.Pointer(s)).Fl_buf = ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((uint32(1) + uint32(unsafe.Sizeof(Ush(0)))) * (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize))) 5941 5942 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 5943 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 5944 (*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method) 5945 5946 return XdeflateReset(tls, strm) 5947 } 5948 5949 var my_version = *(*[7]int8)(unsafe.Pointer(ts /* "1.2.11" */)) /* deflate.c:253:23 */ 5950 5951 // ========================================================================= 5952 // Check for a valid deflate stream state. Return 0 if ok, 1 if not. 5953 func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */ 5954 var s uintptr 5955 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 5956 return 1 5957 } 5958 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5959 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)) { 5960 return 1 5961 } 5962 return 0 5963 } 5964 5965 // ========================================================================= 5966 func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */ 5967 var s uintptr 5968 var str UInt 5969 var n UInt 5970 var wrap int32 5971 var avail uint32 5972 var next uintptr 5973 5974 if (deflateStateCheck(tls, strm) != 0) || (dictionary == uintptr(Z_NULL)) { 5975 return -2 5976 } 5977 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5978 wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap 5979 if ((wrap == 2) || ((wrap == 1) && ((*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE))) || ((*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0) { 5980 return -2 5981 } 5982 5983 // when using zlib wrappers, compute Adler-32 for provided dictionary 5984 if wrap == 1 { 5985 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) 5986 } 5987 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf 5988 5989 // if dictionary would fill window, just replace the history 5990 if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 5991 if wrap == 0 { // already empty otherwise 5992 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 5993 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) * uint32(unsafe.Sizeof(Posf(0))))) 5994 5995 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 5996 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 5997 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 5998 } 5999 dictionary += (uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size)) // use the tail 6000 dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6001 } 6002 6003 // insert dictionary into window and hash 6004 avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6005 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 6006 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength 6007 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary 6008 fill_window(tls, s) 6009 for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 6010 str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 6011 n = ((*Deflate_state)(unsafe.Pointer(s)).Flookahead - (UInt(MIN_MATCH - 1))) 6012 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 6013 (*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) 6014 *(*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)) 6015 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 6016 str++ 6017 } 6018 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str 6019 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = (UInt(MIN_MATCH - 1)) 6020 fill_window(tls, s) 6021 } 6022 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 6023 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6024 (*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 6025 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 6026 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+120 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 6027 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 6028 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 6029 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail 6030 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 6031 return Z_OK 6032 } 6033 6034 // ========================================================================= 6035 func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */ 6036 var s uintptr 6037 var len UInt 6038 6039 if deflateStateCheck(tls, strm) != 0 { 6040 return -2 6041 } 6042 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6043 len = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) 6044 if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 6045 len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6046 } 6047 if (dictionary != uintptr(Z_NULL)) && (len != 0) { 6048 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)), len) 6049 } 6050 if dictLength != uintptr(Z_NULL) { 6051 *(*UInt)(unsafe.Pointer(dictLength)) = len 6052 } 6053 return Z_OK 6054 } 6055 6056 // ========================================================================= 6057 func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */ 6058 var s uintptr 6059 6060 if deflateStateCheck(tls, strm) != 0 { 6061 return -2 6062 } 6063 6064 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+20 /* &.total_out */, ULong(0)) 6065 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically 6066 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN 6067 6068 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6069 (*Deflate_state)(unsafe.Pointer(s)).Fpending = Ulg(0) 6070 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 6071 6072 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 { 6073 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH); 6074 } 6075 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 { 6076 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6077 return GZIP_STATE 6078 } 6079 return func() int32 { 6080 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 { 6081 return INIT_STATE 6082 } 6083 return BUSY_STATE 6084 }() 6085 }() 6086 (*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint32 { 6087 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6088 return Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 6089 } 6090 return Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 6091 }() 6092 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH 6093 6094 X_tr_init(tls, s) 6095 6096 return Z_OK 6097 } 6098 6099 // ========================================================================= 6100 func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */ 6101 var ret int32 6102 6103 ret = XdeflateResetKeep(tls, strm) 6104 if ret == Z_OK { 6105 lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 6106 } 6107 return ret 6108 } 6109 6110 // ========================================================================= 6111 func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */ 6112 if (deflateStateCheck(tls, strm) != 0) || ((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2) { 6113 return -2 6114 } 6115 (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head 6116 return Z_OK 6117 } 6118 6119 // ========================================================================= 6120 func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */ 6121 if deflateStateCheck(tls, strm) != 0 { 6122 return -2 6123 } 6124 if pending != uintptr(Z_NULL) { 6125 *(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) 6126 } 6127 if bits != uintptr(Z_NULL) { 6128 *(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid 6129 } 6130 return Z_OK 6131 } 6132 6133 // ========================================================================= 6134 func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */ 6135 var s uintptr 6136 var put int32 6137 6138 if deflateStateCheck(tls, strm) != 0 { 6139 return -2 6140 } 6141 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6142 if ((*Deflate_state)(unsafe.Pointer(s)).Fd_buf) < ((*Deflate_state)(unsafe.Pointer(s)).Fpending_out + uintptr((int32((Buf_size + 7)) >> 3))) { 6143 return -5 6144 } 6145 for ok := true; ok; ok = bits != 0 { 6146 put = (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 6147 if put > bits { 6148 put = bits 6149 } 6150 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush((value & ((int32(1) << put) - 1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))))) 6151 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (put) 6152 X_tr_flush_bits(tls, s) 6153 value >>= put 6154 bits = bits - (put) 6155 } 6156 return Z_OK 6157 } 6158 6159 // ========================================================================= 6160 func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */ 6161 var s uintptr 6162 var func1 Compress_func 6163 6164 if deflateStateCheck(tls, strm) != 0 { 6165 return -2 6166 } 6167 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6168 6169 if level == (-1) { 6170 level = 6 6171 } 6172 if (((level < 0) || (level > 9)) || (strategy < 0)) || (strategy > Z_FIXED) { 6173 return -2 6174 } 6175 func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc 6176 6177 if ((strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy) || (func1 != configuration_table[level].Ffunc)) && ((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0) { 6178 // Flush the last buffer: 6179 var err int32 = Xdeflate(tls, strm, Z_BLOCK) 6180 if err == (-2) { 6181 return err 6182 } 6183 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6184 return -5 6185 } 6186 } 6187 if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level { 6188 if ((*Deflate_state)(unsafe.Pointer(s)).Flevel == 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0)) { 6189 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) { 6190 slide_hash(tls, s) 6191 } else { 6192 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6193 } 6194 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) * uint32(unsafe.Sizeof(Posf(0))))) 6195 6196 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0) 6197 } 6198 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 6199 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy) 6200 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length) 6201 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length) 6202 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain) 6203 } 6204 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 6205 return Z_OK 6206 } 6207 6208 // ========================================================================= 6209 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: */ 6210 var s uintptr 6211 6212 if deflateStateCheck(tls, strm) != 0 { 6213 return -2 6214 } 6215 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6216 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length) 6217 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy) 6218 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length 6219 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain) 6220 return Z_OK 6221 } 6222 6223 // ========================================================================= 6224 // For the default windowBits of 15 and memLevel of 8, this function returns 6225 // a close to exact, as well as small, upper bound on the compressed size. 6226 // They are coded as constants here for a reason--if the #define's are 6227 // changed, then this function needs to be changed as well. The return 6228 // value for 15 and 8 only works for those exact settings. 6229 // 6230 // For any setting other than those defaults for windowBits and memLevel, 6231 // the value returned is a conservative worst case for the maximum expansion 6232 // resulting from using fixed blocks instead of stored blocks, which deflate 6233 // can emit on compressed data for some combinations of the parameters. 6234 // 6235 // This function could be more sophisticated to provide closer upper bounds for 6236 // every combination of windowBits and memLevel. But even the conservative 6237 // upper bound of about 14% expansion does not seem onerous for output buffer 6238 // allocation. 6239 func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */ 6240 var s uintptr 6241 var complen ULong 6242 var wraplen ULong 6243 6244 // conservative upper bound for compressed data 6245 complen = (((sourceLen + ((sourceLen + ULong(7)) >> 3)) + ((sourceLen + ULong(63)) >> 6)) + ULong(5)) 6246 6247 // if can't get parameters, return conservative bound plus zlib wrapper 6248 if deflateStateCheck(tls, strm) != 0 { 6249 return (complen + ULong(6)) 6250 } 6251 6252 // compute wrapper length 6253 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6254 switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap { 6255 case 0: // raw deflate 6256 wraplen = ULong(0) 6257 break 6258 case 1: // zlib wrapper 6259 wraplen = (ULong(6 + (func() int32 { 6260 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { 6261 return 4 6262 } 6263 return 0 6264 }()))) 6265 break 6266 case 2: // gzip wrapper 6267 wraplen = ULong(18) 6268 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header 6269 var str uintptr 6270 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6271 wraplen = wraplen + (ULong(UInt(2) + (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)) 6272 } 6273 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname 6274 if str != uintptr(Z_NULL) { 6275 for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 6276 wraplen++ 6277 } 6278 } 6279 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment 6280 if str != uintptr(Z_NULL) { 6281 for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 6282 wraplen++ 6283 } 6284 } 6285 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6286 wraplen = wraplen + (ULong(2)) 6287 } 6288 } 6289 break 6290 default: // for compiler happiness 6291 wraplen = ULong(6) 6292 } 6293 6294 // if not default parameters, return conservative bound 6295 if ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15)) || ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != (UInt(8 + 7))) { 6296 return (complen + wraplen) 6297 } 6298 6299 // default settings: return tight bound for that case 6300 return ((((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + ULong(13)) - ULong(6)) + wraplen) 6301 } 6302 6303 // ========================================================================= 6304 // Put a short in the pending buffer. The 16-bit value is put in MSB order. 6305 // IN assertion: the stream state is correct and there is enough room in 6306 // pending_buf. 6307 func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */ 6308 { 6309 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b >> 8)) 6310 } 6311 6312 { 6313 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b & UInt(0xff))) 6314 } 6315 6316 } 6317 6318 // ========================================================================= 6319 // Flush as much pending output as possible. All deflate() output, except for 6320 // some deflate_stored() output, goes through this function so some 6321 // applications may wish to modify it to avoid allocating a large 6322 // strm->next_out buffer and copying into it. (See also read_buf()). 6323 func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */ 6324 var len uint32 6325 var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6326 6327 X_tr_flush_bits(tls, s) 6328 len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending) 6329 if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out { 6330 len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 6331 } 6332 if len == uint32(0) { 6333 return 6334 } 6335 6336 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, len) 6337 *(*uintptr)(unsafe.Pointer(strm + 12 /* &.next_out */)) += (uintptr(len)) 6338 *(*uintptr)(unsafe.Pointer(s + 16 /* &.pending_out */)) += (uintptr(len)) 6339 *(*ULong)(unsafe.Pointer(strm + 20 /* &.total_out */)) += (ULong(len)) 6340 *(*UInt)(unsafe.Pointer(strm + 16 /* &.avail_out */)) -= (len) 6341 *(*Ulg)(unsafe.Pointer(s + 20 /* &.pending */)) -= (Ulg(len)) 6342 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == Ulg(0) { 6343 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 6344 } 6345 } 6346 6347 // =========================================================================== 6348 // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. 6349 6350 // ========================================================================= 6351 func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */ 6352 var old_flush int32 // value of flush param for previous deflate call 6353 var s uintptr 6354 6355 if ((deflateStateCheck(tls, strm) != 0) || (flush > Z_BLOCK)) || (flush < 0) { 6356 return -2 6357 } 6358 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6359 6360 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)) { 6361 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-2))]; return -2 }() 6362 } 6363 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6364 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6365 } 6366 6367 old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush 6368 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush 6369 6370 // Flush as much pending output as possible 6371 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6372 flush_pending(tls, strm) 6373 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6374 // Since avail_out is 0, deflate will be called again with 6375 // more output space, but possibly with both pending and 6376 // avail_in equal to zero. There won't be anything to do, 6377 // but this is not an error situation so make sure we 6378 // return OK instead of BUF_ERROR at next call of deflate: 6379 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6380 return Z_OK 6381 } 6382 6383 // Make sure there is something to do and avoid duplicate consecutive 6384 // flushes. For repeated and useless calls with Z_FINISH, we keep 6385 // returning Z_STREAM_END instead of Z_BUF_ERROR. 6386 } else if (((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((((flush) * 2) - (func() int32 { 6387 if (flush) > 4 { 6388 return 9 6389 } 6390 return 0 6391 }())) <= (((old_flush) * 2) - (func() int32 { 6392 if (old_flush) > 4 { 6393 return 9 6394 } 6395 return 0 6396 }())))) && (flush != Z_FINISH) { 6397 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6398 } 6399 6400 // User must not provide more input after the first FINISH: 6401 if ((*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE) && ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) { 6402 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6403 } 6404 6405 // Write the header 6406 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE { 6407 // zlib header 6408 var header UInt = ((UInt(Z_DEFLATED) + (((*Deflate_state)(unsafe.Pointer(s)).Fw_bits - UInt(8)) << 4)) << 8) 6409 var level_flags UInt 6410 6411 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6412 level_flags = UInt(0) 6413 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 { 6414 level_flags = UInt(1) 6415 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 { 6416 level_flags = UInt(2) 6417 } else { 6418 level_flags = UInt(3) 6419 } 6420 header = header | (level_flags << 6) 6421 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 6422 header = header | (UInt(PRESET_DICT)) 6423 } 6424 header = header + (UInt(31) - (header % UInt(31))) 6425 6426 putShortMSB(tls, s, header) 6427 6428 // Save the adler32 of the preset dictionary: 6429 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 6430 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 6431 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xffff)))) 6432 } 6433 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 6434 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6435 6436 // Compression must start with an empty pending buffer 6437 flush_pending(tls, strm) 6438 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6439 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6440 return Z_OK 6441 } 6442 } 6443 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE { 6444 // gzip header 6445 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 6446 { 6447 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31) 6448 } 6449 6450 { 6451 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139) 6452 } 6453 6454 { 6455 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8) 6456 } 6457 6458 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) { 6459 { 6460 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6461 } 6462 6463 { 6464 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6465 } 6466 6467 { 6468 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6469 } 6470 6471 { 6472 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6473 } 6474 6475 { 6476 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6477 } 6478 6479 { 6480 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 6481 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 6482 return uint8(2) 6483 } 6484 return func() uint8 { 6485 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6486 return uint8(4) 6487 } 6488 return uint8(0) 6489 }() 6490 }() 6491 } 6492 6493 { 6494 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE) 6495 } 6496 6497 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6498 6499 // Compression must start with an empty pending buffer 6500 flush_pending(tls, strm) 6501 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6502 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6503 return Z_OK 6504 } 6505 } else { 6506 { 6507 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((((func() int32 { 6508 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { 6509 return 1 6510 } 6511 return 0 6512 }()) + (func() int32 { 6513 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6514 return 2 6515 } 6516 return 0 6517 }())) + (func() int32 { 6518 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) { 6519 return 0 6520 } 6521 return 4 6522 }())) + (func() int32 { 6523 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) { 6524 return 0 6525 } 6526 return 8 6527 }())) + (func() int32 { 6528 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) { 6529 return 0 6530 } 6531 return 16 6532 }()))) 6533 } 6534 6535 { 6536 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & ULong(0xff))) 6537 } 6538 6539 { 6540 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8) & ULong(0xff))) 6541 } 6542 6543 { 6544 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16) & ULong(0xff))) 6545 } 6546 6547 { 6548 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24) & ULong(0xff))) 6549 } 6550 6551 { 6552 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 6553 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 6554 return uint8(2) 6555 } 6556 return func() uint8 { 6557 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6558 return uint8(4) 6559 } 6560 return uint8(0) 6561 }() 6562 }() 6563 } 6564 6565 { 6566 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff)) 6567 } 6568 6569 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6570 { 6571 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff))) 6572 } 6573 6574 { 6575 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8) & UInt(0xff))) 6576 } 6577 6578 } 6579 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6580 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf, 6581 uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)) 6582 } 6583 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0) 6584 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE 6585 } 6586 } 6587 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE { 6588 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6589 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6590 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)) 6591 for ((*Deflate_state)(unsafe.Pointer(s)).Fpending + Ulg(left)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6592 var copy UInt = (UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)) 6593 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 6594 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), copy) 6595 (*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size 6596 for ok := true; ok; ok = 0 != 0 { 6597 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6598 (*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)))) 6599 } 6600 } 6601 *(*Ulg)(unsafe.Pointer(s + 32 /* &.gzindex */)) += (Ulg(copy)) 6602 flush_pending(tls, strm) 6603 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6604 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6605 return Z_OK 6606 } 6607 beg = Ulg(0) 6608 left = left - (copy) 6609 } 6610 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 6611 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), left) 6612 *(*Ulg)(unsafe.Pointer(s + 20 /* &.pending */)) += (Ulg(left)) 6613 for ok1 := true; ok1; ok1 = 0 != 0 { 6614 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6615 (*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)))) 6616 } 6617 } 6618 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0) 6619 } 6620 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE 6621 } 6622 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE { 6623 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) { 6624 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6625 var val int32 6626 for ok2 := true; ok2; ok2 = (val != 0) { 6627 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6628 for ok3 := true; ok3; ok3 = 0 != 0 { 6629 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6630 (*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)))) 6631 } 6632 } 6633 flush_pending(tls, strm) 6634 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6635 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6636 return Z_OK 6637 } 6638 beg = Ulg(0) 6639 } 6640 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 6641 { 6642 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 6643 } 6644 6645 } 6646 for ok4 := true; ok4; ok4 = 0 != 0 { 6647 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6648 (*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)))) 6649 } 6650 } 6651 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0) 6652 } 6653 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE 6654 } 6655 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE { 6656 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) { 6657 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6658 var val int32 6659 for ok5 := true; ok5; ok5 = (val != 0) { 6660 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6661 for ok6 := true; ok6; ok6 = 0 != 0 { 6662 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6663 (*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)))) 6664 } 6665 } 6666 flush_pending(tls, strm) 6667 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6668 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6669 return Z_OK 6670 } 6671 beg = Ulg(0) 6672 } 6673 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 6674 { 6675 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 6676 } 6677 6678 } 6679 for ok7 := true; ok7; ok7 = 0 != 0 { 6680 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6681 (*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)))) 6682 } 6683 } 6684 } 6685 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE 6686 } 6687 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE { 6688 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6689 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending + Ulg(2)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6690 flush_pending(tls, strm) 6691 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6692 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6693 return Z_OK 6694 } 6695 } 6696 { 6697 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff))) 6698 } 6699 6700 { 6701 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & ULong(0xff))) 6702 } 6703 6704 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 6705 } 6706 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6707 6708 // Compression must start with an empty pending buffer 6709 flush_pending(tls, strm) 6710 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6711 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6712 return Z_OK 6713 } 6714 } 6715 6716 // Start a new block or continue the current one. 6717 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)) { 6718 var bstate Block_state 6719 6720 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 { 6721 bstate = deflate_stored(tls, s, flush) 6722 } else { 6723 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY { 6724 bstate = deflate_huff(tls, s, flush) 6725 } else { 6726 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE { 6727 bstate = deflate_rle(tls, s, flush) 6728 } else { 6729 bstate = (*struct { 6730 f func(*libc.TLS, uintptr, int32) Block_state 6731 })(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush) 6732 } 6733 } 6734 } 6735 6736 if (bstate == Finish_started) || (bstate == Finish_done) { 6737 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 6738 } 6739 if (bstate == Need_more) || (bstate == Finish_started) { 6740 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6741 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above 6742 } 6743 return Z_OK 6744 // If flush != Z_NO_FLUSH && avail_out == 0, the next call 6745 // of deflate should use the same flush parameter to make sure 6746 // that the flush is complete. So we don't have to output an 6747 // empty block here, this will be done at next call. This also 6748 // ensures that for a very small output buffer, we emit at most 6749 // one empty block. 6750 } 6751 if bstate == Block_done { 6752 if flush == Z_PARTIAL_FLUSH { 6753 X_tr_align(tls, s) 6754 } else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH 6755 X_tr_stored_block(tls, s, uintptr(0), uint32(0), 0) 6756 // For a full flush, this empty block will be recognized 6757 // as a special marker by inflate_sync(). 6758 if flush == Z_FULL_FLUSH { 6759 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6760 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) * uint32(unsafe.Sizeof(Posf(0))))) 6761 // forget history 6762 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6763 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 6764 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 6765 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6766 } 6767 } 6768 } 6769 flush_pending(tls, strm) 6770 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6771 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above 6772 return Z_OK 6773 } 6774 } 6775 } 6776 6777 if flush != Z_FINISH { 6778 return Z_OK 6779 } 6780 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { 6781 return Z_STREAM_END 6782 } 6783 6784 // Write the trailer 6785 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6786 { 6787 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff))) 6788 } 6789 6790 { 6791 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & ULong(0xff))) 6792 } 6793 6794 { 6795 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16) & ULong(0xff))) 6796 } 6797 6798 { 6799 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24) & ULong(0xff))) 6800 } 6801 6802 { 6803 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & ULong(0xff))) 6804 } 6805 6806 { 6807 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8) & ULong(0xff))) 6808 } 6809 6810 { 6811 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16) & ULong(0xff))) 6812 } 6813 6814 { 6815 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24) & ULong(0xff))) 6816 } 6817 6818 } else { 6819 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 6820 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xffff)))) 6821 } 6822 flush_pending(tls, strm) 6823 // If avail_out is zero, the application will call deflate again 6824 // to flush the rest. 6825 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 { 6826 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap 6827 } // write the trailer only once! 6828 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) { 6829 return Z_OK 6830 } 6831 return Z_STREAM_END 6832 } 6833 6834 // ========================================================================= 6835 func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */ 6836 var status int32 6837 6838 if deflateStateCheck(tls, strm) != 0 { 6839 return -2 6840 } 6841 6842 status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus 6843 6844 /* Deallocate in reverse order of allocations: */ 6845 { 6846 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { 6847 (*struct { 6848 f func(*libc.TLS, Voidpf, Voidpf) 6849 })(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) 6850 } 6851 } 6852 6853 { 6854 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { 6855 (*struct { 6856 f func(*libc.TLS, Voidpf, Voidpf) 6857 })(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) 6858 } 6859 } 6860 6861 { 6862 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { 6863 (*struct { 6864 f func(*libc.TLS, Voidpf, Voidpf) 6865 })(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) 6866 } 6867 } 6868 6869 { 6870 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { 6871 (*struct { 6872 f func(*libc.TLS, Voidpf, Voidpf) 6873 })(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) 6874 } 6875 } 6876 6877 (*struct { 6878 f func(*libc.TLS, Voidpf, Voidpf) 6879 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 6880 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 6881 6882 if status == BUSY_STATE { 6883 return -3 6884 } 6885 return Z_OK 6886 } 6887 6888 // ========================================================================= 6889 // Copy the source state to the destination state. 6890 // To simplify the source, this is not supported for 16-bit MSDOS (which 6891 // doesn't have enough memory anyway to duplicate compression states). 6892 func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */ 6893 var ds uintptr 6894 var ss uintptr 6895 var overlay uintptr 6896 6897 if (deflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 6898 return -2 6899 } 6900 6901 ss = (*Z_stream)(unsafe.Pointer(source)).Fstate 6902 6903 libc.Xmemcpy(tls, dest, source, uint32(unsafe.Sizeof(Z_stream{}))) 6904 6905 ds = (*struct { 6906 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6907 })(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{}))) 6908 if ds == uintptr(Z_NULL) { 6909 return -4 6910 } 6911 (*Z_stream)(unsafe.Pointer(dest)).Fstate = ds 6912 libc.Xmemcpy(tls, ds, ss, uint32(unsafe.Sizeof(Deflate_state{}))) 6913 (*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest 6914 6915 (*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct { 6916 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6917 })(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(2) * uint32(unsafe.Sizeof(Byte(0))))) 6918 (*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct { 6919 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6920 })(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)))) 6921 (*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct { 6922 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6923 })(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)))) 6924 overlay = (*struct { 6925 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6926 })(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(unsafe.Sizeof(Ush(0))) + uint32(2))) 6927 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay 6928 6929 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)) { 6930 XdeflateEnd(tls, dest) 6931 return -4 6932 } 6933 // following zmemcpy do not work for 16-bit MSDOS 6934 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fwindow, (*Deflate_state)(unsafe.Pointer(ss)).Fwindow, (((*Deflate_state)(unsafe.Pointer(ds)).Fw_size * UInt(2)) * UInt(unsafe.Sizeof(Byte(0))))) 6935 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fprev, (*Deflate_state)(unsafe.Pointer(ss)).Fprev, ((*Deflate_state)(unsafe.Pointer(ds)).Fw_size * UInt(unsafe.Sizeof(Pos(0))))) 6936 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fhead, (*Deflate_state)(unsafe.Pointer(ss)).Fhead, ((*Deflate_state)(unsafe.Pointer(ds)).Fhash_size * UInt(unsafe.Sizeof(Pos(0))))) 6937 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf, UInt((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf_size)) 6938 6939 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_out = ((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(((int32((*Deflate_state)(unsafe.Pointer(ss)).Fpending_out) - int32((*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf)) / 1))) 6940 (*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = (overlay + uintptr(((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize/UInt(unsafe.Sizeof(Ush(0)))))*2) 6941 (*Deflate_state)(unsafe.Pointer(ds)).Fl_buf = ((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(((uint32(1) + uint32(unsafe.Sizeof(Ush(0)))) * (*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize))) 6942 6943 (*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 148 /* &.dyn_ltree */ 6944 (*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2440 /* &.dyn_dtree */ 6945 (*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2684 /* &.bl_tree */ 6946 6947 return Z_OK 6948 } 6949 6950 // =========================================================================== 6951 // Read a new buffer from the current input stream, update the adler32 6952 // and total number of bytes read. All deflate() input goes through 6953 // this function so some applications may wish to modify it to avoid 6954 // allocating a large strm->next_in buffer and copying from it. 6955 // (See also flush_pending()). 6956 func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */ 6957 var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6958 6959 if len > size { 6960 len = size 6961 } 6962 if len == uint32(0) { 6963 return uint32(0) 6964 } 6965 6966 *(*UInt)(unsafe.Pointer(strm + 4 /* &.avail_in */)) -= (len) 6967 6968 libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, len) 6969 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 { 6970 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 6971 } else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 { 6972 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 6973 } 6974 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 6975 *(*ULong)(unsafe.Pointer(strm + 8 /* &.total_in */)) += (ULong(len)) 6976 6977 return len 6978 } 6979 6980 // =========================================================================== 6981 // Initialize the "longest match" routines for a new zlib stream 6982 func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */ 6983 (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = (Ulg(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 6984 6985 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6986 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) * uint32(unsafe.Sizeof(Posf(0))))) 6987 6988 // Set the default configuration parameters: 6989 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) 6990 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) 6991 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) 6992 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) 6993 6994 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 6995 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 6996 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 6997 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6998 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+120 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 6999 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7000 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0) 7001 } 7002 7003 // =========================================================================== 7004 // Set match_start to the longest match starting at the given string and 7005 // return its length. Matches shorter or equal to prev_length are discarded, 7006 // in which case the result is equal to prev_length and match_start is 7007 // garbage. 7008 // IN assertions: cur_match is the head of the hash chain for the current 7009 // string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 7010 // OUT assertion: the match length is not greater than s->lookahead. 7011 // For 80x86 and 680x0, an optimized version will be provided in match.asm or 7012 // match.S. The code will be functionally equivalent. 7013 func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */ 7014 var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length // max hash chain length 7015 var scan uintptr = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) // current string 7016 var match uintptr // matched string 7017 var len int32 // length of current match 7018 var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length) // best match length so far 7019 var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match // stop if match long enough 7020 var limit IPos 7021 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1))) { 7022 limit = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) 7023 } else { 7024 limit = uint32(NIL) 7025 } 7026 // Stop when cur_match becomes <= limit. To simplify the code, 7027 // we prevent matches with the string of window index 0. 7028 var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev 7029 var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask 7030 7031 var strend uintptr = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 7032 var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 7033 var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 7034 7035 // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 7036 // It is easy to get rid of this optimization if necessary. 7037 7038 // Do not waste too much time if we already have a good match: 7039 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match { 7040 chain_length >>= 2 7041 } 7042 // Do not look for matches beyond the end of the input. This is necessary 7043 // to make deflate deterministic. 7044 if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7045 nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 7046 } 7047 7048 for ok := true; ok; ok = (((libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr((cur_match&wmask))*2))))) > limit) && 7049 (libc.PreDecUint32(&chain_length, 1) != uint32(0))) { 7050 7051 match = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match)) 7052 7053 // Skip to next match if the match length cannot increase 7054 // or if the match length is less than 2. Note that the checks below 7055 // for insufficient lookahead only occur occasionally for performance 7056 // reasons. Therefore uninitialized memory will be accessed, and 7057 // conditional jumps will be made that depend on those values. 7058 // However the length of the match is limited to the lookahead, so 7059 // the output of deflate is not affected by the uninitialized values. 7060 7061 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)))) { 7062 continue 7063 } 7064 7065 // The check at best_len-1 can be removed because it will be made 7066 // again later. (This heuristic is not always a win.) 7067 // It is not necessary to compare scan[2] and match[2] since they 7068 // are always equal when the other bytes match, given that 7069 // the hash keys are equal and that HASH_BITS >= 8. 7070 scan += uintptr(2) 7071 match++ 7072 7073 // We check for insufficient lookahead only every 8th comparison; 7074 // the 256th check will be made at strstart+258. 7075 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)) { 7076 } 7077 7078 len = (MAX_MATCH - ((int32(strend) - int32(scan)) / 1)) 7079 scan = (strend - uintptr(MAX_MATCH)) 7080 7081 if len > best_len { 7082 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match 7083 best_len = len 7084 if len >= nice_match { 7085 break 7086 } 7087 scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 7088 scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 7089 } 7090 } 7091 7092 if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7093 return UInt(best_len) 7094 } 7095 return (*Deflate_state)(unsafe.Pointer(s)).Flookahead 7096 } 7097 7098 // =========================================================================== 7099 // Fill the window when the lookahead becomes insufficient. 7100 // Updates strstart and lookahead. 7101 // 7102 // IN assertion: lookahead < MIN_LOOKAHEAD 7103 // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD 7104 // At least one byte has been read, or avail_in == 0; reads are 7105 // performed for at least two bytes (required for the zip translate_eol 7106 // option -- not supported here). 7107 func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */ 7108 var n uint32 7109 var more uint32 // Amount of free space at the end of the window. 7110 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7111 7112 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))) { 7113 more = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7114 7115 // Deal with !@#$% 64K limit: 7116 if uint32(unsafe.Sizeof(int32(0))) <= uint32(2) { 7117 if ((more == uint32(0)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0))) && ((*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0)) { 7118 more = wsize 7119 7120 } else if more == libc.Uint32(libc.Uint32FromInt32(-1)) { 7121 // Very unlikely, but possible on 16 bit machine if 7122 // strstart == 0 && lookahead == 1 (input done a byte at time) 7123 more-- 7124 } 7125 } 7126 7127 // If the window is almost full and there is insufficient lookahead, 7128 // move the upper half to the lower one to make room in the upper half. 7129 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= (wsize + ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) { 7130 7131 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(wsize)), (wsize - more)) 7132 *(*UInt)(unsafe.Pointer(s + 112 /* &.match_start */)) -= (wsize) 7133 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) -= (wsize) // we now have strstart >= MAX_DIST 7134 *(*int32)(unsafe.Pointer(s + 92 /* &.block_start */)) -= (int32(wsize)) 7135 slide_hash(tls, s) 7136 more = more + (wsize) 7137 } 7138 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) { 7139 break 7140 } 7141 7142 // If there was no sliding: 7143 // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && 7144 // more == window_size - lookahead - strstart 7145 // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) 7146 // => more >= window_size - 2*WSIZE + 2 7147 // In the BIG_MEM or MMAP case (not yet supported), 7148 // window_size == input_size + MIN_LOOKAHEAD && 7149 // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. 7150 // Otherwise, window_size == 2*WSIZE so more >= 2. 7151 // If there was sliding, more >= WSIZE. So in all cases, more >= 2. 7152 7153 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) 7154 *(*UInt)(unsafe.Pointer(s + 116 /* &.lookahead */)) += (n) 7155 7156 // Initialize the hash value now that we have some input: 7157 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) >= UInt(MIN_MATCH) { 7158 var str UInt = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 7159 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) 7160 (*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) 7161 for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 { 7162 (*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) 7163 *(*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)) 7164 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 7165 str++ 7166 (*Deflate_state)(unsafe.Pointer(s)).Finsert-- 7167 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) < UInt(MIN_MATCH) { 7168 break 7169 } 7170 } 7171 } 7172 // If the whole input has less than MIN_MATCH bytes, ins_h is garbage, 7173 // but this is not important since only literal bytes will be emitted. 7174 7175 } 7176 7177 // If the WIN_INIT bytes after the end of the current data have never been 7178 // written, then zero those bytes in order to avoid memory check reports of 7179 // the use of uninitialized (or uninitialised as Julian writes) bytes by 7180 // the longest match routines. Update the high water mark for the next 7181 // time through here. WIN_INIT is set to MAX_MATCH since the longest match 7182 // routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. 7183 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size { 7184 var curr Ulg = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead))) 7185 var init1 Ulg 7186 7187 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { 7188 // Previous high water mark below current data -- zero WIN_INIT 7189 // bytes or up to end of window, whichever is less. 7190 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr) 7191 if init1 > Ulg(MAX_MATCH) { 7192 init1 = Ulg(MAX_MATCH) 7193 } 7194 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(curr)), 0, uint32(init1)) 7195 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = (curr + init1) 7196 } else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (curr + Ulg(MAX_MATCH)) { 7197 // High water mark at or above current data, but below current data 7198 // plus WIN_INIT -- zero out to current data plus WIN_INIT, or up 7199 // to end of window, whichever is less. 7200 init1 = ((curr + Ulg(MAX_MATCH)) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 7201 if init1 > ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) { 7202 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 7203 } 7204 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)), 0, uint32(init1)) 7205 *(*Ulg)(unsafe.Pointer(s + 5824 /* &.high_water */)) += (init1) 7206 } 7207 } 7208 7209 } 7210 7211 // =========================================================================== 7212 // Flush the current block, with given end-of-file flag. 7213 // IN assertion: strstart is set to the end of the current match. 7214 7215 // Same but force premature exit if necessary. 7216 7217 // Maximum stored block length in deflate format (not including header). 7218 7219 // Minimum of a and b. 7220 7221 // =========================================================================== 7222 // Copy without compression as much as possible from the input stream, return 7223 // the current block state. 7224 // 7225 // In case deflateParams() is used to later switch to a non-zero compression 7226 // level, s->matches (otherwise unused when storing) keeps track of the number 7227 // of hash table slides to perform. If s->matches is 1, then one hash table 7228 // slide will be done when switching. If s->matches is 2, the maximum value 7229 // allowed here, then the hash table will be cleared, since two or more slides 7230 // is the same as a clear. 7231 // 7232 // deflate_stored() is written to minimize the number of times an input byte is 7233 // copied. It is most efficient with large input and output buffers, which 7234 // maximizes the opportunites to have a single copy from next_in to next_out. 7235 func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */ 7236 // Smallest worthy block size when not flushing or finishing. By default 7237 // this is 32K. This can be as small as 507 bytes for memLevel == 1. For 7238 // large input and output buffers, the stored block size will be larger. 7239 var min_block uint32 = func() uint32 { 7240 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(5)) > (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 7241 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7242 } 7243 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(5))) 7244 }() 7245 7246 // Copy as many min_block or larger stored blocks directly to next_out as 7247 // possible. If flushing, copy the remaining available input to next_out as 7248 // stored blocks, if there is enough space. 7249 var len uint32 7250 var left uint32 7251 var have uint32 7252 var last uint32 = uint32(0) 7253 var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 7254 for ok := true; ok; ok = (last == uint32(0)) { 7255 // Set len to the maximum size block that we can copy directly with the 7256 // available input data and output space. Set left to how much of that 7257 // would be copied from what's left in the window. 7258 len = uint32(MAX_STORED) // maximum deflate stored block length 7259 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 7260 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header 7261 break 7262 } 7263 // maximum stored block length that will fit in avail_out: 7264 have = ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have) 7265 left = (uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) // bytes left in window 7266 if Ulg(len) > (Ulg(left) + Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 7267 len = (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) 7268 } // limit len to the input 7269 if len > have { 7270 len = have 7271 } // limit len to the output 7272 7273 // If the stored block would be less than min_block in length, or if 7274 // unable to copy all of the available input when flushing, then try 7275 // copying to the window and the pending buffer instead. Also don't 7276 // write an empty block when flushing -- deflate() does that. 7277 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))) { 7278 break 7279 } 7280 7281 // Make a dummy stored block in pending to get the header bytes, 7282 // including any pending bits. This also updates the debugging counts. 7283 if (flush == Z_FINISH) && (len == (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 7284 last = uint32(1) 7285 } else { 7286 last = uint32(0) 7287 } 7288 X_tr_stored_block(tls, s, uintptr(0), uint32(0), int32(last)) 7289 7290 // Replace the lengths in the dummy stored block with len. 7291 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - Ulg(4))))) = Bytef(len) 7292 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - Ulg(3))))) = (Bytef(len >> 8)) 7293 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - Ulg(2))))) = Bytef(^len) 7294 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - Ulg(1))))) = (Bytef(^len >> 8)) 7295 7296 // Write the stored block header bytes. 7297 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7298 7299 // Copy uncompressed bytes from the window to next_out. 7300 if left != 0 { 7301 if left > len { 7302 left = len 7303 } 7304 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)), left) 7305 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 12 /* &.next_out */)) += (uintptr(left)) 7306 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16 /* &.avail_out */)) -= (left) 7307 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 20 /* &.total_out */)) += (ULong(left)) 7308 *(*int32)(unsafe.Pointer(s + 92 /* &.block_start */)) += int32((uint32(left))) 7309 len = len - (left) 7310 } 7311 7312 // Copy uncompressed bytes directly from next_in to next_out, updating 7313 // the check value. 7314 if len != 0 { 7315 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len) 7316 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 12 /* &.next_out */)) += (uintptr(len)) 7317 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16 /* &.avail_out */)) -= (len) 7318 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 20 /* &.total_out */)) += (ULong(len)) 7319 } 7320 } 7321 7322 // Update the sliding window with the last s->w_size bytes of the copied 7323 // data, or append all of the copied data to the existing window if less 7324 // than s->w_size bytes were copied. Also update the number of bytes to 7325 // insert in the hash tables, in the event that deflateParams() switches to 7326 // a non-zero compression level. 7327 used = used - ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) // number of input bytes directly copied 7328 if used != 0 { 7329 // If any input was used, then no unused input remains in the window, 7330 // therefore s->block_start == s->strstart. 7331 if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history 7332 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash 7333 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)), (*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7334 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7335 } else { 7336 if ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) <= Ulg(used) { 7337 // Slide the window down. 7338 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7339 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), (*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7340 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 7341 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 7342 } // add a pending slide_hash() 7343 } 7344 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)), used) 7345 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) += (used) 7346 } 7347 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7348 *(*UInt)(unsafe.Pointer(s + 5812 /* &.insert */)) += (func() uint32 { 7349 if (used) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) { 7350 return ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 7351 } 7352 return used 7353 }()) 7354 } 7355 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 7356 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7357 } 7358 7359 // If the last block was written to next_out, then done. 7360 if last != 0 { 7361 return Finish_done 7362 } 7363 7364 // If flushing and all input has been consumed, then done. 7365 if (((flush != Z_NO_FLUSH) && (flush != Z_FINISH)) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start) { 7366 return Block_done 7367 } 7368 7369 // Fill the window with any remaining input. 7370 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - Ulg(1))) 7371 if ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have) && ((*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int32((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 7372 // Slide the window down. 7373 *(*int32)(unsafe.Pointer(s + 92 /* &.block_start */)) -= int32((uint32((*Deflate_state)(unsafe.Pointer(s)).Fw_size))) 7374 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7375 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), (*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7376 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 7377 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 7378 } // add a pending slide_hash() 7379 have = have + ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) // more space now 7380 } 7381 if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 7382 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 7383 } 7384 if have != 0 { 7385 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), have) 7386 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) += (have) 7387 } 7388 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 7389 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7390 } 7391 7392 // There was not enough avail_out to write a complete worthy or flushed 7393 // stored block to next_out. Write a stored block to pending instead, if we 7394 // have enough input for a worthy block, or if flushing and there is enough 7395 // room for the remaining input as a stored block in the pending buffer. 7396 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 7397 // maximum stored block length that will fit in pending: 7398 have = func() uint32 { 7399 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) > (Ulg(MAX_STORED)) { 7400 return uint32(MAX_STORED) 7401 } 7402 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))) 7403 }() 7404 min_block = func() uint32 { 7405 if (have) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 7406 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7407 } 7408 return have 7409 }() 7410 left = (uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7411 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)) { 7412 len = func() uint32 { 7413 if (left) > (have) { 7414 return have 7415 } 7416 return left 7417 }() 7418 if ((flush == Z_FINISH) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (len == left) { 7419 last = uint32(1) 7420 } else { 7421 last = uint32(0) 7422 } 7423 X_tr_stored_block(tls, s, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint32(len), int32(last)) 7424 *(*int32)(unsafe.Pointer(s + 92 /* &.block_start */)) += int32((uint32(len))) 7425 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7426 } 7427 7428 // We've done all we can with the available input and output. 7429 if last != 0 { 7430 return Finish_started 7431 } 7432 return Need_more 7433 } 7434 7435 // =========================================================================== 7436 // Compress as much as possible from the input stream, return the current 7437 // block state. 7438 // This function does not perform lazy evaluation of matches and inserts 7439 // new strings in the dictionary only for unmatched strings or for short 7440 // matches. It is used only for the fast compression options. 7441 func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */ 7442 var hash_head IPos // head of the hash chain 7443 var bflush int32 // set if current block must be flushed 7444 7445 for { 7446 // Make sure that we always have enough lookahead, except 7447 // at the end of the input file. We need MAX_MATCH bytes 7448 // for the next match, plus MIN_MATCH bytes to insert the 7449 // string following the next match. 7450 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 7451 fill_window(tls, s) 7452 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 7453 return Need_more 7454 } 7455 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7456 break 7457 } // flush the current block 7458 } 7459 7460 // Insert the string window[strstart .. strstart+2] in the 7461 // dictionary, and set hash_head to the head of the hash chain: 7462 hash_head = IPos(NIL) 7463 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 7464 (*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) 7465 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)))) 7466 *(*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) 7467 } 7468 7469 // Find the longest match, discarding those <= prev_length. 7470 // At this point we have always match_length < MIN_MATCH 7471 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)))) { 7472 // To simplify the code, we prevent matches with the string 7473 // of window index 0 (in particular we have to avoid a match 7474 // of the string with itself at the start of the input file). 7475 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 7476 // longest_match() sets match_start 7477 } 7478 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 7479 7480 { 7481 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 7482 var dist Ush = (Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)) 7483 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7484 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7485 dist-- 7486 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7487 *(*Ush)(unsafe.Pointer((s + 2440 /* &.dyn_dtree */) + uintptr((func() int32 { 7488 if (int32(dist)) < 256 { 7489 return int32(X_dist_code[dist]) 7490 } 7491 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7492 }()))*4 /* &.fc */))++ 7493 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7494 } 7495 7496 *(*UInt)(unsafe.Pointer(s + 116 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7497 7498 // Insert new strings in the hash table only if the match length 7499 // is not too large. This saves time but degrades compression. 7500 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)) { 7501 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table 7502 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0)) { 7503 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7504 (*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) 7505 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)))) 7506 *(*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) 7507 // strstart never exceeds WSIZE-MAX_MATCH, so there are 7508 // always MIN_MATCH bytes ahead. 7509 } 7510 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7511 } else { 7512 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7513 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7514 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))) 7515 (*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) 7516 // If lookahead < MIN_MATCH, ins_h is garbage, but it does not 7517 // matter since it will be recomputed at next deflate call. 7518 } 7519 } else { 7520 // No match, output a literal byte 7521 7522 { 7523 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7524 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7525 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7526 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7527 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7528 } 7529 7530 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7531 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7532 } 7533 if bflush != 0 { 7534 { 7535 X_tr_flush_block(tls, s, func() uintptr { 7536 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7537 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7538 } 7539 return uintptr(Z_NULL) 7540 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7541 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7542 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7543 } 7544 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7545 if 0 != 0 { 7546 return Finish_started 7547 } 7548 return Need_more 7549 } 7550 } 7551 7552 } 7553 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 7554 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 7555 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 7556 } 7557 return (uint32(MIN_MATCH - 1)) 7558 }() 7559 if flush == Z_FINISH { 7560 { 7561 { 7562 X_tr_flush_block(tls, s, func() uintptr { 7563 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7564 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7565 } 7566 return uintptr(Z_NULL) 7567 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7568 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7569 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7570 } 7571 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7572 if 1 != 0 { 7573 return Finish_started 7574 } 7575 return Need_more 7576 } 7577 } 7578 7579 return Finish_done 7580 } 7581 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7582 { 7583 X_tr_flush_block(tls, s, func() uintptr { 7584 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7585 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7586 } 7587 return uintptr(Z_NULL) 7588 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7589 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7590 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7591 } 7592 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7593 if 0 != 0 { 7594 return Finish_started 7595 } 7596 return Need_more 7597 } 7598 } 7599 7600 return Block_done 7601 } 7602 7603 // =========================================================================== 7604 // Same as above, but achieves better compression. We use a lazy 7605 // evaluation for matches: a match is finally adopted only if there is 7606 // no better match at the next window position. 7607 func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */ 7608 var hash_head IPos // head of hash chain 7609 var bflush int32 // set if current block must be flushed 7610 7611 // Process the input block. 7612 for { 7613 // Make sure that we always have enough lookahead, except 7614 // at the end of the input file. We need MAX_MATCH bytes 7615 // for the next match, plus MIN_MATCH bytes to insert the 7616 // string following the next match. 7617 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 7618 fill_window(tls, s) 7619 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 7620 return Need_more 7621 } 7622 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7623 break 7624 } // flush the current block 7625 } 7626 7627 // Insert the string window[strstart .. strstart+2] in the 7628 // dictionary, and set hash_head to the head of the hash chain: 7629 hash_head = IPos(NIL) 7630 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 7631 (*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) 7632 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)))) 7633 *(*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) 7634 } 7635 7636 // Find the longest match, discarding those <= prev_length. 7637 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 7638 (*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start 7639 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7640 7641 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)))) { 7642 // To simplify the code, we prevent matches with the string 7643 // of window index 0 (in particular we have to avoid a match 7644 // of the string with itself at the start of the input file). 7645 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 7646 // longest_match() sets match_start 7647 7648 if ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5)) && (((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED) || 7649 (((*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)))) { 7650 7651 // If prev_match is also MIN_MATCH, match_start is garbage 7652 // but we will ignore the current match anyway. 7653 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7654 } 7655 } 7656 // If there was a match at the previous step and the current 7657 // match is not better, output the previous match: 7658 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) { 7659 var max_insert UInt = (((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) - UInt(MIN_MATCH)) 7660 // Do not insert strings in hash table beyond this. 7661 7662 { 7663 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))) 7664 var dist Ush = (Ush(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)) 7665 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7666 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7667 dist-- 7668 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7669 *(*Ush)(unsafe.Pointer((s + 2440 /* &.dyn_dtree */) + uintptr((func() int32 { 7670 if (int32(dist)) < 256 { 7671 return int32(X_dist_code[dist]) 7672 } 7673 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7674 }()))*4 /* &.fc */))++ 7675 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7676 } 7677 7678 // Insert in hash table all strings up to the end of the match. 7679 // strstart-1 and strstart are already inserted. If there is not 7680 // enough lookahead, the last two strings are not inserted in 7681 // the hash table. 7682 *(*UInt)(unsafe.Pointer(s + 116 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)) 7683 *(*UInt)(unsafe.Pointer(s + 120 /* &.prev_length */)) -= (UInt(2)) 7684 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0)) { 7685 if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert { 7686 (*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) 7687 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)))) 7688 *(*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) 7689 } 7690 } 7691 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7692 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7693 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7694 7695 if bflush != 0 { 7696 { 7697 X_tr_flush_block(tls, s, func() uintptr { 7698 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7699 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7700 } 7701 return uintptr(Z_NULL) 7702 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7703 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7704 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7705 } 7706 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7707 if 0 != 0 { 7708 return Finish_started 7709 } 7710 return Need_more 7711 } 7712 } 7713 7714 } else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 7715 // If there was no match at the previous position, output a 7716 // single literal. If there was a match but the current match 7717 // is longer, truncate the previous match to a single literal. 7718 7719 { 7720 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 7721 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7722 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7723 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7724 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7725 } 7726 7727 if bflush != 0 { 7728 { 7729 X_tr_flush_block(tls, s, func() uintptr { 7730 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7731 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7732 } 7733 return uintptr(Z_NULL) 7734 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7735 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7736 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7737 } 7738 7739 } 7740 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7741 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7742 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7743 return Need_more 7744 } 7745 } else { 7746 // There is no previous match to compare with, wait for 7747 // the next step to decide. 7748 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1 7749 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7750 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7751 } 7752 } 7753 7754 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 7755 7756 { 7757 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 7758 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7759 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7760 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7761 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7762 } 7763 7764 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7765 } 7766 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 7767 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 7768 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 7769 } 7770 return (uint32(MIN_MATCH - 1)) 7771 }() 7772 if flush == Z_FINISH { 7773 { 7774 { 7775 X_tr_flush_block(tls, s, func() uintptr { 7776 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7777 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7778 } 7779 return uintptr(Z_NULL) 7780 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7781 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7782 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7783 } 7784 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7785 if 1 != 0 { 7786 return Finish_started 7787 } 7788 return Need_more 7789 } 7790 } 7791 7792 return Finish_done 7793 } 7794 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7795 { 7796 X_tr_flush_block(tls, s, func() uintptr { 7797 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7798 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7799 } 7800 return uintptr(Z_NULL) 7801 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7802 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7803 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7804 } 7805 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7806 if 0 != 0 { 7807 return Finish_started 7808 } 7809 return Need_more 7810 } 7811 } 7812 7813 return Block_done 7814 } 7815 7816 // =========================================================================== 7817 // For Z_RLE, simply look for runs of bytes, generate matches only of distance 7818 // one. Do not maintain a hash table. (It will be regenerated if this run of 7819 // deflate switches away from Z_RLE.) 7820 func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */ 7821 var bflush int32 // set if current block must be flushed 7822 var prev UInt // byte at distance one to match 7823 var scan uintptr 7824 var strend uintptr // scan goes up to strend for length of run 7825 7826 for { 7827 // Make sure that we always have enough lookahead, except 7828 // at the end of the input file. We need MAX_MATCH bytes 7829 // for the longest run, plus one for the unrolled loop. 7830 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) { 7831 fill_window(tls, s) 7832 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH)) && (flush == Z_NO_FLUSH) { 7833 return Need_more 7834 } 7835 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7836 break 7837 } // flush the current block 7838 } 7839 7840 // See how many times the previous byte repeats 7841 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7842 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0)) { 7843 scan = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uintptr(1)) 7844 prev = UInt(*(*Bytef)(unsafe.Pointer(scan))) 7845 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))))) { 7846 strend = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 7847 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)) { 7848 } 7849 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MAX_MATCH) - (UInt((int32(strend) - int32(scan)) / 1))) 7850 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7851 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 7852 } 7853 } 7854 7855 } 7856 7857 // Emit match if have run of MIN_MATCH or longer, else emit literal 7858 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 7859 7860 { 7861 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 7862 var dist Ush = Ush(1) 7863 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7864 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7865 dist-- 7866 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7867 *(*Ush)(unsafe.Pointer((s + 2440 /* &.dyn_dtree */) + uintptr((func() int32 { 7868 if (int32(dist)) < 256 { 7869 return int32(X_dist_code[dist]) 7870 } 7871 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7872 }()))*4 /* &.fc */))++ 7873 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7874 } 7875 7876 *(*UInt)(unsafe.Pointer(s + 116 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7877 *(*UInt)(unsafe.Pointer(s + 108 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7878 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7879 } else { 7880 // No match, output a literal byte 7881 7882 { 7883 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7884 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7885 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7886 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7887 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7888 } 7889 7890 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7891 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7892 } 7893 if bflush != 0 { 7894 { 7895 X_tr_flush_block(tls, s, func() uintptr { 7896 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7897 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7898 } 7899 return uintptr(Z_NULL) 7900 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7901 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7902 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7903 } 7904 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7905 if 0 != 0 { 7906 return Finish_started 7907 } 7908 return Need_more 7909 } 7910 } 7911 7912 } 7913 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 7914 if flush == Z_FINISH { 7915 { 7916 { 7917 X_tr_flush_block(tls, s, func() uintptr { 7918 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7919 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7920 } 7921 return uintptr(Z_NULL) 7922 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7923 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7924 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7925 } 7926 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7927 if 1 != 0 { 7928 return Finish_started 7929 } 7930 return Need_more 7931 } 7932 } 7933 7934 return Finish_done 7935 } 7936 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7937 { 7938 X_tr_flush_block(tls, s, func() uintptr { 7939 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7940 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7941 } 7942 return uintptr(Z_NULL) 7943 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7944 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7945 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7946 } 7947 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7948 if 0 != 0 { 7949 return Finish_started 7950 } 7951 return Need_more 7952 } 7953 } 7954 7955 return Block_done 7956 } 7957 7958 // =========================================================================== 7959 // For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. 7960 // (It will be regenerated if this run of deflate switches away from Huffman.) 7961 func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */ 7962 var bflush int32 // set if current block must be flushed 7963 7964 for { 7965 // Make sure that we have a literal to write. 7966 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7967 fill_window(tls, s) 7968 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7969 if flush == Z_NO_FLUSH { 7970 return Need_more 7971 } 7972 break // flush the current block 7973 } 7974 } 7975 7976 // Output a literal byte 7977 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7978 7979 { 7980 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7981 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7982 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7983 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7984 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7985 } 7986 7987 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7988 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7989 if bflush != 0 { 7990 { 7991 X_tr_flush_block(tls, s, func() uintptr { 7992 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7993 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7994 } 7995 return uintptr(Z_NULL) 7996 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7997 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7998 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7999 } 8000 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8001 if 0 != 0 { 8002 return Finish_started 8003 } 8004 return Need_more 8005 } 8006 } 8007 8008 } 8009 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 8010 if flush == Z_FINISH { 8011 { 8012 { 8013 X_tr_flush_block(tls, s, func() uintptr { 8014 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8015 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8016 } 8017 return uintptr(Z_NULL) 8018 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 8019 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8020 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8021 } 8022 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8023 if 1 != 0 { 8024 return Finish_started 8025 } 8026 return Need_more 8027 } 8028 } 8029 8030 return Finish_done 8031 } 8032 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 8033 { 8034 X_tr_flush_block(tls, s, func() uintptr { 8035 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8036 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8037 } 8038 return uintptr(Z_NULL) 8039 }(), (Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 8040 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8041 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8042 } 8043 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8044 if 0 != 0 { 8045 return Finish_started 8046 } 8047 return Need_more 8048 } 8049 } 8050 8051 return Block_done 8052 } 8053 8054 // bits/types.h -- definitions of __*_t types underlying *_t types. 8055 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8056 // This file is part of the GNU C Library. 8057 // 8058 // The GNU C Library is free software; you can redistribute it and/or 8059 // modify it under the terms of the GNU Lesser General Public 8060 // License as published by the Free Software Foundation; either 8061 // version 2.1 of the License, or (at your option) any later version. 8062 // 8063 // The GNU C Library is distributed in the hope that it will be useful, 8064 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8065 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8066 // Lesser General Public License for more details. 8067 // 8068 // You should have received a copy of the GNU Lesser General Public 8069 // License along with the GNU C Library; if not, see 8070 // <https://www.gnu.org/licenses/>. 8071 8072 // Never include this file directly; use <sys/types.h> instead. 8073 8074 // Integral type unchanged by default argument promotions that can 8075 // hold any value corresponding to members of the extended character 8076 // set, as well as at least one value that does not correspond to any 8077 // member of the extended character set. 8078 8079 // Conversion state information. 8080 type X__mbstate_t = struct { 8081 F__count int32 8082 F__value struct{ F__wch uint32 } 8083 } /* __mbstate_t.h:21:3 */ 8084 8085 // The tag name of this struct is _G_fpos_t to preserve historic 8086 // C++ mangled names for functions taking fpos_t arguments. 8087 // That name should not be used in new code. 8088 type X_G_fpos_t = struct { 8089 F__pos X__off_t 8090 F__state X__mbstate_t 8091 } /* __fpos_t.h:10:9 */ 8092 8093 // The tag name of this struct is _G_fpos_t to preserve historic 8094 // C++ mangled names for functions taking fpos_t arguments. 8095 // That name should not be used in new code. 8096 type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ 8097 8098 // bits/types.h -- definitions of __*_t types underlying *_t types. 8099 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8100 // This file is part of the GNU C Library. 8101 // 8102 // The GNU C Library is free software; you can redistribute it and/or 8103 // modify it under the terms of the GNU Lesser General Public 8104 // License as published by the Free Software Foundation; either 8105 // version 2.1 of the License, or (at your option) any later version. 8106 // 8107 // The GNU C Library is distributed in the hope that it will be useful, 8108 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8109 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8110 // Lesser General Public License for more details. 8111 // 8112 // You should have received a copy of the GNU Lesser General Public 8113 // License along with the GNU C Library; if not, see 8114 // <https://www.gnu.org/licenses/>. 8115 8116 // Never include this file directly; use <sys/types.h> instead. 8117 8118 // The tag name of this struct is _G_fpos64_t to preserve historic 8119 // C++ mangled names for functions taking fpos_t and/or fpos64_t 8120 // arguments. That name should not be used in new code. 8121 type X_G_fpos64_t = struct { 8122 F__pos X__off64_t 8123 F__state X__mbstate_t 8124 } /* __fpos64_t.h:10:9 */ 8125 8126 // bits/types.h -- definitions of __*_t types underlying *_t types. 8127 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8128 // This file is part of the GNU C Library. 8129 // 8130 // The GNU C Library is free software; you can redistribute it and/or 8131 // modify it under the terms of the GNU Lesser General Public 8132 // License as published by the Free Software Foundation; either 8133 // version 2.1 of the License, or (at your option) any later version. 8134 // 8135 // The GNU C Library is distributed in the hope that it will be useful, 8136 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8137 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8138 // Lesser General Public License for more details. 8139 // 8140 // You should have received a copy of the GNU Lesser General Public 8141 // License along with the GNU C Library; if not, see 8142 // <https://www.gnu.org/licenses/>. 8143 8144 // Never include this file directly; use <sys/types.h> instead. 8145 8146 // The tag name of this struct is _G_fpos64_t to preserve historic 8147 // C++ mangled names for functions taking fpos_t and/or fpos64_t 8148 // arguments. That name should not be used in new code. 8149 type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ 8150 8151 type X_IO_FILE = struct { 8152 F_flags int32 8153 F_IO_read_ptr uintptr 8154 F_IO_read_end uintptr 8155 F_IO_read_base uintptr 8156 F_IO_write_base uintptr 8157 F_IO_write_ptr uintptr 8158 F_IO_write_end uintptr 8159 F_IO_buf_base uintptr 8160 F_IO_buf_end uintptr 8161 F_IO_save_base uintptr 8162 F_IO_backup_base uintptr 8163 F_IO_save_end uintptr 8164 F_markers uintptr 8165 F_chain uintptr 8166 F_fileno int32 8167 F_flags2 int32 8168 F_old_offset X__off_t 8169 F_cur_column uint16 8170 F_vtable_offset int8 8171 F_shortbuf [1]int8 8172 F_lock uintptr 8173 F_offset X__off64_t 8174 F_codecvt uintptr 8175 F_wide_data uintptr 8176 F_freeres_list uintptr 8177 F_freeres_buf uintptr 8178 F__pad5 Size_t 8179 F_mode int32 8180 F_unused2 [40]int8 8181 } /* __FILE.h:4:1 */ 8182 8183 type X__FILE = X_IO_FILE /* __FILE.h:5:25 */ 8184 8185 // The opaque type of streams. This is the definition used elsewhere. 8186 type FILE = X_IO_FILE /* FILE.h:7:25 */ 8187 8188 type Off_t1 = X__off_t /* stdio.h:63:17 */ 8189 8190 // The type of the second argument to `fgetpos' and `fsetpos'. 8191 type Fpos_t = X__fpos_t /* stdio.h:84:18 */ 8192 type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */ 8193 8194 type Ino_t1 = X__ino_t /* types.h:47:17 */ 8195 8196 // Types from the Large File Support interface. 8197 type Blkcnt_t1 = X__blkcnt_t /* types.h:192:20 */ // Type to count number of disk blocks. 8198 type Fsblkcnt_t1 = X__fsblkcnt_t /* types.h:196:22 */ // Type to count file system blocks. 8199 type Fsfilcnt_t1 = X__fsfilcnt_t /* types.h:200:22 */ 8200 8201 type Flock64 = struct { 8202 Fl_type int16 8203 Fl_whence int16 8204 Fl_start X__off64_t 8205 Fl_len X__off64_t 8206 Fl_pid X__pid_t 8207 } /* fcntl.h:50:1 */ 8208 8209 // Note stat64 has the same shape as stat for x86-64. 8210 type Stat64 = struct { 8211 Fst_dev X__dev_t 8212 F__pad1 uint32 8213 F__st_ino X__ino_t 8214 Fst_mode X__mode_t 8215 Fst_nlink X__nlink_t 8216 Fst_uid X__uid_t 8217 Fst_gid X__gid_t 8218 Fst_rdev X__dev_t 8219 F__pad2 uint32 8220 Fst_size X__off64_t 8221 Fst_blksize X__blksize_t 8222 Fst_blocks X__blkcnt64_t 8223 Fst_atim struct { 8224 Ftv_sec X__time_t 8225 Ftv_nsec X__syscall_slong_t 8226 } 8227 Fst_mtim struct { 8228 Ftv_sec X__time_t 8229 Ftv_nsec X__syscall_slong_t 8230 } 8231 Fst_ctim struct { 8232 Ftv_sec X__time_t 8233 Ftv_nsec X__syscall_slong_t 8234 } 8235 Fst_ino X__ino64_t 8236 } /* stat.h:119:1 */ 8237 8238 // provide prototypes for these when building zlib without LFS 8239 8240 // default memLevel 8241 8242 // default i/o buffer size -- double this for output when reading (this and 8243 // twice this must be able to fit in an unsigned type) 8244 8245 // gzip modes, also provide a little integrity check on the passed structure 8246 8247 // values for gz_state how 8248 8249 // internal gzip file state data structure 8250 type Gz_state = struct { 8251 Fx GzFile_s 8252 Fmode int32 8253 Ffd int32 8254 Fpath uintptr 8255 Fsize uint32 8256 Fwant uint32 8257 Fin uintptr 8258 Fout uintptr 8259 Fdirect int32 8260 Fhow int32 8261 Fstart Off64_t 8262 Feof int32 8263 Fpast int32 8264 Flevel int32 8265 Fstrategy int32 8266 Fskip Off64_t 8267 Fseek int32 8268 Ferr int32 8269 Fmsg uintptr 8270 Fstrm Z_stream 8271 } /* gzguts.h:201:3 */ 8272 type Gz_statep = uintptr /* gzguts.h:202:22 */ 8273 8274 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 8275 // value -- needed when comparing unsigned to z_off64_t, which is signed 8276 // (possible z_off64_t types off_t, off64_t, and long are all signed) 8277 8278 // gzclose() is in a separate file so that it is linked in only if it is used. 8279 // That way the other gzclose functions can be used instead to avoid linking in 8280 // unneeded compression or decompression routines. 8281 func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */ 8282 var state Gz_statep 8283 8284 if file == (uintptr(0)) { 8285 return -2 8286 } 8287 state = file 8288 8289 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8290 return Xgzclose_r(tls, file) 8291 } 8292 return Xgzclose_w(tls, file) 8293 } 8294 8295 // Reset gzip file state 8296 func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */ 8297 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) // no output data available 8298 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ... 8299 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 // not at end of file 8300 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 // have not read past end yet 8301 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header 8302 } 8303 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 // no seek request pending 8304 Xgz_error(tls, state, Z_OK, uintptr(0)) // clear error 8305 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0) // no uncompressed data yet 8306 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet 8307 } 8308 8309 // Open a gzip file either by name or file descriptor. 8310 func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */ 8311 bp := tls.Alloc(16) 8312 defer tls.Free(16) 8313 8314 var state Gz_statep 8315 var len Z_size_t 8316 var oflag int32 8317 var cloexec int32 = 0 8318 var exclusive int32 = 0 8319 8320 // check input 8321 if path == (uintptr(0)) { 8322 return uintptr(0) 8323 } 8324 8325 // allocate gzFile structure to return 8326 state = libc.Xmalloc(tls, uint32(unsafe.Sizeof(Gz_state{}))) 8327 if state == (uintptr(0)) { 8328 return uintptr(0) 8329 } 8330 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) // no buffers allocated yet 8331 (*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size 8332 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) // no error message yet 8333 8334 // interpret mode 8335 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE 8336 (*Gz_state)(unsafe.Pointer(state)).Flevel = -1 8337 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY 8338 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 8339 for *(*int8)(unsafe.Pointer(mode)) != 0 { 8340 if (int32(*(*int8)(unsafe.Pointer(mode))) >= '0') && (int32(*(*int8)(unsafe.Pointer(mode))) <= '9') { 8341 (*Gz_state)(unsafe.Pointer(state)).Flevel = (int32(*(*int8)(unsafe.Pointer(mode))) - '0') 8342 } else { 8343 switch int32(*(*int8)(unsafe.Pointer(mode))) { 8344 case 'r': 8345 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ 8346 break 8347 fallthrough 8348 case 'w': 8349 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE 8350 break 8351 fallthrough 8352 case 'a': 8353 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND 8354 break 8355 fallthrough 8356 case '+': // can't read and write at the same time 8357 libc.Xfree(tls, state) 8358 return uintptr(0) 8359 fallthrough 8360 case 'b': // ignore -- will request binary anyway 8361 break 8362 fallthrough 8363 case 'e': 8364 cloexec = 1 8365 break 8366 fallthrough 8367 case 'x': 8368 exclusive = 1 8369 break 8370 fallthrough 8371 case 'f': 8372 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED 8373 break 8374 fallthrough 8375 case 'h': 8376 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY 8377 break 8378 fallthrough 8379 case 'R': 8380 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE 8381 break 8382 fallthrough 8383 case 'F': 8384 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED 8385 break 8386 fallthrough 8387 case 'T': 8388 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 8389 break 8390 fallthrough 8391 default: // could consider as an error, but just ignore 8392 8393 } 8394 } 8395 mode++ 8396 } 8397 8398 // must provide an "r", "w", or "a" 8399 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE { 8400 libc.Xfree(tls, state) 8401 return uintptr(0) 8402 } 8403 8404 // can't force transparent read 8405 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8406 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 8407 libc.Xfree(tls, state) 8408 return uintptr(0) 8409 } 8410 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file 8411 } 8412 8413 // save the path name for error messages 8414 len = libc.Xstrlen(tls, path) 8415 (*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, (len + Z_size_t(1))) 8416 if (*Gz_state)(unsafe.Pointer(state)).Fpath == (uintptr(0)) { 8417 libc.Xfree(tls, state) 8418 return uintptr(0) 8419 } 8420 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, (len + Z_size_t(1)), ts+76 /* "%s" */, libc.VaList(bp, path)) 8421 8422 // compute the flags for open() 8423 oflag = ((0100000 | (func() int32 { 8424 if cloexec != 0 { 8425 return 02000000 8426 } 8427 return 0 8428 }())) | (func() int32 { 8429 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8430 return O_RDONLY 8431 } 8432 return (((O_WRONLY | O_CREAT) | (func() int32 { 8433 if exclusive != 0 { 8434 return O_EXCL 8435 } 8436 return 0 8437 }())) | (func() int32 { 8438 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE { 8439 return O_TRUNC 8440 } 8441 return O_APPEND 8442 }())) 8443 }())) 8444 8445 // open the file with the appropriate flags (or just use fd) 8446 (*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 { 8447 if fd > -1 { 8448 return fd 8449 } 8450 return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666)) 8451 }() 8452 if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 { 8453 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 8454 libc.Xfree(tls, state) 8455 return uintptr(0) 8456 } 8457 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND { 8458 libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct 8459 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE // simplify later checks 8460 } 8461 8462 // save the current position for rewinding (only if reading) 8463 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8464 (*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 8465 if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) { 8466 (*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0) 8467 } 8468 } 8469 8470 // initialize stream 8471 gz_reset(tls, state) 8472 8473 // return stream 8474 return state 8475 } 8476 8477 // -- see zlib.h -- 8478 func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */ 8479 return gz_open(tls, path, -1, mode) 8480 } 8481 8482 // -- see zlib.h -- 8483 func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */ 8484 return gz_open(tls, path, -1, mode) 8485 } 8486 8487 // -- see zlib.h -- 8488 func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */ 8489 bp := tls.Alloc(8) 8490 defer tls.Free(8) 8491 8492 var path uintptr // identifier for error messages 8493 var gz GzFile 8494 8495 if (fd == -1) || ((libc.AssignUintptr(&path, libc.Xmalloc(tls, (uint32(7)+(uint32(3)*uint32(unsafe.Sizeof(int32(0)))))))) == (uintptr(0))) { 8496 return uintptr(0) 8497 } 8498 libc.Xsnprintf(tls, path, (uint32(7) + (uint32(3) * uint32(unsafe.Sizeof(int32(0))))), ts+79 /* "<fd:%d>" */, libc.VaList(bp, fd)) 8499 gz = gz_open(tls, path, fd, mode) 8500 libc.Xfree(tls, path) 8501 return gz 8502 } 8503 8504 // -- see zlib.h -- 8505 8506 // -- see zlib.h -- 8507 func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */ 8508 var state Gz_statep 8509 8510 // get internal structure and check integrity 8511 if file == (uintptr(0)) { 8512 return -1 8513 } 8514 state = file 8515 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8516 return -1 8517 } 8518 8519 // make sure we haven't already allocated memory 8520 if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { 8521 return -1 8522 } 8523 8524 // check and set requested size 8525 if (size << 1) < size { 8526 return -1 8527 } // need to be able to double it 8528 if size < uint32(2) { 8529 size = uint32(2) 8530 } // need two bytes to check magic header 8531 (*Gz_state)(unsafe.Pointer(state)).Fwant = size 8532 return 0 8533 } 8534 8535 // -- see zlib.h -- 8536 func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */ 8537 var state Gz_statep 8538 8539 // get internal structure 8540 if file == (uintptr(0)) { 8541 return -1 8542 } 8543 state = file 8544 8545 // check that we're reading and that there's no error 8546 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8547 return -1 8548 } 8549 8550 // back up and start over 8551 if libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) { 8552 return -1 8553 } 8554 gz_reset(tls, state) 8555 return 0 8556 } 8557 8558 // -- see zlib.h -- 8559 func Xgzseek64(tls *libc.TLS, file GzFile, offset Off64_t, whence int32) Off64_t { /* gzlib.c:366:19: */ 8560 var n uint32 8561 var ret Off64_t 8562 var state Gz_statep 8563 8564 // get internal structure and check integrity 8565 if file == (uintptr(0)) { 8566 return int64(-1) 8567 } 8568 state = file 8569 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8570 return int64(-1) 8571 } 8572 8573 // check that there's no error 8574 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 8575 return int64(-1) 8576 } 8577 8578 // can only seek from start or relative to current position 8579 if (whence != SEEK_SET) && (whence != SEEK_CUR) { 8580 return int64(-1) 8581 } 8582 8583 // normalize offset to a SEEK_CUR specification 8584 if whence == SEEK_SET { 8585 offset = offset - ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 8586 } else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8587 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fskip) 8588 } 8589 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8590 8591 // if within raw area while reading, just go there 8592 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)) { 8593 ret = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (offset - Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)), SEEK_CUR) 8594 if ret == int64(-1) { 8595 return int64(-1) 8596 } 8597 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 8598 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 8599 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 8600 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8601 Xgz_error(tls, state, Z_OK, uintptr(0)) 8602 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 8603 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (offset) 8604 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 8605 } 8606 8607 // calculate skip amount, rewinding if needed for back seek when reading 8608 if offset < int64(0) { 8609 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards 8610 return int64(-1) 8611 } 8612 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 8613 if offset < int64(0) { // before start of file! 8614 return int64(-1) 8615 } 8616 if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset 8617 return int64(-1) 8618 } 8619 } 8620 8621 // if reading, skip what's in output buffer (one less gzgetc() check) 8622 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8623 if ((uint32(unsafe.Sizeof(int32(0))) == uint32(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset) { 8624 n = uint32(offset) 8625 } else { 8626 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8627 } 8628 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 8629 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 4 /* &.next */)) += (uintptr(n)) 8630 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(n)) 8631 offset = offset - (Off64_t(n)) 8632 } 8633 8634 // request skip (if not zero) 8635 if offset != 0 { 8636 (*Gz_state)(unsafe.Pointer(state)).Fseek = 1 8637 (*Gz_state)(unsafe.Pointer(state)).Fskip = offset 8638 } 8639 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset) 8640 } 8641 8642 // -- see zlib.h -- 8643 func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t1, whence int32) Off_t1 { /* gzlib.c:443:17: */ 8644 var ret Off64_t 8645 8646 ret = Xgzseek64(tls, file, Off64_t(offset), whence) 8647 if ret == Off64_t(Off_t1(ret)) { 8648 return Off_t1(ret) 8649 } 8650 return -1 8651 } 8652 8653 // -- see zlib.h -- 8654 func Xgztell64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:455:19: */ 8655 var state Gz_statep 8656 8657 // get internal structure and check integrity 8658 if file == (uintptr(0)) { 8659 return int64(-1) 8660 } 8661 state = file 8662 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8663 return int64(-1) 8664 } 8665 8666 // return position 8667 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + (func() int64 { 8668 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8669 return (*Gz_state)(unsafe.Pointer(state)).Fskip 8670 } 8671 return int64(0) 8672 }())) 8673 } 8674 8675 // -- see zlib.h -- 8676 func Xgztell(tls *libc.TLS, file GzFile) Off_t1 { /* gzlib.c:472:17: */ 8677 var ret Off64_t 8678 8679 ret = Xgztell64(tls, file) 8680 if ret == Off64_t(Off_t1(ret)) { 8681 return Off_t1(ret) 8682 } 8683 return -1 8684 } 8685 8686 // -- see zlib.h -- 8687 func Xgzoffset64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:482:19: */ 8688 var offset Off64_t 8689 var state Gz_statep 8690 8691 // get internal structure and check integrity 8692 if file == (uintptr(0)) { 8693 return int64(-1) 8694 } 8695 state = file 8696 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8697 return int64(-1) 8698 } 8699 8700 // compute and return effective offset in file 8701 offset = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 8702 if offset == int64(-1) { 8703 return int64(-1) 8704 } 8705 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading 8706 offset = offset - (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) 8707 } // don't count buffered input 8708 return offset 8709 } 8710 8711 // -- see zlib.h -- 8712 func Xgzoffset(tls *libc.TLS, file GzFile) Off_t1 { /* gzlib.c:505:17: */ 8713 var ret Off64_t 8714 8715 ret = Xgzoffset64(tls, file) 8716 if ret == Off64_t(Off_t1(ret)) { 8717 return Off_t1(ret) 8718 } 8719 return -1 8720 } 8721 8722 // -- see zlib.h -- 8723 func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */ 8724 var state Gz_statep 8725 8726 // get internal structure and check integrity 8727 if file == (uintptr(0)) { 8728 return 0 8729 } 8730 state = file 8731 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8732 return 0 8733 } 8734 8735 // return end-of-file state 8736 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8737 return (*Gz_state)(unsafe.Pointer(state)).Fpast 8738 } 8739 return 0 8740 } 8741 8742 // -- see zlib.h -- 8743 func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */ 8744 var state Gz_statep 8745 8746 // get internal structure and check integrity 8747 if file == (uintptr(0)) { 8748 return uintptr(0) 8749 } 8750 state = file 8751 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8752 return uintptr(0) 8753 } 8754 8755 // return error information 8756 if errnum != (uintptr(0)) { 8757 *(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr 8758 } 8759 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-4) { 8760 return ts + 87 /* "out of memory" */ 8761 } 8762 return func() uintptr { 8763 if (*Gz_state)(unsafe.Pointer(state)).Fmsg == (uintptr(0)) { 8764 return ts + 101 /* "" */ 8765 } 8766 return (*Gz_state)(unsafe.Pointer(state)).Fmsg 8767 }() 8768 } 8769 8770 // -- see zlib.h -- 8771 func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */ 8772 var state Gz_statep 8773 8774 // get internal structure and check integrity 8775 if file == (uintptr(0)) { 8776 return 8777 } 8778 state = file 8779 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8780 return 8781 } 8782 8783 // clear error and end-of-file 8784 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8785 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 8786 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 8787 } 8788 Xgz_error(tls, state, Z_OK, uintptr(0)) 8789 } 8790 8791 // Create an error message in allocated memory and set state->err and 8792 // state->msg accordingly. Free any previous error message already there. Do 8793 // not try to free or allocate space if the error is Z_MEM_ERROR (out of 8794 // memory). Simply save the error message as a static string. If there is an 8795 // allocation failure constructing the error message, then convert the error to 8796 // out of memory. 8797 func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */ 8798 bp := tls.Alloc(24) 8799 defer tls.Free(24) 8800 8801 // free previously allocated message and clear 8802 if (*Gz_state)(unsafe.Pointer(state)).Fmsg != (uintptr(0)) { 8803 if (*Gz_state)(unsafe.Pointer(state)).Ferr != (-4) { 8804 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg) 8805 } 8806 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) 8807 } 8808 8809 // if fatal, set state->x.have to 0 so that the gzgetc() macro fails 8810 if (err != Z_OK) && (err != (-5)) { 8811 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 8812 } 8813 8814 // set error code, and if no message, then done 8815 (*Gz_state)(unsafe.Pointer(state)).Ferr = err 8816 if msg == (uintptr(0)) { 8817 return 8818 } 8819 8820 // for an out of memory error, return literal string when requested 8821 if err == (-4) { 8822 return 8823 } 8824 8825 // construct error message with path 8826 if (libc.AssignPtrUintptr(state+92 /* &.msg */, libc.Xmalloc(tls, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg))+Size_t(3))))) == (uintptr(0)) { 8827 (*Gz_state)(unsafe.Pointer(state)).Ferr = -4 8828 return 8829 } 8830 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) + libc.Xstrlen(tls, msg)) + Size_t(3)), 8831 ts+102 /* "%s%s%s" */, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109 /* ": " */, msg)) 8832 } 8833 8834 // Use read() to load a buffer -- return -1 on error, otherwise 0. Read from 8835 // state->fd, and update state->eof, state->err, and state->msg as appropriate. 8836 // This function needs to loop on read(), since read() is not guaranteed to 8837 // read the number of bytes requested, depending on the type of descriptor. 8838 func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */ 8839 var ret int32 8840 var get uint32 8841 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 8842 8843 *(*uint32)(unsafe.Pointer(have)) = uint32(0) 8844 for ok := true; ok; ok = (*(*uint32)(unsafe.Pointer(have)) < len) { 8845 get = (len - *(*uint32)(unsafe.Pointer(have))) 8846 if get > max { 8847 get = max 8848 } 8849 ret = libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (buf + uintptr(*(*uint32)(unsafe.Pointer(have)))), get) 8850 if ret <= 0 { 8851 break 8852 } 8853 *(*uint32)(unsafe.Pointer(have)) += (uint32(ret)) 8854 } 8855 if ret < 0 { 8856 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 8857 return -1 8858 } 8859 if ret == 0 { 8860 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 8861 } 8862 return 0 8863 } 8864 8865 // Load up input buffer and set eof flag if last data loaded -- return -1 on 8866 // error, 0 otherwise. Note that the eof flag is set when the end of the input 8867 // file is reached, even though there may be unused data in the buffer. Once 8868 // that data has been used, no more attempts will be made to read the file. 8869 // If strm->avail_in != 0, then the current data is moved to the beginning of 8870 // the input buffer, and then the remainder of the buffer is loaded with the 8871 // available data from the input file. 8872 func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */ 8873 bp := tls.Alloc(4) 8874 defer tls.Free(4) 8875 8876 // var got uint32 at bp, 4 8877 8878 var strm Z_streamp = (state + 96 /* &.strm */) 8879 8880 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 8881 return -1 8882 } 8883 if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 { 8884 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start 8885 var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin 8886 var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 8887 var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 8888 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 8889 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) 8890 } 8891 } 8892 if gz_load(tls, state, ((*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)), 8893 ((*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in), bp /* &got */) == -1 { 8894 return -1 8895 } 8896 *(*UInt)(unsafe.Pointer(strm + 4 /* &.avail_in */)) += (*(*uint32)(unsafe.Pointer(bp /* got */))) 8897 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8898 } 8899 return 0 8900 } 8901 8902 // Look for gzip header, set up for inflate or copy. state->x.have must be 0. 8903 // If this is the first time in, allocate required memory. state->how will be 8904 // left unchanged if there is no more input data available, will be set to COPY 8905 // if there is no gzip header and direct copying will be performed, or it will 8906 // be set to GZIP for decompression. If direct copying, then leftover input 8907 // data from the input buffer will be copied to the output buffer. In that 8908 // case, all further file reads will be directly to either the output buffer or 8909 // a user buffer. If decompressing, the inflate state will be initialized. 8910 // gz_look() will return 0 on success or -1 on failure. 8911 func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */ 8912 var strm Z_streamp = (state + 96 /* &.strm */) 8913 8914 // allocate read buffers and inflate memory 8915 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { 8916 // allocate buffers 8917 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant) 8918 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, ((*Gz_state)(unsafe.Pointer(state)).Fwant << 1)) 8919 if ((*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0))) || ((*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0))) { 8920 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 8921 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 8922 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 8923 return -1 8924 } 8925 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 8926 8927 // allocate inflate memory 8928 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL) 8929 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL) 8930 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL) 8931 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 8932 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL) 8933 if (XinflateInit2_(tls, (state+96 /* &.strm */), (15+16), ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) { // gunzip 8934 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 8935 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 8936 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) 8937 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 8938 return -1 8939 } 8940 } 8941 8942 // get at least the magic bytes in the input buffer 8943 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) { 8944 if gz_avail(tls, state) == -1 { 8945 return -1 8946 } 8947 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 8948 return 0 8949 } 8950 } 8951 8952 // look for gzip magic bytes -- if there, do gzip decoding (note: there is 8953 // a logical dilemma here when considering the case of a partially written 8954 // gzip file, to wit, if a single 31 byte is written, then we cannot tell 8955 // whether this is a single-byte file, or just a partially written gzip 8956 // file -- for here we assume that if a gzip file is being written, then 8957 // the header will be written in a single operation, so that reading a 8958 // single byte is sufficient indication that it is not a gzip file) 8959 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) { 8960 XinflateReset(tls, strm) 8961 (*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2 8962 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 8963 return 0 8964 } 8965 8966 // no gzip header -- if we were decoding gzip before, then this is trailing 8967 // garbage. Ignore the trailing garbage and finish. 8968 if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 { 8969 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 8970 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 8971 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 8972 return 0 8973 } 8974 8975 // doing raw i/o, copy any leftover input to output -- this assumes that 8976 // the output buffer is larger than the input buffer, which also assures 8977 // space for gzungetc() 8978 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 8979 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 8980 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 8981 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 8982 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 8983 } 8984 (*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1 8985 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 8986 return 0 8987 } 8988 8989 // Decompress from input to the provided next_out and avail_out in the state. 8990 // On return, state->x.have and state->x.next point to the just decompressed 8991 // data. If the gzip stream completes, state->how is reset to LOOK to look for 8992 // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 8993 // on success, -1 on failure. 8994 func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */ 8995 var ret int32 = Z_OK 8996 var had uint32 8997 var strm Z_streamp = (state + 96 /* &.strm */) 8998 8999 // fill output buffer up to end of deflate stream 9000 had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9001 for ok := true; ok; ok = (((*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0) && (ret != Z_STREAM_END)) { 9002 // get more input for inflate() 9003 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && (gz_avail(tls, state) == -1) { 9004 return -1 9005 } 9006 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9007 Xgz_error(tls, state, -5, ts+112 /* "unexpected end o..." */) 9008 break 9009 } 9010 9011 // decompress and handle errors 9012 ret = Xinflate(tls, strm, Z_NO_FLUSH) 9013 if (ret == (-2)) || (ret == Z_NEED_DICT) { 9014 Xgz_error(tls, state, -2, 9015 ts+135 /* "internal error: ..." */) 9016 return -1 9017 } 9018 if ret == (-4) { 9019 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9020 return -1 9021 } 9022 if ret == (-3) { // deflate stream invalid 9023 Xgz_error(tls, state, -3, 9024 func() uintptr { 9025 if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == (uintptr(0)) { 9026 return ts + 174 /* "compressed data ..." */ 9027 } 9028 return (*Z_stream)(unsafe.Pointer(strm)).Fmsg 9029 }()) 9030 return -1 9031 } 9032 } 9033 9034 // update available output 9035 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out) 9036 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 9037 9038 // if the gzip stream completed successfully, look for another 9039 if ret == Z_STREAM_END { 9040 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK 9041 } 9042 9043 // good decompression 9044 return 0 9045 } 9046 9047 // Fetch data and put it in the output buffer. Assumes state->x.have is 0. 9048 // Data is either copied from the input file or decompressed from the input 9049 // file depending on state->how. If state->how is LOOK, then a gzip header is 9050 // looked for to determine whether to copy or decompress. Returns -1 on error, 9051 // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the 9052 // end of the input file has been reached and all data has been processed. 9053 func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */ 9054 var strm Z_streamp = (state + 96 /* &.strm */) 9055 9056 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))) { 9057 switch (*Gz_state)(unsafe.Pointer(state)).Fhow { 9058 case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP 9059 if gz_look(tls, state) == -1 { 9060 return -1 9061 } 9062 if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK { 9063 return 0 9064 } 9065 break 9066 case COPY1: // -> COPY 9067 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, ((*Gz_state)(unsafe.Pointer(state)).Fsize<<1), (state /* &.x */ /* &.have */)) == 9068 -1 { 9069 return -1 9070 } 9071 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9072 return 0 9073 case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream) 9074 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) 9075 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9076 if gz_decomp(tls, state) == -1 { 9077 return -1 9078 } 9079 } 9080 } 9081 return 0 9082 } 9083 9084 // Skip len uncompressed bytes of output. Return -1 on error, 0 on success. 9085 func gz_skip(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzread.c:259:11: */ 9086 var n uint32 9087 9088 // skip over len bytes or reach end-of-file, whichever comes first 9089 for len != 0 { 9090 // skip over whatever is in output buffer 9091 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9092 if ((uint32(unsafe.Sizeof(int32(0))) == uint32(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len) { 9093 n = uint32(len) 9094 } else { 9095 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9096 } 9097 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 9098 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 4 /* &.next */)) += (uintptr(n)) 9099 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(n)) 9100 len = len - (Off64_t(n)) 9101 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 9102 break 9103 } else { 9104 // get more output, looking for header if required 9105 if gz_fetch(tls, state) == -1 { 9106 return -1 9107 } 9108 } 9109 } 9110 return 0 9111 } 9112 9113 // Read len bytes into buf from file, or less than len up to the end of the 9114 // input. Return the number of bytes read. If zero is returned, either the 9115 // end of file was reached, or there was an error. state->err must be 9116 // consulted in that case to determine which. 9117 func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */ 9118 bp := tls.Alloc(4) 9119 defer tls.Free(4) 9120 9121 var got Z_size_t 9122 // var n uint32 at bp, 4 9123 9124 // if len is zero, avoid unnecessary operations 9125 if len == Z_size_t(0) { 9126 return Z_size_t(0) 9127 } 9128 9129 // process a skip request 9130 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9131 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9132 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9133 return Z_size_t(0) 9134 } 9135 } 9136 9137 // get len bytes to buf, or less than len if at the end 9138 got = Z_size_t(0) 9139 for ok := true; ok; ok = len != 0 { 9140 // set n to the maximum amount of len that fits in an unsigned int 9141 *(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1) 9142 if *(*uint32)(unsafe.Pointer(bp /* n */)) > len { 9143 *(*uint32)(unsafe.Pointer(bp /* n */)) = len 9144 } 9145 9146 // first just try copying data from the output buffer 9147 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9148 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp /* n */)) { 9149 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9150 } 9151 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, *(*uint32)(unsafe.Pointer(bp /* n */))) 9152 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 4 /* &.next */)) += (uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9153 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (*(*uint32)(unsafe.Pointer(bp /* n */))) 9154 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 9155 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end 9156 break 9157 } else if ((*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK) || (*(*uint32)(unsafe.Pointer(bp /* n */)) < ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)) { 9158 // get more output, looking for header if required 9159 if gz_fetch(tls, state) == -1 { 9160 return Z_size_t(0) 9161 } 9162 continue // no progress yet -- go back to copy above 9163 // the copy above assures that we will leave with space in the 9164 // output buffer, allowing at least one gzungetc() to succeed 9165 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly 9166 if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp /* n */)), bp /* &n */) == -1 { 9167 return Z_size_t(0) 9168 } 9169 } else { // state->how == GZIP 9170 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */)) 9171 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf 9172 if gz_decomp(tls, state) == -1 { 9173 return Z_size_t(0) 9174 } 9175 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9176 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9177 } 9178 9179 // update progress 9180 len = len - (*(*uint32)(unsafe.Pointer(bp /* n */))) 9181 buf = (buf + uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9182 got = got + (*(*uint32)(unsafe.Pointer(bp /* n */))) 9183 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9184 } 9185 9186 // return number of bytes read into user buffer 9187 return got 9188 } 9189 9190 // -- see zlib.h -- 9191 func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */ 9192 var state Gz_statep 9193 9194 // get internal structure 9195 if file == (uintptr(0)) { 9196 return -1 9197 } 9198 state = file 9199 9200 // check that we're reading and that there's no (serious) error 9201 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9202 return -1 9203 } 9204 9205 // since an int is returned, make sure len fits in one, otherwise return 9206 // with an error (this avoids a flaw in the interface) 9207 if int32(len) < 0 { 9208 Xgz_error(tls, state, -2, ts+196 /* "request does not..." */) 9209 return -1 9210 } 9211 9212 // read len or fewer bytes to buf 9213 len = gz_read(tls, state, buf, len) 9214 9215 // check for an error 9216 if ((len == uint32(0)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 9217 return -1 9218 } 9219 9220 // return the number of bytes read (this is assured to fit in an int) 9221 return int32(len) 9222 } 9223 9224 // -- see zlib.h -- 9225 func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */ 9226 var len Z_size_t 9227 var state Gz_statep 9228 9229 // get internal structure 9230 if file == (uintptr(0)) { 9231 return Z_size_t(0) 9232 } 9233 state = file 9234 9235 // check that we're reading and that there's no (serious) error 9236 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9237 return Z_size_t(0) 9238 } 9239 9240 // compute bytes to read -- error on overflow 9241 len = (nitems * size) 9242 if (size != 0) && ((len / size) != nitems) { 9243 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 9244 return Z_size_t(0) 9245 } 9246 9247 // read len or fewer bytes to buf, return the number of full items read 9248 if len != 0 { 9249 return (gz_read(tls, state, buf, len) / size) 9250 } 9251 return uint32(0) 9252 } 9253 9254 // -- see zlib.h -- 9255 func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */ 9256 bp := tls.Alloc(1) 9257 defer tls.Free(1) 9258 9259 var ret int32 9260 // var buf [1]uint8 at bp, 1 9261 9262 var state Gz_statep 9263 9264 // get internal structure 9265 if file == (uintptr(0)) { 9266 return -1 9267 } 9268 state = file 9269 9270 // check that we're reading and that there's no (serious) error 9271 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9272 return -1 9273 } 9274 9275 // try output buffer (no need to check for skip request) 9276 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9277 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave-- 9278 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 9279 return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext), 1)))) 9280 } 9281 9282 // nothing there -- try gz_read() 9283 ret = int32(gz_read(tls, state, bp /* &buf[0] */, uint32(1))) 9284 if ret < 1 { 9285 return -1 9286 } 9287 return int32(*(*uint8)(unsafe.Pointer(bp /* &buf[0] */))) 9288 } 9289 9290 func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */ 9291 return Xgzgetc(tls, file) 9292 } 9293 9294 // -- see zlib.h -- 9295 func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */ 9296 var state Gz_statep 9297 9298 // get internal structure 9299 if file == (uintptr(0)) { 9300 return -1 9301 } 9302 state = file 9303 9304 // check that we're reading and that there's no (serious) error 9305 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9306 return -1 9307 } 9308 9309 // process a skip request 9310 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9311 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9312 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9313 return -1 9314 } 9315 } 9316 9317 // can't push EOF 9318 if c < 0 { 9319 return -1 9320 } 9321 9322 // if output buffer empty, put byte at end (allows more pushing) 9323 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 9324 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) 9325 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) - uintptr(1)) 9326 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 9327 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 9328 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9329 return c 9330 } 9331 9332 // if no room, give up (must have already done a gzungetc()) 9333 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) { 9334 Xgz_error(tls, state, -3, ts+260 /* "out of room to p..." */) 9335 return -1 9336 } 9337 9338 // slide output data if needed and insert byte before existing data 9339 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout { 9340 var src uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 9341 var dest uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) 9342 for src > (*Gz_state)(unsafe.Pointer(state)).Fout { 9343 *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1))) 9344 } 9345 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest 9346 } 9347 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++ 9348 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext-- 9349 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 9350 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 9351 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9352 return c 9353 } 9354 9355 // -- see zlib.h -- 9356 func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */ 9357 var left uint32 9358 var n uint32 9359 var str uintptr 9360 var eol uintptr 9361 var state Gz_statep 9362 9363 // check parameters and get internal structure 9364 if ((file == (uintptr(0))) || (buf == (uintptr(0)))) || (len < 1) { 9365 return uintptr(0) 9366 } 9367 state = file 9368 9369 // check that we're reading and that there's no (serious) error 9370 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9371 return uintptr(0) 9372 } 9373 9374 // process a skip request 9375 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9376 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9377 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9378 return uintptr(0) 9379 } 9380 } 9381 9382 // copy output bytes up to new line or len - 1, whichever comes first -- 9383 // append a terminating zero to the string (we don't check for a zero in 9384 // the contents, let the user worry about that) 9385 str = buf 9386 left = (uint32(len) - uint32(1)) 9387 if left != 0 { 9388 for ok := true; ok; ok = ((left != 0) && (eol == (uintptr(0)))) { 9389 // assure that something is in the output buffer 9390 if ((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0)) && (gz_fetch(tls, state) == -1) { 9391 return uintptr(0) 9392 } // error 9393 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file 9394 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end 9395 break // return what we have 9396 } 9397 9398 // look for end-of-line in current output buffer 9399 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left { 9400 n = left 9401 } else { 9402 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9403 } 9404 eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', n) 9405 if eol != (uintptr(0)) { 9406 n = ((uint32((int32(eol) - int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) + uint32(1)) 9407 } 9408 9409 // copy through end-of-line, or remainder if not found 9410 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, n) 9411 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 9412 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 4 /* &.next */)) += (uintptr(n)) 9413 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(n)) 9414 left = left - (n) 9415 buf += uintptr(n) 9416 } 9417 } 9418 9419 // return terminated string, or if nothing, end of file 9420 if buf == str { 9421 return uintptr(0) 9422 } 9423 *(*int8)(unsafe.Pointer(buf)) = int8(0) 9424 return str 9425 } 9426 9427 // -- see zlib.h -- 9428 func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */ 9429 var state Gz_statep 9430 9431 // get internal structure 9432 if file == (uintptr(0)) { 9433 return 0 9434 } 9435 state = file 9436 9437 // if the state is not known, but we can find out, then do so (this is 9438 // mainly for right after a gzopen() or gzdopen()) 9439 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)) { 9440 gz_look(tls, state) 9441 } 9442 9443 // return 1 if transparent, 0 if processing a gzip stream 9444 return (*Gz_state)(unsafe.Pointer(state)).Fdirect 9445 } 9446 9447 // -- see zlib.h -- 9448 func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */ 9449 var ret int32 9450 var err int32 9451 var state Gz_statep 9452 9453 // get internal structure 9454 if file == (uintptr(0)) { 9455 return -2 9456 } 9457 state = file 9458 9459 // check that we're reading 9460 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { 9461 return -2 9462 } 9463 9464 // free memory and close file 9465 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 9466 XinflateEnd(tls, (state + 96 /* &.strm */)) 9467 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9468 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9469 } 9470 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-5) { 9471 err = -5 9472 } else { 9473 err = Z_OK 9474 } 9475 Xgz_error(tls, state, Z_OK, uintptr(0)) 9476 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 9477 ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) 9478 libc.Xfree(tls, state) 9479 if ret != 0 { 9480 return -1 9481 } 9482 return err 9483 } 9484 9485 // Initialize state for writing a gzip file. Mark initialization by setting 9486 // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on 9487 // success. 9488 func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */ 9489 var ret int32 9490 var strm Z_streamp = (state + 96 /* &.strm */) 9491 9492 // allocate input buffer (double size for gzprintf) 9493 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, ((*Gz_state)(unsafe.Pointer(state)).Fwant << 1)) 9494 if (*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0)) { 9495 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9496 return -1 9497 } 9498 9499 // only need output buffer and deflate state if compressing 9500 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9501 // allocate output buffer 9502 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant) 9503 if (*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0)) { 9504 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9505 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9506 return -1 9507 } 9508 9509 // allocate deflate memory, set up for gzip compression 9510 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL) 9511 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL) 9512 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL) 9513 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{}))) 9514 if ret != Z_OK { 9515 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9516 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9517 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9518 return -1 9519 } 9520 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0) 9521 } 9522 9523 // mark state as initialized 9524 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 9525 9526 // initialize write buffer if compressing 9527 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9528 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 9529 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9530 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 9531 } 9532 return 0 9533 } 9534 9535 // Compress whatever is at avail_in and next_in and write to the output file. 9536 // Return -1 if there is an error writing to the output file or if gz_init() 9537 // fails to allocate memory, otherwise 0. flush is assumed to be a valid 9538 // deflate() flush value. If flush is Z_FINISH, then the deflate() state is 9539 // reset to start a new gzip stream. If gz->direct is true, then simply write 9540 // to the output file without compressing, and ignore flush. 9541 func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */ 9542 var ret int32 9543 var writ int32 9544 var have uint32 9545 var put uint32 9546 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 9547 var strm Z_streamp = (state + 96 /* &.strm */) 9548 9549 // allocate memory if this is the first time through 9550 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9551 return -1 9552 } 9553 9554 // write directly if requested 9555 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 9556 for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 9557 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max { 9558 put = max 9559 } else { 9560 put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9561 } 9562 writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, put) 9563 if writ < 0 { 9564 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9565 return -1 9566 } 9567 *(*UInt)(unsafe.Pointer(strm + 4 /* &.avail_in */)) -= (uint32(writ)) 9568 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(writ)) 9569 } 9570 return 0 9571 } 9572 9573 // run deflate() on provided input until it produces no more output 9574 ret = Z_OK 9575 for ok := true; ok; ok = have != 0 { 9576 // write out current buffer contents if full, or if flushing, but if 9577 // doing Z_FINISH then don't write until we get to Z_STREAM_END 9578 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0)) || ((flush != Z_NO_FLUSH) && ((flush != Z_FINISH) || (ret == Z_STREAM_END))) { 9579 for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext { 9580 if ((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) > int32(max) { 9581 put = max 9582 } else { 9583 put = (uint32((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) 9584 } 9585 writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, put) 9586 if writ < 0 { 9587 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9588 return -1 9589 } 9590 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 4 /* &.next */)) += (uintptr(writ)) 9591 } 9592 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 9593 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 9594 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9595 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9596 } 9597 } 9598 9599 // compress 9600 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9601 ret = Xdeflate(tls, strm, flush) 9602 if ret == (-2) { 9603 Xgz_error(tls, state, -2, 9604 ts+291 /* "internal error: ..." */) 9605 return -1 9606 } 9607 have = have - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 9608 } 9609 9610 // if that completed a deflate stream, allow another to start 9611 if flush == Z_FINISH { 9612 XdeflateReset(tls, strm) 9613 } 9614 9615 // all done, no errors 9616 return 0 9617 } 9618 9619 // Compress len zeros to output. Return -1 on a write error or memory 9620 // allocation failure by gz_comp(), or 0 on success. 9621 func gz_zero(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzwrite.c:145:11: */ 9622 var first int32 9623 var n uint32 9624 var strm Z_streamp = (state + 96 /* &.strm */) 9625 9626 // consume whatever's left in the input buffer 9627 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9628 return -1 9629 } 9630 9631 // compress len zeros (len guaranteed > 0) 9632 first = 1 9633 for len != 0 { 9634 if ((uint32(unsafe.Sizeof(int32(0))) == uint32(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fsize) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len) { 9635 n = uint32(len) 9636 } else { 9637 n = (*Gz_state)(unsafe.Pointer(state)).Fsize 9638 } 9639 if first != 0 { 9640 libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, n) 9641 first = 0 9642 } 9643 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = n 9644 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9645 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(n)) 9646 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 9647 return -1 9648 } 9649 len = len - (Off64_t(n)) 9650 } 9651 return 0 9652 } 9653 9654 // Write len bytes from buf to file. Return the number of bytes written. If 9655 // the returned value is less than len, then there was an error. 9656 func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */ 9657 var put Z_size_t = len 9658 9659 // if len is zero, avoid unnecessary operations 9660 if len == Z_size_t(0) { 9661 return Z_size_t(0) 9662 } 9663 9664 // allocate memory if this is the first time through 9665 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9666 return Z_size_t(0) 9667 } 9668 9669 // check for seek request 9670 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9671 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9672 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9673 return Z_size_t(0) 9674 } 9675 } 9676 9677 // for small len, copy to input buffer, otherwise compress directly 9678 if len < (*Gz_state)(unsafe.Pointer(state)).Fsize { 9679 // copy to input buffer, compress when full 9680 for ok := true; ok; ok = len != 0 { 9681 var have uint32 9682 var copy uint32 9683 9684 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 9685 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9686 } 9687 have = (uint32(((int32((*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in + uintptr((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in))) - int32((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1)) 9688 copy = ((*Gz_state)(unsafe.Pointer(state)).Fsize - have) 9689 if copy > len { 9690 copy = len 9691 } 9692 libc.Xmemcpy(tls, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have)), buf, copy) 9693 *(*UInt)(unsafe.Pointer(state + 96 /* &.strm */ + 4 /* &.avail_in */)) += (copy) 9694 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(copy)) 9695 buf = (buf + uintptr(copy)) 9696 len = len - (copy) 9697 if (len != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9698 return Z_size_t(0) 9699 } 9700 } 9701 } else { 9702 // consume whatever's left in the input buffer 9703 if ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9704 return Z_size_t(0) 9705 } 9706 9707 // directly compress user buffer to file 9708 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf 9709 for ok1 := true; ok1; ok1 = len != 0 { 9710 var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1)) 9711 if n > len { 9712 n = len 9713 } 9714 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n 9715 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(n)) 9716 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 9717 return Z_size_t(0) 9718 } 9719 len = len - (n) 9720 } 9721 } 9722 9723 // input was all buffered or compressed 9724 return put 9725 } 9726 9727 // -- see zlib.h -- 9728 func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */ 9729 var state Gz_statep 9730 9731 // get internal structure 9732 if file == (uintptr(0)) { 9733 return 0 9734 } 9735 state = file 9736 9737 // check that we're writing and that there's no error 9738 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 9739 return 0 9740 } 9741 9742 // since an int is returned, make sure len fits in one, otherwise return 9743 // with an error (this avoids a flaw in the interface) 9744 if int32(len) < 0 { 9745 Xgz_error(tls, state, -3, ts+330 /* "requested length..." */) 9746 return 0 9747 } 9748 9749 // write len bytes from buf (the return value will fit in an int) 9750 return int32(gz_write(tls, state, buf, len)) 9751 } 9752 9753 // -- see zlib.h -- 9754 func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */ 9755 var len Z_size_t 9756 var state Gz_statep 9757 9758 // get internal structure 9759 if file == (uintptr(0)) { 9760 return Z_size_t(0) 9761 } 9762 state = file 9763 9764 // check that we're writing and that there's no error 9765 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 9766 return Z_size_t(0) 9767 } 9768 9769 // compute bytes to read -- error on overflow 9770 len = (nitems * size) 9771 if (size != 0) && ((len / size) != nitems) { 9772 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 9773 return Z_size_t(0) 9774 } 9775 9776 // write len bytes to buf, return the number of full items written 9777 if len != 0 { 9778 return (gz_write(tls, state, buf, len) / size) 9779 } 9780 return uint32(0) 9781 } 9782 9783 // -- see zlib.h -- 9784 func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */ 9785 bp := tls.Alloc(1) 9786 defer tls.Free(1) 9787 9788 var have uint32 9789 // var buf [1]uint8 at bp, 1 9790 9791 var state Gz_statep 9792 var strm Z_streamp 9793 9794 // get internal structure 9795 if file == (uintptr(0)) { 9796 return -1 9797 } 9798 state = file 9799 strm = (state + 96 /* &.strm */) 9800 9801 // check that we're writing and that there's no error 9802 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 9803 return -1 9804 } 9805 9806 // check for seek request 9807 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9808 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9809 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9810 return -1 9811 } 9812 } 9813 9814 // try writing to input buffer for speed (state->size == 0 if buffer not 9815 // initialized) 9816 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 9817 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9818 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9819 } 9820 have = (uint32(((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in))) - int32((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1)) 9821 if have < (*Gz_state)(unsafe.Pointer(state)).Fsize { 9822 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c) 9823 (*Z_stream)(unsafe.Pointer(strm)).Favail_in++ 9824 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 9825 return (c & 0xff) 9826 } 9827 } 9828 9829 // no room in buffer or not initialized, use gz_write() 9830 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */)) = uint8(c) 9831 if gz_write(tls, state, bp /* &buf[0] */, uint32(1)) != Z_size_t(1) { 9832 return -1 9833 } 9834 return (c & 0xff) 9835 } 9836 9837 // -- see zlib.h -- 9838 func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */ 9839 var ret int32 9840 var len Z_size_t 9841 var state Gz_statep 9842 9843 // get internal structure 9844 if file == (uintptr(0)) { 9845 return -1 9846 } 9847 state = file 9848 9849 // check that we're writing and that there's no error 9850 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 9851 return -1 9852 } 9853 9854 // write string 9855 len = libc.Xstrlen(tls, str) 9856 ret = int32(gz_write(tls, state, str, len)) 9857 if (ret == 0) && (len != Z_size_t(0)) { 9858 return -1 9859 } 9860 return ret 9861 } 9862 9863 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 9864 // 9865 // This file is part of GCC. 9866 // 9867 // GCC is free software; you can redistribute it and/or modify 9868 // it under the terms of the GNU General Public License as published by 9869 // the Free Software Foundation; either version 3, or (at your option) 9870 // any later version. 9871 // 9872 // GCC is distributed in the hope that it will be useful, 9873 // but WITHOUT ANY WARRANTY; without even the implied warranty of 9874 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9875 // GNU General Public License for more details. 9876 // 9877 // Under Section 7 of GPL version 3, you are granted additional 9878 // permissions described in the GCC Runtime Library Exception, version 9879 // 3.1, as published by the Free Software Foundation. 9880 // 9881 // You should have received a copy of the GNU General Public License and 9882 // a copy of the GCC Runtime Library Exception along with this program; 9883 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 9884 // <http://www.gnu.org/licenses/>. 9885 9886 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 9887 9888 // -- see zlib.h -- 9889 func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */ 9890 var len int32 9891 var left uint32 9892 var next uintptr 9893 var state Gz_statep 9894 var strm Z_streamp 9895 9896 // get internal structure 9897 if file == (uintptr(0)) { 9898 return -2 9899 } 9900 state = file 9901 strm = (state + 96 /* &.strm */) 9902 9903 // check that we're writing and that there's no error 9904 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 9905 return -2 9906 } 9907 9908 // make sure we have some buffer space 9909 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9910 return (*Gz_state)(unsafe.Pointer(state)).Ferr 9911 } 9912 9913 // check for seek request 9914 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9915 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9916 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9917 return (*Gz_state)(unsafe.Pointer(state)).Ferr 9918 } 9919 } 9920 9921 // do the printf() into the input buffer, put length in len -- the input 9922 // buffer is double-sized just for this function, so there is guaranteed to 9923 // be state->size bytes available after the current contents 9924 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9925 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9926 } 9927 next = (((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_in) - int32((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1))) + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)) 9928 *(*int8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1))))) = int8(0) 9929 len = libc.Xvsnprintf(tls, next, (*Gz_state)(unsafe.Pointer(state)).Fsize, format, va) 9930 9931 // check that printf() results fit in buffer 9932 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) { 9933 return 0 9934 } 9935 9936 // update buffer and position, compress first half if past that 9937 *(*UInt)(unsafe.Pointer(strm + 4 /* &.avail_in */)) += (uint32(len)) 9938 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 8 /* &.pos */)) += (Off64_t(len)) 9939 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize { 9940 left = ((*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize) 9941 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize 9942 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 9943 return (*Gz_state)(unsafe.Pointer(state)).Ferr 9944 } 9945 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize)), left) 9946 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9947 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = left 9948 } 9949 return len 9950 } 9951 9952 func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */ 9953 var va1 Va_list 9954 _ = va1 9955 var ret int32 9956 9957 va1 = va 9958 ret = Xgzvprintf(tls, file, format, va1) 9959 _ = va1 9960 return ret 9961 } 9962 9963 // -- see zlib.h -- 9964 func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */ 9965 var state Gz_statep 9966 9967 // get internal structure 9968 if file == (uintptr(0)) { 9969 return -2 9970 } 9971 state = file 9972 9973 // check that we're writing and that there's no error 9974 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 9975 return -2 9976 } 9977 9978 // check flush parameter 9979 if (flush < 0) || (flush > Z_FINISH) { 9980 return -2 9981 } 9982 9983 // check for seek request 9984 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9985 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9986 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9987 return (*Gz_state)(unsafe.Pointer(state)).Ferr 9988 } 9989 } 9990 9991 // compress remaining data with requested flush 9992 gz_comp(tls, state, flush) 9993 return (*Gz_state)(unsafe.Pointer(state)).Ferr 9994 } 9995 9996 // -- see zlib.h -- 9997 func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */ 9998 var state Gz_statep 9999 var strm Z_streamp 10000 10001 // get internal structure 10002 if file == (uintptr(0)) { 10003 return -2 10004 } 10005 state = file 10006 strm = (state + 96 /* &.strm */) 10007 10008 // check that we're writing and that there's no error 10009 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10010 return -2 10011 } 10012 10013 // if no change is requested, then do nothing 10014 if (level == (*Gz_state)(unsafe.Pointer(state)).Flevel) && (strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy) { 10015 return Z_OK 10016 } 10017 10018 // check for seek request 10019 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10020 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10021 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10022 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10023 } 10024 } 10025 10026 // change compression parameters for subsequent input 10027 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10028 // flush previous input with previous parameters before changing 10029 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_BLOCK) == -1) { 10030 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10031 } 10032 XdeflateParams(tls, strm, level, strategy) 10033 } 10034 (*Gz_state)(unsafe.Pointer(state)).Flevel = level 10035 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy 10036 return Z_OK 10037 } 10038 10039 // -- see zlib.h -- 10040 func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */ 10041 var ret int32 = Z_OK 10042 var state Gz_statep 10043 10044 // get internal structure 10045 if file == (uintptr(0)) { 10046 return -2 10047 } 10048 state = file 10049 10050 // check that we're writing 10051 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 10052 return -2 10053 } 10054 10055 // check for seek request 10056 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10057 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10058 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10059 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 10060 } 10061 } 10062 10063 // flush, free memory, and close file 10064 if gz_comp(tls, state, Z_FINISH) == -1 { 10065 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 10066 } 10067 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10068 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 10069 XdeflateEnd(tls, (state + 96 /* &.strm */)) 10070 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 10071 } 10072 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 10073 } 10074 Xgz_error(tls, state, Z_OK, uintptr(0)) 10075 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 10076 if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 { 10077 ret = -1 10078 } 10079 libc.Xfree(tls, state) 10080 return ret 10081 } 10082 10083 type Ino_t2 = X__ino64_t /* types.h:49:19 */ 10084 10085 type Off_t2 = X__off64_t /* types.h:87:19 */ 10086 10087 // Types from the Large File Support interface. 10088 type Blkcnt_t2 = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 10089 type Fsblkcnt_t2 = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 10090 type Fsfilcnt_t2 = X__fsfilcnt64_t /* types.h:213:24 */ 10091 10092 // Reverse the bytes in a 32-bit value 10093 10094 // inftrees.h -- header to use inftrees.c 10095 // Copyright (C) 1995-2005, 2010 Mark Adler 10096 // For conditions of distribution and use, see copyright notice in zlib.h 10097 10098 // WARNING: this file should *not* be used by applications. It is 10099 // part of the implementation of the compression library and is 10100 // subject to change. Applications should only use zlib.h. 10101 // 10102 10103 // Structure for decoding tables. Each entry provides either the 10104 // information needed to do the operation requested by the code that 10105 // indexed that table entry, or it provides a pointer to another 10106 // table that indexes more bits of the code. op indicates whether 10107 // the entry is a pointer to another table, a literal, a length or 10108 // distance, an end-of-block, or an invalid code. For a table 10109 // pointer, the low four bits of op is the number of index bits of 10110 // that table. For a length or distance, the low four bits of op 10111 // is the number of extra bits to get after the code. bits is 10112 // the number of bits in this code or part of the code to drop off 10113 // of the bit buffer. val is the actual byte to output in the case 10114 // of a literal, the base length or distance, or the offset from 10115 // the current table to the next table. Each entry is four bytes. 10116 type Code = struct { 10117 Fop uint8 10118 Fbits uint8 10119 Fval uint16 10120 } /* inftrees.h:28:3 */ 10121 10122 // op values as set by inflate_table(): 10123 // 00000000 - literal 10124 // 0000tttt - table link, tttt != 0 is the number of table index bits 10125 // 0001eeee - length or distance, eeee is the number of extra bits 10126 // 01100000 - end of block 10127 // 01000000 - invalid code 10128 // 10129 10130 // Maximum size of the dynamic table. The maximum number of code structures is 10131 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 10132 // codes. These values were found by exhaustive searches using the program 10133 // examples/enough.c found in the zlib distribtution. The arguments to that 10134 // program are the number of symbols, the initial root table size, and the 10135 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 10136 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 10137 // The initial root table size (9 or 6) is found in the fifth argument of the 10138 // inflate_table() calls in inflate.c and infback.c. If the root table size is 10139 // changed, then these maximum sizes would be need to be recalculated and 10140 // updated. 10141 10142 // Type of code to build for inflate_table() 10143 type Codetype = uint32 /* inftrees.h:58:3 */ 10144 // inflate.h -- internal inflate state definition 10145 // Copyright (C) 1995-2016 Mark Adler 10146 // For conditions of distribution and use, see copyright notice in zlib.h 10147 10148 // WARNING: this file should *not* be used by applications. It is 10149 // part of the implementation of the compression library and is 10150 // subject to change. Applications should only use zlib.h. 10151 // 10152 10153 // define NO_GZIP when compiling if you want to disable gzip header and 10154 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 10155 // the crc code when it is not needed. For shared libraries, gzip decoding 10156 // should be left enabled. 10157 10158 // Possible inflate modes between inflate() calls 10159 type Inflate_mode = uint32 /* inflate.h:53:3 */ 10160 10161 // 10162 // State transitions between above modes - 10163 // 10164 // (most modes can go to BAD or MEM on error -- not shown for clarity) 10165 // 10166 // Process header: 10167 // HEAD -> (gzip) or (zlib) or (raw) 10168 // (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> 10169 // HCRC -> TYPE 10170 // (zlib) -> DICTID or TYPE 10171 // DICTID -> DICT -> TYPE 10172 // (raw) -> TYPEDO 10173 // Read deflate blocks: 10174 // TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK 10175 // STORED -> COPY_ -> COPY -> TYPE 10176 // TABLE -> LENLENS -> CODELENS -> LEN_ 10177 // LEN_ -> LEN 10178 // Read deflate codes in fixed or dynamic block: 10179 // LEN -> LENEXT or LIT or TYPE 10180 // LENEXT -> DIST -> DISTEXT -> MATCH -> LEN 10181 // LIT -> LEN 10182 // Process trailer: 10183 // CHECK -> LENGTH -> DONE 10184 // 10185 10186 // State maintained between inflate() calls -- approximately 7K bytes, not 10187 // including the allocated sliding window, which is up to 32K bytes. 10188 type Inflate_state = struct { 10189 Fstrm Z_streamp 10190 Fmode Inflate_mode 10191 Flast int32 10192 Fwrap int32 10193 Fhavedict int32 10194 Fflags int32 10195 Fdmax uint32 10196 Fcheck uint32 10197 Ftotal uint32 10198 Fhead Gz_headerp 10199 Fwbits uint32 10200 Fwsize uint32 10201 Fwhave uint32 10202 Fwnext uint32 10203 Fwindow uintptr 10204 Fhold uint32 10205 Fbits uint32 10206 Flength uint32 10207 Foffset uint32 10208 Fextra uint32 10209 Flencode uintptr 10210 Fdistcode uintptr 10211 Flenbits uint32 10212 Fdistbits uint32 10213 Fncode uint32 10214 Fnlen uint32 10215 Fndist uint32 10216 Fhave uint32 10217 Fnext uintptr 10218 Flens [320]uint16 10219 Fwork [288]uint16 10220 Fcodes [1444]Code 10221 Fsane int32 10222 Fback int32 10223 Fwas uint32 10224 } /* inflate.h:82:1 */ 10225 10226 // 10227 // strm provides memory allocation functions in zalloc and zfree, or 10228 // Z_NULL to use the library memory allocation functions. 10229 // 10230 // windowBits is in the range 8..15, and window is a user-supplied 10231 // window and output buffer that is 2**windowBits bytes. 10232 // 10233 func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */ 10234 var state uintptr 10235 10236 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{})))) { 10237 return -6 10238 } 10239 if (((strm == uintptr(Z_NULL)) || (window == uintptr(Z_NULL))) || (windowBits < 8)) || (windowBits > 15) { 10240 return -2 10241 } 10242 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 10243 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 10244 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 10245 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 10246 }{Xzcalloc})) 10247 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 10248 } 10249 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 10250 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 10251 f func(*libc.TLS, Voidpf, Voidpf) 10252 }{Xzcfree})) 10253 } 10254 state = (*struct { 10255 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 10256 })(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{}))) 10257 if state == uintptr(Z_NULL) { 10258 return -4 10259 } 10260 10261 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 10262 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 10263 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits) 10264 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << windowBits) 10265 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = window 10266 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10267 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10268 return Z_OK 10269 } 10270 10271 // 10272 // Return state with length and distance decoding tables and index sizes set to 10273 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 10274 // If BUILDFIXED is defined, then instead this routine builds the tables the 10275 // first time it's called, and returns those tables the first time and 10276 // thereafter. This reduces the size of the code by about 2K bytes, in 10277 // exchange for a little execution time. However, BUILDFIXED should not be 10278 // used for threaded applications, since the rewriting of the tables and virgin 10279 // may not be thread-safe. 10280 // 10281 func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */ 10282 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix)) 10283 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 10284 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix)) 10285 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 10286 } 10287 10288 var lenfix = [512]Code{ 10289 {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)}, 10290 {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)}, 10291 {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)}, 10292 {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)}, 10293 {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)}, 10294 {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)}, 10295 {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)}, 10296 {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)}, 10297 {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)}, 10298 {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)}, 10299 {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)}, 10300 {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)}, 10301 {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)}, 10302 {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)}, 10303 {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)}, 10304 {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)}, 10305 {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)}, 10306 {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)}, 10307 {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)}, 10308 {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)}, 10309 {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)}, 10310 {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)}, 10311 {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)}, 10312 {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)}, 10313 {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)}, 10314 {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)}, 10315 {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)}, 10316 {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)}, 10317 {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)}, 10318 {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)}, 10319 {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)}, 10320 {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)}, 10321 {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)}, 10322 {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)}, 10323 {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)}, 10324 {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)}, 10325 {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)}, 10326 {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)}, 10327 {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)}, 10328 {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)}, 10329 {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)}, 10330 {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)}, 10331 {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)}, 10332 {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)}, 10333 {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)}, 10334 {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)}, 10335 {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)}, 10336 {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)}, 10337 {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)}, 10338 {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)}, 10339 {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)}, 10340 {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)}, 10341 {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)}, 10342 {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)}, 10343 {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)}, 10344 {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)}, 10345 {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)}, 10346 {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)}, 10347 {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)}, 10348 {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)}, 10349 {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)}, 10350 {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)}, 10351 {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)}, 10352 {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)}, 10353 {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)}, 10354 {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)}, 10355 {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)}, 10356 {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)}, 10357 {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)}, 10358 {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)}, 10359 {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)}, 10360 {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)}, 10361 {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)}, 10362 {Fbits: uint8(9), Fval: uint16(255)}, 10363 } /* inffixed.h:10:23 */ 10364 var distfix = [32]Code{ 10365 {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)}, 10366 {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)}, 10367 {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)}, 10368 {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)}, 10369 {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)}, 10370 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 10371 } /* inffixed.h:87:23 */ 10372 10373 // Macros for inflateBack(): 10374 10375 // Load returned state from inflate_fast() 10376 10377 // Set state from registers for inflate_fast() 10378 10379 // Clear the input bit accumulator 10380 10381 // Assure that some input is available. If input is requested, but denied, 10382 // then return a Z_BUF_ERROR from inflateBack(). 10383 10384 // Get a byte of input into the bit accumulator, or return from inflateBack() 10385 // with an error if there is no input available. 10386 10387 // Assure that there are at least n bits in the bit accumulator. If there is 10388 // not enough available input to do that, then return from inflateBack() with 10389 // an error. 10390 10391 // Return the low n bits of the bit accumulator (n < 16) 10392 10393 // Remove n bits from the bit accumulator 10394 10395 // Remove zero to seven bits as needed to go to a byte boundary 10396 10397 // Assure that some output space is available, by writing out the window 10398 // if it's full. If the write fails, return from inflateBack() with a 10399 // Z_BUF_ERROR. 10400 10401 // 10402 // strm provides the memory allocation functions and window buffer on input, 10403 // and provides information on the unused input on return. For Z_DATA_ERROR 10404 // returns, strm will also provide an error message. 10405 // 10406 // in() and out() are the call-back input and output functions. When 10407 // inflateBack() needs more input, it calls in(). When inflateBack() has 10408 // filled the window with output, or when it completes with data in the 10409 // window, it calls out() to write out the data. The application must not 10410 // change the provided input until in() is called again or inflateBack() 10411 // returns. The application must not change the window/output buffer until 10412 // inflateBack() returns. 10413 // 10414 // in() and out() are called with a descriptor parameter provided in the 10415 // inflateBack() call. This parameter can be a structure that provides the 10416 // information required to do the read or write, as well as accumulated 10417 // information on the input and output such as totals and check values. 10418 // 10419 // in() should return zero on failure. out() should return non-zero on 10420 // failure. If either in() or out() fails, than inflateBack() returns a 10421 // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it 10422 // was in() or out() that caused in the error. Otherwise, inflateBack() 10423 // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format 10424 // error, or Z_MEM_ERROR if it could not allocate memory for the state. 10425 // inflateBack() can also return Z_STREAM_ERROR if the input parameters 10426 // are not correct, i.e. strm is Z_NULL or the state was not initialized. 10427 // 10428 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: */ 10429 bp := tls.Alloc(4) 10430 defer tls.Free(4) 10431 10432 var state uintptr 10433 // var next uintptr at bp, 4 10434 // next input 10435 var put uintptr // next output 10436 var have uint32 10437 var left uint32 // available input and output 10438 var hold uint32 // bit buffer 10439 var bits uint32 // bits in bit buffer 10440 var copy uint32 // number of stored or match bytes to copy 10441 var from uintptr // where to copy match bytes from 10442 var here Code // current decoding table entry 10443 var last Code // parent table entry 10444 var len uint32 // length to copy for repeats, bits to drop 10445 var ret int32 10446 10447 // Check that the strm exists and that the state was initialized 10448 if !((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) { 10449 goto __1 10450 } 10451 return -2 10452 __1: 10453 ; 10454 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10455 10456 // Reset the state 10457 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 10458 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10459 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 10460 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10461 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 10462 if *(*uintptr)(unsafe.Pointer(bp /* next */)) != uintptr(Z_NULL) { 10463 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 10464 } else { 10465 have = uint32(0) 10466 } 10467 hold = uint32(0) 10468 bits = uint32(0) 10469 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10470 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10471 10472 // Inflate until end of block marked as last 10473 __2: 10474 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 10475 case TYPE: 10476 goto __6 10477 10478 case STORED: 10479 goto __7 10480 10481 case TABLE: 10482 goto __8 10483 10484 case LEN: 10485 goto __9 10486 10487 case DONE: 10488 goto __10 10489 10490 case BAD: 10491 goto __11 10492 10493 default: 10494 goto __12 10495 } 10496 goto __5 10497 __6: 10498 // determine and dispatch block type 10499 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 10500 goto __13 10501 } 10502 __14: 10503 hold >>= (bits & uint32(7)) 10504 bits = bits - (bits & uint32(7)) 10505 goto __15 10506 __15: 10507 if 0 != 0 { 10508 goto __14 10509 } 10510 goto __16 10511 __16: 10512 ; 10513 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 10514 goto __5 10515 __13: 10516 ; 10517 __17: 10518 __20: 10519 if !(bits < (uint32(3))) { 10520 goto __21 10521 } 10522 __22: 10523 __25: 10524 if !(have == uint32(0)) { 10525 goto __28 10526 } 10527 have = (*struct { 10528 f func(*libc.TLS, uintptr, uintptr) uint32 10529 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10530 if !(have == uint32(0)) { 10531 goto __29 10532 } 10533 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10534 ret = -5 10535 goto inf_leave 10536 __29: 10537 ; 10538 __28: 10539 ; 10540 goto __26 10541 __26: 10542 if 0 != 0 { 10543 goto __25 10544 } 10545 goto __27 10546 __27: 10547 ; 10548 have-- 10549 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10550 bits = bits + (uint32(8)) 10551 goto __23 10552 __23: 10553 if 0 != 0 { 10554 goto __22 10555 } 10556 goto __24 10557 __24: 10558 ; 10559 goto __20 10560 __21: 10561 ; 10562 goto __18 10563 __18: 10564 if 0 != 0 { 10565 goto __17 10566 } 10567 goto __19 10568 __19: 10569 ; 10570 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 10571 __30: 10572 hold >>= 1 10573 bits = bits - (uint32(1)) 10574 goto __31 10575 __31: 10576 if 0 != 0 { 10577 goto __30 10578 } 10579 goto __32 10580 __32: 10581 ; 10582 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 10583 case uint32(0): 10584 goto __34 10585 case uint32(1): 10586 goto __35 10587 case uint32(2): 10588 goto __36 10589 case uint32(3): 10590 goto __37 10591 } 10592 goto __33 10593 __34: // stored block 10594 ; 10595 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 10596 goto __33 10597 __35: // fixed block 10598 fixedtables(tls, state) 10599 10600 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes 10601 goto __33 10602 __36: // dynamic block 10603 ; 10604 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 10605 goto __33 10606 __37: 10607 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 10608 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10609 __33: 10610 ; 10611 __38: 10612 hold >>= 2 10613 bits = bits - (uint32(2)) 10614 goto __39 10615 __39: 10616 if 0 != 0 { 10617 goto __38 10618 } 10619 goto __40 10620 __40: 10621 ; 10622 goto __5 10623 10624 __7: 10625 // get and verify stored block length 10626 __41: 10627 hold >>= (bits & uint32(7)) 10628 bits = bits - (bits & uint32(7)) 10629 goto __42 10630 __42: 10631 if 0 != 0 { 10632 goto __41 10633 } 10634 goto __43 10635 __43: 10636 ; // go to byte boundary 10637 __44: 10638 __47: 10639 if !(bits < (uint32(32))) { 10640 goto __48 10641 } 10642 __49: 10643 __52: 10644 if !(have == uint32(0)) { 10645 goto __55 10646 } 10647 have = (*struct { 10648 f func(*libc.TLS, uintptr, uintptr) uint32 10649 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10650 if !(have == uint32(0)) { 10651 goto __56 10652 } 10653 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10654 ret = -5 10655 goto inf_leave 10656 __56: 10657 ; 10658 __55: 10659 ; 10660 goto __53 10661 __53: 10662 if 0 != 0 { 10663 goto __52 10664 } 10665 goto __54 10666 __54: 10667 ; 10668 have-- 10669 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10670 bits = bits + (uint32(8)) 10671 goto __50 10672 __50: 10673 if 0 != 0 { 10674 goto __49 10675 } 10676 goto __51 10677 __51: 10678 ; 10679 goto __47 10680 __48: 10681 ; 10682 goto __45 10683 __45: 10684 if 0 != 0 { 10685 goto __44 10686 } 10687 goto __46 10688 __46: 10689 ; 10690 if !((hold & uint32(0xffff)) != ((hold >> 16) ^ uint32(0xffff))) { 10691 goto __57 10692 } 10693 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 10694 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10695 goto __5 10696 __57: 10697 ; 10698 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 10699 10700 __58: 10701 hold = uint32(0) 10702 bits = uint32(0) 10703 goto __59 10704 __59: 10705 if 0 != 0 { 10706 goto __58 10707 } 10708 goto __60 10709 __60: 10710 ; 10711 10712 // copy stored block from input to output 10713 __61: 10714 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) { 10715 goto __62 10716 } 10717 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 10718 __63: 10719 if !(have == uint32(0)) { 10720 goto __66 10721 } 10722 have = (*struct { 10723 f func(*libc.TLS, uintptr, uintptr) uint32 10724 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10725 if !(have == uint32(0)) { 10726 goto __67 10727 } 10728 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10729 ret = -5 10730 goto inf_leave 10731 __67: 10732 ; 10733 __66: 10734 ; 10735 goto __64 10736 __64: 10737 if 0 != 0 { 10738 goto __63 10739 } 10740 goto __65 10741 __65: 10742 ; 10743 __68: 10744 if !(left == uint32(0)) { 10745 goto __71 10746 } 10747 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10748 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10749 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 10750 if !((*struct { 10751 f func(*libc.TLS, uintptr, uintptr, uint32) int32 10752 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 10753 goto __72 10754 } 10755 ret = -5 10756 goto inf_leave 10757 __72: 10758 ; 10759 __71: 10760 ; 10761 goto __69 10762 __69: 10763 if 0 != 0 { 10764 goto __68 10765 } 10766 goto __70 10767 __70: 10768 ; 10769 if !(copy > have) { 10770 goto __73 10771 } 10772 copy = have 10773 __73: 10774 ; 10775 if !(copy > left) { 10776 goto __74 10777 } 10778 copy = left 10779 __74: 10780 ; 10781 libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), copy) 10782 have = have - (copy) 10783 *(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy) 10784 left = left - (copy) 10785 put += uintptr(copy) 10786 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) -= (copy) 10787 goto __61 10788 __62: 10789 ; 10790 10791 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10792 goto __5 10793 10794 __8: 10795 // get dynamic table entries descriptor 10796 __75: 10797 __78: 10798 if !(bits < (uint32(14))) { 10799 goto __79 10800 } 10801 __80: 10802 __83: 10803 if !(have == uint32(0)) { 10804 goto __86 10805 } 10806 have = (*struct { 10807 f func(*libc.TLS, uintptr, uintptr) uint32 10808 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10809 if !(have == uint32(0)) { 10810 goto __87 10811 } 10812 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10813 ret = -5 10814 goto inf_leave 10815 __87: 10816 ; 10817 __86: 10818 ; 10819 goto __84 10820 __84: 10821 if 0 != 0 { 10822 goto __83 10823 } 10824 goto __85 10825 __85: 10826 ; 10827 have-- 10828 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10829 bits = bits + (uint32(8)) 10830 goto __81 10831 __81: 10832 if 0 != 0 { 10833 goto __80 10834 } 10835 goto __82 10836 __82: 10837 ; 10838 goto __78 10839 __79: 10840 ; 10841 goto __76 10842 __76: 10843 if 0 != 0 { 10844 goto __75 10845 } 10846 goto __77 10847 __77: 10848 ; 10849 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 10850 __88: 10851 hold >>= 5 10852 bits = bits - (uint32(5)) 10853 goto __89 10854 __89: 10855 if 0 != 0 { 10856 goto __88 10857 } 10858 goto __90 10859 __90: 10860 ; 10861 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 10862 __91: 10863 hold >>= 5 10864 bits = bits - (uint32(5)) 10865 goto __92 10866 __92: 10867 if 0 != 0 { 10868 goto __91 10869 } 10870 goto __93 10871 __93: 10872 ; 10873 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 10874 __94: 10875 hold >>= 4 10876 bits = bits - (uint32(4)) 10877 goto __95 10878 __95: 10879 if 0 != 0 { 10880 goto __94 10881 } 10882 goto __96 10883 __96: 10884 ; 10885 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 10886 goto __97 10887 } 10888 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 10889 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10890 goto __5 10891 __97: 10892 ; 10893 10894 // get code length code lengths (not a typo) 10895 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 10896 __98: 10897 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 10898 goto __99 10899 } 10900 __100: 10901 __103: 10902 if !(bits < (uint32(3))) { 10903 goto __104 10904 } 10905 __105: 10906 __108: 10907 if !(have == uint32(0)) { 10908 goto __111 10909 } 10910 have = (*struct { 10911 f func(*libc.TLS, uintptr, uintptr) uint32 10912 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10913 if !(have == uint32(0)) { 10914 goto __112 10915 } 10916 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10917 ret = -5 10918 goto inf_leave 10919 __112: 10920 ; 10921 __111: 10922 ; 10923 goto __109 10924 __109: 10925 if 0 != 0 { 10926 goto __108 10927 } 10928 goto __110 10929 __110: 10930 ; 10931 have-- 10932 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10933 bits = bits + (uint32(8)) 10934 goto __106 10935 __106: 10936 if 0 != 0 { 10937 goto __105 10938 } 10939 goto __107 10940 __107: 10941 ; 10942 goto __103 10943 __104: 10944 ; 10945 goto __101 10946 __101: 10947 if 0 != 0 { 10948 goto __100 10949 } 10950 goto __102 10951 __102: 10952 ; 10953 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 10954 __113: 10955 hold >>= 3 10956 bits = bits - (uint32(3)) 10957 goto __114 10958 __114: 10959 if 0 != 0 { 10960 goto __113 10961 } 10962 goto __115 10963 __115: 10964 ; 10965 goto __98 10966 __99: 10967 ; 10968 __116: 10969 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 10970 goto __117 10971 } 10972 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 10973 goto __116 10974 __117: 10975 ; 10976 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */ 10977 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 10978 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 10979 ret = Xinflate_table(tls, CODES, state+116 /* &.lens */, uint32(19), (state + 112 /* &.next */), 10980 (state + 88 /* &.lenbits */), state+756 /* &.work */) 10981 if !(ret != 0) { 10982 goto __118 10983 } 10984 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 10985 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10986 goto __5 10987 __118: 10988 ; 10989 10990 // get length and distance code code lengths 10991 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 10992 __119: 10993 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 10994 goto __120 10995 } 10996 __121: 10997 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 10998 if !((uint32(here.Fbits)) <= bits) { 10999 goto __124 11000 } 11001 goto __123 11002 __124: 11003 ; 11004 __125: 11005 __128: 11006 if !(have == uint32(0)) { 11007 goto __131 11008 } 11009 have = (*struct { 11010 f func(*libc.TLS, uintptr, uintptr) uint32 11011 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11012 if !(have == uint32(0)) { 11013 goto __132 11014 } 11015 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11016 ret = -5 11017 goto inf_leave 11018 __132: 11019 ; 11020 __131: 11021 ; 11022 goto __129 11023 __129: 11024 if 0 != 0 { 11025 goto __128 11026 } 11027 goto __130 11028 __130: 11029 ; 11030 have-- 11031 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11032 bits = bits + (uint32(8)) 11033 goto __126 11034 __126: 11035 if 0 != 0 { 11036 goto __125 11037 } 11038 goto __127 11039 __127: 11040 ; 11041 goto __122 11042 __122: 11043 goto __121 11044 goto __123 11045 __123: 11046 ; 11047 if !(int32(here.Fval) < 16) { 11048 goto __133 11049 } 11050 __135: 11051 hold >>= int32(here.Fbits) 11052 bits = bits - (uint32(here.Fbits)) 11053 goto __136 11054 __136: 11055 if 0 != 0 { 11056 goto __135 11057 } 11058 goto __137 11059 __137: 11060 ; 11061 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 11062 goto __134 11063 __133: 11064 if !(int32(here.Fval) == 16) { 11065 goto __138 11066 } 11067 __140: 11068 __143: 11069 if !(bits < (uint32(int32(here.Fbits) + 2))) { 11070 goto __144 11071 } 11072 __145: 11073 __148: 11074 if !(have == uint32(0)) { 11075 goto __151 11076 } 11077 have = (*struct { 11078 f func(*libc.TLS, uintptr, uintptr) uint32 11079 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11080 if !(have == uint32(0)) { 11081 goto __152 11082 } 11083 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11084 ret = -5 11085 goto inf_leave 11086 __152: 11087 ; 11088 __151: 11089 ; 11090 goto __149 11091 __149: 11092 if 0 != 0 { 11093 goto __148 11094 } 11095 goto __150 11096 __150: 11097 ; 11098 have-- 11099 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11100 bits = bits + (uint32(8)) 11101 goto __146 11102 __146: 11103 if 0 != 0 { 11104 goto __145 11105 } 11106 goto __147 11107 __147: 11108 ; 11109 goto __143 11110 __144: 11111 ; 11112 goto __141 11113 __141: 11114 if 0 != 0 { 11115 goto __140 11116 } 11117 goto __142 11118 __142: 11119 ; 11120 __153: 11121 hold >>= int32(here.Fbits) 11122 bits = bits - (uint32(here.Fbits)) 11123 goto __154 11124 __154: 11125 if 0 != 0 { 11126 goto __153 11127 } 11128 goto __155 11129 __155: 11130 ; 11131 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 11132 goto __156 11133 } 11134 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11135 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11136 goto __120 11137 __156: 11138 ; 11139 len = uint32(*(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 11140 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 11141 __157: 11142 hold >>= 2 11143 bits = bits - (uint32(2)) 11144 goto __158 11145 __158: 11146 if 0 != 0 { 11147 goto __157 11148 } 11149 goto __159 11150 __159: 11151 ; 11152 goto __139 11153 __138: 11154 if !(int32(here.Fval) == 17) { 11155 goto __160 11156 } 11157 __162: 11158 __165: 11159 if !(bits < (uint32(int32(here.Fbits) + 3))) { 11160 goto __166 11161 } 11162 __167: 11163 __170: 11164 if !(have == uint32(0)) { 11165 goto __173 11166 } 11167 have = (*struct { 11168 f func(*libc.TLS, uintptr, uintptr) uint32 11169 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11170 if !(have == uint32(0)) { 11171 goto __174 11172 } 11173 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11174 ret = -5 11175 goto inf_leave 11176 __174: 11177 ; 11178 __173: 11179 ; 11180 goto __171 11181 __171: 11182 if 0 != 0 { 11183 goto __170 11184 } 11185 goto __172 11186 __172: 11187 ; 11188 have-- 11189 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11190 bits = bits + (uint32(8)) 11191 goto __168 11192 __168: 11193 if 0 != 0 { 11194 goto __167 11195 } 11196 goto __169 11197 __169: 11198 ; 11199 goto __165 11200 __166: 11201 ; 11202 goto __163 11203 __163: 11204 if 0 != 0 { 11205 goto __162 11206 } 11207 goto __164 11208 __164: 11209 ; 11210 __175: 11211 hold >>= int32(here.Fbits) 11212 bits = bits - (uint32(here.Fbits)) 11213 goto __176 11214 __176: 11215 if 0 != 0 { 11216 goto __175 11217 } 11218 goto __177 11219 __177: 11220 ; 11221 len = uint32(0) 11222 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 11223 __178: 11224 hold >>= 3 11225 bits = bits - (uint32(3)) 11226 goto __179 11227 __179: 11228 if 0 != 0 { 11229 goto __178 11230 } 11231 goto __180 11232 __180: 11233 ; 11234 goto __161 11235 __160: 11236 __181: 11237 __184: 11238 if !(bits < (uint32(int32(here.Fbits) + 7))) { 11239 goto __185 11240 } 11241 __186: 11242 __189: 11243 if !(have == uint32(0)) { 11244 goto __192 11245 } 11246 have = (*struct { 11247 f func(*libc.TLS, uintptr, uintptr) uint32 11248 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11249 if !(have == uint32(0)) { 11250 goto __193 11251 } 11252 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11253 ret = -5 11254 goto inf_leave 11255 __193: 11256 ; 11257 __192: 11258 ; 11259 goto __190 11260 __190: 11261 if 0 != 0 { 11262 goto __189 11263 } 11264 goto __191 11265 __191: 11266 ; 11267 have-- 11268 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11269 bits = bits + (uint32(8)) 11270 goto __187 11271 __187: 11272 if 0 != 0 { 11273 goto __186 11274 } 11275 goto __188 11276 __188: 11277 ; 11278 goto __184 11279 __185: 11280 ; 11281 goto __182 11282 __182: 11283 if 0 != 0 { 11284 goto __181 11285 } 11286 goto __183 11287 __183: 11288 ; 11289 __194: 11290 hold >>= int32(here.Fbits) 11291 bits = bits - (uint32(here.Fbits)) 11292 goto __195 11293 __195: 11294 if 0 != 0 { 11295 goto __194 11296 } 11297 goto __196 11298 __196: 11299 ; 11300 len = uint32(0) 11301 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 11302 __197: 11303 hold >>= 7 11304 bits = bits - (uint32(7)) 11305 goto __198 11306 __198: 11307 if 0 != 0 { 11308 goto __197 11309 } 11310 goto __199 11311 __199: 11312 ; 11313 __161: 11314 ; 11315 __139: 11316 ; 11317 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 11318 goto __200 11319 } 11320 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11321 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11322 goto __120 11323 __200: 11324 ; 11325 __201: 11326 if !(libc.PostDecUint32(©, 1) != 0) { 11327 goto __202 11328 } 11329 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 11330 goto __201 11331 __202: 11332 ; 11333 __134: 11334 ; 11335 goto __119 11336 __120: 11337 ; 11338 11339 // handle error breaks in while 11340 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 11341 goto __203 11342 } 11343 goto __5 11344 __203: 11345 ; 11346 11347 // check for end-of-block code (better have one) 11348 if !(int32(*(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + 256*2))) == 0) { 11349 goto __204 11350 } 11351 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 11352 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11353 goto __5 11354 __204: 11355 ; 11356 11357 // build code tables -- note: do not change the lenbits or distbits 11358 // values here (9 and 6) without reading the comments in inftrees.h 11359 // concerning the ENOUGH constants, which depend on those values 11360 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */ 11361 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11362 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 11363 ret = Xinflate_table(tls, LENS, state+116 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 112 /* &.next */), 11364 (state + 88 /* &.lenbits */), state+756 /* &.work */) 11365 if !(ret != 0) { 11366 goto __205 11367 } 11368 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 11369 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11370 goto __5 11371 __205: 11372 ; 11373 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11374 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 11375 ret = Xinflate_table(tls, DISTS, ((state + 116 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 11376 (state + 112 /* &.next */), (state + 92 /* &.distbits */), state+756 /* &.work */) 11377 if !(ret != 0) { 11378 goto __206 11379 } 11380 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 11381 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11382 goto __5 11383 __206: 11384 ; 11385 11386 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11387 11388 __9: 11389 // use inflate_fast() if we have enough input and output 11390 if !((have >= uint32(6)) && (left >= uint32(258))) { 11391 goto __207 11392 } 11393 __208: 11394 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 11395 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 11396 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 11397 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 11398 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11399 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11400 goto __209 11401 __209: 11402 if 0 != 0 { 11403 goto __208 11404 } 11405 goto __210 11406 __210: 11407 ; 11408 if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 11409 goto __211 11410 } 11411 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - left) 11412 __211: 11413 ; 11414 Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 11415 __212: 11416 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11417 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11418 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11419 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11420 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11421 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11422 goto __213 11423 __213: 11424 if 0 != 0 { 11425 goto __212 11426 } 11427 goto __214 11428 __214: 11429 ; 11430 goto __5 11431 __207: 11432 ; 11433 11434 // get a literal, length, or end-of-block code 11435 __215: 11436 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 11437 if !((uint32(here.Fbits)) <= bits) { 11438 goto __218 11439 } 11440 goto __217 11441 __218: 11442 ; 11443 __219: 11444 __222: 11445 if !(have == uint32(0)) { 11446 goto __225 11447 } 11448 have = (*struct { 11449 f func(*libc.TLS, uintptr, uintptr) uint32 11450 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11451 if !(have == uint32(0)) { 11452 goto __226 11453 } 11454 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11455 ret = -5 11456 goto inf_leave 11457 __226: 11458 ; 11459 __225: 11460 ; 11461 goto __223 11462 __223: 11463 if 0 != 0 { 11464 goto __222 11465 } 11466 goto __224 11467 __224: 11468 ; 11469 have-- 11470 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11471 bits = bits + (uint32(8)) 11472 goto __220 11473 __220: 11474 if 0 != 0 { 11475 goto __219 11476 } 11477 goto __221 11478 __221: 11479 ; 11480 goto __216 11481 __216: 11482 goto __215 11483 goto __217 11484 __217: 11485 ; 11486 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 11487 goto __227 11488 } 11489 last = here 11490 __228: 11491 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)) 11492 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 11493 goto __231 11494 } 11495 goto __230 11496 __231: 11497 ; 11498 __232: 11499 __235: 11500 if !(have == uint32(0)) { 11501 goto __238 11502 } 11503 have = (*struct { 11504 f func(*libc.TLS, uintptr, uintptr) uint32 11505 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11506 if !(have == uint32(0)) { 11507 goto __239 11508 } 11509 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11510 ret = -5 11511 goto inf_leave 11512 __239: 11513 ; 11514 __238: 11515 ; 11516 goto __236 11517 __236: 11518 if 0 != 0 { 11519 goto __235 11520 } 11521 goto __237 11522 __237: 11523 ; 11524 have-- 11525 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11526 bits = bits + (uint32(8)) 11527 goto __233 11528 __233: 11529 if 0 != 0 { 11530 goto __232 11531 } 11532 goto __234 11533 __234: 11534 ; 11535 goto __229 11536 __229: 11537 goto __228 11538 goto __230 11539 __230: 11540 ; 11541 __240: 11542 hold >>= int32(last.Fbits) 11543 bits = bits - (uint32(last.Fbits)) 11544 goto __241 11545 __241: 11546 if 0 != 0 { 11547 goto __240 11548 } 11549 goto __242 11550 __242: 11551 ; 11552 __227: 11553 ; 11554 __243: 11555 hold >>= int32(here.Fbits) 11556 bits = bits - (uint32(here.Fbits)) 11557 goto __244 11558 __244: 11559 if 0 != 0 { 11560 goto __243 11561 } 11562 goto __245 11563 __245: 11564 ; 11565 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 11566 11567 // process literal 11568 if !(int32(here.Fop) == 0) { 11569 goto __246 11570 } 11571 11572 __247: 11573 if !(left == uint32(0)) { 11574 goto __250 11575 } 11576 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11577 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11578 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 11579 if !((*struct { 11580 f func(*libc.TLS, uintptr, uintptr, uint32) int32 11581 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 11582 goto __251 11583 } 11584 ret = -5 11585 goto inf_leave 11586 __251: 11587 ; 11588 __250: 11589 ; 11590 goto __248 11591 __248: 11592 if 0 != 0 { 11593 goto __247 11594 } 11595 goto __249 11596 __249: 11597 ; 11598 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 11599 left-- 11600 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11601 goto __5 11602 __246: 11603 ; 11604 11605 // process end of block 11606 if !((int32(here.Fop) & 32) != 0) { 11607 goto __252 11608 } 11609 11610 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11611 goto __5 11612 __252: 11613 ; 11614 11615 // invalid code 11616 if !((int32(here.Fop) & 64) != 0) { 11617 goto __253 11618 } 11619 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 11620 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11621 goto __5 11622 __253: 11623 ; 11624 11625 // length code -- get extra bits, if any 11626 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 11627 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 11628 goto __254 11629 } 11630 __255: 11631 __258: 11632 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 11633 goto __259 11634 } 11635 __260: 11636 __263: 11637 if !(have == uint32(0)) { 11638 goto __266 11639 } 11640 have = (*struct { 11641 f func(*libc.TLS, uintptr, uintptr) uint32 11642 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11643 if !(have == uint32(0)) { 11644 goto __267 11645 } 11646 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11647 ret = -5 11648 goto inf_leave 11649 __267: 11650 ; 11651 __266: 11652 ; 11653 goto __264 11654 __264: 11655 if 0 != 0 { 11656 goto __263 11657 } 11658 goto __265 11659 __265: 11660 ; 11661 have-- 11662 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11663 bits = bits + (uint32(8)) 11664 goto __261 11665 __261: 11666 if 0 != 0 { 11667 goto __260 11668 } 11669 goto __262 11670 __262: 11671 ; 11672 goto __258 11673 __259: 11674 ; 11675 goto __256 11676 __256: 11677 if 0 != 0 { 11678 goto __255 11679 } 11680 goto __257 11681 __257: 11682 ; 11683 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 11684 __268: 11685 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 11686 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 11687 goto __269 11688 __269: 11689 if 0 != 0 { 11690 goto __268 11691 } 11692 goto __270 11693 __270: 11694 ; 11695 __254: 11696 ; 11697 11698 // get distance code 11699 __271: 11700 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 11701 if !((uint32(here.Fbits)) <= bits) { 11702 goto __274 11703 } 11704 goto __273 11705 __274: 11706 ; 11707 __275: 11708 __278: 11709 if !(have == uint32(0)) { 11710 goto __281 11711 } 11712 have = (*struct { 11713 f func(*libc.TLS, uintptr, uintptr) uint32 11714 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11715 if !(have == uint32(0)) { 11716 goto __282 11717 } 11718 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11719 ret = -5 11720 goto inf_leave 11721 __282: 11722 ; 11723 __281: 11724 ; 11725 goto __279 11726 __279: 11727 if 0 != 0 { 11728 goto __278 11729 } 11730 goto __280 11731 __280: 11732 ; 11733 have-- 11734 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11735 bits = bits + (uint32(8)) 11736 goto __276 11737 __276: 11738 if 0 != 0 { 11739 goto __275 11740 } 11741 goto __277 11742 __277: 11743 ; 11744 goto __272 11745 __272: 11746 goto __271 11747 goto __273 11748 __273: 11749 ; 11750 if !((int32(here.Fop) & 0xf0) == 0) { 11751 goto __283 11752 } 11753 last = here 11754 __284: 11755 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)) 11756 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 11757 goto __287 11758 } 11759 goto __286 11760 __287: 11761 ; 11762 __288: 11763 __291: 11764 if !(have == uint32(0)) { 11765 goto __294 11766 } 11767 have = (*struct { 11768 f func(*libc.TLS, uintptr, uintptr) uint32 11769 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11770 if !(have == uint32(0)) { 11771 goto __295 11772 } 11773 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11774 ret = -5 11775 goto inf_leave 11776 __295: 11777 ; 11778 __294: 11779 ; 11780 goto __292 11781 __292: 11782 if 0 != 0 { 11783 goto __291 11784 } 11785 goto __293 11786 __293: 11787 ; 11788 have-- 11789 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11790 bits = bits + (uint32(8)) 11791 goto __289 11792 __289: 11793 if 0 != 0 { 11794 goto __288 11795 } 11796 goto __290 11797 __290: 11798 ; 11799 goto __285 11800 __285: 11801 goto __284 11802 goto __286 11803 __286: 11804 ; 11805 __296: 11806 hold >>= int32(last.Fbits) 11807 bits = bits - (uint32(last.Fbits)) 11808 goto __297 11809 __297: 11810 if 0 != 0 { 11811 goto __296 11812 } 11813 goto __298 11814 __298: 11815 ; 11816 __283: 11817 ; 11818 __299: 11819 hold >>= int32(here.Fbits) 11820 bits = bits - (uint32(here.Fbits)) 11821 goto __300 11822 __300: 11823 if 0 != 0 { 11824 goto __299 11825 } 11826 goto __301 11827 __301: 11828 ; 11829 if !((int32(here.Fop) & 64) != 0) { 11830 goto __302 11831 } 11832 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 11833 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11834 goto __5 11835 __302: 11836 ; 11837 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 11838 11839 // get distance extra bits, if any 11840 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 11841 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 11842 goto __303 11843 } 11844 __304: 11845 __307: 11846 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 11847 goto __308 11848 } 11849 __309: 11850 __312: 11851 if !(have == uint32(0)) { 11852 goto __315 11853 } 11854 have = (*struct { 11855 f func(*libc.TLS, uintptr, uintptr) uint32 11856 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11857 if !(have == uint32(0)) { 11858 goto __316 11859 } 11860 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11861 ret = -5 11862 goto inf_leave 11863 __316: 11864 ; 11865 __315: 11866 ; 11867 goto __313 11868 __313: 11869 if 0 != 0 { 11870 goto __312 11871 } 11872 goto __314 11873 __314: 11874 ; 11875 have-- 11876 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11877 bits = bits + (uint32(8)) 11878 goto __310 11879 __310: 11880 if 0 != 0 { 11881 goto __309 11882 } 11883 goto __311 11884 __311: 11885 ; 11886 goto __307 11887 __308: 11888 ; 11889 goto __305 11890 __305: 11891 if 0 != 0 { 11892 goto __304 11893 } 11894 goto __306 11895 __306: 11896 ; 11897 *(*uint32)(unsafe.Pointer(state + 72 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 11898 __317: 11899 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 11900 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 11901 goto __318 11902 __318: 11903 if 0 != 0 { 11904 goto __317 11905 } 11906 goto __319 11907 __319: 11908 ; 11909 __303: 11910 ; 11911 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (func() uint32 { 11912 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 11913 return left 11914 } 11915 return uint32(0) 11916 }()))) { 11917 goto __320 11918 } 11919 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 11920 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11921 goto __5 11922 __320: 11923 ; 11924 11925 // copy match from window to output 11926 __321: 11927 __324: 11928 if !(left == uint32(0)) { 11929 goto __327 11930 } 11931 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11932 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11933 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 11934 if !((*struct { 11935 f func(*libc.TLS, uintptr, uintptr, uint32) int32 11936 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 11937 goto __328 11938 } 11939 ret = -5 11940 goto inf_leave 11941 __328: 11942 ; 11943 __327: 11944 ; 11945 goto __325 11946 __325: 11947 if 0 != 0 { 11948 goto __324 11949 } 11950 goto __326 11951 __326: 11952 ; 11953 copy = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset) 11954 if !(copy < left) { 11955 goto __329 11956 } 11957 from = (put + uintptr(copy)) 11958 copy = (left - copy) 11959 goto __330 11960 __329: 11961 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 11962 copy = left 11963 __330: 11964 ; 11965 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 11966 goto __331 11967 } 11968 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 11969 __331: 11970 ; 11971 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) -= (copy) 11972 left = left - (copy) 11973 __332: 11974 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11975 goto __333 11976 __333: 11977 if libc.PreDecUint32(©, 1) != 0 { 11978 goto __332 11979 } 11980 goto __334 11981 __334: 11982 ; 11983 goto __322 11984 __322: 11985 if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { 11986 goto __321 11987 } 11988 goto __323 11989 __323: 11990 ; 11991 goto __5 11992 11993 __10: 11994 // inflate stream terminated properly -- write leftover output 11995 ret = Z_STREAM_END 11996 if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 11997 goto __335 11998 } 11999 if !((*struct { 12000 f func(*libc.TLS, uintptr, uintptr, uint32) int32 12001 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, ((*Inflate_state)(unsafe.Pointer(state)).Fwsize-left)) != 0) { 12002 goto __336 12003 } 12004 ret = -5 12005 __336: 12006 ; 12007 __335: 12008 ; 12009 goto inf_leave 12010 12011 __11: 12012 ret = -3 12013 goto inf_leave 12014 12015 __12: // can't happen, but makes compilers happy 12016 ret = -2 12017 goto inf_leave 12018 __5: 12019 ; 12020 goto __3 12021 __3: 12022 goto __2 12023 goto __4 12024 __4: 12025 ; 12026 12027 // Return unused input 12028 inf_leave: 12029 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 12030 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 12031 return ret 12032 } 12033 12034 var order = // permutation of code lengths 12035 [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 */ 12036 12037 func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */ 12038 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 12039 return -2 12040 } 12041 (*struct { 12042 f func(*libc.TLS, Voidpf, Voidpf) 12043 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 12044 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 12045 12046 return Z_OK 12047 } 12048 12049 // 12050 // Decode literal, length, and distance codes and write out the resulting 12051 // literal and match bytes until either not enough input or output is 12052 // available, an end-of-block is encountered, or a data error is encountered. 12053 // When large enough input and output buffers are supplied to inflate(), for 12054 // example, a 16K input buffer and a 64K output buffer, more than 95% of the 12055 // inflate execution time is spent in this routine. 12056 // 12057 // Entry assumptions: 12058 // 12059 // state->mode == LEN 12060 // strm->avail_in >= 6 12061 // strm->avail_out >= 258 12062 // start >= strm->avail_out 12063 // state->bits < 8 12064 // 12065 // On return, state->mode is one of: 12066 // 12067 // LEN -- ran out of enough output space or enough available input 12068 // TYPE -- reached end of block code, inflate() to interpret next block 12069 // BAD -- error in block data 12070 // 12071 // Notes: 12072 // 12073 // - The maximum input bits used by a length/distance pair is 15 bits for the 12074 // length code, 5 bits for the length extra, 15 bits for the distance code, 12075 // and 13 bits for the distance extra. This totals 48 bits, or six bytes. 12076 // Therefore if strm->avail_in >= 6, then there is enough input to avoid 12077 // checking for available input while decoding. 12078 // 12079 // - The maximum bytes that a single length/distance pair can output is 258 12080 // bytes, which is the maximum length that can be coded. inflate_fast() 12081 // requires strm->avail_out >= 258 for each loop to avoid checking for 12082 // output space. 12083 // 12084 func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */ 12085 var state uintptr 12086 var in uintptr // local strm->next_in 12087 var last uintptr // have enough input while in < last 12088 var out uintptr // local strm->next_out 12089 var beg uintptr // inflate()'s initial strm->next_out 12090 var end uintptr // while out < end, enough space available 12091 var wsize uint32 // window size or zero if not using window 12092 var whave uint32 // valid bytes in the window 12093 var wnext uint32 // window write index 12094 var window uintptr // allocated sliding window, if wsize != 0 12095 var hold uint32 // local strm->hold 12096 var bits uint32 // local strm->bits 12097 var lcode uintptr // local strm->lencode 12098 var dcode uintptr // local strm->distcode 12099 var lmask uint32 // mask for first level of length codes 12100 var dmask uint32 // mask for first level of distance codes 12101 var here Code // retrieved table entry 12102 var op uint32 // code bits, operation, extra bits, or 12103 // window position, window bytes to copy 12104 var len uint32 // match length, unused bytes 12105 var dist uint32 // match distance 12106 var from uintptr // where to copy match from 12107 12108 // copy state to local variables 12109 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12110 in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 12111 last = (in + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_in - UInt(5)))) 12112 out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 12113 beg = (out - uintptr((start - (*Z_stream)(unsafe.Pointer(strm)).Favail_out))) 12114 end = (out + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_out - UInt(257)))) 12115 wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12116 whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 12117 wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext 12118 window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 12119 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 12120 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 12121 lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode 12122 dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode 12123 lmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Flenbits) - uint32(1)) 12124 dmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fdistbits) - uint32(1)) 12125 12126 // decode literals and length/distances until end-of-block or not enough 12127 // input data or output space 12128 __1: 12129 if !(bits < uint32(15)) { 12130 goto __4 12131 } 12132 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12133 bits = bits + (uint32(8)) 12134 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12135 bits = bits + (uint32(8)) 12136 __4: 12137 ; 12138 here = *(*Code)(unsafe.Pointer(lcode + uintptr((hold&uint32(lmask)))*4)) 12139 dolen: 12140 op = uint32(here.Fbits) 12141 hold >>= op 12142 bits = bits - (op) 12143 op = uint32(here.Fop) 12144 if !(op == uint32(0)) { 12145 goto __5 12146 } // literal 12147 12148 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval) 12149 goto __6 12150 __5: 12151 if !((op & uint32(16)) != 0) { 12152 goto __7 12153 } // length base 12154 len = uint32(here.Fval) 12155 op = op & (uint32(15)) // number of extra bits 12156 if !(op != 0) { 12157 goto __9 12158 } 12159 if !(bits < op) { 12160 goto __10 12161 } 12162 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12163 bits = bits + (uint32(8)) 12164 __10: 12165 ; 12166 len = len + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 12167 hold >>= op 12168 bits = bits - (op) 12169 __9: 12170 ; 12171 12172 if !(bits < uint32(15)) { 12173 goto __11 12174 } 12175 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12176 bits = bits + (uint32(8)) 12177 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12178 bits = bits + (uint32(8)) 12179 __11: 12180 ; 12181 here = *(*Code)(unsafe.Pointer(dcode + uintptr((hold&uint32(dmask)))*4)) 12182 dodist: 12183 op = uint32(here.Fbits) 12184 hold >>= op 12185 bits = bits - (op) 12186 op = uint32(here.Fop) 12187 if !((op & uint32(16)) != 0) { 12188 goto __12 12189 } // distance base 12190 dist = uint32(here.Fval) 12191 op = op & (uint32(15)) // number of extra bits 12192 if !(bits < op) { 12193 goto __14 12194 } 12195 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12196 bits = bits + (uint32(8)) 12197 if !(bits < op) { 12198 goto __15 12199 } 12200 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12201 bits = bits + (uint32(8)) 12202 __15: 12203 ; 12204 __14: 12205 ; 12206 dist = dist + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 12207 hold >>= op 12208 bits = bits - (op) 12209 12210 op = (uint32((int32(out) - int32(beg)) / 1)) // max distance in output 12211 if !(dist > op) { 12212 goto __16 12213 } // see if copy from window 12214 op = (dist - op) // distance back in window 12215 if !(op > whave) { 12216 goto __18 12217 } 12218 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 12219 goto __19 12220 } 12221 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 12222 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12223 goto __3 12224 __19: 12225 ; 12226 __18: 12227 ; 12228 from = window 12229 if !(wnext == uint32(0)) { 12230 goto __20 12231 } // very common case 12232 from += (uintptr(wsize - op)) 12233 if !(op < len) { 12234 goto __22 12235 } // some from window 12236 len = len - (op) 12237 __23: 12238 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12239 goto __24 12240 __24: 12241 if libc.PreDecUint32(&op, 1) != 0 { 12242 goto __23 12243 } 12244 goto __25 12245 __25: 12246 ; 12247 from = (out - uintptr(dist)) // rest from output 12248 __22: 12249 ; 12250 goto __21 12251 __20: 12252 if !(wnext < op) { 12253 goto __26 12254 } // wrap around window 12255 from += (uintptr((wsize + wnext) - op)) 12256 op = op - (wnext) 12257 if !(op < len) { 12258 goto __28 12259 } // some from end of window 12260 len = len - (op) 12261 __29: 12262 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12263 goto __30 12264 __30: 12265 if libc.PreDecUint32(&op, 1) != 0 { 12266 goto __29 12267 } 12268 goto __31 12269 __31: 12270 ; 12271 from = window 12272 if !(wnext < len) { 12273 goto __32 12274 } // some from start of window 12275 op = wnext 12276 len = len - (op) 12277 __33: 12278 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12279 goto __34 12280 __34: 12281 if libc.PreDecUint32(&op, 1) != 0 { 12282 goto __33 12283 } 12284 goto __35 12285 __35: 12286 ; 12287 from = (out - uintptr(dist)) // rest from output 12288 __32: 12289 ; 12290 __28: 12291 ; 12292 goto __27 12293 __26: // contiguous in window 12294 from += (uintptr(wnext - op)) 12295 if !(op < len) { 12296 goto __36 12297 } // some from window 12298 len = len - (op) 12299 __37: 12300 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12301 goto __38 12302 __38: 12303 if libc.PreDecUint32(&op, 1) != 0 { 12304 goto __37 12305 } 12306 goto __39 12307 __39: 12308 ; 12309 from = (out - uintptr(dist)) // rest from output 12310 __36: 12311 ; 12312 __27: 12313 ; 12314 __21: 12315 ; 12316 __40: 12317 if !(len > uint32(2)) { 12318 goto __41 12319 } 12320 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12321 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12322 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12323 len = len - (uint32(3)) 12324 goto __40 12325 __41: 12326 ; 12327 if !(len != 0) { 12328 goto __42 12329 } 12330 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12331 if !(len > uint32(1)) { 12332 goto __43 12333 } 12334 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12335 __43: 12336 ; 12337 __42: 12338 ; 12339 goto __17 12340 __16: 12341 from = (out - uintptr(dist)) // copy direct from output 12342 __44: // minimum length is three 12343 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12344 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12345 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12346 len = len - (uint32(3)) 12347 goto __45 12348 __45: 12349 if len > uint32(2) { 12350 goto __44 12351 } 12352 goto __46 12353 __46: 12354 ; 12355 if !(len != 0) { 12356 goto __47 12357 } 12358 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12359 if !(len > uint32(1)) { 12360 goto __48 12361 } 12362 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12363 __48: 12364 ; 12365 __47: 12366 ; 12367 __17: 12368 ; 12369 goto __13 12370 __12: 12371 if !((op & uint32(64)) == uint32(0)) { 12372 goto __49 12373 } // 2nd level distance code 12374 here = *(*Code)(unsafe.Pointer(dcode + uintptr((uint32(here.Fval)+(hold&(uint32((uint32(1)<<op)-uint32(1))))))*4)) 12375 goto dodist 12376 goto __50 12377 __49: 12378 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 12379 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12380 goto __3 12381 __50: 12382 ; 12383 __13: 12384 ; 12385 goto __8 12386 __7: 12387 if !((op & uint32(64)) == uint32(0)) { 12388 goto __51 12389 } // 2nd level length code 12390 here = *(*Code)(unsafe.Pointer(lcode + uintptr((uint32(here.Fval)+(hold&(uint32((uint32(1)<<op)-uint32(1))))))*4)) 12391 goto dolen 12392 goto __52 12393 __51: 12394 if !((op & uint32(32)) != 0) { 12395 goto __53 12396 } // end-of-block 12397 12398 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12399 goto __3 12400 goto __54 12401 __53: 12402 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 12403 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12404 goto __3 12405 __54: 12406 ; 12407 __52: 12408 ; 12409 __8: 12410 ; 12411 __6: 12412 ; 12413 goto __2 12414 __2: 12415 if (in < last) && (out < end) { 12416 goto __1 12417 } 12418 goto __3 12419 __3: 12420 ; 12421 12422 // return unused bytes (on entry, bits < 8, so in won't go too far back) 12423 len = (bits >> 3) 12424 in -= uintptr(len) 12425 bits = bits - (len << 3) 12426 hold = hold & (uint32((uint32(1) << bits) - uint32(1))) 12427 12428 // update state and return 12429 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in 12430 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out 12431 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 { 12432 if in < last { 12433 return (uint32(5 + ((int32(last) - int32(in)) / 1))) 12434 } 12435 return (uint32(5 - ((int32(in) - int32(last)) / 1))) 12436 }() 12437 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 { 12438 if out < end { 12439 return (uint32(257 + ((int32(end) - int32(out)) / 1))) 12440 } 12441 return (uint32(257 - ((int32(out) - int32(end)) / 1))) 12442 }() 12443 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 12444 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 12445 return 12446 } 12447 12448 // 12449 // inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): 12450 // - Using bit fields for code structure 12451 // - Different op definition to avoid & for extra bits (do & for table bits) 12452 // - Three separate decoding do-loops for direct, window, and wnext == 0 12453 // - Special case for distance > 1 copies to do overlapped load and store copy 12454 // - Explicit branch predictions (based on measured branch probabilities) 12455 // - Deferring match copy and interspersed it with decoding subsequent codes 12456 // - Swapping literal/length else 12457 // - Swapping window/direct else 12458 // - Larger unrolled copy loops (three is about right) 12459 // - Moving len -= 3 statement into middle of loop 12460 // 12461 12462 func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */ 12463 var state uintptr 12464 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 12465 return 1 12466 } 12467 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12468 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) { 12469 return 1 12470 } 12471 return 0 12472 } 12473 12474 func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */ 12475 var state uintptr 12476 12477 if inflateStateCheck(tls, strm) != 0 { 12478 return -2 12479 } 12480 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12481 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+20 /* &.total_out */, libc.AssignPtrUint32(state+32 /* &.total */, uint32(0))) 12482 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 12483 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite 12484 (*Z_stream)(unsafe.Pointer(strm)).Fadler = (ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)) 12485 } 12486 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD 12487 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 12488 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0 12489 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 12490 (*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL) 12491 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0) 12492 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 12493 (*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+84 /* &.distcode */, libc.AssignPtrUintptr(state+112 /* &.next */, state+1332 /* &.codes */)) 12494 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 12495 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 12496 12497 return Z_OK 12498 } 12499 12500 func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */ 12501 var state uintptr 12502 12503 if inflateStateCheck(tls, strm) != 0 { 12504 return -2 12505 } 12506 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12507 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) 12508 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 12509 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 12510 return XinflateResetKeep(tls, strm) 12511 } 12512 12513 func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */ 12514 var wrap int32 12515 var state uintptr 12516 12517 // get the state 12518 if inflateStateCheck(tls, strm) != 0 { 12519 return -2 12520 } 12521 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12522 12523 // extract wrap request from windowBits parameter 12524 if windowBits < 0 { 12525 wrap = 0 12526 windowBits = -windowBits 12527 } else { 12528 wrap = ((windowBits >> 4) + 5) 12529 if windowBits < 48 { 12530 windowBits = windowBits & (15) 12531 } 12532 } 12533 12534 // set number of window bits, free window if different 12535 if (windowBits != 0) && ((windowBits < 8) || (windowBits > 15)) { 12536 return -2 12537 } 12538 if ((*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL)) && ((*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits)) { 12539 (*struct { 12540 f func(*libc.TLS, Voidpf, Voidpf) 12541 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 12542 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 12543 } 12544 12545 // update state and reset the rest of it 12546 (*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap 12547 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits) 12548 return XinflateReset(tls, strm) 12549 } 12550 12551 func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */ 12552 var ret int32 12553 var state uintptr 12554 12555 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{})))) { 12556 return -6 12557 } 12558 if strm == uintptr(Z_NULL) { 12559 return -2 12560 } 12561 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 12562 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 12563 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 12564 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 12565 }{Xzcalloc})) 12566 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 12567 } 12568 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 12569 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 12570 f func(*libc.TLS, Voidpf, Voidpf) 12571 }{Xzcfree})) 12572 } 12573 state = (*struct { 12574 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 12575 })(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{}))) 12576 if state == uintptr(Z_NULL) { 12577 return -4 12578 } 12579 12580 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 12581 (*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm 12582 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 12583 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2() 12584 ret = XinflateReset2(tls, strm, windowBits) 12585 if ret != Z_OK { 12586 (*struct { 12587 f func(*libc.TLS, Voidpf, Voidpf) 12588 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state) 12589 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 12590 } 12591 return ret 12592 } 12593 12594 func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */ 12595 return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size) 12596 } 12597 12598 func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */ 12599 var state uintptr 12600 12601 if inflateStateCheck(tls, strm) != 0 { 12602 return -2 12603 } 12604 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12605 if bits < 0 { 12606 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0) 12607 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 12608 return Z_OK 12609 } 12610 if (bits > 16) || (((*Inflate_state)(unsafe.Pointer(state)).Fbits + UInt(bits)) > uint32(32)) { 12611 return -2 12612 } 12613 value = int32(int32(value) & ((int32(1) << bits) - 1)) 12614 *(*uint32)(unsafe.Pointer(state + 60 /* &.hold */)) += (uint32(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)) 12615 *(*uint32)(unsafe.Pointer(state + 64 /* &.bits */)) += (UInt(bits)) 12616 return Z_OK 12617 } 12618 12619 // 12620 // Return state with length and distance decoding tables and index sizes set to 12621 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 12622 // If BUILDFIXED is defined, then instead this routine builds the tables the 12623 // first time it's called, and returns those tables the first time and 12624 // thereafter. This reduces the size of the code by about 2K bytes, in 12625 // exchange for a little execution time. However, BUILDFIXED should not be 12626 // used for threaded applications, since the rewriting of the tables and virgin 12627 // may not be thread-safe. 12628 // 12629 func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */ 12630 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1)) 12631 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 12632 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1)) 12633 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 12634 } 12635 12636 var lenfix1 = [512]Code{ 12637 {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)}, 12638 {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)}, 12639 {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)}, 12640 {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)}, 12641 {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)}, 12642 {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)}, 12643 {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)}, 12644 {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)}, 12645 {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)}, 12646 {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)}, 12647 {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)}, 12648 {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)}, 12649 {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)}, 12650 {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)}, 12651 {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)}, 12652 {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)}, 12653 {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)}, 12654 {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)}, 12655 {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)}, 12656 {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)}, 12657 {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)}, 12658 {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)}, 12659 {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)}, 12660 {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)}, 12661 {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)}, 12662 {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)}, 12663 {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)}, 12664 {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)}, 12665 {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)}, 12666 {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)}, 12667 {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)}, 12668 {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)}, 12669 {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)}, 12670 {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)}, 12671 {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)}, 12672 {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)}, 12673 {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)}, 12674 {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)}, 12675 {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)}, 12676 {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)}, 12677 {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)}, 12678 {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)}, 12679 {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)}, 12680 {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)}, 12681 {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)}, 12682 {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)}, 12683 {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)}, 12684 {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)}, 12685 {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)}, 12686 {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)}, 12687 {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)}, 12688 {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)}, 12689 {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)}, 12690 {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)}, 12691 {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)}, 12692 {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)}, 12693 {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)}, 12694 {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)}, 12695 {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)}, 12696 {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)}, 12697 {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)}, 12698 {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)}, 12699 {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)}, 12700 {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)}, 12701 {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)}, 12702 {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)}, 12703 {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)}, 12704 {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)}, 12705 {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)}, 12706 {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)}, 12707 {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)}, 12708 {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)}, 12709 {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)}, 12710 {Fbits: uint8(9), Fval: uint16(255)}, 12711 } /* inffixed.h:10:23 */ 12712 var distfix1 = [32]Code{ 12713 {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)}, 12714 {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)}, 12715 {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)}, 12716 {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)}, 12717 {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)}, 12718 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 12719 } /* inffixed.h:87:23 */ 12720 12721 // 12722 // Update the window with the last wsize (normally 32K) bytes written before 12723 // returning. If window does not exist yet, create it. This is only called 12724 // when a window is already in use, or when output has been written during this 12725 // inflate call, but the end of the deflate stream has not been reached yet. 12726 // It is also called to create a window for dictionary data when a dictionary 12727 // is loaded. 12728 // 12729 // Providing output buffers larger than 32K to inflate() should provide a speed 12730 // advantage, since only the last 32K of output is copied to the sliding window 12731 // upon return from inflate(), and since all distances after the first 32K of 12732 // output will fall in the output data, making match copies simpler and faster. 12733 // The advantage may be dependent on the size of the processor's data caches. 12734 // 12735 func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */ 12736 var state uintptr 12737 var dist uint32 12738 12739 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12740 12741 // if it hasn't been done already, allocate space for the window 12742 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 12743 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct { 12744 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 12745 })(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)))) 12746 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 12747 return 1 12748 } 12749 } 12750 12751 // if window not in use yet, initialize 12752 if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) { 12753 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 12754 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 12755 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 12756 } 12757 12758 // copy state->wsize or less output bytes into the circular window 12759 if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 12760 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize)), (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 12761 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 12762 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12763 } else { 12764 dist = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext) 12765 if dist > copy { 12766 dist = copy 12767 } 12768 libc.Xmemcpy(tls, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), (end - uintptr(copy)), dist) 12769 copy = copy - (dist) 12770 if copy != 0 { 12771 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr(copy)), copy) 12772 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy 12773 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12774 } else { 12775 *(*uint32)(unsafe.Pointer(state + 52 /* &.wnext */)) += (dist) 12776 if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 12777 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 12778 } 12779 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 12780 *(*uint32)(unsafe.Pointer(state + 48 /* &.whave */)) += (dist) 12781 } 12782 } 12783 } 12784 return 0 12785 } 12786 12787 // Macros for inflate(): 12788 12789 // check function to use adler32() for zlib or crc32() for gzip 12790 12791 // check macros for header crc 12792 12793 // Load registers with state in inflate() for speed 12794 12795 // Restore state from registers in inflate() 12796 12797 // Clear the input bit accumulator 12798 12799 // Get a byte of input into the bit accumulator, or return from inflate() 12800 // if there is no input available. 12801 12802 // Assure that there are at least n bits in the bit accumulator. If there is 12803 // not enough available input to do that, then return from inflate(). 12804 12805 // Return the low n bits of the bit accumulator (n < 16) 12806 12807 // Remove n bits from the bit accumulator 12808 12809 // Remove zero to seven bits as needed to go to a byte boundary 12810 12811 // 12812 // inflate() uses a state machine to process as much input data and generate as 12813 // much output data as possible before returning. The state machine is 12814 // structured roughly as follows: 12815 // 12816 // for (;;) switch (state) { 12817 // ... 12818 // case STATEn: 12819 // if (not enough input data or output space to make progress) 12820 // return; 12821 // ... make progress ... 12822 // state = STATEm; 12823 // break; 12824 // ... 12825 // } 12826 // 12827 // so when inflate() is called again, the same case is attempted again, and 12828 // if the appropriate resources are provided, the machine proceeds to the 12829 // next state. The NEEDBITS() macro is usually the way the state evaluates 12830 // whether it can proceed or should return. NEEDBITS() does the return if 12831 // the requested bits are not available. The typical use of the BITS macros 12832 // is: 12833 // 12834 // NEEDBITS(n); 12835 // ... do something with BITS(n) ... 12836 // DROPBITS(n); 12837 // 12838 // where NEEDBITS(n) either returns from inflate() if there isn't enough 12839 // input left to load n bits into the accumulator, or it continues. BITS(n) 12840 // gives the low n bits in the accumulator. When done, DROPBITS(n) drops 12841 // the low n bits off the accumulator. INITBITS() clears the accumulator 12842 // and sets the number of available bits to zero. BYTEBITS() discards just 12843 // enough bits to put the accumulator on a byte boundary. After BYTEBITS() 12844 // and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. 12845 // 12846 // NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return 12847 // if there is no input available. The decoding of variable length codes uses 12848 // PULLBYTE() directly in order to pull just enough bytes to decode the next 12849 // code, and no more. 12850 // 12851 // Some states loop until they get enough input, making sure that enough 12852 // state information is maintained to continue the loop where it left off 12853 // if NEEDBITS() returns in the loop. For example, want, need, and keep 12854 // would all have to actually be part of the saved state in case NEEDBITS() 12855 // returns: 12856 // 12857 // case STATEw: 12858 // while (want < need) { 12859 // NEEDBITS(n); 12860 // keep[want++] = BITS(n); 12861 // DROPBITS(n); 12862 // } 12863 // state = STATEx; 12864 // case STATEx: 12865 // 12866 // As shown above, if the next state is also the next case, then the break 12867 // is omitted. 12868 // 12869 // A state may also return if there is not enough output space available to 12870 // complete that state. Those states are copying stored data, writing a 12871 // literal byte, and copying a matching string. 12872 // 12873 // When returning, a "goto inf_leave" is used to update the total counters, 12874 // update the check value, and determine whether any progress has been made 12875 // during that inflate() call in order to return the proper return code. 12876 // Progress is defined as a change in either strm->avail_in or strm->avail_out. 12877 // When there is a window, goto inf_leave will update the window with the last 12878 // output written. If a goto inf_leave occurs in the middle of decompression 12879 // and there is no window currently, goto inf_leave will create one and copy 12880 // output to the window for the next call of inflate(). 12881 // 12882 // In this implementation, the flush parameter of inflate() only affects the 12883 // return code (per zlib.h). inflate() always writes as much as possible to 12884 // strm->next_out, given the space available and the provided input--the effect 12885 // documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers 12886 // the allocation of and copying into a sliding window until necessary, which 12887 // provides the effect documented in zlib.h for Z_FINISH when the entire input 12888 // stream available. So the only thing the flush parameter actually does is: 12889 // when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it 12890 // will return Z_BUF_ERROR if it has not reached the end of the stream. 12891 // 12892 12893 func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */ 12894 bp := tls.Alloc(4) 12895 defer tls.Free(4) 12896 12897 var state uintptr 12898 var next uintptr // next input 12899 var put uintptr // next output 12900 var have uint32 12901 var left uint32 // available input and output 12902 var hold uint32 // bit buffer 12903 var bits uint32 // bits in bit buffer 12904 var in uint32 12905 var out uint32 // save starting available input and output 12906 var copy uint32 // number of stored or match bytes to copy 12907 var from uintptr // where to copy match bytes from 12908 var here Code // current decoding table entry 12909 var last Code // parent table entry 12910 var len uint32 // length to copy for repeats, bits to drop 12911 var ret int32 // return code 12912 // var hbuf [4]uint8 at bp, 4 12913 12914 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)))) { 12915 goto __1 12916 } 12917 return -2 12918 __1: 12919 ; 12920 12921 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12922 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 12923 goto __2 12924 } 12925 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 12926 __2: 12927 ; // skip check 12928 __3: 12929 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 12930 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 12931 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 12932 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 12933 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 12934 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 12935 goto __4 12936 __4: 12937 if 0 != 0 { 12938 goto __3 12939 } 12940 goto __5 12941 __5: 12942 ; 12943 in = have 12944 out = left 12945 ret = Z_OK 12946 __6: 12947 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 12948 case HEAD: 12949 goto __10 12950 case FLAGS: 12951 goto __11 12952 case TIME: 12953 goto __12 12954 case OS: 12955 goto __13 12956 case EXLEN: 12957 goto __14 12958 case EXTRA: 12959 goto __15 12960 case NAME: 12961 goto __16 12962 case COMMENT: 12963 goto __17 12964 case HCRC: 12965 goto __18 12966 case DICTID: 12967 goto __19 12968 case DICT: 12969 goto __20 12970 case TYPE: 12971 goto __21 12972 case TYPEDO: 12973 goto __22 12974 case STORED: 12975 goto __23 12976 case COPY_: 12977 goto __24 12978 case COPY: 12979 goto __25 12980 case TABLE: 12981 goto __26 12982 case LENLENS: 12983 goto __27 12984 case CODELENS: 12985 goto __28 12986 case LEN_: 12987 goto __29 12988 case LEN: 12989 goto __30 12990 case LENEXT: 12991 goto __31 12992 case DIST: 12993 goto __32 12994 case DISTEXT: 12995 goto __33 12996 case MATCH: 12997 goto __34 12998 case LIT: 12999 goto __35 13000 case CHECK: 13001 goto __36 13002 case LENGTH: 13003 goto __37 13004 case DONE: 13005 goto __38 13006 case BAD: 13007 goto __39 13008 case MEM: 13009 goto __40 13010 case SYNC: 13011 goto __41 13012 default: 13013 goto __42 13014 } 13015 goto __9 13016 __10: 13017 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) { 13018 goto __43 13019 } 13020 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 13021 goto __9 13022 __43: 13023 ; 13024 __44: 13025 __47: 13026 if !(bits < (uint32(16))) { 13027 goto __48 13028 } 13029 __49: 13030 if !(have == uint32(0)) { 13031 goto __52 13032 } 13033 goto inf_leave 13034 __52: 13035 ; 13036 have-- 13037 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13038 bits = bits + (uint32(8)) 13039 goto __50 13040 __50: 13041 if 0 != 0 { 13042 goto __49 13043 } 13044 goto __51 13045 __51: 13046 ; 13047 goto __47 13048 __48: 13049 ; 13050 goto __45 13051 __45: 13052 if 0 != 0 { 13053 goto __44 13054 } 13055 goto __46 13056 __46: 13057 ; 13058 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) != 0) && (hold == uint32(0x8b1f))) { 13059 goto __53 13060 } // gzip header 13061 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 13062 goto __54 13063 } 13064 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) 13065 __54: 13066 ; 13067 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 13068 __55: 13069 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13070 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13071 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13072 goto __56 13073 __56: 13074 if 0 != 0 { 13075 goto __55 13076 } 13077 goto __57 13078 __57: 13079 ; 13080 __58: 13081 hold = uint32(0) 13082 bits = uint32(0) 13083 goto __59 13084 __59: 13085 if 0 != 0 { 13086 goto __58 13087 } 13088 goto __60 13089 __60: 13090 ; 13091 (*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS 13092 goto __9 13093 __53: 13094 ; 13095 (*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header 13096 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13097 goto __61 13098 } 13099 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1 13100 __61: 13101 ; 13102 if !(!(((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) != 0) || ((((uint32((uint32(hold) & ((uint32(1) << (8)) - uint32(1))) << 8)) + (hold >> 8)) % uint32(31)) != 0)) { 13103 goto __62 13104 } 13105 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */ 13106 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13107 goto __9 13108 __62: 13109 ; 13110 if !((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) != uint32(Z_DEFLATED)) { 13111 goto __63 13112 } 13113 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 13114 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13115 goto __9 13116 __63: 13117 ; 13118 __64: 13119 hold >>= 4 13120 bits = bits - (uint32(4)) 13121 goto __65 13122 __65: 13123 if 0 != 0 { 13124 goto __64 13125 } 13126 goto __66 13127 __66: 13128 ; 13129 len = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(8)) 13130 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 13131 goto __67 13132 } 13133 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = len 13134 __67: 13135 ; 13136 if !((len > uint32(15)) || (len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits)) { 13137 goto __68 13138 } 13139 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */ 13140 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13141 goto __9 13142 __68: 13143 ; 13144 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = (uint32(1) << len) 13145 13146 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28 /* &.check */, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))) 13147 (*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 { 13148 if (hold & uint32(0x200)) != 0 { 13149 return DICTID 13150 } 13151 return TYPE 13152 }() 13153 __69: 13154 hold = uint32(0) 13155 bits = uint32(0) 13156 goto __70 13157 __70: 13158 if 0 != 0 { 13159 goto __69 13160 } 13161 goto __71 13162 __71: 13163 ; 13164 goto __9 13165 __11: 13166 __72: 13167 __75: 13168 if !(bits < (uint32(16))) { 13169 goto __76 13170 } 13171 __77: 13172 if !(have == uint32(0)) { 13173 goto __80 13174 } 13175 goto inf_leave 13176 __80: 13177 ; 13178 have-- 13179 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13180 bits = bits + (uint32(8)) 13181 goto __78 13182 __78: 13183 if 0 != 0 { 13184 goto __77 13185 } 13186 goto __79 13187 __79: 13188 ; 13189 goto __75 13190 __76: 13191 ; 13192 goto __73 13193 __73: 13194 if 0 != 0 { 13195 goto __72 13196 } 13197 goto __74 13198 __74: 13199 ; 13200 (*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold) 13201 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xff) != Z_DEFLATED) { 13202 goto __81 13203 } 13204 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 13205 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13206 goto __9 13207 __81: 13208 ; 13209 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xe000) != 0) { 13210 goto __82 13211 } 13212 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */ 13213 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13214 goto __9 13215 __82: 13216 ; 13217 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13218 goto __83 13219 } 13220 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = (int32((hold >> 8) & uint32(1))) 13221 __83: 13222 ; 13223 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13224 goto __84 13225 } 13226 __85: 13227 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13228 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13229 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13230 goto __86 13231 __86: 13232 if 0 != 0 { 13233 goto __85 13234 } 13235 goto __87 13236 __87: 13237 ; 13238 __84: 13239 ; 13240 __88: 13241 hold = uint32(0) 13242 bits = uint32(0) 13243 goto __89 13244 __89: 13245 if 0 != 0 { 13246 goto __88 13247 } 13248 goto __90 13249 __90: 13250 ; 13251 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME 13252 __12: 13253 __91: 13254 __94: 13255 if !(bits < (uint32(32))) { 13256 goto __95 13257 } 13258 __96: 13259 if !(have == uint32(0)) { 13260 goto __99 13261 } 13262 goto inf_leave 13263 __99: 13264 ; 13265 have-- 13266 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13267 bits = bits + (uint32(8)) 13268 goto __97 13269 __97: 13270 if 0 != 0 { 13271 goto __96 13272 } 13273 goto __98 13274 __98: 13275 ; 13276 goto __94 13277 __95: 13278 ; 13279 goto __92 13280 __92: 13281 if 0 != 0 { 13282 goto __91 13283 } 13284 goto __93 13285 __93: 13286 ; 13287 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13288 goto __100 13289 } 13290 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold 13291 __100: 13292 ; 13293 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13294 goto __101 13295 } 13296 __102: 13297 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13298 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13299 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 2)) = (uint8((hold) >> 16)) 13300 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 3)) = (uint8((hold) >> 24)) 13301 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(4)) 13302 goto __103 13303 __103: 13304 if 0 != 0 { 13305 goto __102 13306 } 13307 goto __104 13308 __104: 13309 ; 13310 __101: 13311 ; 13312 __105: 13313 hold = uint32(0) 13314 bits = uint32(0) 13315 goto __106 13316 __106: 13317 if 0 != 0 { 13318 goto __105 13319 } 13320 goto __107 13321 __107: 13322 ; 13323 (*Inflate_state)(unsafe.Pointer(state)).Fmode = OS 13324 __13: 13325 __108: 13326 __111: 13327 if !(bits < (uint32(16))) { 13328 goto __112 13329 } 13330 __113: 13331 if !(have == uint32(0)) { 13332 goto __116 13333 } 13334 goto inf_leave 13335 __116: 13336 ; 13337 have-- 13338 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13339 bits = bits + (uint32(8)) 13340 goto __114 13341 __114: 13342 if 0 != 0 { 13343 goto __113 13344 } 13345 goto __115 13346 __115: 13347 ; 13348 goto __111 13349 __112: 13350 ; 13351 goto __109 13352 __109: 13353 if 0 != 0 { 13354 goto __108 13355 } 13356 goto __110 13357 __110: 13358 ; 13359 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13360 goto __117 13361 } 13362 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = (int32(hold & uint32(0xff))) 13363 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = (int32(hold >> 8)) 13364 __117: 13365 ; 13366 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13367 goto __118 13368 } 13369 __119: 13370 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13371 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13372 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13373 goto __120 13374 __120: 13375 if 0 != 0 { 13376 goto __119 13377 } 13378 goto __121 13379 __121: 13380 ; 13381 __118: 13382 ; 13383 __122: 13384 hold = uint32(0) 13385 bits = uint32(0) 13386 goto __123 13387 __123: 13388 if 0 != 0 { 13389 goto __122 13390 } 13391 goto __124 13392 __124: 13393 ; 13394 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN 13395 __14: 13396 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 13397 goto __125 13398 } 13399 __127: 13400 __130: 13401 if !(bits < (uint32(16))) { 13402 goto __131 13403 } 13404 __132: 13405 if !(have == uint32(0)) { 13406 goto __135 13407 } 13408 goto inf_leave 13409 __135: 13410 ; 13411 have-- 13412 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13413 bits = bits + (uint32(8)) 13414 goto __133 13415 __133: 13416 if 0 != 0 { 13417 goto __132 13418 } 13419 goto __134 13420 __134: 13421 ; 13422 goto __130 13423 __131: 13424 ; 13425 goto __128 13426 __128: 13427 if 0 != 0 { 13428 goto __127 13429 } 13430 goto __129 13431 __129: 13432 ; 13433 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) 13434 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13435 goto __136 13436 } 13437 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) 13438 __136: 13439 ; 13440 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13441 goto __137 13442 } 13443 __138: 13444 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13445 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13446 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13447 goto __139 13448 __139: 13449 if 0 != 0 { 13450 goto __138 13451 } 13452 goto __140 13453 __140: 13454 ; 13455 __137: 13456 ; 13457 __141: 13458 hold = uint32(0) 13459 bits = uint32(0) 13460 goto __142 13461 __142: 13462 if 0 != 0 { 13463 goto __141 13464 } 13465 goto __143 13466 __143: 13467 ; 13468 goto __126 13469 __125: 13470 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13471 goto __144 13472 } 13473 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL) 13474 __144: 13475 ; 13476 __126: 13477 ; 13478 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA 13479 __15: 13480 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 13481 goto __145 13482 } 13483 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13484 if !(copy > have) { 13485 goto __146 13486 } 13487 copy = have 13488 __146: 13489 ; 13490 if !(copy != 0) { 13491 goto __147 13492 } 13493 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) && ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL))) { 13494 goto __148 13495 } 13496 len = ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength) 13497 libc.Xmemcpy(tls, ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra + uintptr(len)), next, 13498 func() uint32 { 13499 if (len + copy) > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { 13500 return ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len) 13501 } 13502 return copy 13503 }()) 13504 __148: 13505 ; 13506 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13507 goto __149 13508 } 13509 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13510 __149: 13511 ; 13512 have = have - (copy) 13513 next += uintptr(copy) 13514 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) -= (copy) 13515 __147: 13516 ; 13517 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) { 13518 goto __150 13519 } 13520 goto inf_leave 13521 __150: 13522 ; 13523 __145: 13524 ; 13525 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 13526 (*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME 13527 __16: 13528 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0800) != 0) { 13529 goto __151 13530 } 13531 if !(have == uint32(0)) { 13532 goto __153 13533 } 13534 goto inf_leave 13535 __153: 13536 ; 13537 copy = uint32(0) 13538 __154: 13539 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 13540 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)) { 13541 goto __157 13542 } 13543 *(*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) 13544 __157: 13545 ; 13546 goto __155 13547 __155: 13548 if (len != 0) && (copy < have) { 13549 goto __154 13550 } 13551 goto __156 13552 __156: 13553 ; 13554 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13555 goto __158 13556 } 13557 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13558 __158: 13559 ; 13560 have = have - (copy) 13561 next += uintptr(copy) 13562 if !(len != 0) { 13563 goto __159 13564 } 13565 goto inf_leave 13566 __159: 13567 ; 13568 goto __152 13569 __151: 13570 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13571 goto __160 13572 } 13573 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL) 13574 __160: 13575 ; 13576 __152: 13577 ; 13578 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 13579 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT 13580 __17: 13581 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x1000) != 0) { 13582 goto __161 13583 } 13584 if !(have == uint32(0)) { 13585 goto __163 13586 } 13587 goto inf_leave 13588 __163: 13589 ; 13590 copy = uint32(0) 13591 __164: 13592 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 13593 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)) { 13594 goto __167 13595 } 13596 *(*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) 13597 __167: 13598 ; 13599 goto __165 13600 __165: 13601 if (len != 0) && (copy < have) { 13602 goto __164 13603 } 13604 goto __166 13605 __166: 13606 ; 13607 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13608 goto __168 13609 } 13610 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13611 __168: 13612 ; 13613 have = have - (copy) 13614 next += uintptr(copy) 13615 if !(len != 0) { 13616 goto __169 13617 } 13618 goto inf_leave 13619 __169: 13620 ; 13621 goto __162 13622 __161: 13623 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13624 goto __170 13625 } 13626 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL) 13627 __170: 13628 ; 13629 __162: 13630 ; 13631 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC 13632 __18: 13633 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) { 13634 goto __171 13635 } 13636 __172: 13637 __175: 13638 if !(bits < (uint32(16))) { 13639 goto __176 13640 } 13641 __177: 13642 if !(have == uint32(0)) { 13643 goto __180 13644 } 13645 goto inf_leave 13646 __180: 13647 ; 13648 have-- 13649 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13650 bits = bits + (uint32(8)) 13651 goto __178 13652 __178: 13653 if 0 != 0 { 13654 goto __177 13655 } 13656 goto __179 13657 __179: 13658 ; 13659 goto __175 13660 __176: 13661 ; 13662 goto __173 13663 __173: 13664 if 0 != 0 { 13665 goto __172 13666 } 13667 goto __174 13668 __174: 13669 ; 13670 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (hold != ((*Inflate_state)(unsafe.Pointer(state)).Fcheck & uint32(0xffff)))) { 13671 goto __181 13672 } 13673 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */ 13674 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13675 goto __9 13676 __181: 13677 ; 13678 __182: 13679 hold = uint32(0) 13680 bits = uint32(0) 13681 goto __183 13682 __183: 13683 if 0 != 0 { 13684 goto __182 13685 } 13686 goto __184 13687 __184: 13688 ; 13689 __171: 13690 ; 13691 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13692 goto __185 13693 } 13694 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (((*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9) & 1) 13695 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1 13696 __185: 13697 ; 13698 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28 /* &.check */, Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))) 13699 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 13700 goto __9 13701 __19: 13702 __186: 13703 __189: 13704 if !(bits < (uint32(32))) { 13705 goto __190 13706 } 13707 __191: 13708 if !(have == uint32(0)) { 13709 goto __194 13710 } 13711 goto inf_leave 13712 __194: 13713 ; 13714 have-- 13715 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13716 bits = bits + (uint32(8)) 13717 goto __192 13718 __192: 13719 if 0 != 0 { 13720 goto __191 13721 } 13722 goto __193 13723 __193: 13724 ; 13725 goto __189 13726 __190: 13727 ; 13728 goto __187 13729 __187: 13730 if 0 != 0 { 13731 goto __186 13732 } 13733 goto __188 13734 __188: 13735 ; 13736 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28 /* &.check */, ((((((hold) >> 24) & uint32(0xff)) + (((hold) >> 8) & uint32(0xff00))) + (((hold) & uint32(0xff00)) << 8)) + (((hold) & uint32(0xff)) << 24))) 13737 __195: 13738 hold = uint32(0) 13739 bits = uint32(0) 13740 goto __196 13741 __196: 13742 if 0 != 0 { 13743 goto __195 13744 } 13745 goto __197 13746 __197: 13747 ; 13748 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT 13749 __20: 13750 if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) { 13751 goto __198 13752 } 13753 __199: 13754 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 13755 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 13756 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 13757 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 13758 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 13759 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 13760 goto __200 13761 __200: 13762 if 0 != 0 { 13763 goto __199 13764 } 13765 goto __201 13766 __201: 13767 ; 13768 return Z_NEED_DICT 13769 __198: 13770 ; 13771 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28 /* &.check */, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))) 13772 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 13773 __21: 13774 if !((flush == Z_BLOCK) || (flush == Z_TREES)) { 13775 goto __202 13776 } 13777 goto inf_leave 13778 __202: 13779 ; 13780 __22: 13781 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 13782 goto __203 13783 } 13784 __204: 13785 hold >>= (bits & uint32(7)) 13786 bits = bits - (bits & uint32(7)) 13787 goto __205 13788 __205: 13789 if 0 != 0 { 13790 goto __204 13791 } 13792 goto __206 13793 __206: 13794 ; 13795 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK 13796 goto __9 13797 __203: 13798 ; 13799 __207: 13800 __210: 13801 if !(bits < (uint32(3))) { 13802 goto __211 13803 } 13804 __212: 13805 if !(have == uint32(0)) { 13806 goto __215 13807 } 13808 goto inf_leave 13809 __215: 13810 ; 13811 have-- 13812 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13813 bits = bits + (uint32(8)) 13814 goto __213 13815 __213: 13816 if 0 != 0 { 13817 goto __212 13818 } 13819 goto __214 13820 __214: 13821 ; 13822 goto __210 13823 __211: 13824 ; 13825 goto __208 13826 __208: 13827 if 0 != 0 { 13828 goto __207 13829 } 13830 goto __209 13831 __209: 13832 ; 13833 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 13834 __216: 13835 hold >>= 1 13836 bits = bits - (uint32(1)) 13837 goto __217 13838 __217: 13839 if 0 != 0 { 13840 goto __216 13841 } 13842 goto __218 13843 __218: 13844 ; 13845 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 13846 case uint32(0): 13847 goto __220 13848 case uint32(1): 13849 goto __221 13850 case uint32(2): 13851 goto __222 13852 case uint32(3): 13853 goto __223 13854 } 13855 goto __219 13856 __220: // stored block 13857 ; 13858 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 13859 goto __219 13860 __221: // fixed block 13861 fixedtables1(tls, state) 13862 13863 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes 13864 if !(flush == Z_TREES) { 13865 goto __224 13866 } 13867 __225: 13868 hold >>= 2 13869 bits = bits - (uint32(2)) 13870 goto __226 13871 __226: 13872 if 0 != 0 { 13873 goto __225 13874 } 13875 goto __227 13876 __227: 13877 ; 13878 goto inf_leave 13879 __224: 13880 ; 13881 goto __219 13882 __222: // dynamic block 13883 ; 13884 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 13885 goto __219 13886 __223: 13887 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 13888 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13889 __219: 13890 ; 13891 __228: 13892 hold >>= 2 13893 bits = bits - (uint32(2)) 13894 goto __229 13895 __229: 13896 if 0 != 0 { 13897 goto __228 13898 } 13899 goto __230 13900 __230: 13901 ; 13902 goto __9 13903 __23: 13904 __231: 13905 hold >>= (bits & uint32(7)) 13906 bits = bits - (bits & uint32(7)) 13907 goto __232 13908 __232: 13909 if 0 != 0 { 13910 goto __231 13911 } 13912 goto __233 13913 __233: 13914 ; // go to byte boundary 13915 __234: 13916 __237: 13917 if !(bits < (uint32(32))) { 13918 goto __238 13919 } 13920 __239: 13921 if !(have == uint32(0)) { 13922 goto __242 13923 } 13924 goto inf_leave 13925 __242: 13926 ; 13927 have-- 13928 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13929 bits = bits + (uint32(8)) 13930 goto __240 13931 __240: 13932 if 0 != 0 { 13933 goto __239 13934 } 13935 goto __241 13936 __241: 13937 ; 13938 goto __237 13939 __238: 13940 ; 13941 goto __235 13942 __235: 13943 if 0 != 0 { 13944 goto __234 13945 } 13946 goto __236 13947 __236: 13948 ; 13949 if !((hold & uint32(0xffff)) != ((hold >> 16) ^ uint32(0xffff))) { 13950 goto __243 13951 } 13952 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 13953 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13954 goto __9 13955 __243: 13956 ; 13957 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 13958 13959 __244: 13960 hold = uint32(0) 13961 bits = uint32(0) 13962 goto __245 13963 __245: 13964 if 0 != 0 { 13965 goto __244 13966 } 13967 goto __246 13968 __246: 13969 ; 13970 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_ 13971 if !(flush == Z_TREES) { 13972 goto __247 13973 } 13974 goto inf_leave 13975 __247: 13976 ; 13977 __24: 13978 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY 13979 __25: 13980 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13981 if !(copy != 0) { 13982 goto __248 13983 } 13984 if !(copy > have) { 13985 goto __249 13986 } 13987 copy = have 13988 __249: 13989 ; 13990 if !(copy > left) { 13991 goto __250 13992 } 13993 copy = left 13994 __250: 13995 ; 13996 if !(copy == uint32(0)) { 13997 goto __251 13998 } 13999 goto inf_leave 14000 __251: 14001 ; 14002 libc.Xmemcpy(tls, put, next, copy) 14003 have = have - (copy) 14004 next += uintptr(copy) 14005 left = left - (copy) 14006 put += uintptr(copy) 14007 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) -= (copy) 14008 goto __9 14009 __248: 14010 ; 14011 14012 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14013 goto __9 14014 __26: 14015 __252: 14016 __255: 14017 if !(bits < (uint32(14))) { 14018 goto __256 14019 } 14020 __257: 14021 if !(have == uint32(0)) { 14022 goto __260 14023 } 14024 goto inf_leave 14025 __260: 14026 ; 14027 have-- 14028 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14029 bits = bits + (uint32(8)) 14030 goto __258 14031 __258: 14032 if 0 != 0 { 14033 goto __257 14034 } 14035 goto __259 14036 __259: 14037 ; 14038 goto __255 14039 __256: 14040 ; 14041 goto __253 14042 __253: 14043 if 0 != 0 { 14044 goto __252 14045 } 14046 goto __254 14047 __254: 14048 ; 14049 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 14050 __261: 14051 hold >>= 5 14052 bits = bits - (uint32(5)) 14053 goto __262 14054 __262: 14055 if 0 != 0 { 14056 goto __261 14057 } 14058 goto __263 14059 __263: 14060 ; 14061 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 14062 __264: 14063 hold >>= 5 14064 bits = bits - (uint32(5)) 14065 goto __265 14066 __265: 14067 if 0 != 0 { 14068 goto __264 14069 } 14070 goto __266 14071 __266: 14072 ; 14073 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 14074 __267: 14075 hold >>= 4 14076 bits = bits - (uint32(4)) 14077 goto __268 14078 __268: 14079 if 0 != 0 { 14080 goto __267 14081 } 14082 goto __269 14083 __269: 14084 ; 14085 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 14086 goto __270 14087 } 14088 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 14089 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14090 goto __9 14091 __270: 14092 ; 14093 14094 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14095 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS 14096 __27: 14097 __271: 14098 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 14099 goto __272 14100 } 14101 __273: 14102 __276: 14103 if !(bits < (uint32(3))) { 14104 goto __277 14105 } 14106 __278: 14107 if !(have == uint32(0)) { 14108 goto __281 14109 } 14110 goto inf_leave 14111 __281: 14112 ; 14113 have-- 14114 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14115 bits = bits + (uint32(8)) 14116 goto __279 14117 __279: 14118 if 0 != 0 { 14119 goto __278 14120 } 14121 goto __280 14122 __280: 14123 ; 14124 goto __276 14125 __277: 14126 ; 14127 goto __274 14128 __274: 14129 if 0 != 0 { 14130 goto __273 14131 } 14132 goto __275 14133 __275: 14134 ; 14135 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 14136 __282: 14137 hold >>= 3 14138 bits = bits - (uint32(3)) 14139 goto __283 14140 __283: 14141 if 0 != 0 { 14142 goto __282 14143 } 14144 goto __284 14145 __284: 14146 ; 14147 goto __271 14148 __272: 14149 ; 14150 __285: 14151 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 14152 goto __286 14153 } 14154 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 14155 goto __285 14156 __286: 14157 ; 14158 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */ 14159 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14160 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 14161 ret = Xinflate_table(tls, CODES, state+116 /* &.lens */, uint32(19), (state + 112 /* &.next */), 14162 (state + 88 /* &.lenbits */), state+756 /* &.work */) 14163 if !(ret != 0) { 14164 goto __287 14165 } 14166 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 14167 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14168 goto __9 14169 __287: 14170 ; 14171 14172 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14173 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS 14174 __28: 14175 __288: 14176 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 14177 goto __289 14178 } 14179 __290: 14180 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 14181 if !((uint32(here.Fbits)) <= bits) { 14182 goto __293 14183 } 14184 goto __292 14185 __293: 14186 ; 14187 __294: 14188 if !(have == uint32(0)) { 14189 goto __297 14190 } 14191 goto inf_leave 14192 __297: 14193 ; 14194 have-- 14195 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14196 bits = bits + (uint32(8)) 14197 goto __295 14198 __295: 14199 if 0 != 0 { 14200 goto __294 14201 } 14202 goto __296 14203 __296: 14204 ; 14205 goto __291 14206 __291: 14207 goto __290 14208 goto __292 14209 __292: 14210 ; 14211 if !(int32(here.Fval) < 16) { 14212 goto __298 14213 } 14214 __300: 14215 hold >>= int32(here.Fbits) 14216 bits = bits - (uint32(here.Fbits)) 14217 goto __301 14218 __301: 14219 if 0 != 0 { 14220 goto __300 14221 } 14222 goto __302 14223 __302: 14224 ; 14225 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 14226 goto __299 14227 __298: 14228 if !(int32(here.Fval) == 16) { 14229 goto __303 14230 } 14231 __305: 14232 __308: 14233 if !(bits < (uint32(int32(here.Fbits) + 2))) { 14234 goto __309 14235 } 14236 __310: 14237 if !(have == uint32(0)) { 14238 goto __313 14239 } 14240 goto inf_leave 14241 __313: 14242 ; 14243 have-- 14244 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14245 bits = bits + (uint32(8)) 14246 goto __311 14247 __311: 14248 if 0 != 0 { 14249 goto __310 14250 } 14251 goto __312 14252 __312: 14253 ; 14254 goto __308 14255 __309: 14256 ; 14257 goto __306 14258 __306: 14259 if 0 != 0 { 14260 goto __305 14261 } 14262 goto __307 14263 __307: 14264 ; 14265 __314: 14266 hold >>= int32(here.Fbits) 14267 bits = bits - (uint32(here.Fbits)) 14268 goto __315 14269 __315: 14270 if 0 != 0 { 14271 goto __314 14272 } 14273 goto __316 14274 __316: 14275 ; 14276 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 14277 goto __317 14278 } 14279 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 14280 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14281 goto __289 14282 __317: 14283 ; 14284 len = uint32(*(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 14285 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 14286 __318: 14287 hold >>= 2 14288 bits = bits - (uint32(2)) 14289 goto __319 14290 __319: 14291 if 0 != 0 { 14292 goto __318 14293 } 14294 goto __320 14295 __320: 14296 ; 14297 goto __304 14298 __303: 14299 if !(int32(here.Fval) == 17) { 14300 goto __321 14301 } 14302 __323: 14303 __326: 14304 if !(bits < (uint32(int32(here.Fbits) + 3))) { 14305 goto __327 14306 } 14307 __328: 14308 if !(have == uint32(0)) { 14309 goto __331 14310 } 14311 goto inf_leave 14312 __331: 14313 ; 14314 have-- 14315 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14316 bits = bits + (uint32(8)) 14317 goto __329 14318 __329: 14319 if 0 != 0 { 14320 goto __328 14321 } 14322 goto __330 14323 __330: 14324 ; 14325 goto __326 14326 __327: 14327 ; 14328 goto __324 14329 __324: 14330 if 0 != 0 { 14331 goto __323 14332 } 14333 goto __325 14334 __325: 14335 ; 14336 __332: 14337 hold >>= int32(here.Fbits) 14338 bits = bits - (uint32(here.Fbits)) 14339 goto __333 14340 __333: 14341 if 0 != 0 { 14342 goto __332 14343 } 14344 goto __334 14345 __334: 14346 ; 14347 len = uint32(0) 14348 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 14349 __335: 14350 hold >>= 3 14351 bits = bits - (uint32(3)) 14352 goto __336 14353 __336: 14354 if 0 != 0 { 14355 goto __335 14356 } 14357 goto __337 14358 __337: 14359 ; 14360 goto __322 14361 __321: 14362 __338: 14363 __341: 14364 if !(bits < (uint32(int32(here.Fbits) + 7))) { 14365 goto __342 14366 } 14367 __343: 14368 if !(have == uint32(0)) { 14369 goto __346 14370 } 14371 goto inf_leave 14372 __346: 14373 ; 14374 have-- 14375 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14376 bits = bits + (uint32(8)) 14377 goto __344 14378 __344: 14379 if 0 != 0 { 14380 goto __343 14381 } 14382 goto __345 14383 __345: 14384 ; 14385 goto __341 14386 __342: 14387 ; 14388 goto __339 14389 __339: 14390 if 0 != 0 { 14391 goto __338 14392 } 14393 goto __340 14394 __340: 14395 ; 14396 __347: 14397 hold >>= int32(here.Fbits) 14398 bits = bits - (uint32(here.Fbits)) 14399 goto __348 14400 __348: 14401 if 0 != 0 { 14402 goto __347 14403 } 14404 goto __349 14405 __349: 14406 ; 14407 len = uint32(0) 14408 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 14409 __350: 14410 hold >>= 7 14411 bits = bits - (uint32(7)) 14412 goto __351 14413 __351: 14414 if 0 != 0 { 14415 goto __350 14416 } 14417 goto __352 14418 __352: 14419 ; 14420 __322: 14421 ; 14422 __304: 14423 ; 14424 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 14425 goto __353 14426 } 14427 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 14428 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14429 goto __289 14430 __353: 14431 ; 14432 __354: 14433 if !(libc.PostDecUint32(©, 1) != 0) { 14434 goto __355 14435 } 14436 *(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 14437 goto __354 14438 __355: 14439 ; 14440 __299: 14441 ; 14442 goto __288 14443 __289: 14444 ; 14445 14446 // handle error breaks in while 14447 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 14448 goto __356 14449 } 14450 goto __9 14451 __356: 14452 ; 14453 14454 // check for end-of-block code (better have one) 14455 if !(int32(*(*uint16)(unsafe.Pointer((state + 116 /* &.lens */) + 256*2))) == 0) { 14456 goto __357 14457 } 14458 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 14459 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14460 goto __9 14461 __357: 14462 ; 14463 14464 // build code tables -- note: do not change the lenbits or distbits 14465 // values here (9 and 6) without reading the comments in inftrees.h 14466 // concerning the ENOUGH constants, which depend on those values 14467 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */ 14468 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14469 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 14470 ret = Xinflate_table(tls, LENS, state+116 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 112 /* &.next */), 14471 (state + 88 /* &.lenbits */), state+756 /* &.work */) 14472 if !(ret != 0) { 14473 goto __358 14474 } 14475 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 14476 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14477 goto __9 14478 __358: 14479 ; 14480 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14481 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 14482 ret = Xinflate_table(tls, DISTS, ((state + 116 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 14483 (state + 112 /* &.next */), (state + 92 /* &.distbits */), state+756 /* &.work */) 14484 if !(ret != 0) { 14485 goto __359 14486 } 14487 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 14488 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14489 goto __9 14490 __359: 14491 ; 14492 14493 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ 14494 if !(flush == Z_TREES) { 14495 goto __360 14496 } 14497 goto inf_leave 14498 __360: 14499 ; 14500 __29: 14501 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 14502 __30: 14503 if !((have >= uint32(6)) && (left >= uint32(258))) { 14504 goto __361 14505 } 14506 __362: 14507 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 14508 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 14509 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 14510 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 14511 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 14512 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 14513 goto __363 14514 __363: 14515 if 0 != 0 { 14516 goto __362 14517 } 14518 goto __364 14519 __364: 14520 ; 14521 Xinflate_fast(tls, strm, out) 14522 __365: 14523 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 14524 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 14525 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 14526 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 14527 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 14528 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 14529 goto __366 14530 __366: 14531 if 0 != 0 { 14532 goto __365 14533 } 14534 goto __367 14535 __367: 14536 ; 14537 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 14538 goto __368 14539 } 14540 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 14541 __368: 14542 ; 14543 goto __9 14544 __361: 14545 ; 14546 (*Inflate_state)(unsafe.Pointer(state)).Fback = 0 14547 __369: 14548 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 14549 if !((uint32(here.Fbits)) <= bits) { 14550 goto __372 14551 } 14552 goto __371 14553 __372: 14554 ; 14555 __373: 14556 if !(have == uint32(0)) { 14557 goto __376 14558 } 14559 goto inf_leave 14560 __376: 14561 ; 14562 have-- 14563 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14564 bits = bits + (uint32(8)) 14565 goto __374 14566 __374: 14567 if 0 != 0 { 14568 goto __373 14569 } 14570 goto __375 14571 __375: 14572 ; 14573 goto __370 14574 __370: 14575 goto __369 14576 goto __371 14577 __371: 14578 ; 14579 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 14580 goto __377 14581 } 14582 last = here 14583 __378: 14584 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)) 14585 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 14586 goto __381 14587 } 14588 goto __380 14589 __381: 14590 ; 14591 __382: 14592 if !(have == uint32(0)) { 14593 goto __385 14594 } 14595 goto inf_leave 14596 __385: 14597 ; 14598 have-- 14599 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14600 bits = bits + (uint32(8)) 14601 goto __383 14602 __383: 14603 if 0 != 0 { 14604 goto __382 14605 } 14606 goto __384 14607 __384: 14608 ; 14609 goto __379 14610 __379: 14611 goto __378 14612 goto __380 14613 __380: 14614 ; 14615 __386: 14616 hold >>= int32(last.Fbits) 14617 bits = bits - (uint32(last.Fbits)) 14618 goto __387 14619 __387: 14620 if 0 != 0 { 14621 goto __386 14622 } 14623 goto __388 14624 __388: 14625 ; 14626 *(*int32)(unsafe.Pointer(state + 7112 /* &.back */)) += (int32(last.Fbits)) 14627 __377: 14628 ; 14629 __389: 14630 hold >>= int32(here.Fbits) 14631 bits = bits - (uint32(here.Fbits)) 14632 goto __390 14633 __390: 14634 if 0 != 0 { 14635 goto __389 14636 } 14637 goto __391 14638 __391: 14639 ; 14640 *(*int32)(unsafe.Pointer(state + 7112 /* &.back */)) += (int32(here.Fbits)) 14641 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 14642 if !((int32(here.Fop)) == 0) { 14643 goto __392 14644 } 14645 14646 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT 14647 goto __9 14648 __392: 14649 ; 14650 if !((int32(here.Fop) & 32) != 0) { 14651 goto __393 14652 } 14653 14654 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 14655 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14656 goto __9 14657 __393: 14658 ; 14659 if !((int32(here.Fop) & 64) != 0) { 14660 goto __394 14661 } 14662 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 14663 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14664 goto __9 14665 __394: 14666 ; 14667 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 14668 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT 14669 __31: 14670 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 14671 goto __395 14672 } 14673 __396: 14674 __399: 14675 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 14676 goto __400 14677 } 14678 __401: 14679 if !(have == uint32(0)) { 14680 goto __404 14681 } 14682 goto inf_leave 14683 __404: 14684 ; 14685 have-- 14686 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14687 bits = bits + (uint32(8)) 14688 goto __402 14689 __402: 14690 if 0 != 0 { 14691 goto __401 14692 } 14693 goto __403 14694 __403: 14695 ; 14696 goto __399 14697 __400: 14698 ; 14699 goto __397 14700 __397: 14701 if 0 != 0 { 14702 goto __396 14703 } 14704 goto __398 14705 __398: 14706 ; 14707 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 14708 __405: 14709 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 14710 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 14711 goto __406 14712 __406: 14713 if 0 != 0 { 14714 goto __405 14715 } 14716 goto __407 14717 __407: 14718 ; 14719 *(*int32)(unsafe.Pointer(state + 7112 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 14720 __395: 14721 ; 14722 14723 (*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength 14724 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST 14725 __32: 14726 __408: 14727 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 14728 if !((uint32(here.Fbits)) <= bits) { 14729 goto __411 14730 } 14731 goto __410 14732 __411: 14733 ; 14734 __412: 14735 if !(have == uint32(0)) { 14736 goto __415 14737 } 14738 goto inf_leave 14739 __415: 14740 ; 14741 have-- 14742 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14743 bits = bits + (uint32(8)) 14744 goto __413 14745 __413: 14746 if 0 != 0 { 14747 goto __412 14748 } 14749 goto __414 14750 __414: 14751 ; 14752 goto __409 14753 __409: 14754 goto __408 14755 goto __410 14756 __410: 14757 ; 14758 if !((int32(here.Fop) & 0xf0) == 0) { 14759 goto __416 14760 } 14761 last = here 14762 __417: 14763 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)) 14764 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 14765 goto __420 14766 } 14767 goto __419 14768 __420: 14769 ; 14770 __421: 14771 if !(have == uint32(0)) { 14772 goto __424 14773 } 14774 goto inf_leave 14775 __424: 14776 ; 14777 have-- 14778 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14779 bits = bits + (uint32(8)) 14780 goto __422 14781 __422: 14782 if 0 != 0 { 14783 goto __421 14784 } 14785 goto __423 14786 __423: 14787 ; 14788 goto __418 14789 __418: 14790 goto __417 14791 goto __419 14792 __419: 14793 ; 14794 __425: 14795 hold >>= int32(last.Fbits) 14796 bits = bits - (uint32(last.Fbits)) 14797 goto __426 14798 __426: 14799 if 0 != 0 { 14800 goto __425 14801 } 14802 goto __427 14803 __427: 14804 ; 14805 *(*int32)(unsafe.Pointer(state + 7112 /* &.back */)) += (int32(last.Fbits)) 14806 __416: 14807 ; 14808 __428: 14809 hold >>= int32(here.Fbits) 14810 bits = bits - (uint32(here.Fbits)) 14811 goto __429 14812 __429: 14813 if 0 != 0 { 14814 goto __428 14815 } 14816 goto __430 14817 __430: 14818 ; 14819 *(*int32)(unsafe.Pointer(state + 7112 /* &.back */)) += (int32(here.Fbits)) 14820 if !((int32(here.Fop) & 64) != 0) { 14821 goto __431 14822 } 14823 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 14824 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14825 goto __9 14826 __431: 14827 ; 14828 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 14829 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 14830 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT 14831 __33: 14832 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 14833 goto __432 14834 } 14835 __433: 14836 __436: 14837 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 14838 goto __437 14839 } 14840 __438: 14841 if !(have == uint32(0)) { 14842 goto __441 14843 } 14844 goto inf_leave 14845 __441: 14846 ; 14847 have-- 14848 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14849 bits = bits + (uint32(8)) 14850 goto __439 14851 __439: 14852 if 0 != 0 { 14853 goto __438 14854 } 14855 goto __440 14856 __440: 14857 ; 14858 goto __436 14859 __437: 14860 ; 14861 goto __434 14862 __434: 14863 if 0 != 0 { 14864 goto __433 14865 } 14866 goto __435 14867 __435: 14868 ; 14869 *(*uint32)(unsafe.Pointer(state + 72 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 14870 __442: 14871 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 14872 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 14873 goto __443 14874 __443: 14875 if 0 != 0 { 14876 goto __442 14877 } 14878 goto __444 14879 __444: 14880 ; 14881 *(*int32)(unsafe.Pointer(state + 7112 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 14882 __432: 14883 ; 14884 14885 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH 14886 __34: 14887 if !(left == uint32(0)) { 14888 goto __445 14889 } 14890 goto inf_leave 14891 __445: 14892 ; 14893 copy = (out - left) 14894 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) { 14895 goto __446 14896 } // copy from window 14897 copy = ((*Inflate_state)(unsafe.Pointer(state)).Foffset - copy) 14898 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) { 14899 goto __448 14900 } 14901 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 14902 goto __449 14903 } 14904 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 14905 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14906 goto __9 14907 __449: 14908 ; 14909 __448: 14910 ; 14911 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) { 14912 goto __450 14913 } 14914 copy = copy - ((*Inflate_state)(unsafe.Pointer(state)).Fwnext) 14915 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwsize - copy))) 14916 goto __451 14917 __450: 14918 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwnext - copy))) 14919 __451: 14920 ; 14921 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 14922 goto __452 14923 } 14924 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 14925 __452: 14926 ; 14927 goto __447 14928 __446: // copy from output 14929 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 14930 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 14931 __447: 14932 ; 14933 if !(copy > left) { 14934 goto __453 14935 } 14936 copy = left 14937 __453: 14938 ; 14939 left = left - (copy) 14940 *(*uint32)(unsafe.Pointer(state + 68 /* &.length */)) -= (copy) 14941 __454: 14942 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 14943 goto __455 14944 __455: 14945 if libc.PreDecUint32(©, 1) != 0 { 14946 goto __454 14947 } 14948 goto __456 14949 __456: 14950 ; 14951 if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) { 14952 goto __457 14953 } 14954 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 14955 __457: 14956 ; 14957 goto __9 14958 __35: 14959 if !(left == uint32(0)) { 14960 goto __458 14961 } 14962 goto inf_leave 14963 __458: 14964 ; 14965 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 14966 left-- 14967 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 14968 goto __9 14969 __36: 14970 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) { 14971 goto __459 14972 } 14973 __460: 14974 __463: 14975 if !(bits < (uint32(32))) { 14976 goto __464 14977 } 14978 __465: 14979 if !(have == uint32(0)) { 14980 goto __468 14981 } 14982 goto inf_leave 14983 __468: 14984 ; 14985 have-- 14986 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14987 bits = bits + (uint32(8)) 14988 goto __466 14989 __466: 14990 if 0 != 0 { 14991 goto __465 14992 } 14993 goto __467 14994 __467: 14995 ; 14996 goto __463 14997 __464: 14998 ; 14999 goto __461 15000 __461: 15001 if 0 != 0 { 15002 goto __460 15003 } 15004 goto __462 15005 __462: 15006 ; 15007 out = out - (left) 15008 *(*ULong)(unsafe.Pointer(strm + 20 /* &.total_out */)) += (ULong(out)) 15009 *(*uint32)(unsafe.Pointer(state + 32 /* &.total */)) += (uint32(out)) 15010 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 15011 goto __469 15012 } 15013 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28 /* &.check */, func() uint32 { 15014 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15015 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 15016 } 15017 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 15018 }()) 15019 __469: 15020 ; 15021 out = left 15022 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && ((func() uint32 { 15023 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15024 return hold 15025 } 15026 return ((((((hold) >> 24) & uint32(0xff)) + (((hold) >> 8) & uint32(0xff00))) + (((hold) & uint32(0xff00)) << 8)) + (((hold) & uint32(0xff)) << 24)) 15027 }()) != (*Inflate_state)(unsafe.Pointer(state)).Fcheck)) { 15028 goto __470 15029 } 15030 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */ 15031 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15032 goto __9 15033 __470: 15034 ; 15035 __471: 15036 hold = uint32(0) 15037 bits = uint32(0) 15038 goto __472 15039 __472: 15040 if 0 != 0 { 15041 goto __471 15042 } 15043 goto __473 15044 __473: 15045 ; 15046 15047 __459: 15048 ; 15049 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH 15050 __37: 15051 if !(((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fflags != 0)) { 15052 goto __474 15053 } 15054 __475: 15055 __478: 15056 if !(bits < (uint32(32))) { 15057 goto __479 15058 } 15059 __480: 15060 if !(have == uint32(0)) { 15061 goto __483 15062 } 15063 goto inf_leave 15064 __483: 15065 ; 15066 have-- 15067 hold = hold + ((uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15068 bits = bits + (uint32(8)) 15069 goto __481 15070 __481: 15071 if 0 != 0 { 15072 goto __480 15073 } 15074 goto __482 15075 __482: 15076 ; 15077 goto __478 15078 __479: 15079 ; 15080 goto __476 15081 __476: 15082 if 0 != 0 { 15083 goto __475 15084 } 15085 goto __477 15086 __477: 15087 ; 15088 if !(hold != ((*Inflate_state)(unsafe.Pointer(state)).Ftotal & 0xffffffff)) { 15089 goto __484 15090 } 15091 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */ 15092 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15093 goto __9 15094 __484: 15095 ; 15096 __485: 15097 hold = uint32(0) 15098 bits = uint32(0) 15099 goto __486 15100 __486: 15101 if 0 != 0 { 15102 goto __485 15103 } 15104 goto __487 15105 __487: 15106 ; 15107 15108 __474: 15109 ; 15110 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 15111 __38: 15112 ret = Z_STREAM_END 15113 goto inf_leave 15114 __39: 15115 ret = -3 15116 goto inf_leave 15117 __40: 15118 return -4 15119 __41: 15120 __42: 15121 return -2 15122 __9: 15123 ; 15124 goto __7 15125 __7: 15126 goto __6 15127 goto __8 15128 __8: 15129 ; 15130 15131 // 15132 // Return from inflate(), updating the total counts and the check value. 15133 // If there was no progress during the inflate() call, return a buffer 15134 // error. Call updatewindow() to create and/or update the window state. 15135 // Note: a memory error from inflate() is non-recoverable. 15136 // 15137 inf_leave: 15138 __488: 15139 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 15140 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 15141 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 15142 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 15143 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 15144 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 15145 goto __489 15146 __489: 15147 if 0 != 0 { 15148 goto __488 15149 } 15150 goto __490 15151 __490: 15152 ; 15153 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)))) { 15154 goto __491 15155 } 15156 if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)) != 0) { 15157 goto __492 15158 } 15159 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 15160 return -4 15161 __492: 15162 ; 15163 __491: 15164 ; 15165 in = in - ((*Z_stream)(unsafe.Pointer(strm)).Favail_in) 15166 out = out - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 15167 *(*ULong)(unsafe.Pointer(strm + 8 /* &.total_in */)) += (ULong(in)) 15168 *(*ULong)(unsafe.Pointer(strm + 20 /* &.total_out */)) += (ULong(out)) 15169 *(*uint32)(unsafe.Pointer(state + 32 /* &.total */)) += (uint32(out)) 15170 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 15171 goto __493 15172 } 15173 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28 /* &.check */, func() uint32 { 15174 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15175 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 15176 } 15177 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 15178 }()) 15179 __493: 15180 ; 15181 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = (((int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + (func() int32 { 15182 if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 { 15183 return 64 15184 } 15185 return 0 15186 }())) + (func() int32 { 15187 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE { 15188 return 128 15189 } 15190 return 0 15191 }())) + (func() int32 { 15192 if ((*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_) || ((*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_) { 15193 return 256 15194 } 15195 return 0 15196 }())) 15197 if !((((in == uint32(0)) && (out == uint32(0))) || (flush == Z_FINISH)) && (ret == Z_OK)) { 15198 goto __494 15199 } 15200 ret = -5 15201 __494: 15202 ; 15203 return ret 15204 } 15205 15206 var order1 = // permutation of code lengths 15207 [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 */ 15208 15209 func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */ 15210 var state uintptr 15211 if inflateStateCheck(tls, strm) != 0 { 15212 return -2 15213 } 15214 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15215 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 15216 (*struct { 15217 f func(*libc.TLS, Voidpf, Voidpf) 15218 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 15219 } 15220 (*struct { 15221 f func(*libc.TLS, Voidpf, Voidpf) 15222 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 15223 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 15224 15225 return Z_OK 15226 } 15227 15228 func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */ 15229 var state uintptr 15230 15231 // check state 15232 if inflateStateCheck(tls, strm) != 0 { 15233 return -2 15234 } 15235 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15236 15237 // copy dictionary 15238 if ((*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0) && (dictionary != uintptr(Z_NULL)) { 15239 libc.Xmemcpy(tls, dictionary, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 15240 ((*Inflate_state)(unsafe.Pointer(state)).Fwhave - (*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 15241 libc.Xmemcpy(tls, ((dictionary + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)) - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 15242 (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwnext) 15243 } 15244 if dictLength != uintptr(Z_NULL) { 15245 *(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 15246 } 15247 return Z_OK 15248 } 15249 15250 func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */ 15251 var state uintptr 15252 var dictid uint32 15253 var ret int32 15254 15255 // check state 15256 if inflateStateCheck(tls, strm) != 0 { 15257 return -2 15258 } 15259 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15260 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT) { 15261 return -2 15262 } 15263 15264 // check for correct dictionary identifier 15265 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT { 15266 dictid = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)) 15267 dictid = Xadler32(tls, dictid, dictionary, dictLength) 15268 if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck { 15269 return -3 15270 } 15271 } 15272 15273 // copy dictionary to window using updatewindow(), which will amend the 15274 // existing dictionary if appropriate 15275 ret = updatewindow(tls, strm, (dictionary + uintptr(dictLength)), dictLength) 15276 if ret != 0 { 15277 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 15278 return -4 15279 } 15280 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1 15281 15282 return Z_OK 15283 } 15284 15285 func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */ 15286 var state uintptr 15287 15288 // check state 15289 if inflateStateCheck(tls, strm) != 0 { 15290 return -2 15291 } 15292 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15293 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) == 0 { 15294 return -2 15295 } 15296 15297 // save header structure 15298 (*Inflate_state)(unsafe.Pointer(state)).Fhead = head 15299 (*Gz_header)(unsafe.Pointer(head)).Fdone = 0 15300 return Z_OK 15301 } 15302 15303 // 15304 // Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found 15305 // or when out of input. When called, *have is the number of pattern bytes 15306 // found in order so far, in 0..3. On return *have is updated to the new 15307 // state. If on return *have equals four, then the pattern was found and the 15308 // return value is how many bytes were read including the last byte of the 15309 // pattern. If *have is less than four, then the pattern has not been found 15310 // yet and the return value is len. In the latter case, syncsearch() can be 15311 // called again with more data and the *have state. *have is initialized to 15312 // zero for the first call. 15313 // 15314 func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */ 15315 var got uint32 15316 var next uint32 15317 15318 got = *(*uint32)(unsafe.Pointer(have)) 15319 next = uint32(0) 15320 for (next < len) && (got < uint32(4)) { 15321 if (int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next))))) == (func() int32 { 15322 if got < uint32(2) { 15323 return 0 15324 } 15325 return 0xff 15326 }()) { 15327 got++ 15328 } else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 { 15329 got = uint32(0) 15330 } else { 15331 got = (uint32(4) - got) 15332 } 15333 next++ 15334 } 15335 *(*uint32)(unsafe.Pointer(have)) = got 15336 return next 15337 } 15338 15339 func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */ 15340 bp := tls.Alloc(4) 15341 defer tls.Free(4) 15342 15343 var len uint32 // number of bytes to look at or looked at 15344 var in uint32 15345 var out uint32 // temporary to save total_in and total_out 15346 // var buf [4]uint8 at bp, 4 15347 // to restore bit buffer to byte string 15348 var state uintptr 15349 15350 // check parameters 15351 if inflateStateCheck(tls, strm) != 0 { 15352 return -2 15353 } 15354 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15355 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8)) { 15356 return -5 15357 } 15358 15359 // if first time, start search in bit buffer 15360 if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC { 15361 (*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC 15362 libc.AssignShlPtrUint32(state+60 /* &.hold */, int(((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)))) 15363 *(*uint32)(unsafe.Pointer(state + 64 /* &.bits */)) -= ((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)) 15364 len = uint32(0) 15365 for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { 15366 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold) 15367 libc.AssignShrPtrUint32(state+60 /* &.hold */, int(8)) 15368 *(*uint32)(unsafe.Pointer(state + 64 /* &.bits */)) -= (uint32(8)) 15369 } 15370 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 15371 syncsearch(tls, (state + 108 /* &.have */), bp /* &buf[0] */, len) 15372 } 15373 15374 // search available input 15375 len = syncsearch(tls, (state + 108 /* &.have */), (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 15376 *(*UInt)(unsafe.Pointer(strm + 4 /* &.avail_in */)) -= (len) 15377 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 15378 *(*ULong)(unsafe.Pointer(strm + 8 /* &.total_in */)) += (ULong(len)) 15379 15380 // return no joy or set up to restart inflate() on a new block 15381 if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { 15382 return -3 15383 } 15384 in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in 15385 out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out 15386 XinflateReset(tls, strm) 15387 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in 15388 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out 15389 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 15390 return Z_OK 15391 } 15392 15393 // 15394 // Returns true if inflate is currently at the end of a block generated by 15395 // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP 15396 // implementation to provide an additional safety check. PPP uses 15397 // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored 15398 // block. When decompressing, PPP checks that at the end of input packet, 15399 // inflate is waiting for these length bytes. 15400 // 15401 func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */ 15402 var state uintptr 15403 15404 if inflateStateCheck(tls, strm) != 0 { 15405 return -2 15406 } 15407 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15408 return (libc.Bool32(((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)))) 15409 } 15410 15411 func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */ 15412 var state uintptr 15413 var copy uintptr 15414 var window uintptr 15415 var wsize uint32 15416 15417 // check input 15418 if (inflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 15419 return -2 15420 } 15421 state = (*Z_stream)(unsafe.Pointer(source)).Fstate 15422 15423 // allocate space 15424 copy = (*struct { 15425 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 15426 })(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{}))) 15427 if copy == uintptr(Z_NULL) { 15428 return -4 15429 } 15430 window = uintptr(Z_NULL) 15431 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 15432 window = (*struct { 15433 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 15434 })(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)))) 15435 if window == uintptr(Z_NULL) { 15436 (*struct { 15437 f func(*libc.TLS, Voidpf, Voidpf) 15438 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((source))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy) 15439 return -4 15440 } 15441 } 15442 15443 // copy state 15444 libc.Xmemcpy(tls, dest, source, uint32(unsafe.Sizeof(Z_stream{}))) 15445 libc.Xmemcpy(tls, copy, state, uint32(unsafe.Sizeof(Inflate_state{}))) 15446 (*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest 15447 if ((*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1332 /* &.codes */) && ((*Inflate_state)(unsafe.Pointer(state)).Flencode <= (((state + 1332 /* &.codes */) + uintptr((ENOUGH_LENS+ENOUGH_DISTS))*4) - uintptr(1)*4)) { 15448 (*Inflate_state)(unsafe.Pointer(copy)).Flencode = ((copy + 1332 /* &.codes */) + uintptr((int32(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1332 /* &.codes */))/4)))*4) 15449 (*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = ((copy + 1332 /* &.codes */) + uintptr((int32(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1332 /* &.codes */))/4)))*4) 15450 } 15451 (*Inflate_state)(unsafe.Pointer(copy)).Fnext = ((copy + 1332 /* &.codes */) + uintptr((int32(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1332 /* &.codes */))/4)))*4) 15452 if window != uintptr(Z_NULL) { 15453 wsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 15454 libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, wsize) 15455 } 15456 (*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window 15457 (*Z_stream)(unsafe.Pointer(dest)).Fstate = copy 15458 return Z_OK 15459 } 15460 15461 func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */ 15462 var state uintptr 15463 15464 if inflateStateCheck(tls, strm) != 0 { 15465 return -2 15466 } 15467 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15468 _ = subvert 15469 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 15470 return -3 15471 } 15472 15473 func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */ 15474 var state uintptr 15475 15476 if inflateStateCheck(tls, strm) != 0 { 15477 return -2 15478 } 15479 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15480 if check != 0 { 15481 *(*int32)(unsafe.Pointer(state + 12 /* &.wrap */)) |= (4) 15482 } else { 15483 *(*int32)(unsafe.Pointer(state + 12 /* &.wrap */)) &= (libc.CplInt32(4)) 15484 } 15485 return Z_OK 15486 } 15487 15488 func XinflateMark(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1541:14: */ 15489 var state uintptr 15490 15491 if inflateStateCheck(tls, strm) != 0 { 15492 return -(int32(1) << 16) 15493 } 15494 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15495 return (int32(uint32((int32((uint32(int32((*Inflate_state)(unsafe.Pointer(state)).Fback))) << 16))) + (func() uint32 { 15496 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY { 15497 return uint32((*Inflate_state)(unsafe.Pointer(state)).Flength) 15498 } 15499 return func() uint32 { 15500 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH { 15501 return (uint32((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)) 15502 } 15503 return uint32(0) 15504 }() 15505 }()))) 15506 } 15507 15508 func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint32 { /* inflate.c:1554:23: */ 15509 var state uintptr 15510 if inflateStateCheck(tls, strm) != 0 { 15511 return libc.Uint32(libc.Uint32FromInt32(-1)) 15512 } 15513 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15514 return (uint32(int32(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1332 /* &.codes */)) / 4))) 15515 } 15516 15517 var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828 /* " inflate 1.2.11 ..." */)) /* inftrees.c:11:12 */ 15518 15519 // 15520 // If you use the zlib library in a product, an acknowledgment is welcome 15521 // in the documentation of your product. If for some reason you cannot 15522 // include such an acknowledgment, I would appreciate that you keep this 15523 // copyright string in the executable of your product. 15524 // 15525 15526 // 15527 // Build a set of tables to decode the provided canonical Huffman code. 15528 // The code lengths are lens[0..codes-1]. The result starts at *table, 15529 // whose indices are 0..2^bits-1. work is a writable array of at least 15530 // lens shorts, which is used as a work area. type is the type of code 15531 // to be generated, CODES, LENS, or DISTS. On return, zero is success, 15532 // -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 15533 // on return points to the next available entry's address. bits is the 15534 // requested root table index bits, and on return it is the actual root 15535 // table index bits. It will differ if the request is greater than the 15536 // longest code or if it is less than the shortest code. 15537 // 15538 func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */ 15539 bp := tls.Alloc(64) 15540 defer tls.Free(64) 15541 15542 var len uint32 // a code's length in bits 15543 var sym uint32 // index of code symbols 15544 var min uint32 15545 var max uint32 // minimum and maximum code lengths 15546 var root uint32 // number of index bits for root table 15547 var curr uint32 // number of index bits for current table 15548 var drop uint32 // code bits to drop for sub-table 15549 var left int32 // number of prefix codes available 15550 var used uint32 // code entries in table used 15551 var huff uint32 // Huffman code 15552 var incr uint32 // for incrementing code, index 15553 var fill uint32 // index for replicating entries 15554 var low uint32 // low bits for current root entry 15555 var mask uint32 // mask for low root bits 15556 var here Code // table entry for duplication 15557 var next uintptr // next available space in table 15558 var base uintptr // base value table to use 15559 var extra uintptr // extra bits table to use 15560 var match uint32 // use base and extra for symbol >= match 15561 // var count [16]uint16 at bp, 32 15562 // number of codes of each length 15563 // var offs [16]uint16 at bp+32, 32 15564 15565 // 15566 // Process a set of code lengths to create a canonical Huffman code. The 15567 // code lengths are lens[0..codes-1]. Each length corresponds to the 15568 // symbols 0..codes-1. The Huffman code is generated by first sorting the 15569 // symbols by length from short to long, and retaining the symbol order 15570 // for codes with equal lengths. Then the code starts with all zero bits 15571 // for the first code of the shortest length, and the codes are integer 15572 // increments for the same length, and zeros are appended as the length 15573 // increases. For the deflate format, these bits are stored backwards 15574 // from their more natural integer increment ordering, and so when the 15575 // decoding tables are built in the large loop below, the integer codes 15576 // are incremented backwards. 15577 // 15578 // This routine assumes, but does not check, that all of the entries in 15579 // lens[] are in the range 0..MAXBITS. The caller must assure this. 15580 // 1..MAXBITS is interpreted as that code length. zero means that that 15581 // symbol does not occur in this code. 15582 // 15583 // The codes are sorted by computing a count of codes for each length, 15584 // creating from that a table of starting indices for each length in the 15585 // sorted table, and then entering the symbols in order in the sorted 15586 // table. The sorted table is work[], with that space being provided by 15587 // the caller. 15588 // 15589 // The length counts are used for other purposes as well, i.e. finding 15590 // the minimum and maximum length codes, determining if there are any 15591 // codes at all, checking for a valid set of lengths, and looking ahead 15592 // at length counts to determine sub-table sizes when building the 15593 // decoding tables. 15594 // 15595 15596 // accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) 15597 for len = uint32(0); len <= uint32(MAXBITS); len++ { 15598 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)) = uint16(0) 15599 } 15600 for sym = uint32(0); sym < codes; sym++ { 15601 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++ 15602 } 15603 15604 // bound code lengths, force root to be within code lengths 15605 root = *(*uint32)(unsafe.Pointer(bits)) 15606 for max = uint32(MAXBITS); max >= uint32(1); max-- { 15607 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(max)*2))) != 0 { 15608 break 15609 } 15610 } 15611 if root > max { 15612 root = max 15613 } 15614 if max == uint32(0) { // no symbols to code at all 15615 here.Fop = uint8(64) // invalid code marker 15616 here.Fbits = uint8(1) 15617 here.Fval = uint16(0) 15618 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here // make a table to force an error 15619 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here 15620 *(*uint32)(unsafe.Pointer(bits)) = uint32(1) 15621 return 0 // no symbols, but wait for decoding to report error 15622 } 15623 for min = uint32(1); min < max; min++ { 15624 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(min)*2))) != 0 { 15625 break 15626 } 15627 } 15628 if root < min { 15629 root = min 15630 } 15631 15632 // check for an over-subscribed or incomplete set of lengths 15633 left = 1 15634 for len = uint32(1); len <= uint32(MAXBITS); len++ { 15635 left <<= 1 15636 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)))) 15637 if left < 0 { 15638 return -1 15639 } // over-subscribed 15640 } 15641 if (left > 0) && ((type1 == CODES) || (max != uint32(1))) { 15642 return -1 15643 } // incomplete set 15644 15645 // generate offsets into symbol table for each length for sorting 15646 *(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + 1*2)) = uint16(0) 15647 for len = uint32(1); len < uint32(MAXBITS); len++ { 15648 *(*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))))) 15649 } 15650 15651 // sort symbols by length, by symbol order within each length 15652 for sym = uint32(0); sym < codes; sym++ { 15653 if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { 15654 *(*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) 15655 } 15656 } 15657 15658 // 15659 // Create and fill in decoding tables. In this loop, the table being 15660 // filled is at next and has curr index bits. The code being used is huff 15661 // with length len. That code is converted to an index by dropping drop 15662 // bits off of the bottom. For codes where len is less than drop + curr, 15663 // those top drop + curr - len bits are incremented through all values to 15664 // fill the table with replicated entries. 15665 // 15666 // root is the number of index bits for the root table. When len exceeds 15667 // root, sub-tables are created pointed to by the root entry with an index 15668 // of the low root bits of huff. This is saved in low to check for when a 15669 // new sub-table should be started. drop is zero when the root table is 15670 // being filled, and drop is root when sub-tables are being filled. 15671 // 15672 // When a new sub-table is needed, it is necessary to look ahead in the 15673 // code lengths to determine what size sub-table is needed. The length 15674 // counts are used for this, and so count[] is decremented as codes are 15675 // entered in the tables. 15676 // 15677 // used keeps track of how many table entries have been allocated from the 15678 // provided *table space. It is checked for LENS and DIST tables against 15679 // the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in 15680 // the initial root table size constants. See the comments in inftrees.h 15681 // for more information. 15682 // 15683 // sym increments through all symbols, and the loop terminates when 15684 // all codes of length max, i.e. all codes, have been processed. This 15685 // routine permits incomplete codes, so another loop after this one fills 15686 // in the rest of the decoding tables with invalid code markers. 15687 // 15688 15689 // set up for code type 15690 switch type1 { 15691 case CODES: 15692 base = libc.AssignUintptr(&extra, work) // dummy value--not used 15693 match = uint32(20) 15694 break 15695 case LENS: 15696 base = uintptr(unsafe.Pointer(&lbase)) 15697 extra = uintptr(unsafe.Pointer(&lext)) 15698 match = uint32(257) 15699 break 15700 default: // DISTS 15701 base = uintptr(unsafe.Pointer(&dbase)) 15702 extra = uintptr(unsafe.Pointer(&dext)) 15703 match = uint32(0) 15704 } 15705 15706 // initialize state for loop 15707 huff = uint32(0) // starting code 15708 sym = uint32(0) // starting code symbol 15709 len = min // starting code length 15710 next = *(*uintptr)(unsafe.Pointer(table)) // current table to fill in 15711 curr = root // current table index bits 15712 drop = uint32(0) // current bits to drop from code for index 15713 low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root 15714 used = (uint32(1) << root) // use root table entries 15715 mask = (used - uint32(1)) // mask for comparing low 15716 15717 // check available table space 15718 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 15719 return 1 15720 } 15721 15722 // process all codes and make table entries 15723 for { 15724 // create table entry 15725 here.Fbits = (uint8(len - drop)) 15726 if (uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) + 1) < match { 15727 here.Fop = uint8(0) 15728 here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) 15729 } else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { 15730 here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2))) 15731 here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2)) 15732 } else { 15733 here.Fop = (uint8(32 + 64)) // end of block 15734 here.Fval = uint16(0) 15735 } 15736 15737 // replicate for those indices with low len bits equal to huff 15738 incr = (uint32(1) << (len - drop)) 15739 fill = (uint32(1) << curr) 15740 min = fill // save offset to next table 15741 for ok := true; ok; ok = (fill != uint32(0)) { 15742 fill = fill - (incr) 15743 *(*Code)(unsafe.Pointer(next + uintptr(((huff>>drop)+fill))*4)) = here 15744 } 15745 15746 // backwards increment the len-bit code huff 15747 incr = (uint32(1) << (len - uint32(1))) 15748 for (huff & incr) != 0 { 15749 incr >>= 1 15750 } 15751 if incr != uint32(0) { 15752 huff = huff & (incr - uint32(1)) 15753 huff = huff + (incr) 15754 } else { 15755 huff = uint32(0) 15756 } 15757 15758 // go to next symbol, update count, len 15759 sym++ 15760 if int32(libc.PreDecUint16(&(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))), 1)) == 0 { 15761 if len == max { 15762 break 15763 } 15764 len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) 15765 } 15766 15767 // create new sub-table if needed 15768 if (len > root) && ((huff & mask) != low) { 15769 // if first time, transition to sub-tables 15770 if drop == uint32(0) { 15771 drop = root 15772 } 15773 15774 // increment past last table 15775 next += 4 * (uintptr(min)) // here min is 1 << curr 15776 15777 // determine length of next table 15778 curr = (len - drop) 15779 left = (int32(1) << curr) 15780 for (curr + drop) < max { 15781 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr((curr+drop))*2)))) 15782 if left <= 0 { 15783 break 15784 } 15785 curr++ 15786 left <<= 1 15787 } 15788 15789 // check for enough space 15790 used = used + (uint32(1) << curr) 15791 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 15792 return 1 15793 } 15794 15795 // point entry in root table to sub-table 15796 low = (huff & mask) 15797 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fop = uint8(curr) 15798 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fbits = uint8(root) 15799 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fval = (uint16((int32(next) - int32(*(*uintptr)(unsafe.Pointer(table)))) / 4)) 15800 } 15801 } 15802 15803 // fill in remaining table entry if code is incomplete (guaranteed to have 15804 // at most one remaining entry, since if the code is incomplete, the 15805 // maximum code length that was allowed to get this far is one bit) 15806 if huff != uint32(0) { 15807 here.Fop = uint8(64) // invalid code marker 15808 here.Fbits = (uint8(len - drop)) 15809 here.Fval = uint16(0) 15810 *(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here 15811 } 15812 15813 // set return parameters 15814 *(*uintptr)(unsafe.Pointer(table)) += (uintptr(used)) * 4 15815 *(*uint32)(unsafe.Pointer(bits)) = root 15816 return 0 15817 } 15818 15819 var lbase = [31]uint16{ // Length codes 257..285 base 15820 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), 15821 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 */ 15822 var lext = [31]uint16{ // Length codes 257..285 extra 15823 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), 15824 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 */ 15825 var dbase = [32]uint16{ // Distance codes 0..29 base 15826 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), 15827 uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145), 15828 uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */ 15829 var dext = [32]uint16{ // Distance codes 0..29 extra 15830 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), 15831 uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27), 15832 uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */ 15833 15834 type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */ 15835 15836 // =========================================================================== 15837 // Constants 15838 15839 // Bit length codes must not exceed MAX_BL_BITS bits 15840 15841 // end of block literal code 15842 15843 // repeat previous bit length 3-6 times (2 bits of repeat count) 15844 15845 // repeat a zero length 3-10 times (3 bits of repeat count) 15846 15847 // repeat a zero length 11-138 times (7 bits of repeat count) 15848 15849 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 */ 15850 15851 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 */ 15852 15853 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 */ 15854 15855 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 */ 15856 // The lengths of the bit length codes are sent in order of decreasing 15857 // probability, to avoid transmitting the lengths for unused bit length codes. 15858 15859 // =========================================================================== 15860 // Local data. These are initialized only once. 15861 15862 // header created automatically with -DGEN_TREES_H 15863 15864 var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) { 15865 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 15866 return r 15867 }(), Fdl: func() (r struct{ Fdad Ush }) { 15868 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15869 return r 15870 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15871 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140) 15872 return r 15873 }(), Fdl: func() (r struct{ Fdad Ush }) { 15874 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15875 return r 15876 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15877 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76) 15878 return r 15879 }(), Fdl: func() (r struct{ Fdad Ush }) { 15880 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15881 return r 15882 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15883 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204) 15884 return r 15885 }(), Fdl: func() (r struct{ Fdad Ush }) { 15886 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15887 return r 15888 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15889 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44) 15890 return r 15891 }(), Fdl: func() (r struct{ Fdad Ush }) { 15892 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15893 return r 15894 }()}, 15895 {Ffc: func() (r struct{ Ffreq Ush }) { 15896 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172) 15897 return r 15898 }(), Fdl: func() (r struct{ Fdad Ush }) { 15899 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15900 return r 15901 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15902 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108) 15903 return r 15904 }(), Fdl: func() (r struct{ Fdad Ush }) { 15905 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15906 return r 15907 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15908 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236) 15909 return r 15910 }(), Fdl: func() (r struct{ Fdad Ush }) { 15911 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15912 return r 15913 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15914 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 15915 return r 15916 }(), Fdl: func() (r struct{ Fdad Ush }) { 15917 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15918 return r 15919 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15920 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156) 15921 return r 15922 }(), Fdl: func() (r struct{ Fdad Ush }) { 15923 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15924 return r 15925 }()}, 15926 {Ffc: func() (r struct{ Ffreq Ush }) { 15927 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92) 15928 return r 15929 }(), Fdl: func() (r struct{ Fdad Ush }) { 15930 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15931 return r 15932 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15933 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220) 15934 return r 15935 }(), Fdl: func() (r struct{ Fdad Ush }) { 15936 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15937 return r 15938 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15939 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60) 15940 return r 15941 }(), Fdl: func() (r struct{ Fdad Ush }) { 15942 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15943 return r 15944 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15945 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188) 15946 return r 15947 }(), Fdl: func() (r struct{ Fdad Ush }) { 15948 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15949 return r 15950 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15951 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124) 15952 return r 15953 }(), Fdl: func() (r struct{ Fdad Ush }) { 15954 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15955 return r 15956 }()}, 15957 {Ffc: func() (r struct{ Ffreq Ush }) { 15958 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252) 15959 return r 15960 }(), Fdl: func() (r struct{ Fdad Ush }) { 15961 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15962 return r 15963 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15964 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 15965 return r 15966 }(), Fdl: func() (r struct{ Fdad Ush }) { 15967 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15968 return r 15969 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15970 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130) 15971 return r 15972 }(), Fdl: func() (r struct{ Fdad Ush }) { 15973 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15974 return r 15975 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15976 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66) 15977 return r 15978 }(), Fdl: func() (r struct{ Fdad Ush }) { 15979 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15980 return r 15981 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15982 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194) 15983 return r 15984 }(), Fdl: func() (r struct{ Fdad Ush }) { 15985 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15986 return r 15987 }()}, 15988 {Ffc: func() (r struct{ Ffreq Ush }) { 15989 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34) 15990 return r 15991 }(), Fdl: func() (r struct{ Fdad Ush }) { 15992 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15993 return r 15994 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15995 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162) 15996 return r 15997 }(), Fdl: func() (r struct{ Fdad Ush }) { 15998 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15999 return r 16000 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16001 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98) 16002 return r 16003 }(), Fdl: func() (r struct{ Fdad Ush }) { 16004 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16005 return r 16006 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16007 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226) 16008 return r 16009 }(), Fdl: func() (r struct{ Fdad Ush }) { 16010 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16011 return r 16012 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16013 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 16014 return r 16015 }(), Fdl: func() (r struct{ Fdad Ush }) { 16016 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16017 return r 16018 }()}, 16019 {Ffc: func() (r struct{ Ffreq Ush }) { 16020 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146) 16021 return r 16022 }(), Fdl: func() (r struct{ Fdad Ush }) { 16023 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16024 return r 16025 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16026 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82) 16027 return r 16028 }(), Fdl: func() (r struct{ Fdad Ush }) { 16029 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16030 return r 16031 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16032 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210) 16033 return r 16034 }(), Fdl: func() (r struct{ Fdad Ush }) { 16035 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16036 return r 16037 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16038 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50) 16039 return r 16040 }(), Fdl: func() (r struct{ Fdad Ush }) { 16041 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16042 return r 16043 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16044 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178) 16045 return r 16046 }(), Fdl: func() (r struct{ Fdad Ush }) { 16047 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16048 return r 16049 }()}, 16050 {Ffc: func() (r struct{ Ffreq Ush }) { 16051 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114) 16052 return r 16053 }(), Fdl: func() (r struct{ Fdad Ush }) { 16054 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16055 return r 16056 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16057 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242) 16058 return r 16059 }(), Fdl: func() (r struct{ Fdad Ush }) { 16060 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16061 return r 16062 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16063 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 16064 return r 16065 }(), Fdl: func() (r struct{ Fdad Ush }) { 16066 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16067 return r 16068 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16069 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138) 16070 return r 16071 }(), Fdl: func() (r struct{ Fdad Ush }) { 16072 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16073 return r 16074 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16075 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74) 16076 return r 16077 }(), Fdl: func() (r struct{ Fdad Ush }) { 16078 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16079 return r 16080 }()}, 16081 {Ffc: func() (r struct{ Ffreq Ush }) { 16082 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202) 16083 return r 16084 }(), Fdl: func() (r struct{ Fdad Ush }) { 16085 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16086 return r 16087 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16088 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42) 16089 return r 16090 }(), Fdl: func() (r struct{ Fdad Ush }) { 16091 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16092 return r 16093 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16094 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170) 16095 return r 16096 }(), Fdl: func() (r struct{ Fdad Ush }) { 16097 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16098 return r 16099 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16100 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106) 16101 return r 16102 }(), Fdl: func() (r struct{ Fdad Ush }) { 16103 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16104 return r 16105 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16106 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234) 16107 return r 16108 }(), Fdl: func() (r struct{ Fdad Ush }) { 16109 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16110 return r 16111 }()}, 16112 {Ffc: func() (r struct{ Ffreq Ush }) { 16113 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 16114 return r 16115 }(), Fdl: func() (r struct{ Fdad Ush }) { 16116 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16117 return r 16118 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16119 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154) 16120 return r 16121 }(), Fdl: func() (r struct{ Fdad Ush }) { 16122 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16123 return r 16124 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16125 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90) 16126 return r 16127 }(), Fdl: func() (r struct{ Fdad Ush }) { 16128 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16129 return r 16130 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16131 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218) 16132 return r 16133 }(), Fdl: func() (r struct{ Fdad Ush }) { 16134 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16135 return r 16136 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16137 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58) 16138 return r 16139 }(), Fdl: func() (r struct{ Fdad Ush }) { 16140 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16141 return r 16142 }()}, 16143 {Ffc: func() (r struct{ Ffreq Ush }) { 16144 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186) 16145 return r 16146 }(), Fdl: func() (r struct{ Fdad Ush }) { 16147 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16148 return r 16149 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16150 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122) 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(250) 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(6) 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(134) 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 }()}, 16174 {Ffc: func() (r struct{ Ffreq Ush }) { 16175 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70) 16176 return r 16177 }(), Fdl: func() (r struct{ Fdad Ush }) { 16178 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16179 return r 16180 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16181 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198) 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(38) 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(166) 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(102) 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 }()}, 16205 {Ffc: func() (r struct{ Ffreq Ush }) { 16206 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230) 16207 return r 16208 }(), Fdl: func() (r struct{ Fdad Ush }) { 16209 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16210 return r 16211 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16212 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 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(150) 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(86) 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(214) 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 }()}, 16236 {Ffc: func() (r struct{ Ffreq Ush }) { 16237 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54) 16238 return r 16239 }(), Fdl: func() (r struct{ Fdad Ush }) { 16240 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16241 return r 16242 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16243 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182) 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(118) 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(246) 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(14) 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 }()}, 16267 {Ffc: func() (r struct{ Ffreq Ush }) { 16268 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142) 16269 return r 16270 }(), Fdl: func() (r struct{ Fdad Ush }) { 16271 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16272 return r 16273 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16274 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78) 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(206) 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(46) 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(174) 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 }()}, 16298 {Ffc: func() (r struct{ Ffreq Ush }) { 16299 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110) 16300 return r 16301 }(), Fdl: func() (r struct{ Fdad Ush }) { 16302 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16303 return r 16304 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16305 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238) 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(30) 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(158) 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(94) 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 }()}, 16329 {Ffc: func() (r struct{ Ffreq Ush }) { 16330 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222) 16331 return r 16332 }(), Fdl: func() (r struct{ Fdad Ush }) { 16333 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16334 return r 16335 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16336 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62) 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(190) 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(126) 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(254) 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 }()}, 16360 {Ffc: func() (r struct{ Ffreq Ush }) { 16361 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 16362 return r 16363 }(), Fdl: func() (r struct{ Fdad Ush }) { 16364 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16365 return r 16366 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16367 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129) 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(65) 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(193) 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(33) 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 }()}, 16391 {Ffc: func() (r struct{ Ffreq Ush }) { 16392 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161) 16393 return r 16394 }(), Fdl: func() (r struct{ Fdad Ush }) { 16395 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16396 return r 16397 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16398 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97) 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(225) 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(17) 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(145) 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 }()}, 16422 {Ffc: func() (r struct{ Ffreq Ush }) { 16423 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81) 16424 return r 16425 }(), Fdl: func() (r struct{ Fdad Ush }) { 16426 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16427 return r 16428 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16429 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209) 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(49) 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(177) 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(113) 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 }()}, 16453 {Ffc: func() (r struct{ Ffreq Ush }) { 16454 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241) 16455 return r 16456 }(), Fdl: func() (r struct{ Fdad Ush }) { 16457 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16458 return r 16459 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16460 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 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(137) 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(73) 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(201) 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 }()}, 16484 {Ffc: func() (r struct{ Ffreq Ush }) { 16485 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41) 16486 return r 16487 }(), Fdl: func() (r struct{ Fdad Ush }) { 16488 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16489 return r 16490 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16491 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169) 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(105) 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(233) 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(25) 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 }()}, 16515 {Ffc: func() (r struct{ Ffreq Ush }) { 16516 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153) 16517 return r 16518 }(), Fdl: func() (r struct{ Fdad Ush }) { 16519 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16520 return r 16521 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16522 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89) 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(217) 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(57) 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(185) 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 }()}, 16546 {Ffc: func() (r struct{ Ffreq Ush }) { 16547 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121) 16548 return r 16549 }(), Fdl: func() (r struct{ Fdad Ush }) { 16550 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16551 return r 16552 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16553 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249) 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(5) 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(133) 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(69) 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 }()}, 16577 {Ffc: func() (r struct{ Ffreq Ush }) { 16578 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197) 16579 return r 16580 }(), Fdl: func() (r struct{ Fdad Ush }) { 16581 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16582 return r 16583 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16584 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37) 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(165) 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(101) 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(229) 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 }()}, 16608 {Ffc: func() (r struct{ Ffreq Ush }) { 16609 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 16610 return r 16611 }(), Fdl: func() (r struct{ Fdad Ush }) { 16612 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16613 return r 16614 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16615 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149) 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(85) 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(213) 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(53) 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 }()}, 16639 {Ffc: func() (r struct{ Ffreq Ush }) { 16640 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181) 16641 return r 16642 }(), Fdl: func() (r struct{ Fdad Ush }) { 16643 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16644 return r 16645 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16646 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117) 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(245) 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(13) 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(141) 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 }()}, 16670 {Ffc: func() (r struct{ Ffreq Ush }) { 16671 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77) 16672 return r 16673 }(), Fdl: func() (r struct{ Fdad Ush }) { 16674 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16675 return r 16676 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16677 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205) 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(45) 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(173) 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(109) 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 }()}, 16701 {Ffc: func() (r struct{ Ffreq Ush }) { 16702 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237) 16703 return r 16704 }(), Fdl: func() (r struct{ Fdad Ush }) { 16705 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16706 return r 16707 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16708 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 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(157) 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(93) 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(221) 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 }()}, 16732 {Ffc: func() (r struct{ Ffreq Ush }) { 16733 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61) 16734 return r 16735 }(), Fdl: func() (r struct{ Fdad Ush }) { 16736 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16737 return r 16738 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16739 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189) 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(125) 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(253) 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(19) 16758 return r 16759 }(), Fdl: func() (r struct{ Fdad Ush }) { 16760 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16761 return r 16762 }()}, 16763 {Ffc: func() (r struct{ Ffreq Ush }) { 16764 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275) 16765 return r 16766 }(), Fdl: func() (r struct{ Fdad Ush }) { 16767 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16768 return r 16769 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16770 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147) 16771 return r 16772 }(), Fdl: func() (r struct{ Fdad Ush }) { 16773 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16774 return r 16775 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16776 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403) 16777 return r 16778 }(), Fdl: func() (r struct{ Fdad Ush }) { 16779 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16780 return r 16781 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16782 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83) 16783 return r 16784 }(), Fdl: func() (r struct{ Fdad Ush }) { 16785 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16786 return r 16787 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16788 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339) 16789 return r 16790 }(), Fdl: func() (r struct{ Fdad Ush }) { 16791 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16792 return r 16793 }()}, 16794 {Ffc: func() (r struct{ Ffreq Ush }) { 16795 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211) 16796 return r 16797 }(), Fdl: func() (r struct{ Fdad Ush }) { 16798 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16799 return r 16800 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16801 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467) 16802 return r 16803 }(), Fdl: func() (r struct{ Fdad Ush }) { 16804 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16805 return r 16806 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16807 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51) 16808 return r 16809 }(), Fdl: func() (r struct{ Fdad Ush }) { 16810 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16811 return r 16812 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16813 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307) 16814 return r 16815 }(), Fdl: func() (r struct{ Fdad Ush }) { 16816 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16817 return r 16818 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16819 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179) 16820 return r 16821 }(), Fdl: func() (r struct{ Fdad Ush }) { 16822 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16823 return r 16824 }()}, 16825 {Ffc: func() (r struct{ Ffreq Ush }) { 16826 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435) 16827 return r 16828 }(), Fdl: func() (r struct{ Fdad Ush }) { 16829 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16830 return r 16831 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16832 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115) 16833 return r 16834 }(), Fdl: func() (r struct{ Fdad Ush }) { 16835 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16836 return r 16837 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16838 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371) 16839 return r 16840 }(), Fdl: func() (r struct{ Fdad Ush }) { 16841 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16842 return r 16843 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16844 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243) 16845 return r 16846 }(), Fdl: func() (r struct{ Fdad Ush }) { 16847 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16848 return r 16849 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16850 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499) 16851 return r 16852 }(), Fdl: func() (r struct{ Fdad Ush }) { 16853 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16854 return r 16855 }()}, 16856 {Ffc: func() (r struct{ Ffreq Ush }) { 16857 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 16858 return r 16859 }(), Fdl: func() (r struct{ Fdad Ush }) { 16860 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16861 return r 16862 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16863 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267) 16864 return r 16865 }(), Fdl: func() (r struct{ Fdad Ush }) { 16866 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16867 return r 16868 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16869 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139) 16870 return r 16871 }(), Fdl: func() (r struct{ Fdad Ush }) { 16872 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16873 return r 16874 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16875 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395) 16876 return r 16877 }(), Fdl: func() (r struct{ Fdad Ush }) { 16878 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16879 return r 16880 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16881 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75) 16882 return r 16883 }(), Fdl: func() (r struct{ Fdad Ush }) { 16884 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16885 return r 16886 }()}, 16887 {Ffc: func() (r struct{ Ffreq Ush }) { 16888 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331) 16889 return r 16890 }(), Fdl: func() (r struct{ Fdad Ush }) { 16891 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16892 return r 16893 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16894 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203) 16895 return r 16896 }(), Fdl: func() (r struct{ Fdad Ush }) { 16897 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16898 return r 16899 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16900 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459) 16901 return r 16902 }(), Fdl: func() (r struct{ Fdad Ush }) { 16903 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16904 return r 16905 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16906 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43) 16907 return r 16908 }(), Fdl: func() (r struct{ Fdad Ush }) { 16909 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16910 return r 16911 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16912 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299) 16913 return r 16914 }(), Fdl: func() (r struct{ Fdad Ush }) { 16915 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16916 return r 16917 }()}, 16918 {Ffc: func() (r struct{ Ffreq Ush }) { 16919 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171) 16920 return r 16921 }(), Fdl: func() (r struct{ Fdad Ush }) { 16922 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16923 return r 16924 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16925 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427) 16926 return r 16927 }(), Fdl: func() (r struct{ Fdad Ush }) { 16928 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16929 return r 16930 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16931 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107) 16932 return r 16933 }(), Fdl: func() (r struct{ Fdad Ush }) { 16934 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16935 return r 16936 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363) 16938 return r 16939 }(), Fdl: func() (r struct{ Fdad Ush }) { 16940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16941 return r 16942 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16943 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235) 16944 return r 16945 }(), Fdl: func() (r struct{ Fdad Ush }) { 16946 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16947 return r 16948 }()}, 16949 {Ffc: func() (r struct{ Ffreq Ush }) { 16950 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491) 16951 return r 16952 }(), Fdl: func() (r struct{ Fdad Ush }) { 16953 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16954 return r 16955 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16956 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 16957 return r 16958 }(), Fdl: func() (r struct{ Fdad Ush }) { 16959 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16960 return r 16961 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16962 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283) 16963 return r 16964 }(), Fdl: func() (r struct{ Fdad Ush }) { 16965 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16966 return r 16967 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155) 16969 return r 16970 }(), Fdl: func() (r struct{ Fdad Ush }) { 16971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16972 return r 16973 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16974 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411) 16975 return r 16976 }(), Fdl: func() (r struct{ Fdad Ush }) { 16977 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16978 return r 16979 }()}, 16980 {Ffc: func() (r struct{ Ffreq Ush }) { 16981 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91) 16982 return r 16983 }(), Fdl: func() (r struct{ Fdad Ush }) { 16984 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16985 return r 16986 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16987 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347) 16988 return r 16989 }(), Fdl: func() (r struct{ Fdad Ush }) { 16990 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16991 return r 16992 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16993 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219) 16994 return r 16995 }(), Fdl: func() (r struct{ Fdad Ush }) { 16996 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16997 return r 16998 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475) 17000 return r 17001 }(), Fdl: func() (r struct{ Fdad Ush }) { 17002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17003 return r 17004 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17005 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59) 17006 return r 17007 }(), Fdl: func() (r struct{ Fdad Ush }) { 17008 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17009 return r 17010 }()}, 17011 {Ffc: func() (r struct{ Ffreq Ush }) { 17012 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315) 17013 return r 17014 }(), Fdl: func() (r struct{ Fdad Ush }) { 17015 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17016 return r 17017 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17018 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187) 17019 return r 17020 }(), Fdl: func() (r struct{ Fdad Ush }) { 17021 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17022 return r 17023 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17024 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443) 17025 return r 17026 }(), Fdl: func() (r struct{ Fdad Ush }) { 17027 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17028 return r 17029 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17030 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123) 17031 return r 17032 }(), Fdl: func() (r struct{ Fdad Ush }) { 17033 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17034 return r 17035 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17036 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379) 17037 return r 17038 }(), Fdl: func() (r struct{ Fdad Ush }) { 17039 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17040 return r 17041 }()}, 17042 {Ffc: func() (r struct{ Ffreq Ush }) { 17043 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251) 17044 return r 17045 }(), Fdl: func() (r struct{ Fdad Ush }) { 17046 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17047 return r 17048 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17049 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507) 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(7) 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(263) 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(135) 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 }()}, 17073 {Ffc: func() (r struct{ Ffreq Ush }) { 17074 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391) 17075 return r 17076 }(), Fdl: func() (r struct{ Fdad Ush }) { 17077 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17078 return r 17079 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17080 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71) 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(327) 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(199) 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(455) 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 }()}, 17104 {Ffc: func() (r struct{ Ffreq Ush }) { 17105 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39) 17106 return r 17107 }(), Fdl: func() (r struct{ Fdad Ush }) { 17108 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17109 return r 17110 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17111 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295) 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(167) 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(423) 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(103) 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 }()}, 17135 {Ffc: func() (r struct{ Ffreq Ush }) { 17136 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359) 17137 return r 17138 }(), Fdl: func() (r struct{ Fdad Ush }) { 17139 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17140 return r 17141 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17142 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231) 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(487) 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(23) 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(279) 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 }()}, 17166 {Ffc: func() (r struct{ Ffreq Ush }) { 17167 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151) 17168 return r 17169 }(), Fdl: func() (r struct{ Fdad Ush }) { 17170 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17171 return r 17172 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17173 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407) 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(87) 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(343) 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(215) 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 }()}, 17197 {Ffc: func() (r struct{ Ffreq Ush }) { 17198 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471) 17199 return r 17200 }(), Fdl: func() (r struct{ Fdad Ush }) { 17201 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17202 return r 17203 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17204 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55) 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(311) 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(183) 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(439) 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 }()}, 17228 {Ffc: func() (r struct{ Ffreq Ush }) { 17229 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119) 17230 return r 17231 }(), Fdl: func() (r struct{ Fdad Ush }) { 17232 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17233 return r 17234 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17235 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375) 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(247) 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(503) 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(15) 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 }()}, 17259 {Ffc: func() (r struct{ Ffreq Ush }) { 17260 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271) 17261 return r 17262 }(), Fdl: func() (r struct{ Fdad Ush }) { 17263 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17264 return r 17265 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17266 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143) 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(399) 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(79) 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(335) 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 }()}, 17290 {Ffc: func() (r struct{ Ffreq Ush }) { 17291 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207) 17292 return r 17293 }(), Fdl: func() (r struct{ Fdad Ush }) { 17294 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17295 return r 17296 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17297 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463) 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(47) 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(303) 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(175) 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 }()}, 17321 {Ffc: func() (r struct{ Ffreq Ush }) { 17322 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431) 17323 return r 17324 }(), Fdl: func() (r struct{ Fdad Ush }) { 17325 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17326 return r 17327 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17328 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111) 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(367) 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(239) 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(495) 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 }()}, 17352 {Ffc: func() (r struct{ Ffreq Ush }) { 17353 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31) 17354 return r 17355 }(), Fdl: func() (r struct{ Fdad Ush }) { 17356 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17357 return r 17358 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17359 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287) 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(159) 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(415) 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(95) 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 }()}, 17383 {Ffc: func() (r struct{ Ffreq Ush }) { 17384 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351) 17385 return r 17386 }(), Fdl: func() (r struct{ Fdad Ush }) { 17387 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17388 return r 17389 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17390 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223) 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(479) 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(63) 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(319) 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 }()}, 17414 {Ffc: func() (r struct{ Ffreq Ush }) { 17415 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191) 17416 return r 17417 }(), Fdl: func() (r struct{ Fdad Ush }) { 17418 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17419 return r 17420 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17421 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447) 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(127) 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(383) 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(255) 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 }()}, 17445 {Ffc: func() (r struct{ Ffreq Ush }) { 17446 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511) 17447 return r 17448 }(), Fdl: func() (r struct{ Fdad Ush }) { 17449 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17450 return r 17451 }()}, {Fdl: func() (r struct{ Fdad Ush }) { 17452 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17453 return r 17454 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17455 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64) 17456 return r 17457 }(), Fdl: func() (r struct{ Fdad Ush }) { 17458 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17459 return r 17460 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32) 17462 return r 17463 }(), Fdl: func() (r struct{ Fdad Ush }) { 17464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17465 return r 17466 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96) 17468 return r 17469 }(), Fdl: func() (r struct{ Fdad Ush }) { 17470 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17471 return r 17472 }()}, 17473 {Ffc: func() (r struct{ Ffreq Ush }) { 17474 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 17475 return r 17476 }(), Fdl: func() (r struct{ Fdad Ush }) { 17477 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17478 return r 17479 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17480 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80) 17481 return r 17482 }(), Fdl: func() (r struct{ Fdad Ush }) { 17483 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17484 return r 17485 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17486 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48) 17487 return r 17488 }(), Fdl: func() (r struct{ Fdad Ush }) { 17489 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17490 return r 17491 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112) 17493 return r 17494 }(), Fdl: func() (r struct{ Fdad Ush }) { 17495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17496 return r 17497 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17499 return r 17500 }(), Fdl: func() (r struct{ Fdad Ush }) { 17501 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17502 return r 17503 }()}, 17504 {Ffc: func() (r struct{ Ffreq Ush }) { 17505 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72) 17506 return r 17507 }(), Fdl: func() (r struct{ Fdad Ush }) { 17508 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17509 return r 17510 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17511 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40) 17512 return r 17513 }(), Fdl: func() (r struct{ Fdad Ush }) { 17514 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17515 return r 17516 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17517 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104) 17518 return r 17519 }(), Fdl: func() (r struct{ Fdad Ush }) { 17520 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17521 return r 17522 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 17524 return r 17525 }(), Fdl: func() (r struct{ Fdad Ush }) { 17526 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17527 return r 17528 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17529 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88) 17530 return r 17531 }(), Fdl: func() (r struct{ Fdad Ush }) { 17532 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17533 return r 17534 }()}, 17535 {Ffc: func() (r struct{ Ffreq Ush }) { 17536 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56) 17537 return r 17538 }(), Fdl: func() (r struct{ Fdad Ush }) { 17539 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17540 return r 17541 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17542 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120) 17543 return r 17544 }(), Fdl: func() (r struct{ Fdad Ush }) { 17545 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17546 return r 17547 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17548 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 17549 return r 17550 }(), Fdl: func() (r struct{ Fdad Ush }) { 17551 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17552 return r 17553 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17554 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68) 17555 return r 17556 }(), Fdl: func() (r struct{ Fdad Ush }) { 17557 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17558 return r 17559 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17560 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36) 17561 return r 17562 }(), Fdl: func() (r struct{ Fdad Ush }) { 17563 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17564 return r 17565 }()}, 17566 {Ffc: func() (r struct{ Ffreq Ush }) { 17567 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100) 17568 return r 17569 }(), Fdl: func() (r struct{ Fdad Ush }) { 17570 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17571 return r 17572 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17573 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 17574 return r 17575 }(), Fdl: func() (r struct{ Fdad Ush }) { 17576 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17577 return r 17578 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17579 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84) 17580 return r 17581 }(), Fdl: func() (r struct{ Fdad Ush }) { 17582 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17583 return r 17584 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17585 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52) 17586 return r 17587 }(), Fdl: func() (r struct{ Fdad Ush }) { 17588 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17589 return r 17590 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17591 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116) 17592 return r 17593 }(), Fdl: func() (r struct{ Fdad Ush }) { 17594 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17595 return r 17596 }()}, 17597 {Ffc: func() (r struct{ Ffreq Ush }) { 17598 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 17599 return r 17600 }(), Fdl: func() (r struct{ Fdad Ush }) { 17601 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17602 return r 17603 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17604 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131) 17605 return r 17606 }(), Fdl: func() (r struct{ Fdad Ush }) { 17607 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17608 return r 17609 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17610 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67) 17611 return r 17612 }(), Fdl: func() (r struct{ Fdad Ush }) { 17613 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17614 return r 17615 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17616 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195) 17617 return r 17618 }(), Fdl: func() (r struct{ Fdad Ush }) { 17619 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17620 return r 17621 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17622 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35) 17623 return r 17624 }(), Fdl: func() (r struct{ Fdad Ush }) { 17625 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17626 return r 17627 }()}, 17628 {Ffc: func() (r struct{ Ffreq Ush }) { 17629 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163) 17630 return r 17631 }(), Fdl: func() (r struct{ Fdad Ush }) { 17632 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17633 return r 17634 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17635 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99) 17636 return r 17637 }(), Fdl: func() (r struct{ Fdad Ush }) { 17638 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17639 return r 17640 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17641 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227) 17642 return r 17643 }(), Fdl: func() (r struct{ Fdad Ush }) { 17644 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17645 return r 17646 }()}} /* trees.h:3:21 */ 17647 17648 var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) { 17649 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17650 return r 17651 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17652 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 17653 return r 17654 }(), Fdl: func() (r struct{ Fdad Ush }) { 17655 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17656 return r 17657 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17658 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17659 return r 17660 }(), Fdl: func() (r struct{ Fdad Ush }) { 17661 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17662 return r 17663 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17664 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 17665 return r 17666 }(), Fdl: func() (r struct{ Fdad Ush }) { 17667 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17668 return r 17669 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17670 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 17671 return r 17672 }(), Fdl: func() (r struct{ Fdad Ush }) { 17673 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17674 return r 17675 }()}, 17676 {Ffc: func() (r struct{ Ffreq Ush }) { 17677 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 17678 return r 17679 }(), Fdl: func() (r struct{ Fdad Ush }) { 17680 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17681 return r 17682 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17683 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 17684 return r 17685 }(), Fdl: func() (r struct{ Fdad Ush }) { 17686 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17687 return r 17688 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17689 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 17690 return r 17691 }(), Fdl: func() (r struct{ Fdad Ush }) { 17692 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17693 return r 17694 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17695 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 17696 return r 17697 }(), Fdl: func() (r struct{ Fdad Ush }) { 17698 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17699 return r 17700 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17701 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 17702 return r 17703 }(), Fdl: func() (r struct{ Fdad Ush }) { 17704 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17705 return r 17706 }()}, 17707 {Ffc: func() (r struct{ Ffreq Ush }) { 17708 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 17709 return r 17710 }(), Fdl: func() (r struct{ Fdad Ush }) { 17711 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17712 return r 17713 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17714 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 17715 return r 17716 }(), Fdl: func() (r struct{ Fdad Ush }) { 17717 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17718 return r 17719 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17720 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 17721 return r 17722 }(), Fdl: func() (r struct{ Fdad Ush }) { 17723 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17724 return r 17725 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17726 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 17727 return r 17728 }(), Fdl: func() (r struct{ Fdad Ush }) { 17729 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17730 return r 17731 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17732 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 17733 return r 17734 }(), Fdl: func() (r struct{ Fdad Ush }) { 17735 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17736 return r 17737 }()}, 17738 {Ffc: func() (r struct{ Ffreq Ush }) { 17739 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 17740 return r 17741 }(), Fdl: func() (r struct{ Fdad Ush }) { 17742 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17743 return r 17744 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17745 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 17746 return r 17747 }(), Fdl: func() (r struct{ Fdad Ush }) { 17748 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17749 return r 17750 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17751 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 17752 return r 17753 }(), Fdl: func() (r struct{ Fdad Ush }) { 17754 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17755 return r 17756 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17757 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17758 return r 17759 }(), Fdl: func() (r struct{ Fdad Ush }) { 17760 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17761 return r 17762 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17763 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 17764 return r 17765 }(), Fdl: func() (r struct{ Fdad Ush }) { 17766 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17767 return r 17768 }()}, 17769 {Ffc: func() (r struct{ Ffreq Ush }) { 17770 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17771 return r 17772 }(), Fdl: func() (r struct{ Fdad Ush }) { 17773 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17774 return r 17775 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17776 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 17777 return r 17778 }(), Fdl: func() (r struct{ Fdad Ush }) { 17779 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17780 return r 17781 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17782 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 17783 return r 17784 }(), Fdl: func() (r struct{ Fdad Ush }) { 17785 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17786 return r 17787 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17788 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 17789 return r 17790 }(), Fdl: func() (r struct{ Fdad Ush }) { 17791 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17792 return r 17793 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17794 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 17795 return r 17796 }(), Fdl: func() (r struct{ Fdad Ush }) { 17797 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17798 return r 17799 }()}, 17800 {Ffc: func() (r struct{ Ffreq Ush }) { 17801 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 17802 return r 17803 }(), Fdl: func() (r struct{ Fdad Ush }) { 17804 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17805 return r 17806 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17807 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 17808 return r 17809 }(), Fdl: func() (r struct{ Fdad Ush }) { 17810 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17811 return r 17812 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17813 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 17814 return r 17815 }(), Fdl: func() (r struct{ Fdad Ush }) { 17816 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17817 return r 17818 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17819 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17820 return r 17821 }(), Fdl: func() (r struct{ Fdad Ush }) { 17822 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17823 return r 17824 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17825 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 17826 return r 17827 }(), Fdl: func() (r struct{ Fdad Ush }) { 17828 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17829 return r 17830 }()}} /* trees.h:64:21 */ 17831 17832 var X_dist_code = [512]Uch{ 17833 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), 17834 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), 17835 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), 17836 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), 17837 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), 17838 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), 17839 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), 17840 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), 17841 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), 17842 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), 17843 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), 17844 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), 17845 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), 17846 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), 17847 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), 17848 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), 17849 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), 17850 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), 17851 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), 17852 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), 17853 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), 17854 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), 17855 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), 17856 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), 17857 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), 17858 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 17859 } /* trees.h:73:25 */ 17860 17861 var X_length_code = [256]Uch{ 17862 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), 17863 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), 17864 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), 17865 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), 17866 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), 17867 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), 17868 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), 17869 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), 17870 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), 17871 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), 17872 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), 17873 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), 17874 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), 17875 } /* trees.h:102:25 */ 17876 17877 var base_length = [29]int32{ 17878 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 17879 64, 80, 96, 112, 128, 160, 192, 224, 0, 17880 } /* trees.h:118:17 */ 17881 17882 var base_dist = [30]int32{ 17883 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 17884 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 17885 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 17886 } /* trees.h:123:17 */ 17887 17888 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 */ 17889 17890 var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */ 17891 17892 var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */ 17893 17894 // Send a code of the given tree. c and tree must not have side effects 17895 17896 // =========================================================================== 17897 // Output a short LSB first on the stream. 17898 // IN assertion: there is enough room in pendingBuf. 17899 17900 // =========================================================================== 17901 // Send a value on a given number of bits. 17902 // IN assertion: length <= 16 and value fits in length bits. 17903 17904 // the arguments must not have side effects 17905 17906 // =========================================================================== 17907 // Initialize the various 'constant' tables. 17908 func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */ 17909 } 17910 17911 // =========================================================================== 17912 // Genererate the file trees.h describing the static trees. 17913 17914 // =========================================================================== 17915 // Initialize the tree data structures for a new zlib stream. 17916 func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */ 17917 tr_static_init(tls) 17918 17919 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 148 /* &.dyn_ltree */ 17920 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc)) 17921 17922 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2440 /* &.dyn_dtree */ 17923 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc)) 17924 17925 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2684 /* &.bl_tree */ 17926 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc)) 17927 17928 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 17929 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 17930 17931 // Initialize the first block of the first file: 17932 init_block(tls, s) 17933 } 17934 17935 // =========================================================================== 17936 // Initialize a new block. 17937 func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */ 17938 var n int32 // iterates over tree elements 17939 17940 // Initialize the trees. 17941 for n = 0; n < ((LITERALS + 1) + LENGTH_CODES); n++ { 17942 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 17943 } 17944 for n = 0; n < D_CODES; n++ { 17945 *(*Ush)(unsafe.Pointer((s + 2440 /* &.dyn_dtree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 17946 } 17947 for n = 0; n < BL_CODES; n++ { 17948 *(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 17949 } 17950 17951 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + 256*4 /* &.fc */)) = Ush(1) 17952 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint32(s+5804 /* &.static_len */, Ulg(0)) 17953 (*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5808 /* &.matches */, UInt(0)) 17954 } 17955 17956 // Index within the heap array of least frequent node in the Huffman tree 17957 17958 // =========================================================================== 17959 // Remove the smallest element from the heap and recreate the heap with 17960 // one less element. Updates heap and heap_len. 17961 17962 // =========================================================================== 17963 // Compares to subtrees, using the tree depth as tie breaker when 17964 // the subtrees have equal frequency. This minimizes the worst case length. 17965 17966 // =========================================================================== 17967 // Restore the heap property by moving down the tree starting at node k, 17968 // exchanging a node with the smallest of its two sons if necessary, stopping 17969 // when the heap property is re-established (each father smaller than its 17970 // two sons). 17971 func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */ 17972 var v int32 = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(k)*4)) 17973 var j int32 = (k << 1) // left son of k 17974 for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len { 17975 // Set j to the smallest of the two sons: 17976 if (j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len) && ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr((j+1))*4)))))) <= int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(j)*4))))))))) { 17977 j++ 17978 } 17979 // Exit if v is smaller than both sons 17980 if (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.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 + 2908 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(j)*4)))))))) { 17981 break 17982 } 17983 17984 // Exchange v with the smallest son 17985 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(k)*4)) = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(j)*4)) 17986 k = j 17987 17988 // And continue down the tree, setting j to the left son of k 17989 j <<= 1 17990 } 17991 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(k)*4)) = v 17992 } 17993 17994 // =========================================================================== 17995 // Compute the optimal bit lengths for a tree and update the total bit length 17996 // for the current block. 17997 // IN assertion: the fields freq and dad are set, heap[heap_max] and 17998 // above are the tree nodes sorted by increasing frequency. 17999 // OUT assertions: the field len is set to the optimal bit length, the 18000 // array bl_count contains the frequencies for each bit length. 18001 // The length opt_len is updated; static_len is also updated if stree is 18002 // not null. 18003 func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */ 18004 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 18005 var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code 18006 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 18007 var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits 18008 var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base 18009 var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length 18010 var h int32 // heap index 18011 var n int32 18012 var m int32 // iterate over the tree elements 18013 var bits int32 // bit length 18014 var xbits int32 // extra bits 18015 var f Ush // frequency 18016 var overflow int32 = 0 // number of elements with bit length too large 18017 18018 for bits = 0; bits <= MAX_BITS; bits++ { 18019 *(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr(bits)*2)) = Ush(0) 18020 } 18021 18022 // In a first pass, compute the optimal bit lengths (which may 18023 // overflow in the case of the bit length tree). 18024 *(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2 /* &.dl */)) = Ush(0) // root of the heap 18025 18026 for h = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1); h < ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1); h++ { 18027 n = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(h)*4)) 18028 bits = (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)))*4 + 2 /* &.dl */))) + 1) 18029 if bits > max_length { 18030 bits = max_length 18031 overflow++ 18032 } 18033 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(bits) 18034 // We overwrite tree[n].Dad which is no longer needed 18035 18036 if n > max_code { 18037 continue 18038 } // not a leaf node 18039 18040 *(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr(bits)*2))++ 18041 xbits = 0 18042 if n >= base { 18043 xbits = *(*Intf)(unsafe.Pointer(extra + uintptr((n-base))*4)) 18044 } 18045 f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */)) 18046 *(*Ulg)(unsafe.Pointer(s + 5800 /* &.opt_len */)) += (Ulg(f) * Ulg((uint32(bits + xbits)))) 18047 if stree != 0 { 18048 *(*Ulg)(unsafe.Pointer(s + 5804 /* &.static_len */)) += (Ulg(f) * Ulg((uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2 /* &.dl */))) + xbits)))) 18049 } 18050 } 18051 if overflow == 0 { 18052 return 18053 } 18054 18055 // This happens for example on obj2 and pic of the Calgary corpus 18056 18057 // Find the first bit length which could increase: 18058 for ok := true; ok; ok = (overflow > 0) { 18059 bits = (max_length - 1) 18060 for int32(*(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr(bits)*2))) == 0 { 18061 bits-- 18062 } 18063 *(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr(bits)*2))-- // move one leaf down the tree 18064 *(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr((bits+1))*2)) += Ush((2)) // move one overflow item as its brother 18065 *(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr(max_length)*2))-- 18066 // The brother of the overflow item also moves one step up, 18067 // but this does not affect bl_count[max_length] 18068 overflow = overflow - (2) 18069 } 18070 18071 // Now recompute all bit lengths, scanning in increasing frequency. 18072 // h is still equal to HEAP_SIZE. (It is simpler to reconstruct all 18073 // lengths instead of fixing only the wrong ones. This idea is taken 18074 // from 'ar' written by Haruhiko Okumura.) 18075 for bits = max_length; bits != 0; bits-- { 18076 n = int32(*(*Ush)(unsafe.Pointer((s + 2876 /* &.bl_count */) + uintptr(bits)*2))) 18077 for n != 0 { 18078 m = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(libc.PreDecInt32(&h, 1))*4)) 18079 if m > max_code { 18080 continue 18081 } 18082 if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */))) != uint32(bits) { 18083 18084 *(*Ulg)(unsafe.Pointer(s + 5800 /* &.opt_len */)) += ((Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 /* &.fc */)))) 18085 *(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)) = Ush(bits) 18086 } 18087 n-- 18088 } 18089 } 18090 } 18091 18092 // =========================================================================== 18093 // Generate the codes for a given tree and bit counts (which need not be 18094 // optimal). 18095 // IN assertion: the array bl_count contains the bit length statistics for 18096 // the given tree and the field len is set for all tree elements. 18097 // OUT assertion: the field code is set for all tree elements of non 18098 // zero code length. 18099 func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */ 18100 bp := tls.Alloc(32) 18101 defer tls.Free(32) 18102 18103 // var next_code [16]Ush at bp, 32 18104 // next code value for each bit length 18105 var code uint32 = uint32(0) // running code value 18106 var bits int32 // bit index 18107 var n int32 // code index 18108 18109 // The distribution counts are first used to generate the code values 18110 // without bit reversal. 18111 for bits = 1; bits <= MAX_BITS; bits++ { 18112 code = ((code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr((bits-1))*2)))) << 1) 18113 *(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(bits)*2)) = Ush(code) 18114 } 18115 // Check that the bit counts in bl_count are consistent. The last code 18116 // must be all ones. 18117 18118 for n = 0; n <= max_code; n++ { 18119 var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */))) 18120 if len == 0 { 18121 continue 18122 } 18123 // Now reverse the bits 18124 *(*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)) 18125 18126 } 18127 } 18128 18129 // =========================================================================== 18130 // Construct one Huffman tree and assigns the code bit strings and lengths. 18131 // Update the total bit length for the current block. 18132 // IN assertion: the field freq is set for all tree elements. 18133 // OUT assertions: the fields len and code are set to the optimal bit length 18134 // and corresponding code. The length opt_len is updated; static_len is 18135 // also updated if stree is not null. The field max_code is set. 18136 func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */ 18137 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 18138 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 18139 var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems 18140 var n int32 18141 var m int32 // iterate over heap elements 18142 var max_code int32 = -1 // largest code with non zero frequency 18143 var node int32 // new node being created 18144 18145 // Construct the initial heap, with least frequent element in 18146 // heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. 18147 // heap[0] is not used. 18148 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0 18149 (*Deflate_state)(unsafe.Pointer(s)).Fheap_max = ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1) 18150 18151 for n = 0; n < elems; n++ { 18152 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) != 0 { 18153 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4)) = libc.AssignInt32(&max_code, n) 18154 *(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(n))) = Uch(0) 18155 } else { 18156 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(0) 18157 } 18158 } 18159 18160 // The pkzip format requires that at least one distance code exists, 18161 // and that at least one bit should be sent even if there is only one 18162 // possible code. So to avoid special checks later on we force at least 18163 // two codes of non zero frequency. 18164 for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 { 18165 node = libc.AssignPtrInt32((s+2908 /* &.heap */)+uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4, func() int32 { 18166 if max_code < 2 { 18167 return libc.PreIncInt32(&max_code, 1) 18168 } 18169 return 0 18170 }()) 18171 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = Ush(1) 18172 *(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(node))) = Uch(0) 18173 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len-- 18174 if stree != 0 { 18175 *(*Ulg)(unsafe.Pointer(s + 5804 /* &.static_len */)) -= (Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2 /* &.dl */)))) 18176 } 18177 // node is 0 or 1 so it does not have extra bits 18178 } 18179 (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code 18180 18181 // The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, 18182 // establish sub-heaps of increasing lengths: 18183 for n = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2); n >= 1; n-- { 18184 pqdownheap(tls, s, tree, n) 18185 } 18186 18187 // Construct the Huffman tree by repeatedly combining the least two 18188 // frequent nodes. 18189 node = elems // next internal node of the tree 18190 for ok := true; ok; ok = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2) { 18191 { 18192 n = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + 1*4)) 18193 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + 1*4)) = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) 18194 pqdownheap(tls, s, tree, SMALLEST) 18195 } 18196 // n = node of least frequency 18197 m = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + 1*4)) // m = node of next least frequency 18198 18199 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = n // keep the nodes sorted by frequency 18200 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = m 18201 18202 // Create a new node father of n and m 18203 *(*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 */))))) 18204 *(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(node))) = (Uch((func() int32 { 18205 if int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(m)))) { 18206 return int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(n)))) 18207 } 18208 return int32(*(*Uch)(unsafe.Pointer((s + 5208 /* &.depth */) + uintptr(m)))) 18209 }()) + 1)) 18210 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2 /* &.dl */ /* &.dad */, Ush(node)) 18211 // and insert the new node in the heap 18212 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + 1*4)) = libc.PostIncInt32(&node, 1) 18213 pqdownheap(tls, s, tree, SMALLEST) 18214 18215 } 18216 18217 *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = *(*int32)(unsafe.Pointer((s + 2908 /* &.heap */) + 1*4)) 18218 18219 // At this point, the fields freq and dad are set. We can now 18220 // generate the bit lengths. 18221 gen_bitlen(tls, s, desc) 18222 18223 // The field len is now set, we can generate the bit codes 18224 gen_codes(tls, tree, max_code, s+2876 /* &.bl_count */) 18225 } 18226 18227 // =========================================================================== 18228 // Scan a literal or distance tree to determine the frequencies of the codes 18229 // in the bit length tree. 18230 func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */ 18231 var n int32 // iterates over all tree elements 18232 var prevlen int32 = -1 // last emitted length 18233 var curlen int32 // length of current code 18234 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 18235 var count int32 = 0 // repeat count of the current code 18236 var max_count int32 = 7 // max repeat count 18237 var min_count int32 = 4 // min repeat count 18238 18239 if nextlen == 0 { 18240 max_count = 138 18241 min_count = 3 18242 } 18243 *(*Ush)(unsafe.Pointer(tree + uintptr((max_code+1))*4 + 2 /* &.dl */)) = Ush(0xffff) // guard 18244 18245 for n = 0; n <= max_code; n++ { 18246 curlen = nextlen 18247 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 18248 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 18249 continue 18250 } else if count < min_count { 18251 *(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */ /* &.freq */)) += Ush((count)) 18252 } else if curlen != 0 { 18253 if curlen != prevlen { 18254 *(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))++ 18255 } 18256 *(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 16*4 /* &.fc */))++ 18257 } else if count <= 10 { 18258 *(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 17*4 /* &.fc */))++ 18259 } else { 18260 *(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 18*4 /* &.fc */))++ 18261 } 18262 count = 0 18263 prevlen = curlen 18264 if nextlen == 0 { 18265 max_count = 138 18266 min_count = 3 18267 } else if curlen == nextlen { 18268 max_count = 6 18269 min_count = 3 18270 } else { 18271 max_count = 7 18272 min_count = 4 18273 } 18274 } 18275 } 18276 18277 // =========================================================================== 18278 // Send a literal or distance tree in compressed form, using the codes in 18279 // bl_tree. 18280 func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */ 18281 var n int32 // iterates over all tree elements 18282 var prevlen int32 = -1 // last emitted length 18283 var curlen int32 // length of current code 18284 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 18285 var count int32 = 0 // repeat count of the current code 18286 var max_count int32 = 7 // max repeat count 18287 var min_count int32 = 4 // min repeat count 18288 18289 /* tree[max_code+1].Len = -1; */ // guard already set 18290 if nextlen == 0 { 18291 max_count = 138 18292 min_count = 3 18293 } 18294 18295 for n = 0; n <= max_code; n++ { 18296 curlen = nextlen 18297 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 18298 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 18299 continue 18300 } else if count < min_count { 18301 for ok := true; ok; ok = (libc.PreDecInt32(&count, 1) != 0) { 18302 { 18303 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 18304 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18305 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 18306 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18307 { 18308 { 18309 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18310 } 18311 { 18312 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18313 } 18314 18315 } 18316 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18317 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18318 } else { 18319 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18320 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18321 } 18322 } 18323 } 18324 18325 } else if curlen != 0 { 18326 if curlen != prevlen { 18327 { 18328 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 18329 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18330 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 18331 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18332 { 18333 { 18334 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18335 } 18336 { 18337 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18338 } 18339 18340 } 18341 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18342 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18343 } else { 18344 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18345 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18346 } 18347 } 18348 count-- 18349 } 18350 18351 { 18352 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 16*4 + 2 /* &.dl */))) 18353 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18354 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 16*4 /* &.fc */))) 18355 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18356 { 18357 { 18358 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18359 } 18360 { 18361 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18362 } 18363 18364 } 18365 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18366 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18367 } else { 18368 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 16*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18369 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18370 } 18371 } 18372 { 18373 var len int32 = 2 18374 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18375 var val int32 = (count - 3) 18376 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18377 { 18378 { 18379 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18380 } 18381 { 18382 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18383 } 18384 18385 } 18386 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18387 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18388 } else { 18389 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18390 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18391 } 18392 } 18393 18394 } else if count <= 10 { 18395 { 18396 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 17*4 + 2 /* &.dl */))) 18397 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18398 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 17*4 /* &.fc */))) 18399 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18400 { 18401 { 18402 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18403 } 18404 { 18405 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18406 } 18407 18408 } 18409 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18410 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18411 } else { 18412 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 17*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18413 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18414 } 18415 } 18416 { 18417 var len int32 = 3 18418 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18419 var val int32 = (count - 3) 18420 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18421 { 18422 { 18423 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18424 } 18425 { 18426 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18427 } 18428 18429 } 18430 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18431 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18432 } else { 18433 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18434 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18435 } 18436 } 18437 18438 } else { 18439 { 18440 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 18*4 + 2 /* &.dl */))) 18441 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18442 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 18*4 /* &.fc */))) 18443 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18444 { 18445 { 18446 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18447 } 18448 { 18449 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18450 } 18451 18452 } 18453 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18454 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18455 } else { 18456 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + 18*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18457 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18458 } 18459 } 18460 { 18461 var len int32 = 7 18462 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18463 var val int32 = (count - 11) 18464 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18465 { 18466 { 18467 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18468 } 18469 { 18470 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18471 } 18472 18473 } 18474 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18475 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18476 } else { 18477 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(count - 11))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18478 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18479 } 18480 } 18481 18482 } 18483 count = 0 18484 prevlen = curlen 18485 if nextlen == 0 { 18486 max_count = 138 18487 min_count = 3 18488 } else if curlen == nextlen { 18489 max_count = 6 18490 min_count = 3 18491 } else { 18492 max_count = 7 18493 min_count = 4 18494 } 18495 } 18496 } 18497 18498 // =========================================================================== 18499 // Construct the Huffman tree for the bit lengths and return the index in 18500 // bl_order of the last bit length code to send. 18501 func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */ 18502 var max_blindex int32 // index of last bit length code of non zero freq 18503 18504 // Determine the bit length frequencies for literal and distance trees 18505 scan_tree(tls, s, s+148 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) 18506 scan_tree(tls, s, s+2440 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) 18507 18508 // Build the bit length tree: 18509 build_tree(tls, s, (s + 2864 /* &.bl_desc */)) 18510 // opt_len now includes the length of the tree representations, except 18511 // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. 18512 18513 // Determine the number of bit length codes to send. The pkzip format 18514 // requires that at least 4 bit length codes be sent. (appnote.txt says 18515 // 3 but the actual value used is 4.) 18516 for max_blindex = (BL_CODES - 1); max_blindex >= 3; max_blindex-- { 18517 if int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(bl_order[max_blindex])*4 + 2 /* &.dl */))) != 0 { 18518 break 18519 } 18520 } 18521 // Update opt_len to include the bit length tree and counts 18522 *(*Ulg)(unsafe.Pointer(s + 5800 /* &.opt_len */)) += ((((Ulg(3) * (Ulg(max_blindex) + Ulg(1))) + Ulg(5)) + Ulg(5)) + Ulg(4)) 18523 18524 return max_blindex 18525 } 18526 18527 // =========================================================================== 18528 // Send the header for a block using dynamic Huffman trees: the counts, the 18529 // lengths of the bit length codes, the literal tree and the distance tree. 18530 // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. 18531 func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */ 18532 var rank int32 // index in bl_order 18533 18534 { 18535 var len int32 = 5 18536 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18537 var val int32 = (lcodes - 257) 18538 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18539 { 18540 { 18541 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18542 } 18543 { 18544 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18545 } 18546 18547 } 18548 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18549 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18550 } else { 18551 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(lcodes - 257))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18552 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18553 } 18554 } 18555 /* not +255 as stated in appnote.txt */ 18556 { 18557 var len int32 = 5 18558 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18559 var val int32 = (dcodes - 1) 18560 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18561 { 18562 { 18563 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18564 } 18565 { 18566 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18567 } 18568 18569 } 18570 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18571 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18572 } else { 18573 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(dcodes - 1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18574 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18575 } 18576 } 18577 18578 { 18579 var len int32 = 4 18580 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18581 var val int32 = (blcodes - 4) 18582 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18583 { 18584 { 18585 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18586 } 18587 { 18588 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18589 } 18590 18591 } 18592 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18593 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18594 } else { 18595 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(blcodes - 4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18596 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18597 } 18598 } 18599 // not -3 as stated in appnote.txt 18600 for rank = 0; rank < blcodes; rank++ { 18601 18602 { 18603 var len int32 = 3 18604 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18605 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */))) 18606 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18607 { 18608 { 18609 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18610 } 18611 { 18612 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18613 } 18614 18615 } 18616 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18617 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18618 } else { 18619 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2684 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18620 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18621 } 18622 } 18623 18624 } 18625 18626 send_tree(tls, s, s+148 /* &.dyn_ltree */, (lcodes - 1)) // literal tree 18627 18628 send_tree(tls, s, s+2440 /* &.dyn_dtree */, (dcodes - 1)) // distance tree 18629 18630 } 18631 18632 // =========================================================================== 18633 // Send a stored block 18634 func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */ 18635 { 18636 var len int32 = 3 18637 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18638 var val int32 = ((int32(STORED_BLOCK) << 1) + last) 18639 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18640 { 18641 { 18642 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18643 } 18644 { 18645 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18646 } 18647 18648 } 18649 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18650 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18651 } else { 18652 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STORED_BLOCK) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18653 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18654 } 18655 } 18656 // send block type 18657 bi_windup(tls, s) /* align on byte boundary */ 18658 { 18659 { 18660 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(stored_len))) & 0xff)) 18661 } 18662 { 18663 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(stored_len))) >> 8)) 18664 } 18665 18666 } 18667 18668 { 18669 { 18670 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(^stored_len))) & 0xff)) 18671 } 18672 { 18673 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(^stored_len))) >> 8)) 18674 } 18675 18676 } 18677 18678 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), buf, uint32(stored_len)) 18679 *(*Ulg)(unsafe.Pointer(s + 20 /* &.pending */)) += (stored_len) 18680 } 18681 18682 // =========================================================================== 18683 // Flush the bits in the bit buffer to pending output (leaves at most 7 bits) 18684 func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */ 18685 bi_flush(tls, s) 18686 } 18687 18688 // =========================================================================== 18689 // Send one empty static block to give enough lookahead for inflate. 18690 // This takes 10 bits, of which 7 may remain in the bit buffer. 18691 func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */ 18692 { 18693 var len int32 = 3 18694 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18695 var val int32 = (int32(STATIC_TREES) << 1) 18696 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18697 { 18698 { 18699 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18700 } 18701 { 18702 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18703 } 18704 18705 } 18706 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18707 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18708 } else { 18709 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(int32((Ush(int32(STATIC_TREES) << 1)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18710 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18711 } 18712 } 18713 18714 { 18715 var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2 /* &.dl */))) 18716 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18717 var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */))) 18718 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18719 { 18720 { 18721 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18722 } 18723 { 18724 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18725 } 18726 18727 } 18728 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18729 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18730 } else { 18731 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18732 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18733 } 18734 } 18735 18736 bi_flush(tls, s) 18737 } 18738 18739 // =========================================================================== 18740 // Determine the best encoding for the current block: dynamic trees, static 18741 // trees or store, and write out the encoded block. 18742 func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */ 18743 var opt_lenb Ulg 18744 var static_lenb Ulg // opt_len and static_len in bytes 18745 var max_blindex int32 = 0 // index of last bit length code of non zero freq 18746 18747 // Build the Huffman trees unless a stored block is forced 18748 if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 { 18749 18750 // Check if the file is binary or text 18751 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN { 18752 (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s) 18753 } 18754 18755 // Construct the literal and distance trees 18756 build_tree(tls, s, (s + 2840 /* &.l_desc */)) 18757 18758 build_tree(tls, s, (s + 2852 /* &.d_desc */)) 18759 18760 // At this point, opt_len and static_len are the total bit lengths of 18761 // the compressed block data, excluding the tree representations. 18762 18763 // Build the bit length tree for the above two trees, and get the index 18764 // in bl_order of the last bit length code to send. 18765 max_blindex = build_bl_tree(tls, s) 18766 18767 // Determine the best encoding. Compute the block lengths in bytes. 18768 opt_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + Ulg(3)) + Ulg(7)) >> 3) 18769 static_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + Ulg(3)) + Ulg(7)) >> 3) 18770 18771 if static_lenb <= opt_lenb { 18772 opt_lenb = static_lenb 18773 } 18774 18775 } else { 18776 18777 opt_lenb = libc.AssignUint32(&static_lenb, (stored_len + Ulg(5))) // force a stored block 18778 } 18779 18780 if ((stored_len + Ulg(4)) <= opt_lenb) && (buf != uintptr(0)) { 18781 // 4: two words for the lengths 18782 // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. 18783 // Otherwise we can't have processed more than WSIZE input bytes since 18784 // the last block flush, because compression would have been 18785 // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 18786 // transform a block into a stored block. 18787 X_tr_stored_block(tls, s, buf, stored_len, last) 18788 18789 } else if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED) || (static_lenb == opt_lenb) { 18790 { 18791 var len int32 = 3 18792 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18793 var val int32 = ((int32(STATIC_TREES) << 1) + last) 18794 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18795 { 18796 { 18797 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18798 } 18799 { 18800 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18801 } 18802 18803 } 18804 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18805 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18806 } else { 18807 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STATIC_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18808 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18809 } 18810 } 18811 18812 compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))), 18813 uintptr(uintptr(unsafe.Pointer(&static_dtree)))) 18814 } else { 18815 { 18816 var len int32 = 3 18817 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18818 var val int32 = ((int32(DYN_TREES) << 1) + last) 18819 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18820 { 18821 { 18822 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18823 } 18824 { 18825 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18826 } 18827 18828 } 18829 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18830 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18831 } else { 18832 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush((int32(DYN_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18833 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18834 } 18835 } 18836 18837 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), 18838 (max_blindex + 1)) 18839 compress_block(tls, s, s+148, /* &.dyn_ltree */ 18840 s+2440 /* &.dyn_dtree */) 18841 } 18842 18843 // The above check is made mod 2^32, for files larger than 512 MB 18844 // and uLong implemented on 32 bits. 18845 init_block(tls, s) 18846 18847 if last != 0 { 18848 bi_windup(tls, s) 18849 } 18850 18851 } 18852 18853 // =========================================================================== 18854 // Save the match info and tally the frequency counts. Return true if 18855 // the current block must be flushed. 18856 func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */ 18857 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist) 18858 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc) 18859 if dist == uint32(0) { 18860 // lc is the unmatched char 18861 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(lc)*4 /* &.fc */))++ 18862 } else { 18863 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 18864 // Here, lc is the match length - MIN_MATCH 18865 dist-- // dist = match distance - 1 18866 18867 *(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[lc])+LITERALS)+1))*4 /* &.fc */))++ 18868 *(*Ush)(unsafe.Pointer((s + 2440 /* &.dyn_dtree */) + uintptr((func() int32 { 18869 if (dist) < uint32(256) { 18870 return int32(X_dist_code[dist]) 18871 } 18872 return int32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 18873 }()))*4 /* &.fc */))++ 18874 } 18875 18876 return (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 18877 // We avoid equality with lit_bufsize because of wraparound at 64K 18878 // on 16 bit machines and because stored blocks are restricted to 18879 // 64K-1 bytes. 18880 } 18881 18882 // =========================================================================== 18883 // Send the block data compressed using the given Huffman trees 18884 func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */ 18885 var dist uint32 // distance of matched string 18886 var lc int32 // match length or unmatched char (if dist == 0) 18887 var lx uint32 = uint32(0) // running index in l_buf 18888 var code uint32 // the code to send 18889 var extra int32 // number of extra bits to send 18890 18891 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) { 18892 for ok := true; ok; ok = (lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit) { 18893 dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2))) 18894 lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1))))) 18895 if dist == uint32(0) { 18896 { 18897 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2 /* &.dl */))) 18898 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18899 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */))) 18900 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18901 { 18902 { 18903 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18904 } 18905 { 18906 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18907 } 18908 18909 } 18910 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18911 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18912 } else { 18913 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18914 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18915 } 18916 } 18917 // send a literal byte 18918 18919 } else { 18920 // Here, lc is the match length - MIN_MATCH 18921 code = uint32(X_length_code[lc]) 18922 { 18923 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 + 2 /* &.dl */))) 18924 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18925 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */))) 18926 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18927 { 18928 { 18929 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18930 } 18931 { 18932 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18933 } 18934 18935 } 18936 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18937 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18938 } else { 18939 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18940 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18941 } 18942 } 18943 // send the length code 18944 extra = extra_lbits[code] 18945 if extra != 0 { 18946 lc = lc - (base_length[code]) 18947 { 18948 var len int32 = extra 18949 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18950 var val int32 = lc 18951 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18952 { 18953 { 18954 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18955 } 18956 { 18957 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18958 } 18959 18960 } 18961 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18962 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18963 } else { 18964 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(lc))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18965 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18966 } 18967 } 18968 // send the extra length bits 18969 } 18970 dist-- // dist is now the match distance - 1 18971 code = func() uint32 { 18972 if (dist) < uint32(256) { 18973 return uint32(X_dist_code[dist]) 18974 } 18975 return uint32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 18976 }() 18977 18978 { 18979 var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2 /* &.dl */))) 18980 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18981 var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */))) 18982 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18983 { 18984 { 18985 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18986 } 18987 { 18988 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18989 } 18990 18991 } 18992 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18993 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 18994 } else { 18995 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18996 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 18997 } 18998 } 18999 // send the distance code 19000 extra = extra_dbits[code] 19001 if extra != 0 { 19002 dist = dist - (uint32(base_dist[code])) 19003 { 19004 var len int32 = extra 19005 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19006 var val int32 = int32(dist) 19007 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19008 { 19009 { 19010 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19011 } 19012 { 19013 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19014 } 19015 19016 } 19017 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19018 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 19019 } else { 19020 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((Ush(dist))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19021 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 19022 } 19023 } 19024 // send the extra distance bits 19025 } 19026 } // literal or match pair ? 19027 19028 // Check that the overlay between pending_buf and d_buf+l_buf is ok: 19029 19030 } 19031 } 19032 19033 { 19034 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2 /* &.dl */))) 19035 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19036 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */))) 19037 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19038 { 19039 { 19040 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19041 } 19042 { 19043 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19044 } 19045 19046 } 19047 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19048 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len - Buf_size) 19049 } else { 19050 *(*Ush)(unsafe.Pointer(s + 5816 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19051 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) += (len) 19052 } 19053 } 19054 19055 } 19056 19057 // =========================================================================== 19058 // Check if the data type is TEXT or BINARY, using the following algorithm: 19059 // - TEXT if the two conditions below are satisfied: 19060 // a) There are no non-portable control characters belonging to the 19061 // "black list" (0..6, 14..25, 28..31). 19062 // b) There is at least one printable character belonging to the 19063 // "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). 19064 // - BINARY otherwise. 19065 // - The following partially-portable control characters form a 19066 // "gray list" that is ignored in this detection algorithm: 19067 // (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). 19068 // IN assertion: the fields Freq of dyn_ltree are set. 19069 func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */ 19070 // black_mask is the bit mask of black-listed bytes 19071 // set bits 0..6, 14..25, and 28..31 19072 // 0xf3ffc07f = binary 11110011111111111100000001111111 19073 var black_mask uint32 = 0xf3ffc07f 19074 var n int32 19075 19076 // Check for non-textual ("black-listed") bytes. 19077 n = 0 19078 __1: 19079 if !(n <= 31) { 19080 goto __3 19081 } 19082 if ((black_mask & uint32(1)) != 0) && (int32(*(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0) { 19083 return Z_BINARY 19084 } 19085 goto __2 19086 __2: 19087 n++ 19088 black_mask >>= 1 19089 goto __1 19090 goto __3 19091 __3: 19092 ; 19093 19094 // Check for textual ("white-listed") bytes. 19095 if ((int32(*(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + 9*4 /* &.fc */))) != 0) || (int32(*(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + 10*4 /* &.fc */))) != 0)) || 19096 (int32(*(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + 13*4 /* &.fc */))) != 0) { 19097 return Z_TEXT 19098 } 19099 for n = 32; n < LITERALS; n++ { 19100 if int32(*(*Ush)(unsafe.Pointer((s + 148 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0 { 19101 return Z_TEXT 19102 } 19103 } 19104 19105 // There are no "black-listed" or "white-listed" bytes: 19106 // this stream either is empty or has tolerated ("gray-listed") bytes only. 19107 return Z_BINARY 19108 } 19109 19110 // =========================================================================== 19111 // Reverse the first len bits of a code, using straightforward code (a faster 19112 // method would use a table) 19113 // IN assertion: 1 <= len <= 15 19114 func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */ 19115 var res uint32 = uint32(0) 19116 for ok := true; ok; ok = (libc.PreDecInt32(&len, 1) > 0) { 19117 res = res | (code & uint32(1)) 19118 code >>= 1 19119 res <<= 1 19120 } 19121 return (res >> 1) 19122 } 19123 19124 // =========================================================================== 19125 // Flush the bit buffer, keeping at most 7 bits in it. 19126 func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */ 19127 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 { 19128 { 19129 { 19130 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19131 } 19132 { 19133 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19134 } 19135 19136 } 19137 19138 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 19139 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 19140 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 { 19141 { 19142 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 19143 } 19144 19145 libc.AssignShrPtrUint16(s+5816 /* &.bi_buf */, int(8)) 19146 *(*int32)(unsafe.Pointer(s + 5820 /* &.bi_valid */)) -= (8) 19147 } 19148 } 19149 19150 // =========================================================================== 19151 // Flush the bit buffer and align the output on a byte boundary 19152 func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */ 19153 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 { 19154 { 19155 { 19156 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19157 } 19158 { 19159 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19160 } 19161 19162 } 19163 19164 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { 19165 { 19166 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 19167 } 19168 19169 } 19170 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 19171 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 19172 } 19173 19174 // =========================================================================== 19175 // Decompresses the source buffer into the destination buffer. *sourceLen is 19176 // the byte length of the source buffer. Upon entry, *destLen is the total size 19177 // of the destination buffer, which must be large enough to hold the entire 19178 // uncompressed data. (The size of the uncompressed data must have been saved 19179 // previously by the compressor and transmitted to the decompressor by some 19180 // mechanism outside the scope of this compression library.) Upon exit, 19181 // *destLen is the size of the decompressed data and *sourceLen is the number 19182 // of source bytes consumed. Upon return, source + *sourceLen points to the 19183 // first unused input byte. 19184 // 19185 // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough 19186 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or 19187 // Z_DATA_ERROR if the input data was corrupted, including if the input data is 19188 // an incomplete zlib stream. 19189 func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */ 19190 bp := tls.Alloc(60) 19191 defer tls.Free(60) 19192 19193 // var stream Z_stream at bp+4, 56 19194 19195 var err int32 19196 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 19197 var len ULong 19198 var left ULong 19199 // var buf [1]Byte at bp, 1 19200 // for detection of incomplete stream when *destLen == 0 19201 19202 len = *(*ULong)(unsafe.Pointer(sourceLen)) 19203 if *(*ULongf)(unsafe.Pointer(destLen)) != 0 { 19204 left = *(*ULongf)(unsafe.Pointer(destLen)) 19205 *(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0) 19206 } else { 19207 left = ULong(1) 19208 dest = bp /* &buf[0] */ 19209 } 19210 19211 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fnext_in = source 19212 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in = UInt(0) 19213 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fzalloc = uintptr(0) 19214 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fzfree = uintptr(0) 19215 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fopaque = uintptr(0) 19216 19217 err = XinflateInit_(tls, bp+4 /* &stream */, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 19218 if err != Z_OK { 19219 return err 19220 } 19221 19222 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fnext_out = dest 19223 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out = UInt(0) 19224 19225 for ok := true; ok; ok = (err == Z_OK) { 19226 if (*Z_stream)(unsafe.Pointer(bp+4 /* &stream */)).Favail_out == UInt(0) { 19227 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out = func() uint32 { 19228 if left > ULong(max) { 19229 return max 19230 } 19231 return UInt(left) 19232 }() 19233 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out)) 19234 } 19235 if (*Z_stream)(unsafe.Pointer(bp+4 /* &stream */)).Favail_in == UInt(0) { 19236 (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in = func() uint32 { 19237 if len > ULong(max) { 19238 return max 19239 } 19240 return UInt(len) 19241 }() 19242 len = len - (ULong((*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in)) 19243 } 19244 err = Xinflate(tls, bp+4 /* &stream */, Z_NO_FLUSH) 19245 } 19246 19247 *(*ULong)(unsafe.Pointer(sourceLen)) -= (len + ULong((*Z_stream)(unsafe.Pointer(bp+4 /* &stream */)).Favail_in)) 19248 if dest != bp /* buf */ { 19249 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Ftotal_out 19250 } else if ((*Z_stream)(unsafe.Pointer(bp+4 /* &stream */)).Ftotal_out != 0) && (err == (-5)) { 19251 left = ULong(1) 19252 } 19253 19254 XinflateEnd(tls, bp+4 /* &stream */) 19255 if err == Z_STREAM_END { 19256 return Z_OK 19257 } 19258 if err == Z_NEED_DICT { 19259 return -3 19260 } 19261 if (err == (-5)) && ((left + ULong((*Z_stream)(unsafe.Pointer(bp+4 /* &stream */)).Favail_out)) != 0) { 19262 return -3 19263 } 19264 return err 19265 } 19266 19267 func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */ 19268 bp := tls.Alloc(4) 19269 defer tls.Free(4) 19270 *(*ULong)(unsafe.Pointer(bp)) = sourceLen 19271 19272 return Xuncompress2(tls, dest, destLen, source, bp /* &sourceLen */) 19273 } 19274 19275 // These macros are used by bits/stdio.h and internal headers. 19276 19277 // Many more flag bits are defined internally. 19278 19279 // The type of the second argument to `fgetpos' and `fsetpos'. 19280 type Fpos_t1 = X__fpos64_t /* stdio.h:86:20 */ 19281 19282 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 19283 // value -- needed when comparing unsigned to z_off64_t, which is signed 19284 // (possible z_off64_t types off_t, off64_t, and long are all signed) 19285 19286 var Xz_errmsg = [10]uintptr{ 19287 uintptr(ts + 876 /* "need dictionary" */), // Z_NEED_DICT 2 19288 uintptr(ts + 892 /* "stream end" */), // Z_STREAM_END 1 19289 uintptr(ts + 101 /* "" */), // Z_OK 0 19290 uintptr(ts + 903 /* "file error" */), // Z_ERRNO (-1) 19291 uintptr(ts + 914 /* "stream error" */), // Z_STREAM_ERROR (-2) 19292 uintptr(ts + 927 /* "data error" */), // Z_DATA_ERROR (-3) 19293 uintptr(ts + 938 /* "insufficient mem..." */), // Z_MEM_ERROR (-4) 19294 uintptr(ts + 958 /* "buffer error" */), // Z_BUF_ERROR (-5) 19295 uintptr(ts + 971 /* "incompatible ver..." */), // Z_VERSION_ERROR (-6) 19296 uintptr(ts + 101 /* "" */), 19297 } /* zutil.c:13:14 */ 19298 19299 func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */ 19300 return ts /* "1.2.11" */ 19301 } 19302 19303 func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */ 19304 var flags ULong 19305 19306 flags = ULong(0) 19307 switch int32(unsafe.Sizeof(UInt(0))) { 19308 case 2: 19309 break 19310 case 4: 19311 flags = flags + (ULong(1)) 19312 break 19313 case 8: 19314 flags = flags + (ULong(2)) 19315 break 19316 default: 19317 flags = flags + (ULong(3)) 19318 } 19319 switch int32(unsafe.Sizeof(ULong(0))) { 19320 case 2: 19321 break 19322 case 4: 19323 flags = flags + (ULong(int32(1) << 2)) 19324 break 19325 case 8: 19326 flags = flags + (ULong(int32(2) << 2)) 19327 break 19328 default: 19329 flags = flags + (ULong(int32(3) << 2)) 19330 } 19331 switch int32(unsafe.Sizeof(Voidpf(0))) { 19332 case 2: 19333 break 19334 case 4: 19335 flags = flags + (ULong(int32(1) << 4)) 19336 break 19337 case 8: 19338 flags = flags + (ULong(int32(2) << 4)) 19339 break 19340 default: 19341 flags = flags + (ULong(int32(3) << 4)) 19342 } 19343 switch int32(unsafe.Sizeof(Off_t2(0))) { 19344 case 2: 19345 break 19346 case 4: 19347 flags = flags + (ULong(int32(1) << 6)) 19348 break 19349 case 8: 19350 flags = flags + (ULong(int32(2) << 6)) 19351 break 19352 default: 19353 flags = flags + (ULong(int32(3) << 6)) 19354 } 19355 return flags 19356 } 19357 19358 // exported to allow conversion of error code to string for compress() and 19359 // uncompress() 19360 func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */ 19361 return Xz_errmsg[(Z_NEED_DICT - (err))] 19362 } 19363 19364 func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */ 19365 _ = opaque 19366 if uint32(unsafe.Sizeof(UInt(0))) > uint32(2) { 19367 return libc.Xmalloc(tls, (items * size)) 19368 } 19369 return libc.Xcalloc(tls, items, size) 19370 } 19371 19372 func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */ 19373 _ = opaque 19374 libc.Xfree(tls, ptr) 19375 } 19376 19377 func init() { 19378 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8 /* .func */)) = deflate_stored // deflate.c:136:29: 19379 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 20 /* .func */)) = deflate_fast // deflate.c:137:29: 19380 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 32 /* .func */)) = deflate_fast // deflate.c:138:29: 19381 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 44 /* .func */)) = deflate_fast // deflate.c:139:29: 19382 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56 /* .func */)) = deflate_slow // deflate.c:141:29: 19383 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 68 /* .func */)) = deflate_slow // deflate.c:142:29: 19384 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 80 /* .func */)) = deflate_slow // deflate.c:143:29: 19385 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 92 /* .func */)) = deflate_slow // deflate.c:144:29: 19386 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104 /* .func */)) = deflate_slow // deflate.c:145:30: 19387 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 116 /* .func */)) = deflate_slow // deflate.c:146:30: 19388 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22: 19389 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2: 19390 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits)) // trees.c:129:16: 19391 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2: 19392 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits)) // trees.c:126:16: 19393 } 19394 19395 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" 19396 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data