modernc.org/z@v1.7.4/lib/z_linux_s390x.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_s390x.go -pkgname z -trace-translation-units /tmp/go-generate-1577412705/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 = 4321 30 CHARCLASS_NAME_MAX = 2048 31 CHAR_BIT = 8 32 CHAR_MAX = 255 33 CHAR_MIN = 0 34 COLL_WEIGHTS_MAX = 255 35 DEF_MEM_LEVEL = 8 36 DEF_WBITS = 15 37 DELAYTIMER_MAX = 2147483647 38 DYN_TREES = 2 39 EXIT_FAILURE = 1 40 EXIT_SUCCESS = 0 41 EXPR_NEST_MAX = 32 42 FAR = 0 43 FD_SETSIZE = 1024 44 F_LOCK = 1 45 F_OK = 0 46 F_TEST = 3 47 F_TLOCK = 2 48 F_ULOCK = 0 49 HAVE_HIDDEN = 1 50 HAVE_MEMCPY = 0 51 HOST_NAME_MAX = 64 52 INT_MAX = 2147483647 53 INT_MIN = -2147483648 54 LINE_MAX = 2048 55 LITTLE_ENDIAN = 1234 56 LLONG_MAX = 9223372036854775807 57 LLONG_MIN = -9223372036854775808 58 LOGIN_NAME_MAX = 256 59 LONG_MAX = 9223372036854775807 60 LONG_MIN = -9223372036854775808 61 L_INCR = 1 62 L_SET = 0 63 L_XTND = 2 64 MAX_CANON = 255 65 MAX_INPUT = 255 66 MAX_MATCH = 258 67 MAX_MEM_LEVEL = 9 68 MAX_WBITS = 15 69 MB_LEN_MAX = 16 70 MIN_MATCH = 3 71 MQ_PRIO_MAX = 32768 72 NAME_MAX = 255 73 NGROUPS_MAX = 65536 74 NMAX = 5552 75 OS_CODE = 3 76 PATH_MAX = 4096 77 PDP_ENDIAN = 3412 78 PIPE_BUF = 4096 79 PRESET_DICT = 0x20 80 PTHREAD_DESTRUCTOR_ITERATIONS = 4 81 PTHREAD_KEYS_MAX = 1024 82 PTHREAD_STACK_MIN = 16384 83 RAND_MAX = 2147483647 84 RE_DUP_MAX = 32767 85 RTSIG_MAX = 32 86 R_OK = 4 87 SCHAR_MAX = 127 88 SCHAR_MIN = -128 89 SEEK_CUR = 1 90 SEEK_END = 2 91 SEEK_SET = 0 92 SEM_VALUE_MAX = 2147483647 93 SHRT_MAX = 32767 94 SHRT_MIN = -32768 95 SSIZE_MAX = 9223372036854775807 96 STATIC_TREES = 1 97 STDC = 0 98 STDC99 = 0 99 STDERR_FILENO = 2 100 STDIN_FILENO = 0 101 STDOUT_FILENO = 1 102 STORED_BLOCK = 0 103 TTY_NAME_MAX = 32 104 UCHAR_MAX = 255 105 UINT_MAX = 4294967295 106 ULLONG_MAX = 18446744073709551615 107 ULONG_MAX = 18446744073709551615 108 USHRT_MAX = 65535 109 WCONTINUED = 8 110 WEXITED = 4 111 WNOHANG = 1 112 WNOWAIT = 0x01000000 113 WSTOPPED = 2 114 WUNTRACED = 2 115 W_OK = 2 116 XATTR_LIST_MAX = 65536 117 XATTR_NAME_MAX = 255 118 XATTR_SIZE_MAX = 65536 119 X_OK = 1 120 ZCONF_H = 0 121 ZEXPORT = 0 122 ZEXPORTVA = 0 123 ZLIB_H = 0 124 ZLIB_VERNUM = 0x12b0 125 ZLIB_VERSION = "1.2.11" 126 ZLIB_VER_MAJOR = 1 127 ZLIB_VER_MINOR = 2 128 ZLIB_VER_REVISION = 11 129 ZLIB_VER_SUBREVISION = 0 130 ZUTIL_H = 0 131 Z_ASCII = 1 132 Z_BEST_COMPRESSION = 9 133 Z_BEST_SPEED = 1 134 Z_BINARY = 0 135 Z_BLOCK = 5 136 Z_BUF_ERROR = -5 137 Z_DATA_ERROR = -3 138 Z_DEFAULT_COMPRESSION = -1 139 Z_DEFAULT_STRATEGY = 0 140 Z_DEFLATED = 8 141 Z_ERRNO = -1 142 Z_FILTERED = 1 143 Z_FINISH = 4 144 Z_FIXED = 4 145 Z_FULL_FLUSH = 3 146 Z_HAVE_STDARG_H = 0 147 Z_HAVE_UNISTD_H = 0 148 Z_HUFFMAN_ONLY = 2 149 Z_LARGE64 = 0 150 Z_LFS64 = 0 151 Z_MEM_ERROR = -4 152 Z_NEED_DICT = 2 153 Z_NO_COMPRESSION = 0 154 Z_NO_FLUSH = 0 155 Z_NULL = 0 156 Z_OK = 0 157 Z_PARTIAL_FLUSH = 1 158 Z_RLE = 3 159 Z_STREAM_END = 1 160 Z_STREAM_ERROR = -2 161 Z_SYNC_FLUSH = 2 162 Z_TEXT = 1 163 Z_TREES = 6 164 Z_UNKNOWN = 2 165 Z_VERSION_ERROR = -6 166 Z_WANT64 = 0 167 X_ALLOCA_H = 1 168 X_ANSI_STDARG_H_ = 0 169 X_ANSI_STDDEF_H = 0 170 X_ATFILE_SOURCE = 1 171 X_BITS_BYTESWAP_H = 1 172 X_BITS_ENDIANNESS_H = 1 173 X_BITS_ENDIAN_H = 1 174 X_BITS_FLOATN_COMMON_H = 0 175 X_BITS_FLOATN_H = 0 176 X_BITS_POSIX1_LIM_H = 1 177 X_BITS_POSIX2_LIM_H = 1 178 X_BITS_POSIX_OPT_H = 1 179 X_BITS_PTHREADTYPES_ARCH_H = 1 180 X_BITS_PTHREADTYPES_COMMON_H = 1 181 X_BITS_STDINT_INTN_H = 1 182 X_BITS_TIME64_H = 1 183 X_BITS_TYPESIZES_H = 1 184 X_BITS_TYPES_H = 1 185 X_BITS_TYPES_LOCALE_T_H = 1 186 X_BITS_TYPES___LOCALE_T_H = 1 187 X_BITS_UINTN_IDENTITY_H = 1 188 X_BSD_PTRDIFF_T_ = 0 189 X_BSD_SIZE_T_ = 0 190 X_BSD_SIZE_T_DEFINED_ = 0 191 X_DEFAULT_SOURCE = 1 192 X_ENDIAN_H = 1 193 X_FEATURES_H = 1 194 X_FILE_OFFSET_BITS = 64 195 X_GCC_LIMITS_H_ = 0 196 X_GCC_MAX_ALIGN_T = 0 197 X_GCC_PTRDIFF_T = 0 198 X_GCC_SIZE_T = 0 199 X_GCC_WCHAR_T = 0 200 X_GETOPT_CORE_H = 1 201 X_GETOPT_POSIX_H = 1 202 X_LARGEFILE64_SOURCE = 1 203 X_LFS64_ASYNCHRONOUS_IO = 1 204 X_LFS64_LARGEFILE = 1 205 X_LFS64_STDIO = 1 206 X_LFS_ASYNCHRONOUS_IO = 1 207 X_LFS_LARGEFILE = 1 208 X_LIBC_LIMITS_H_ = 1 209 X_LIMITS_H___ = 0 210 X_LINUX_LIMITS_H = 0 211 X_LP64 = 1 212 X_POSIX2_BC_BASE_MAX = 99 213 X_POSIX2_BC_DIM_MAX = 2048 214 X_POSIX2_BC_SCALE_MAX = 99 215 X_POSIX2_BC_STRING_MAX = 1000 216 X_POSIX2_CHARCLASS_NAME_MAX = 14 217 X_POSIX2_CHAR_TERM = 200809 218 X_POSIX2_COLL_WEIGHTS_MAX = 2 219 X_POSIX2_C_BIND = 200809 220 X_POSIX2_C_DEV = 200809 221 X_POSIX2_C_VERSION = 200809 222 X_POSIX2_EXPR_NEST_MAX = 32 223 X_POSIX2_LINE_MAX = 2048 224 X_POSIX2_LOCALEDEF = 200809 225 X_POSIX2_RE_DUP_MAX = 255 226 X_POSIX2_SW_DEV = 200809 227 X_POSIX2_VERSION = 200809 228 X_POSIX_ADVISORY_INFO = 200809 229 X_POSIX_AIO_LISTIO_MAX = 2 230 X_POSIX_AIO_MAX = 1 231 X_POSIX_ARG_MAX = 4096 232 X_POSIX_ASYNCHRONOUS_IO = 200809 233 X_POSIX_ASYNC_IO = 1 234 X_POSIX_BARRIERS = 200809 235 X_POSIX_CHILD_MAX = 25 236 X_POSIX_CHOWN_RESTRICTED = 0 237 X_POSIX_CLOCKRES_MIN = 20000000 238 X_POSIX_CLOCK_SELECTION = 200809 239 X_POSIX_CPUTIME = 0 240 X_POSIX_C_SOURCE = 200809 241 X_POSIX_DELAYTIMER_MAX = 32 242 X_POSIX_FSYNC = 200809 243 X_POSIX_HOST_NAME_MAX = 255 244 X_POSIX_IPV6 = 200809 245 X_POSIX_JOB_CONTROL = 1 246 X_POSIX_LINK_MAX = 8 247 X_POSIX_LOGIN_NAME_MAX = 9 248 X_POSIX_MAPPED_FILES = 200809 249 X_POSIX_MAX_CANON = 255 250 X_POSIX_MAX_INPUT = 255 251 X_POSIX_MEMLOCK = 200809 252 X_POSIX_MEMLOCK_RANGE = 200809 253 X_POSIX_MEMORY_PROTECTION = 200809 254 X_POSIX_MESSAGE_PASSING = 200809 255 X_POSIX_MONOTONIC_CLOCK = 0 256 X_POSIX_MQ_OPEN_MAX = 8 257 X_POSIX_MQ_PRIO_MAX = 32 258 X_POSIX_NAME_MAX = 14 259 X_POSIX_NGROUPS_MAX = 8 260 X_POSIX_NO_TRUNC = 1 261 X_POSIX_OPEN_MAX = 20 262 X_POSIX_PATH_MAX = 256 263 X_POSIX_PIPE_BUF = 512 264 X_POSIX_PRIORITIZED_IO = 200809 265 X_POSIX_PRIORITY_SCHEDULING = 200809 266 X_POSIX_RAW_SOCKETS = 200809 267 X_POSIX_READER_WRITER_LOCKS = 200809 268 X_POSIX_REALTIME_SIGNALS = 200809 269 X_POSIX_REENTRANT_FUNCTIONS = 1 270 X_POSIX_REGEXP = 1 271 X_POSIX_RE_DUP_MAX = 255 272 X_POSIX_RTSIG_MAX = 8 273 X_POSIX_SAVED_IDS = 1 274 X_POSIX_SEMAPHORES = 200809 275 X_POSIX_SEM_NSEMS_MAX = 256 276 X_POSIX_SEM_VALUE_MAX = 32767 277 X_POSIX_SHARED_MEMORY_OBJECTS = 200809 278 X_POSIX_SHELL = 1 279 X_POSIX_SIGQUEUE_MAX = 32 280 X_POSIX_SOURCE = 1 281 X_POSIX_SPAWN = 200809 282 X_POSIX_SPIN_LOCKS = 200809 283 X_POSIX_SPORADIC_SERVER = -1 284 X_POSIX_SSIZE_MAX = 32767 285 X_POSIX_STREAM_MAX = 8 286 X_POSIX_SYMLINK_MAX = 255 287 X_POSIX_SYMLOOP_MAX = 8 288 X_POSIX_SYNCHRONIZED_IO = 200809 289 X_POSIX_THREADS = 200809 290 X_POSIX_THREAD_ATTR_STACKADDR = 200809 291 X_POSIX_THREAD_ATTR_STACKSIZE = 200809 292 X_POSIX_THREAD_CPUTIME = 0 293 X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 294 X_POSIX_THREAD_KEYS_MAX = 128 295 X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 296 X_POSIX_THREAD_PRIO_INHERIT = 200809 297 X_POSIX_THREAD_PRIO_PROTECT = 200809 298 X_POSIX_THREAD_PROCESS_SHARED = 200809 299 X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 300 X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 301 X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 302 X_POSIX_THREAD_SPORADIC_SERVER = -1 303 X_POSIX_THREAD_THREADS_MAX = 64 304 X_POSIX_TIMEOUTS = 200809 305 X_POSIX_TIMERS = 200809 306 X_POSIX_TIMER_MAX = 32 307 X_POSIX_TRACE = -1 308 X_POSIX_TRACE_EVENT_FILTER = -1 309 X_POSIX_TRACE_INHERIT = -1 310 X_POSIX_TRACE_LOG = -1 311 X_POSIX_TTY_NAME_MAX = 9 312 X_POSIX_TYPED_MEMORY_OBJECTS = -1 313 X_POSIX_TZNAME_MAX = 6 314 X_POSIX_V6_LP64_OFF64 = 1 315 X_POSIX_V6_LPBIG_OFFBIG = -1 316 X_POSIX_V7_LP64_OFF64 = 1 317 X_POSIX_V7_LPBIG_OFFBIG = -1 318 X_POSIX_VDISABLE = 0 319 X_POSIX_VERSION = 200809 320 X_PTRDIFF_T = 0 321 X_PTRDIFF_T_ = 0 322 X_PTRDIFF_T_DECLARED = 0 323 X_RWLOCK_INTERNAL_H = 0 324 X_SIZET_ = 0 325 X_SIZE_T = 0 326 X_SIZE_T_ = 0 327 X_SIZE_T_DECLARED = 0 328 X_SIZE_T_DEFINED = 0 329 X_SIZE_T_DEFINED_ = 0 330 X_STDARG_H = 0 331 X_STDC_PREDEF_H = 1 332 X_STDDEF_H = 0 333 X_STDDEF_H_ = 0 334 X_STDLIB_H = 1 335 X_STRINGS_H = 1 336 X_STRING_H = 1 337 X_STRUCT_TIMESPEC = 1 338 X_SYS_CDEFS_H = 1 339 X_SYS_SELECT_H = 1 340 X_SYS_SIZE_T_H = 0 341 X_SYS_TYPES_H = 1 342 X_THREAD_MUTEX_INTERNAL_H = 1 343 X_THREAD_SHARED_TYPES_H = 1 344 X_T_PTRDIFF = 0 345 X_T_PTRDIFF_ = 0 346 X_T_SIZE = 0 347 X_T_SIZE_ = 0 348 X_T_WCHAR = 0 349 X_T_WCHAR_ = 0 350 X_UNISTD_H = 1 351 X_VA_LIST = 0 352 X_VA_LIST_ = 0 353 X_VA_LIST_DEFINED = 0 354 X_VA_LIST_T_H = 0 355 X_WCHAR_T = 0 356 X_WCHAR_T_ = 0 357 X_WCHAR_T_DECLARED = 0 358 X_WCHAR_T_DEFINED = 0 359 X_WCHAR_T_DEFINED_ = 0 360 X_WCHAR_T_H = 0 361 X_XBS5_LP64_OFF64 = 1 362 X_XBS5_LPBIG_OFFBIG = -1 363 X_XOPEN_ENH_I18N = 1 364 X_XOPEN_LEGACY = 1 365 X_XOPEN_REALTIME = 1 366 X_XOPEN_REALTIME_THREADS = 1 367 X_XOPEN_SHM = 1 368 X_XOPEN_UNIX = 1 369 X_XOPEN_VERSION = 700 370 X_XOPEN_XCU_VERSION = 4 371 X_XOPEN_XPG2 = 1 372 X_XOPEN_XPG3 = 1 373 X_XOPEN_XPG4 = 1 374 Linux = 1 375 Unix = 1 376 Z_const = 0 377 BYFOUR = 0 378 GF2_DIM = 32 379 TBLS = 8 380 BL_CODES = 19 381 BUSY_STATE = 113 382 Buf_size = 16 383 COMMENT_STATE = 91 384 DEFLATE_H = 0 385 D_CODES = 30 386 EXTRA_STATE = 69 387 FINISH_STATE = 666 388 GZIP = 0 389 GZIP_STATE = 57 390 HCRC_STATE = 103 391 HEAP_SIZE = 573 392 INIT_STATE = 42 393 LENGTH_CODES = 29 394 LITERALS = 256 395 L_CODES = 286 396 MAX_BITS = 15 397 MAX_STORED = 65535 398 MIN_LOOKAHEAD = 262 399 NAME_STATE = 73 400 NIL = 0 401 TOO_FAR = 4096 402 WIN_INIT = 258 403 AT_EACCESS = 0x200 404 AT_FDCWD = -100 405 AT_REMOVEDIR = 0x200 406 AT_SYMLINK_FOLLOW = 0x400 407 AT_SYMLINK_NOFOLLOW = 0x100 408 BUFSIZ = 8192 409 COPY1 = 1 410 E2BIG = 7 411 EACCES = 13 412 EADDRINUSE = 98 413 EADDRNOTAVAIL = 99 414 EADV = 68 415 EAFNOSUPPORT = 97 416 EAGAIN = 11 417 EALREADY = 114 418 EBADE = 52 419 EBADF = 9 420 EBADFD = 77 421 EBADMSG = 74 422 EBADR = 53 423 EBADRQC = 56 424 EBADSLT = 57 425 EBFONT = 59 426 EBUSY = 16 427 ECANCELED = 125 428 ECHILD = 10 429 ECHRNG = 44 430 ECOMM = 70 431 ECONNABORTED = 103 432 ECONNREFUSED = 111 433 ECONNRESET = 104 434 EDEADLK = 35 435 EDEADLOCK = 35 436 EDESTADDRREQ = 89 437 EDOM = 33 438 EDOTDOT = 73 439 EDQUOT = 122 440 EEXIST = 17 441 EFAULT = 14 442 EFBIG = 27 443 EHOSTDOWN = 112 444 EHOSTUNREACH = 113 445 EHWPOISON = 133 446 EIDRM = 43 447 EILSEQ = 84 448 EINPROGRESS = 115 449 EINTR = 4 450 EINVAL = 22 451 EIO = 5 452 EISCONN = 106 453 EISDIR = 21 454 EISNAM = 120 455 EKEYEXPIRED = 127 456 EKEYREJECTED = 129 457 EKEYREVOKED = 128 458 EL2HLT = 51 459 EL2NSYNC = 45 460 EL3HLT = 46 461 EL3RST = 47 462 ELIBACC = 79 463 ELIBBAD = 80 464 ELIBEXEC = 83 465 ELIBMAX = 82 466 ELIBSCN = 81 467 ELNRNG = 48 468 ELOOP = 40 469 EMEDIUMTYPE = 124 470 EMFILE = 24 471 EMLINK = 31 472 EMSGSIZE = 90 473 EMULTIHOP = 72 474 ENAMETOOLONG = 36 475 ENAVAIL = 119 476 ENETDOWN = 100 477 ENETRESET = 102 478 ENETUNREACH = 101 479 ENFILE = 23 480 ENOANO = 55 481 ENOBUFS = 105 482 ENOCSI = 50 483 ENODATA = 61 484 ENODEV = 19 485 ENOENT = 2 486 ENOEXEC = 8 487 ENOKEY = 126 488 ENOLCK = 37 489 ENOLINK = 67 490 ENOMEDIUM = 123 491 ENOMEM = 12 492 ENOMSG = 42 493 ENONET = 64 494 ENOPKG = 65 495 ENOPROTOOPT = 92 496 ENOSPC = 28 497 ENOSR = 63 498 ENOSTR = 60 499 ENOSYS = 38 500 ENOTBLK = 15 501 ENOTCONN = 107 502 ENOTDIR = 20 503 ENOTEMPTY = 39 504 ENOTNAM = 118 505 ENOTRECOVERABLE = 131 506 ENOTSOCK = 88 507 ENOTSUP = 95 508 ENOTTY = 25 509 ENOTUNIQ = 76 510 ENXIO = 6 511 EOF = -1 512 EOPNOTSUPP = 95 513 EOVERFLOW = 75 514 EOWNERDEAD = 130 515 EPERM = 1 516 EPFNOSUPPORT = 96 517 EPIPE = 32 518 EPROTO = 71 519 EPROTONOSUPPORT = 93 520 EPROTOTYPE = 91 521 ERANGE = 34 522 EREMCHG = 78 523 EREMOTE = 66 524 EREMOTEIO = 121 525 ERESTART = 85 526 ERFKILL = 132 527 EROFS = 30 528 ESHUTDOWN = 108 529 ESOCKTNOSUPPORT = 94 530 ESPIPE = 29 531 ESRCH = 3 532 ESRMNT = 69 533 ESTALE = 116 534 ESTRPIPE = 86 535 ETIME = 62 536 ETIMEDOUT = 110 537 ETOOMANYREFS = 109 538 ETXTBSY = 26 539 EUCLEAN = 117 540 EUNATCH = 49 541 EUSERS = 87 542 EWOULDBLOCK = 11 543 EXDEV = 18 544 EXFULL = 54 545 FAPPEND = 1024 546 FASYNC = 8192 547 FD_CLOEXEC = 1 548 FFSYNC = 1052672 549 FILENAME_MAX = 4096 550 FNDELAY = 2048 551 FNONBLOCK = 2048 552 FOPEN_MAX = 16 553 F_DUPFD = 0 554 F_DUPFD_CLOEXEC = 1030 555 F_EXLCK = 4 556 F_GETFD = 1 557 F_GETFL = 3 558 F_GETLK = 5 559 F_GETLK64 = 5 560 F_GETOWN = 9 561 F_RDLCK = 0 562 F_SETFD = 2 563 F_SETFL = 4 564 F_SETLK = 6 565 F_SETLK64 = 6 566 F_SETLKW = 7 567 F_SETLKW64 = 7 568 F_SETOWN = 8 569 F_SHLCK = 8 570 F_UNLCK = 2 571 F_WRLCK = 1 572 GZBUFSIZE = 8192 573 GZ_APPEND = 1 574 GZ_NONE = 0 575 GZ_READ = 7247 576 GZ_WRITE = 31153 577 HAVE_VSNPRINTF = 0 578 LOCK_EX = 2 579 LOCK_NB = 4 580 LOCK_SH = 1 581 LOCK_UN = 8 582 LOOK = 0 583 L_ctermid = 9 584 L_tmpnam = 20 585 O_ACCMODE = 0003 586 O_APPEND = 02000 587 O_ASYNC = 020000 588 O_CLOEXEC = 524288 589 O_CREAT = 0100 590 O_DIRECTORY = 65536 591 O_DSYNC = 4096 592 O_EXCL = 0200 593 O_FSYNC = 1052672 594 O_LARGEFILE = 0 595 O_NDELAY = 2048 596 O_NOCTTY = 0400 597 O_NOFOLLOW = 131072 598 O_NONBLOCK = 04000 599 O_RDONLY = 00 600 O_RDWR = 02 601 O_RSYNC = 1052672 602 O_SYNC = 04010000 603 O_TRUNC = 01000 604 O_WRONLY = 01 605 POSIX_FADV_DONTNEED = 6 606 POSIX_FADV_NOREUSE = 7 607 POSIX_FADV_NORMAL = 0 608 POSIX_FADV_RANDOM = 1 609 POSIX_FADV_SEQUENTIAL = 2 610 POSIX_FADV_WILLNEED = 3 611 P_tmpdir = "/tmp" 612 S_IFBLK = 24576 613 S_IFCHR = 8192 614 S_IFDIR = 16384 615 S_IFIFO = 4096 616 S_IFLNK = 40960 617 S_IFMT = 61440 618 S_IFREG = 32768 619 S_IFSOCK = 49152 620 S_IRGRP = 32 621 S_IROTH = 4 622 S_IRUSR = 256 623 S_IRWXG = 56 624 S_IRWXO = 7 625 S_IRWXU = 448 626 S_ISGID = 1024 627 S_ISUID = 2048 628 S_ISVTX = 512 629 S_IWGRP = 16 630 S_IWOTH = 2 631 S_IWUSR = 128 632 S_IXGRP = 8 633 S_IXOTH = 1 634 S_IXUSR = 64 635 TMP_MAX = 238328 636 UTIME_NOW = 1073741823 637 UTIME_OMIT = 1073741822 638 X_ASM_GENERIC_ERRNO_BASE_H = 0 639 X_ASM_GENERIC_ERRNO_H = 0 640 X_BITS_ERRNO_H = 1 641 X_BITS_STAT_H = 1 642 X_BITS_STDIO_LIM_H = 1 643 X_ERRNO_H = 1 644 X_FCNTL_H = 1 645 X_IOFBF = 0 646 X_IOLBF = 1 647 X_IONBF = 2 648 X_IO_EOF_SEEN = 0x0010 649 X_IO_ERR_SEEN = 0x0020 650 X_IO_USER_LOCK = 0x8000 651 X_LARGEFILE_SOURCE = 1 652 X_MKNOD_VER_LINUX = 0 653 X_STATBUF_ST_BLKSIZE = 0 654 X_STATBUF_ST_NSEC = 0 655 X_STATBUF_ST_RDEV = 0 656 X_STAT_VER = 1 657 X_STAT_VER_KERNEL = 0 658 X_STAT_VER_LINUX = 1 659 X_STDIO_H = 1 660 ENOUGH = 1444 661 ENOUGH_DISTS = 592 662 ENOUGH_LENS = 852 663 GUNZIP = 0 664 MAXBITS = 15 665 DIST_CODE_LEN = 512 666 END_BLOCK = 256 667 MAX_BL_BITS = 7 668 REPZ_11_138 = 18 669 REPZ_3_10 = 17 670 REP_3_6 = 16 671 SMALLEST = 1 672 ) 673 674 // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; 675 // the `_SC_*' symbols for the NAME argument to `sysconf'; 676 // and the `_CS_*' symbols for the NAME argument to `confstr'. 677 // `sysconf', `pathconf', and `confstr' NAME values. Generic version. 678 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 679 // This file is part of the GNU C Library. 680 // 681 // The GNU C Library is free software; you can redistribute it and/or 682 // modify it under the terms of the GNU Lesser General Public 683 // License as published by the Free Software Foundation; either 684 // version 2.1 of the License, or (at your option) any later version. 685 // 686 // The GNU C Library is distributed in the hope that it will be useful, 687 // but WITHOUT ANY WARRANTY; without even the implied warranty of 688 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 689 // Lesser General Public License for more details. 690 // 691 // You should have received a copy of the GNU Lesser General Public 692 // License along with the GNU C Library; if not, see 693 // <https://www.gnu.org/licenses/>. 694 695 // Values for the NAME argument to `pathconf' and `fpathconf'. 696 const ( /* confname.h:24:1: */ 697 X_PC_LINK_MAX = 0 698 X_PC_MAX_CANON = 1 699 X_PC_MAX_INPUT = 2 700 X_PC_NAME_MAX = 3 701 X_PC_PATH_MAX = 4 702 X_PC_PIPE_BUF = 5 703 X_PC_CHOWN_RESTRICTED = 6 704 X_PC_NO_TRUNC = 7 705 X_PC_VDISABLE = 8 706 X_PC_SYNC_IO = 9 707 X_PC_ASYNC_IO = 10 708 X_PC_PRIO_IO = 11 709 X_PC_SOCK_MAXBUF = 12 710 X_PC_FILESIZEBITS = 13 711 X_PC_REC_INCR_XFER_SIZE = 14 712 X_PC_REC_MAX_XFER_SIZE = 15 713 X_PC_REC_MIN_XFER_SIZE = 16 714 X_PC_REC_XFER_ALIGN = 17 715 X_PC_ALLOC_SIZE_MIN = 18 716 X_PC_SYMLINK_MAX = 19 717 X_PC_2_SYMLINKS = 20 718 ) 719 720 // Values for the NAME argument to `confstr'. 721 const ( /* confname.h:533:1: */ 722 X_CS_PATH = 0 // The default search path. 723 724 X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 725 726 X_CS_GNU_LIBC_VERSION = 2 727 X_CS_GNU_LIBPTHREAD_VERSION = 3 728 729 X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 730 731 X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 732 733 X_CS_LFS_CFLAGS = 1000 734 X_CS_LFS_LDFLAGS = 1001 735 X_CS_LFS_LIBS = 1002 736 X_CS_LFS_LINTFLAGS = 1003 737 X_CS_LFS64_CFLAGS = 1004 738 X_CS_LFS64_LDFLAGS = 1005 739 X_CS_LFS64_LIBS = 1006 740 X_CS_LFS64_LINTFLAGS = 1007 741 742 X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 743 X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 744 X_CS_XBS5_ILP32_OFF32_LIBS = 1102 745 X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 746 X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 747 X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 748 X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 749 X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 750 X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 751 X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 752 X_CS_XBS5_LP64_OFF64_LIBS = 1110 753 X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 754 X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 755 X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 756 X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 757 X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 758 759 X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 760 X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 761 X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 762 X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 763 X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 764 X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 765 X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 766 X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 767 X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 768 X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 769 X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 770 X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 771 X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 772 X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 773 X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 774 X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 775 776 X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 777 X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 778 X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 779 X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 780 X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 781 X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 782 X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 783 X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 784 X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 785 X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 786 X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 787 X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 788 X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 789 X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 790 X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 791 X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 792 793 X_CS_V6_ENV = 1148 794 X_CS_V7_ENV = 1149 795 ) 796 797 // Values for the argument to `sysconf'. 798 const ( /* confname.h:71:1: */ 799 X_SC_ARG_MAX = 0 800 X_SC_CHILD_MAX = 1 801 X_SC_CLK_TCK = 2 802 X_SC_NGROUPS_MAX = 3 803 X_SC_OPEN_MAX = 4 804 X_SC_STREAM_MAX = 5 805 X_SC_TZNAME_MAX = 6 806 X_SC_JOB_CONTROL = 7 807 X_SC_SAVED_IDS = 8 808 X_SC_REALTIME_SIGNALS = 9 809 X_SC_PRIORITY_SCHEDULING = 10 810 X_SC_TIMERS = 11 811 X_SC_ASYNCHRONOUS_IO = 12 812 X_SC_PRIORITIZED_IO = 13 813 X_SC_SYNCHRONIZED_IO = 14 814 X_SC_FSYNC = 15 815 X_SC_MAPPED_FILES = 16 816 X_SC_MEMLOCK = 17 817 X_SC_MEMLOCK_RANGE = 18 818 X_SC_MEMORY_PROTECTION = 19 819 X_SC_MESSAGE_PASSING = 20 820 X_SC_SEMAPHORES = 21 821 X_SC_SHARED_MEMORY_OBJECTS = 22 822 X_SC_AIO_LISTIO_MAX = 23 823 X_SC_AIO_MAX = 24 824 X_SC_AIO_PRIO_DELTA_MAX = 25 825 X_SC_DELAYTIMER_MAX = 26 826 X_SC_MQ_OPEN_MAX = 27 827 X_SC_MQ_PRIO_MAX = 28 828 X_SC_VERSION = 29 829 X_SC_PAGESIZE = 30 830 X_SC_RTSIG_MAX = 31 831 X_SC_SEM_NSEMS_MAX = 32 832 X_SC_SEM_VALUE_MAX = 33 833 X_SC_SIGQUEUE_MAX = 34 834 X_SC_TIMER_MAX = 35 835 836 // Values for the argument to `sysconf' 837 // corresponding to _POSIX2_* symbols. 838 X_SC_BC_BASE_MAX = 36 839 X_SC_BC_DIM_MAX = 37 840 X_SC_BC_SCALE_MAX = 38 841 X_SC_BC_STRING_MAX = 39 842 X_SC_COLL_WEIGHTS_MAX = 40 843 X_SC_EQUIV_CLASS_MAX = 41 844 X_SC_EXPR_NEST_MAX = 42 845 X_SC_LINE_MAX = 43 846 X_SC_RE_DUP_MAX = 44 847 X_SC_CHARCLASS_NAME_MAX = 45 848 849 X_SC_2_VERSION = 46 850 X_SC_2_C_BIND = 47 851 X_SC_2_C_DEV = 48 852 X_SC_2_FORT_DEV = 49 853 X_SC_2_FORT_RUN = 50 854 X_SC_2_SW_DEV = 51 855 X_SC_2_LOCALEDEF = 52 856 857 X_SC_PII = 53 858 X_SC_PII_XTI = 54 859 X_SC_PII_SOCKET = 55 860 X_SC_PII_INTERNET = 56 861 X_SC_PII_OSI = 57 862 X_SC_POLL = 58 863 X_SC_SELECT = 59 864 X_SC_UIO_MAXIOV = 60 865 X_SC_IOV_MAX = 60 866 X_SC_PII_INTERNET_STREAM = 61 867 X_SC_PII_INTERNET_DGRAM = 62 868 X_SC_PII_OSI_COTS = 63 869 X_SC_PII_OSI_CLTS = 64 870 X_SC_PII_OSI_M = 65 871 X_SC_T_IOV_MAX = 66 872 873 // Values according to POSIX 1003.1c (POSIX threads). 874 X_SC_THREADS = 67 875 X_SC_THREAD_SAFE_FUNCTIONS = 68 876 X_SC_GETGR_R_SIZE_MAX = 69 877 X_SC_GETPW_R_SIZE_MAX = 70 878 X_SC_LOGIN_NAME_MAX = 71 879 X_SC_TTY_NAME_MAX = 72 880 X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 881 X_SC_THREAD_KEYS_MAX = 74 882 X_SC_THREAD_STACK_MIN = 75 883 X_SC_THREAD_THREADS_MAX = 76 884 X_SC_THREAD_ATTR_STACKADDR = 77 885 X_SC_THREAD_ATTR_STACKSIZE = 78 886 X_SC_THREAD_PRIORITY_SCHEDULING = 79 887 X_SC_THREAD_PRIO_INHERIT = 80 888 X_SC_THREAD_PRIO_PROTECT = 81 889 X_SC_THREAD_PROCESS_SHARED = 82 890 891 X_SC_NPROCESSORS_CONF = 83 892 X_SC_NPROCESSORS_ONLN = 84 893 X_SC_PHYS_PAGES = 85 894 X_SC_AVPHYS_PAGES = 86 895 X_SC_ATEXIT_MAX = 87 896 X_SC_PASS_MAX = 88 897 898 X_SC_XOPEN_VERSION = 89 899 X_SC_XOPEN_XCU_VERSION = 90 900 X_SC_XOPEN_UNIX = 91 901 X_SC_XOPEN_CRYPT = 92 902 X_SC_XOPEN_ENH_I18N = 93 903 X_SC_XOPEN_SHM = 94 904 905 X_SC_2_CHAR_TERM = 95 906 X_SC_2_C_VERSION = 96 907 X_SC_2_UPE = 97 908 909 X_SC_XOPEN_XPG2 = 98 910 X_SC_XOPEN_XPG3 = 99 911 X_SC_XOPEN_XPG4 = 100 912 913 X_SC_CHAR_BIT = 101 914 X_SC_CHAR_MAX = 102 915 X_SC_CHAR_MIN = 103 916 X_SC_INT_MAX = 104 917 X_SC_INT_MIN = 105 918 X_SC_LONG_BIT = 106 919 X_SC_WORD_BIT = 107 920 X_SC_MB_LEN_MAX = 108 921 X_SC_NZERO = 109 922 X_SC_SSIZE_MAX = 110 923 X_SC_SCHAR_MAX = 111 924 X_SC_SCHAR_MIN = 112 925 X_SC_SHRT_MAX = 113 926 X_SC_SHRT_MIN = 114 927 X_SC_UCHAR_MAX = 115 928 X_SC_UINT_MAX = 116 929 X_SC_ULONG_MAX = 117 930 X_SC_USHRT_MAX = 118 931 932 X_SC_NL_ARGMAX = 119 933 X_SC_NL_LANGMAX = 120 934 X_SC_NL_MSGMAX = 121 935 X_SC_NL_NMAX = 122 936 X_SC_NL_SETMAX = 123 937 X_SC_NL_TEXTMAX = 124 938 939 X_SC_XBS5_ILP32_OFF32 = 125 940 X_SC_XBS5_ILP32_OFFBIG = 126 941 X_SC_XBS5_LP64_OFF64 = 127 942 X_SC_XBS5_LPBIG_OFFBIG = 128 943 944 X_SC_XOPEN_LEGACY = 129 945 X_SC_XOPEN_REALTIME = 130 946 X_SC_XOPEN_REALTIME_THREADS = 131 947 948 X_SC_ADVISORY_INFO = 132 949 X_SC_BARRIERS = 133 950 X_SC_BASE = 134 951 X_SC_C_LANG_SUPPORT = 135 952 X_SC_C_LANG_SUPPORT_R = 136 953 X_SC_CLOCK_SELECTION = 137 954 X_SC_CPUTIME = 138 955 X_SC_THREAD_CPUTIME = 139 956 X_SC_DEVICE_IO = 140 957 X_SC_DEVICE_SPECIFIC = 141 958 X_SC_DEVICE_SPECIFIC_R = 142 959 X_SC_FD_MGMT = 143 960 X_SC_FIFO = 144 961 X_SC_PIPE = 145 962 X_SC_FILE_ATTRIBUTES = 146 963 X_SC_FILE_LOCKING = 147 964 X_SC_FILE_SYSTEM = 148 965 X_SC_MONOTONIC_CLOCK = 149 966 X_SC_MULTI_PROCESS = 150 967 X_SC_SINGLE_PROCESS = 151 968 X_SC_NETWORKING = 152 969 X_SC_READER_WRITER_LOCKS = 153 970 X_SC_SPIN_LOCKS = 154 971 X_SC_REGEXP = 155 972 X_SC_REGEX_VERSION = 156 973 X_SC_SHELL = 157 974 X_SC_SIGNALS = 158 975 X_SC_SPAWN = 159 976 X_SC_SPORADIC_SERVER = 160 977 X_SC_THREAD_SPORADIC_SERVER = 161 978 X_SC_SYSTEM_DATABASE = 162 979 X_SC_SYSTEM_DATABASE_R = 163 980 X_SC_TIMEOUTS = 164 981 X_SC_TYPED_MEMORY_OBJECTS = 165 982 X_SC_USER_GROUPS = 166 983 X_SC_USER_GROUPS_R = 167 984 X_SC_2_PBS = 168 985 X_SC_2_PBS_ACCOUNTING = 169 986 X_SC_2_PBS_LOCATE = 170 987 X_SC_2_PBS_MESSAGE = 171 988 X_SC_2_PBS_TRACK = 172 989 X_SC_SYMLOOP_MAX = 173 990 X_SC_STREAMS = 174 991 X_SC_2_PBS_CHECKPOINT = 175 992 993 X_SC_V6_ILP32_OFF32 = 176 994 X_SC_V6_ILP32_OFFBIG = 177 995 X_SC_V6_LP64_OFF64 = 178 996 X_SC_V6_LPBIG_OFFBIG = 179 997 998 X_SC_HOST_NAME_MAX = 180 999 X_SC_TRACE = 181 1000 X_SC_TRACE_EVENT_FILTER = 182 1001 X_SC_TRACE_INHERIT = 183 1002 X_SC_TRACE_LOG = 184 1003 1004 X_SC_LEVEL1_ICACHE_SIZE = 185 1005 X_SC_LEVEL1_ICACHE_ASSOC = 186 1006 X_SC_LEVEL1_ICACHE_LINESIZE = 187 1007 X_SC_LEVEL1_DCACHE_SIZE = 188 1008 X_SC_LEVEL1_DCACHE_ASSOC = 189 1009 X_SC_LEVEL1_DCACHE_LINESIZE = 190 1010 X_SC_LEVEL2_CACHE_SIZE = 191 1011 X_SC_LEVEL2_CACHE_ASSOC = 192 1012 X_SC_LEVEL2_CACHE_LINESIZE = 193 1013 X_SC_LEVEL3_CACHE_SIZE = 194 1014 X_SC_LEVEL3_CACHE_ASSOC = 195 1015 X_SC_LEVEL3_CACHE_LINESIZE = 196 1016 X_SC_LEVEL4_CACHE_SIZE = 197 1017 X_SC_LEVEL4_CACHE_ASSOC = 198 1018 X_SC_LEVEL4_CACHE_LINESIZE = 199 1019 // Leave room here, maybe we need a few more cache levels some day. 1020 1021 X_SC_IPV6 = 235 1022 X_SC_RAW_SOCKETS = 236 1023 1024 X_SC_V7_ILP32_OFF32 = 237 1025 X_SC_V7_ILP32_OFFBIG = 238 1026 X_SC_V7_LP64_OFF64 = 239 1027 X_SC_V7_LPBIG_OFFBIG = 240 1028 1029 X_SC_SS_REPL_MAX = 241 1030 1031 X_SC_TRACE_EVENT_NAME_MAX = 242 1032 X_SC_TRACE_NAME_MAX = 243 1033 X_SC_TRACE_SYS_MAX = 244 1034 X_SC_TRACE_USER_EVENT_MAX = 245 1035 1036 X_SC_XOPEN_STREAMS = 246 1037 1038 X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 1039 X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 1040 ) 1041 1042 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1043 // This file is part of the GNU C Library. 1044 // 1045 // The GNU C Library is free software; you can redistribute it and/or 1046 // modify it under the terms of the GNU Lesser General Public 1047 // License as published by the Free Software Foundation; either 1048 // version 2.1 of the License, or (at your option) any later version. 1049 // 1050 // The GNU C Library is distributed in the hope that it will be useful, 1051 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1052 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1053 // Lesser General Public License for more details. 1054 // 1055 // You should have received a copy of the GNU Lesser General Public 1056 // License along with the GNU C Library; if not, see 1057 // <https://www.gnu.org/licenses/>. 1058 1059 // ISO C99 Standard: 7.20 General utilities <stdlib.h> 1060 1061 // Handle feature test macros at the start of a header. 1062 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1063 // This file is part of the GNU C Library. 1064 // 1065 // The GNU C Library is free software; you can redistribute it and/or 1066 // modify it under the terms of the GNU Lesser General Public 1067 // License as published by the Free Software Foundation; either 1068 // version 2.1 of the License, or (at your option) any later version. 1069 // 1070 // The GNU C Library is distributed in the hope that it will be useful, 1071 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1072 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1073 // Lesser General Public License for more details. 1074 // 1075 // You should have received a copy of the GNU Lesser General Public 1076 // License along with the GNU C Library; if not, see 1077 // <https://www.gnu.org/licenses/>. 1078 1079 // This header is internal to glibc and should not be included outside 1080 // of glibc headers. Headers including it must define 1081 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1082 // cannot have multiple include guards because ISO C feature test 1083 // macros depend on the definition of the macro when an affected 1084 // header is included, not when the first system header is 1085 // included. 1086 1087 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1088 // This file is part of the GNU C Library. 1089 // 1090 // The GNU C Library is free software; you can redistribute it and/or 1091 // modify it under the terms of the GNU Lesser General Public 1092 // License as published by the Free Software Foundation; either 1093 // version 2.1 of the License, or (at your option) any later version. 1094 // 1095 // The GNU C Library is distributed in the hope that it will be useful, 1096 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1097 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1098 // Lesser General Public License for more details. 1099 // 1100 // You should have received a copy of the GNU Lesser General Public 1101 // License along with the GNU C Library; if not, see 1102 // <https://www.gnu.org/licenses/>. 1103 1104 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1105 // macro. 1106 1107 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1108 // macro. Most but not all symbols enabled by that macro in TS 1109 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1110 // still require that macro in C2X. 1111 1112 // ISO/IEC TS 18661-4:2015 defines the 1113 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1114 // functions, the symbols from this TS are enabled unconditionally in 1115 // C2X. 1116 1117 // ISO/IEC TS 18661-3:2015 defines the 1118 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1119 1120 // Get size_t, wchar_t and NULL from <stddef.h>. 1121 // Copyright (C) 1989-2019 Free Software Foundation, Inc. 1122 // 1123 // This file is part of GCC. 1124 // 1125 // GCC is free software; you can redistribute it and/or modify 1126 // it under the terms of the GNU General Public License as published by 1127 // the Free Software Foundation; either version 3, or (at your option) 1128 // any later version. 1129 // 1130 // GCC is distributed in the hope that it will be useful, 1131 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1132 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1133 // GNU General Public License for more details. 1134 // 1135 // Under Section 7 of GPL version 3, you are granted additional 1136 // permissions described in the GCC Runtime Library Exception, version 1137 // 3.1, as published by the Free Software Foundation. 1138 // 1139 // You should have received a copy of the GNU General Public License and 1140 // a copy of the GCC Runtime Library Exception along with this program; 1141 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1142 // <http://www.gnu.org/licenses/>. 1143 1144 // ISO C Standard: 7.17 Common definitions <stddef.h> 1145 1146 // Any one of these symbols __need_* means that GNU libc 1147 // wants us just to define one data type. So don't define 1148 // the symbols that indicate this file's entire job has been done. 1149 1150 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1151 // There's no way to win with the other order! Sun lossage. 1152 1153 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1154 // Just ignore it. 1155 1156 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1157 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1158 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1159 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1160 // If we find that the macros are still defined at this point, we must 1161 // invoke them so that the type is defined as expected. 1162 1163 // In case nobody has defined these types, but we aren't running under 1164 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1165 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1166 // parts of GCC is compiled by an older compiler, that actually 1167 // include gstddef.h, such as collect2. 1168 1169 // Signed type of difference of two pointers. 1170 1171 // Define this type if we are doing the whole job, 1172 // or if we want this type in particular. 1173 1174 // If this symbol has done its job, get rid of it. 1175 1176 // Unsigned type of `sizeof' something. 1177 1178 // Define this type if we are doing the whole job, 1179 // or if we want this type in particular. 1180 1181 // Wide character type. 1182 // Locale-writers should change this as necessary to 1183 // be big enough to hold unique values not between 0 and 127, 1184 // and not (wchar_t) -1, for each defined multibyte character. 1185 1186 // Define this type if we are doing the whole job, 1187 // or if we want this type in particular. 1188 1189 // A null pointer constant. 1190 1191 // Offset of member MEMBER in a struct of type TYPE. 1192 1193 // XPG requires a few symbols from <sys/wait.h> being defined. 1194 // Definitions of flag bits for `waitpid' et al. 1195 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1196 // This file is part of the GNU C Library. 1197 // 1198 // The GNU C Library is free software; you can redistribute it and/or 1199 // modify it under the terms of the GNU Lesser General Public 1200 // License as published by the Free Software Foundation; either 1201 // version 2.1 of the License, or (at your option) any later version. 1202 // 1203 // The GNU C Library is distributed in the hope that it will be useful, 1204 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1205 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1206 // Lesser General Public License for more details. 1207 // 1208 // You should have received a copy of the GNU Lesser General Public 1209 // License along with the GNU C Library; if not, see 1210 // <https://www.gnu.org/licenses/>. 1211 1212 // Bits in the third argument to `waitpid'. 1213 1214 // Bits in the fourth argument to `waitid'. 1215 1216 // The following values are used by the `waitid' function. 1217 1218 // The Linux kernel defines these bare, rather than an enum, 1219 // which causes a conflict if the include order is reversed. 1220 1221 const ( /* waitflags.h:52:1: */ 1222 P_ALL = 0 // Wait for any child. 1223 P_PID = 1 // Wait for specified process. 1224 P_PGID = 2 1225 ) 1226 1227 // 1228 // If you use the zlib library in a product, an acknowledgment is welcome 1229 // in the documentation of your product. If for some reason you cannot 1230 // include such an acknowledgment, I would appreciate that you keep this 1231 // copyright string in the executable of your product. 1232 // 1233 1234 // =========================================================================== 1235 // Function prototypes. 1236 const ( /* deflate.c:66:1: */ 1237 Need_more = 0 // block not completed, need more input or more output 1238 Block_done = 1 // block flush performed 1239 Finish_started = 2 // finish started, need only more output at next deflate 1240 Finish_done = 3 1241 ) 1242 1243 // inflate.h -- internal inflate state definition 1244 // Copyright (C) 1995-2016 Mark Adler 1245 // For conditions of distribution and use, see copyright notice in zlib.h 1246 1247 // WARNING: this file should *not* be used by applications. It is 1248 // part of the implementation of the compression library and is 1249 // subject to change. Applications should only use zlib.h. 1250 // 1251 1252 // define NO_GZIP when compiling if you want to disable gzip header and 1253 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 1254 // the crc code when it is not needed. For shared libraries, gzip decoding 1255 // should be left enabled. 1256 1257 // Possible inflate modes between inflate() calls 1258 const ( /* inflate.h:20:1: */ 1259 HEAD = 16180 // i: waiting for magic header 1260 FLAGS = 16181 // i: waiting for method and flags (gzip) 1261 TIME = 16182 // i: waiting for modification time (gzip) 1262 OS = 16183 // i: waiting for extra flags and operating system (gzip) 1263 EXLEN = 16184 // i: waiting for extra length (gzip) 1264 EXTRA = 16185 // i: waiting for extra bytes (gzip) 1265 NAME = 16186 // i: waiting for end of file name (gzip) 1266 COMMENT = 16187 // i: waiting for end of comment (gzip) 1267 HCRC = 16188 // i: waiting for header crc (gzip) 1268 DICTID = 16189 // i: waiting for dictionary check value 1269 DICT = 16190 // waiting for inflateSetDictionary() call 1270 TYPE = 16191 // i: waiting for type bits, including last-flag bit 1271 TYPEDO = 16192 // i: same, but skip check to exit inflate on new block 1272 STORED = 16193 // i: waiting for stored size (length and complement) 1273 COPY_ = 16194 // i/o: same as COPY below, but only first time in 1274 COPY = 16195 // i/o: waiting for input or output to copy stored block 1275 TABLE = 16196 // i: waiting for dynamic block table lengths 1276 LENLENS = 16197 // i: waiting for code length code lengths 1277 CODELENS = 16198 // i: waiting for length/lit and distance code lengths 1278 LEN_ = 16199 // i: same as LEN below, but only first time in 1279 LEN = 16200 // i: waiting for length/lit/eob code 1280 LENEXT = 16201 // i: waiting for length extra bits 1281 DIST = 16202 // i: waiting for distance code 1282 DISTEXT = 16203 // i: waiting for distance extra bits 1283 MATCH = 16204 // o: waiting for output space to copy string 1284 LIT = 16205 // o: waiting for output space to write literal 1285 CHECK = 16206 // i: waiting for 32-bit check value 1286 LENGTH = 16207 // i: waiting for 32-bit length (gzip) 1287 DONE = 16208 // finished check, done -- remain here until reset 1288 BAD = 16209 // got a data error -- remain here until reset 1289 MEM = 16210 // got an inflate() memory error -- remain here until reset 1290 SYNC = 16211 1291 ) 1292 1293 // op values as set by inflate_table(): 1294 // 00000000 - literal 1295 // 0000tttt - table link, tttt != 0 is the number of table index bits 1296 // 0001eeee - length or distance, eeee is the number of extra bits 1297 // 01100000 - end of block 1298 // 01000000 - invalid code 1299 // 1300 1301 // Maximum size of the dynamic table. The maximum number of code structures is 1302 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 1303 // codes. These values were found by exhaustive searches using the program 1304 // examples/enough.c found in the zlib distribtution. The arguments to that 1305 // program are the number of symbols, the initial root table size, and the 1306 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 1307 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 1308 // The initial root table size (9 or 6) is found in the fifth argument of the 1309 // inflate_table() calls in inflate.c and infback.c. If the root table size is 1310 // changed, then these maximum sizes would be need to be recalculated and 1311 // updated. 1312 1313 // Type of code to build for inflate_table() 1314 const ( /* inftrees.h:54:1: */ 1315 CODES = 0 1316 LENS = 1 1317 DISTS = 2 1318 ) 1319 1320 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 1321 1322 type Size_t = uint64 /* <builtin>:9:23 */ 1323 1324 type Wchar_t = int32 /* <builtin>:15:24 */ 1325 1326 type X__int128_t = struct { 1327 Flo int64 1328 Fhi int64 1329 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 1330 type X__uint128_t = struct { 1331 Flo uint64 1332 Fhi uint64 1333 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 1334 1335 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 1336 type X__float128 = float64 /* <builtin>:47:21 */ 1337 1338 // A null pointer constant. 1339 1340 // Offset of member MEMBER in a struct of type TYPE. 1341 1342 // Type whose alignment is supported in every context and is at least 1343 // as great as that of any standard type not using alignment 1344 // specifiers. 1345 type Max_align_t = struct { 1346 F__max_align_ll int64 1347 F__max_align_ld float64 1348 } /* stddef.h:426:3 */ 1349 1350 type Z_size_t = Size_t /* zconf.h:248:21 */ 1351 1352 // Maximum value for memLevel in deflateInit2 1353 1354 // Maximum value for windowBits in deflateInit2 and inflateInit2. 1355 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 1356 // created by gzip. (Files created by minigzip can still be extracted by 1357 // gzip.) 1358 1359 // The memory requirements for deflate are (in bytes): 1360 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 1361 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 1362 // plus a few kilobytes for small objects. For example, if you want to reduce 1363 // the default memory requirements from 256K to 128K, compile with 1364 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 1365 // Of course this will generally degrade compression (there's no free lunch). 1366 // 1367 // The memory requirements for inflate are (in bytes) 1 << windowBits 1368 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 1369 // for small objects. 1370 1371 // Type declarations 1372 1373 // The following definitions for FAR are needed only for MSDOS mixed 1374 // model programming (small or medium model with some far allocations). 1375 // This was tested only with MSC; for other MSDOS compilers you may have 1376 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 1377 // just define FAR to be empty. 1378 1379 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 1380 type UInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 1381 type ULong = uint64 /* zconf.h:394:24 */ // 32 bits or more 1382 1383 type Bytef = Byte /* zconf.h:400:22 */ 1384 type Charf = uint8 /* zconf.h:402:19 */ 1385 type Intf = int32 /* zconf.h:403:19 */ 1386 type UIntf = UInt /* zconf.h:404:19 */ 1387 type ULongf = ULong /* zconf.h:405:19 */ 1388 1389 type Voidpc = uintptr /* zconf.h:408:23 */ 1390 type Voidpf = uintptr /* zconf.h:409:23 */ 1391 type Voidp = uintptr /* zconf.h:410:23 */ 1392 1393 // Copyright (C) 1992-2019 Free Software Foundation, Inc. 1394 // 1395 // This file is part of GCC. 1396 // 1397 // GCC is free software; you can redistribute it and/or modify it under 1398 // the terms of the GNU General Public License as published by the Free 1399 // Software Foundation; either version 3, or (at your option) any later 1400 // version. 1401 // 1402 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 1403 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 1404 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1405 // for more details. 1406 // 1407 // Under Section 7 of GPL version 3, you are granted additional 1408 // permissions described in the GCC Runtime Library Exception, version 1409 // 3.1, as published by the Free Software Foundation. 1410 // 1411 // You should have received a copy of the GNU General Public License and 1412 // a copy of the GCC Runtime Library Exception along with this program; 1413 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1414 // <http://www.gnu.org/licenses/>. 1415 1416 // This administrivia gets added to the beginning of limits.h 1417 // if the system has its own version of limits.h. 1418 1419 // We use _GCC_LIMITS_H_ because we want this not to match 1420 // any macros that the system's limits.h uses for its own purposes. 1421 1422 // Use "..." so that we find syslimits.h only in this same directory. 1423 // syslimits.h stands for the system's own limits.h file. 1424 // If we can use it ok unmodified, then we install this text. 1425 // If fixincludes fixes it, then the fixed version is installed 1426 // instead of this text. 1427 1428 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1429 // This file is part of the GNU C Library. 1430 // 1431 // The GNU C Library is free software; you can redistribute it and/or 1432 // modify it under the terms of the GNU Lesser General Public 1433 // License as published by the Free Software Foundation; either 1434 // version 2.1 of the License, or (at your option) any later version. 1435 // 1436 // The GNU C Library is distributed in the hope that it will be useful, 1437 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1438 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1439 // Lesser General Public License for more details. 1440 // 1441 // You should have received a copy of the GNU Lesser General Public 1442 // License along with the GNU C Library; if not, see 1443 // <https://www.gnu.org/licenses/>. 1444 1445 // ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> 1446 1447 // Handle feature test macros at the start of a header. 1448 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1449 // This file is part of the GNU C Library. 1450 // 1451 // The GNU C Library is free software; you can redistribute it and/or 1452 // modify it under the terms of the GNU Lesser General Public 1453 // License as published by the Free Software Foundation; either 1454 // version 2.1 of the License, or (at your option) any later version. 1455 // 1456 // The GNU C Library is distributed in the hope that it will be useful, 1457 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1458 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1459 // Lesser General Public License for more details. 1460 // 1461 // You should have received a copy of the GNU Lesser General Public 1462 // License along with the GNU C Library; if not, see 1463 // <https://www.gnu.org/licenses/>. 1464 1465 // This header is internal to glibc and should not be included outside 1466 // of glibc headers. Headers including it must define 1467 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1468 // cannot have multiple include guards because ISO C feature test 1469 // macros depend on the definition of the macro when an affected 1470 // header is included, not when the first system header is 1471 // included. 1472 1473 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1474 // This file is part of the GNU C Library. 1475 // 1476 // The GNU C Library is free software; you can redistribute it and/or 1477 // modify it under the terms of the GNU Lesser General Public 1478 // License as published by the Free Software Foundation; either 1479 // version 2.1 of the License, or (at your option) any later version. 1480 // 1481 // The GNU C Library is distributed in the hope that it will be useful, 1482 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1483 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1484 // Lesser General Public License for more details. 1485 // 1486 // You should have received a copy of the GNU Lesser General Public 1487 // License along with the GNU C Library; if not, see 1488 // <https://www.gnu.org/licenses/>. 1489 1490 // These are defined by the user (or the compiler) 1491 // to specify the desired environment: 1492 // 1493 // __STRICT_ANSI__ ISO Standard C. 1494 // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. 1495 // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. 1496 // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. 1497 // __STDC_WANT_LIB_EXT2__ 1498 // Extensions to ISO C99 from TR 27431-2:2010. 1499 // __STDC_WANT_IEC_60559_BFP_EXT__ 1500 // Extensions to ISO C11 from TS 18661-1:2014. 1501 // __STDC_WANT_IEC_60559_FUNCS_EXT__ 1502 // Extensions to ISO C11 from TS 18661-4:2015. 1503 // __STDC_WANT_IEC_60559_TYPES_EXT__ 1504 // Extensions to ISO C11 from TS 18661-3:2015. 1505 // 1506 // _POSIX_SOURCE IEEE Std 1003.1. 1507 // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; 1508 // if >=199309L, add IEEE Std 1003.1b-1993; 1509 // if >=199506L, add IEEE Std 1003.1c-1995; 1510 // if >=200112L, all of IEEE 1003.1-2004 1511 // if >=200809L, all of IEEE 1003.1-2008 1512 // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if 1513 // Single Unix conformance is wanted, to 600 for the 1514 // sixth revision, to 700 for the seventh revision. 1515 // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. 1516 // _LARGEFILE_SOURCE Some more functions for correct standard I/O. 1517 // _LARGEFILE64_SOURCE Additional functionality from LFS for large files. 1518 // _FILE_OFFSET_BITS=N Select default filesystem interface. 1519 // _ATFILE_SOURCE Additional *at interfaces. 1520 // _GNU_SOURCE All of the above, plus GNU extensions. 1521 // _DEFAULT_SOURCE The default set of features (taking precedence over 1522 // __STRICT_ANSI__). 1523 // 1524 // _FORTIFY_SOURCE Add security hardening to many library functions. 1525 // Set to 1 or 2; 2 performs stricter checks than 1. 1526 // 1527 // _REENTRANT, _THREAD_SAFE 1528 // Obsolete; equivalent to _POSIX_C_SOURCE=199506L. 1529 // 1530 // The `-ansi' switch to the GNU C compiler, and standards conformance 1531 // options such as `-std=c99', define __STRICT_ANSI__. If none of 1532 // these are defined, or if _DEFAULT_SOURCE is defined, the default is 1533 // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 1534 // 200809L, as well as enabling miscellaneous functions from BSD and 1535 // SVID. If more than one of these are defined, they accumulate. For 1536 // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together 1537 // give you ISO C, 1003.1, and 1003.2, but nothing else. 1538 // 1539 // These are defined by this file and are used by the 1540 // header files to decide what to declare or define: 1541 // 1542 // __GLIBC_USE (F) Define things from feature set F. This is defined 1543 // to 1 or 0; the subsequent macros are either defined 1544 // or undefined, and those tests should be moved to 1545 // __GLIBC_USE. 1546 // __USE_ISOC11 Define ISO C11 things. 1547 // __USE_ISOC99 Define ISO C99 things. 1548 // __USE_ISOC95 Define ISO C90 AMD1 (C95) things. 1549 // __USE_ISOCXX11 Define ISO C++11 things. 1550 // __USE_POSIX Define IEEE Std 1003.1 things. 1551 // __USE_POSIX2 Define IEEE Std 1003.2 things. 1552 // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. 1553 // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. 1554 // __USE_XOPEN Define XPG things. 1555 // __USE_XOPEN_EXTENDED Define X/Open Unix things. 1556 // __USE_UNIX98 Define Single Unix V2 things. 1557 // __USE_XOPEN2K Define XPG6 things. 1558 // __USE_XOPEN2KXSI Define XPG6 XSI things. 1559 // __USE_XOPEN2K8 Define XPG7 things. 1560 // __USE_XOPEN2K8XSI Define XPG7 XSI things. 1561 // __USE_LARGEFILE Define correct standard I/O things. 1562 // __USE_LARGEFILE64 Define LFS things with separate names. 1563 // __USE_FILE_OFFSET64 Define 64bit interface as default. 1564 // __USE_MISC Define things from 4.3BSD or System V Unix. 1565 // __USE_ATFILE Define *at interfaces and AT_* constants for them. 1566 // __USE_GNU Define GNU extensions. 1567 // __USE_FORTIFY_LEVEL Additional security measures used, according to level. 1568 // 1569 // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are 1570 // defined by this file unconditionally. `__GNU_LIBRARY__' is provided 1571 // only for compatibility. All new code should use the other symbols 1572 // to test for features. 1573 // 1574 // All macros listed above as possibly being defined by this file are 1575 // explicitly undefined if they are not explicitly defined. 1576 // Feature-test macros that are not defined by the user or compiler 1577 // but are implied by the other feature-test macros defined (or by the 1578 // lack of any definitions) are defined by the file. 1579 // 1580 // ISO C feature test macros depend on the definition of the macro 1581 // when an affected header is included, not when the first system 1582 // header is included, and so they are handled in 1583 // <bits/libc-header-start.h>, which does not have a multiple include 1584 // guard. Feature test macros that can be handled from the first 1585 // system header included are handled here. 1586 1587 // Undefine everything, so we get a clean slate. 1588 1589 // Suppress kernel-name space pollution unless user expressedly asks 1590 // for it. 1591 1592 // Convenience macro to test the version of gcc. 1593 // Use like this: 1594 // #if __GNUC_PREREQ (2,8) 1595 // ... code requiring gcc 2.8 or later ... 1596 // #endif 1597 // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was 1598 // added in 2.0. 1599 1600 // Similarly for clang. Features added to GCC after version 4.2 may 1601 // or may not also be available in clang, and clang's definitions of 1602 // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such 1603 // features can be queried via __has_extension/__has_feature. 1604 1605 // Whether to use feature set F. 1606 1607 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for 1608 // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not 1609 // issue a warning; the expectation is that the source is being 1610 // transitioned to use the new macro. 1611 1612 // If _GNU_SOURCE was defined by the user, turn on all the other features. 1613 1614 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, 1615 // define _DEFAULT_SOURCE. 1616 1617 // This is to enable the ISO C2X extension. 1618 1619 // This is to enable the ISO C11 extension. 1620 1621 // This is to enable the ISO C99 extension. 1622 1623 // This is to enable the ISO C90 Amendment 1:1995 extension. 1624 1625 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE 1626 // is defined, use POSIX.1-2008 (or another version depending on 1627 // _XOPEN_SOURCE). 1628 1629 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be 1630 // defined in all multithreaded code. GNU libc has not required this 1631 // for many years. We now treat them as compatibility synonyms for 1632 // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with 1633 // comprehensive support for multithreaded code. Using them never 1634 // lowers the selected level of POSIX conformance, only raises it. 1635 1636 // The function 'gets' existed in C89, but is impossible to use 1637 // safely. It has been removed from ISO C11 and ISO C++14. Note: for 1638 // compatibility with various implementations of <cstdio>, this test 1639 // must consider only the value of __cplusplus when compiling C++. 1640 1641 // GNU formerly extended the scanf functions with modified format 1642 // specifiers %as, %aS, and %a[...] that allocate a buffer for the 1643 // input using malloc. This extension conflicts with ISO C99, which 1644 // defines %a as a standalone format specifier that reads a floating- 1645 // point number; moreover, POSIX.1-2008 provides the same feature 1646 // using the modifier letter 'm' instead (%ms, %mS, %m[...]). 1647 // 1648 // We now follow C99 unless GNU extensions are active and the compiler 1649 // is specifically in C89 or C++98 mode (strict or not). For 1650 // instance, with GCC, -std=gnu11 will have C99-compliant scanf with 1651 // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the 1652 // old extension. 1653 1654 // Get definitions of __STDC_* predefined macros, if the compiler has 1655 // not preincluded this header automatically. 1656 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1657 // This file is part of the GNU C Library. 1658 // 1659 // The GNU C Library is free software; you can redistribute it and/or 1660 // modify it under the terms of the GNU Lesser General Public 1661 // License as published by the Free Software Foundation; either 1662 // version 2.1 of the License, or (at your option) any later version. 1663 // 1664 // The GNU C Library is distributed in the hope that it will be useful, 1665 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1666 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1667 // Lesser General Public License for more details. 1668 // 1669 // You should have received a copy of the GNU Lesser General Public 1670 // License along with the GNU C Library; if not, see 1671 // <https://www.gnu.org/licenses/>. 1672 1673 // This macro indicates that the installed library is the GNU C Library. 1674 // For historic reasons the value now is 6 and this will stay from now 1675 // on. The use of this variable is deprecated. Use __GLIBC__ and 1676 // __GLIBC_MINOR__ now (see below) when you want to test for a specific 1677 // GNU C library version and use the values in <gnu/lib-names.h> to get 1678 // the sonames of the shared libraries. 1679 1680 // Major and minor version number of the GNU C library package. Use 1681 // these macros to test for features in specific releases. 1682 1683 // This is here only because every header file already includes this one. 1684 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1685 // This file is part of the GNU C Library. 1686 // 1687 // The GNU C Library is free software; you can redistribute it and/or 1688 // modify it under the terms of the GNU Lesser General Public 1689 // License as published by the Free Software Foundation; either 1690 // version 2.1 of the License, or (at your option) any later version. 1691 // 1692 // The GNU C Library is distributed in the hope that it will be useful, 1693 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1694 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1695 // Lesser General Public License for more details. 1696 // 1697 // You should have received a copy of the GNU Lesser General Public 1698 // License along with the GNU C Library; if not, see 1699 // <https://www.gnu.org/licenses/>. 1700 1701 // We are almost always included from features.h. 1702 1703 // The GNU libc does not support any K&R compilers or the traditional mode 1704 // of ISO C compilers anymore. Check for some of the combinations not 1705 // anymore supported. 1706 1707 // Some user header file might have defined this before. 1708 1709 // All functions, except those with callbacks or those that 1710 // synchronize memory, are leaf functions. 1711 1712 // GCC can always grok prototypes. For C++ programs we add throw() 1713 // to help it optimize the function calls. But this works only with 1714 // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions 1715 // as non-throwing using a function attribute since programs can use 1716 // the -fexceptions options for C code as well. 1717 1718 // Compilers that are not clang may object to 1719 // #if defined __clang__ && __has_extension(...) 1720 // even though they do not need to evaluate the right-hand side of the &&. 1721 1722 // These two macros are not used in glibc anymore. They are kept here 1723 // only because some other projects expect the macros to be defined. 1724 1725 // For these things, GCC behaves the ANSI way normally, 1726 // and the non-ANSI way under -traditional. 1727 1728 // This is not a typedef so `const __ptr_t' does the right thing. 1729 1730 // C++ needs to know that types and declarations are C, not C++. 1731 1732 // Fortify support. 1733 1734 // Support for flexible arrays. 1735 // Headers that should use flexible arrays only if they're "real" 1736 // (e.g. only if they won't affect sizeof()) should test 1737 // #if __glibc_c99_flexarr_available. 1738 1739 // __asm__ ("xyz") is used throughout the headers to rename functions 1740 // at the assembly language level. This is wrapped by the __REDIRECT 1741 // macro, in order to support compilers that can do this some other 1742 // way. When compilers don't support asm-names at all, we have to do 1743 // preprocessor tricks instead (which don't have exactly the right 1744 // semantics, but it's the best we can do). 1745 // 1746 // Example: 1747 // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); 1748 1749 // 1750 // #elif __SOME_OTHER_COMPILER__ 1751 // 1752 // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) 1753 1754 // GCC has various useful declarations that can be made with the 1755 // `__attribute__' syntax. All of the ways we use this do fine if 1756 // they are omitted for compilers that don't understand it. 1757 1758 // At some point during the gcc 2.96 development the `malloc' attribute 1759 // for functions was introduced. We don't want to use it unconditionally 1760 // (although this would be possible) since it generates warnings. 1761 1762 // Tell the compiler which arguments to an allocation function 1763 // indicate the size of the allocation. 1764 1765 // At some point during the gcc 2.96 development the `pure' attribute 1766 // for functions was introduced. We don't want to use it unconditionally 1767 // (although this would be possible) since it generates warnings. 1768 1769 // This declaration tells the compiler that the value is constant. 1770 1771 // At some point during the gcc 3.1 development the `used' attribute 1772 // for functions was introduced. We don't want to use it unconditionally 1773 // (although this would be possible) since it generates warnings. 1774 1775 // Since version 3.2, gcc allows marking deprecated functions. 1776 1777 // Since version 4.5, gcc also allows one to specify the message printed 1778 // when a deprecated function is used. clang claims to be gcc 4.2, but 1779 // may also support this feature. 1780 1781 // At some point during the gcc 2.8 development the `format_arg' attribute 1782 // for functions was introduced. We don't want to use it unconditionally 1783 // (although this would be possible) since it generates warnings. 1784 // If several `format_arg' attributes are given for the same function, in 1785 // gcc-3.0 and older, all but the last one are ignored. In newer gccs, 1786 // all designated arguments are considered. 1787 1788 // At some point during the gcc 2.97 development the `strfmon' format 1789 // attribute for functions was introduced. We don't want to use it 1790 // unconditionally (although this would be possible) since it 1791 // generates warnings. 1792 1793 // The nonull function attribute allows to mark pointer parameters which 1794 // must not be NULL. 1795 1796 // If fortification mode, we warn about unused results of certain 1797 // function calls which can lead to problems. 1798 1799 // Forces a function to be always inlined. 1800 // The Linux kernel defines __always_inline in stddef.h (283d7573), and 1801 // it conflicts with this definition. Therefore undefine it first to 1802 // allow either header to be included first. 1803 1804 // Associate error messages with the source location of the call site rather 1805 // than with the source location inside the function. 1806 1807 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 1808 // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ 1809 // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions 1810 // older than 4.3 may define these macros and still not guarantee GNU inlining 1811 // semantics. 1812 // 1813 // clang++ identifies itself as gcc-4.2, but has support for GNU inlining 1814 // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and 1815 // __GNUC_GNU_INLINE__ macro definitions. 1816 1817 // GCC 4.3 and above allow passing all anonymous arguments of an 1818 // __extern_always_inline function to some other vararg function. 1819 1820 // It is possible to compile containing GCC extensions even if GCC is 1821 // run in pedantic mode if the uses are carefully marked using the 1822 // `__extension__' keyword. But this is not generally available before 1823 // version 2.8. 1824 1825 // __restrict is known in EGCS 1.2 and above. 1826 1827 // ISO C99 also allows to declare arrays as non-overlapping. The syntax is 1828 // array_name[restrict] 1829 // GCC 3.1 supports this. 1830 1831 // Describes a char array whose address can safely be passed as the first 1832 // argument to strncpy and strncat, as the char array is not necessarily 1833 // a NUL-terminated string. 1834 1835 // Undefine (also defined in libc-symbols.h). 1836 // Copies attributes from the declaration or type referenced by 1837 // the argument. 1838 1839 // Determine the wordsize from the preprocessor defines. 1840 1841 // Properties of long double type. ldbl-opt version. 1842 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1843 // This file is part of the GNU C Library. 1844 // 1845 // The GNU C Library is free software; you can redistribute it and/or 1846 // modify it under the terms of the GNU Lesser General Public 1847 // License published by the Free Software Foundation; either 1848 // version 2.1 of the License, or (at your option) any later version. 1849 // 1850 // The GNU C Library is distributed in the hope that it will be useful, 1851 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1852 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1853 // Lesser General Public License for more details. 1854 // 1855 // You should have received a copy of the GNU Lesser General Public 1856 // License along with the GNU C Library; if not, see 1857 // <https://www.gnu.org/licenses/>. 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 // Determine the wordsize from the preprocessor defines. 1887 1888 // This file is automatically generated. 1889 // It defines a symbol `__stub_FUNCTION' for each function 1890 // in the C library which is a stub, meaning it will fail 1891 // every time called, usually setting errno to ENOSYS. 1892 1893 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1894 // macro. 1895 1896 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1897 // macro. Most but not all symbols enabled by that macro in TS 1898 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1899 // still require that macro in C2X. 1900 1901 // ISO/IEC TS 18661-4:2015 defines the 1902 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1903 // functions, the symbols from this TS are enabled unconditionally in 1904 // C2X. 1905 1906 // ISO/IEC TS 18661-3:2015 defines the 1907 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1908 1909 // Maximum length of any multibyte character in any locale. 1910 // We define this value here since the gcc header does not define 1911 // the correct value. 1912 1913 // If we are not using GNU CC we have to define all the symbols ourself. 1914 // Otherwise use gcc's definitions (see below). 1915 1916 // Get the compiler's limits.h, which defines almost all the ISO constants. 1917 // 1918 // We put this #include_next outside the double inclusion check because 1919 // it should be possible to include this file more than once and still get 1920 // the definitions from gcc's header. 1921 1922 // The <limits.h> files in some gcc versions don't define LLONG_MIN, 1923 // LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for 1924 // ages are available. 1925 1926 // The integer width macros are not defined by GCC's <limits.h> before 1927 // GCC 7, or if _GNU_SOURCE rather than 1928 // __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. 1929 1930 // POSIX adds things to <limits.h>. 1931 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1932 // This file is part of the GNU C Library. 1933 // 1934 // The GNU C Library is free software; you can redistribute it and/or 1935 // modify it under the terms of the GNU Lesser General Public 1936 // License as published by the Free Software Foundation; either 1937 // version 2.1 of the License, or (at your option) any later version. 1938 // 1939 // The GNU C Library is distributed in the hope that it will be useful, 1940 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1941 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1942 // Lesser General Public License for more details. 1943 // 1944 // You should have received a copy of the GNU Lesser General Public 1945 // License along with the GNU C Library; if not, see 1946 // <https://www.gnu.org/licenses/>. 1947 1948 // POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> 1949 // 1950 // Never include this file directly; use <limits.h> instead. 1951 1952 // Determine the wordsize from the preprocessor defines. 1953 1954 // These are the standard-mandated minimum values. 1955 1956 // Minimum number of operations in one list I/O call. 1957 1958 // Minimal number of outstanding asynchronous I/O operations. 1959 1960 // Maximum length of arguments to `execve', including environment. 1961 1962 // Maximum simultaneous processes per real user ID. 1963 1964 // Minimal number of timer expiration overruns. 1965 1966 // Maximum length of a host name (not including the terminating null) 1967 // as returned from the GETHOSTNAME function. 1968 1969 // Maximum link count of a file. 1970 1971 // Maximum length of login name. 1972 1973 // Number of bytes in a terminal canonical input queue. 1974 1975 // Number of bytes for which space will be 1976 // available in a terminal input queue. 1977 1978 // Maximum number of message queues open for a process. 1979 1980 // Maximum number of supported message priorities. 1981 1982 // Number of bytes in a filename. 1983 1984 // Number of simultaneous supplementary group IDs per process. 1985 1986 // Number of files one process can have open at once. 1987 1988 // Number of bytes in a pathname. 1989 1990 // Number of bytes than can be written atomically to a pipe. 1991 1992 // The number of repeated occurrences of a BRE permitted by the 1993 // REGEXEC and REGCOMP functions when using the interval notation. 1994 1995 // Minimal number of realtime signals reserved for the application. 1996 1997 // Number of semaphores a process can have. 1998 1999 // Maximal value of a semaphore. 2000 2001 // Number of pending realtime signals. 2002 2003 // Largest value of a `ssize_t'. 2004 2005 // Number of streams a process can have open at once. 2006 2007 // The number of bytes in a symbolic link. 2008 2009 // The number of symbolic links that can be traversed in the 2010 // resolution of a pathname in the absence of a loop. 2011 2012 // Number of timer for a process. 2013 2014 // Maximum number of characters in a tty name. 2015 2016 // Maximum length of a timezone name (element of `tzname'). 2017 2018 // Maximum clock resolution in nanoseconds. 2019 2020 // Get the implementation-specific values for the above. 2021 // Minimum guaranteed maximum values for system limits. Linux version. 2022 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 2023 // This file is part of the GNU C Library. 2024 // 2025 // The GNU C Library is free software; you can redistribute it and/or 2026 // modify it under the terms of the GNU Lesser General Public License as 2027 // published by the Free Software Foundation; either version 2.1 of the 2028 // License, or (at your option) any later version. 2029 // 2030 // The GNU C Library is distributed in the hope that it will be useful, 2031 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2032 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2033 // Lesser General Public License for more details. 2034 // 2035 // You should have received a copy of the GNU Lesser General Public 2036 // License along with the GNU C Library; see the file COPYING.LIB. If 2037 // not, see <https://www.gnu.org/licenses/>. 2038 2039 // The kernel header pollutes the namespace with the NR_OPEN symbol 2040 // and defines LINK_MAX although filesystems have different maxima. A 2041 // similar thing is true for OPEN_MAX: the limit can be changed at 2042 // runtime and therefore the macro must not be defined. Remove this 2043 // after including the header if necessary. 2044 2045 // The kernel sources contain a file with all the needed information. 2046 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 2047 2048 // Have to remove NR_OPEN? 2049 // Have to remove LINK_MAX? 2050 // Have to remove OPEN_MAX? 2051 // Have to remove ARG_MAX? 2052 2053 // The number of data keys per process. 2054 // This is the value this implementation supports. 2055 2056 // Controlling the iterations of destructors for thread-specific data. 2057 // Number of iterations this implementation does. 2058 2059 // The number of threads per process. 2060 // We have no predefined limit on the number of threads. 2061 2062 // Maximum amount by which a process can descrease its asynchronous I/O 2063 // priority level. 2064 2065 // Minimum size for a thread. We are free to choose a reasonable value. 2066 2067 // Maximum number of timer expiration overruns. 2068 2069 // Maximum tty name length. 2070 2071 // Maximum login name length. This is arbitrary. 2072 2073 // Maximum host name length. 2074 2075 // Maximum message queue priority level. 2076 2077 // Maximum value the semaphore can have. 2078 2079 // ssize_t is not formally required to be the signed type 2080 // corresponding to size_t, but it is for all configurations supported 2081 // by glibc. 2082 2083 // This value is a guaranteed minimum maximum. 2084 // The current maximum can be got from `sysconf'. 2085 2086 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2087 // This file is part of the GNU C Library. 2088 // 2089 // The GNU C Library is free software; you can redistribute it and/or 2090 // modify it under the terms of the GNU Lesser General Public 2091 // License as published by the Free Software Foundation; either 2092 // version 2.1 of the License, or (at your option) any later version. 2093 // 2094 // The GNU C Library is distributed in the hope that it will be useful, 2095 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2096 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2097 // Lesser General Public License for more details. 2098 // 2099 // You should have received a copy of the GNU Lesser General Public 2100 // License along with the GNU C Library; if not, see 2101 // <https://www.gnu.org/licenses/>. 2102 2103 // Never include this file directly; include <limits.h> instead. 2104 2105 // The maximum `ibase' and `obase' values allowed by the `bc' utility. 2106 2107 // The maximum number of elements allowed in an array by the `bc' utility. 2108 2109 // The maximum `scale' value allowed by the `bc' utility. 2110 2111 // The maximum length of a string constant accepted by the `bc' utility. 2112 2113 // The maximum number of weights that can be assigned to an entry of 2114 // the LC_COLLATE `order' keyword in the locale definition file. 2115 2116 // The maximum number of expressions that can be nested 2117 // within parentheses by the `expr' utility. 2118 2119 // The maximum length, in bytes, of an input line. 2120 2121 // The maximum number of repeated occurrences of a regular expression 2122 // permitted when using the interval notation `\{M,N\}'. 2123 2124 // The maximum number of bytes in a character class name. We have no 2125 // fixed limit, 2048 is a high number. 2126 2127 // These values are implementation-specific, 2128 // and may vary within the implementation. 2129 // Their precise values can be obtained from sysconf. 2130 2131 // This value is defined like this in regex.h. 2132 2133 // Copyright (C) 1991-2019 Free Software Foundation, Inc. 2134 // 2135 // This file is part of GCC. 2136 // 2137 // GCC is free software; you can redistribute it and/or modify it under 2138 // the terms of the GNU General Public License as published by the Free 2139 // Software Foundation; either version 3, or (at your option) any later 2140 // version. 2141 // 2142 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 2143 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 2144 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2145 // for more details. 2146 // 2147 // Under Section 7 of GPL version 3, you are granted additional 2148 // permissions described in the GCC Runtime Library Exception, version 2149 // 3.1, as published by the Free Software Foundation. 2150 // 2151 // You should have received a copy of the GNU General Public License and 2152 // a copy of the GCC Runtime Library Exception along with this program; 2153 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2154 // <http://www.gnu.org/licenses/>. 2155 2156 // Number of bits in a `char'. 2157 2158 // Maximum length of a multibyte character. 2159 2160 // Minimum and maximum values a `signed char' can hold. 2161 2162 // Maximum value an `unsigned char' can hold. (Minimum is 0). 2163 2164 // Minimum and maximum values a `char' can hold. 2165 2166 // Minimum and maximum values a `signed short int' can hold. 2167 2168 // Maximum value an `unsigned short int' can hold. (Minimum is 0). 2169 2170 // Minimum and maximum values a `signed int' can hold. 2171 2172 // Maximum value an `unsigned int' can hold. (Minimum is 0). 2173 2174 // Minimum and maximum values a `signed long int' can hold. 2175 // (Same as `int'). 2176 2177 // Maximum value an `unsigned long int' can hold. (Minimum is 0). 2178 2179 // Minimum and maximum values a `signed long long int' can hold. 2180 2181 // Maximum value an `unsigned long long int' can hold. (Minimum is 0). 2182 2183 // This administrivia gets added to the end of limits.h 2184 // if the system has its own version of limits.h. 2185 2186 type Z_crc_t = uint32 /* zconf.h:429:17 */ 2187 2188 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2189 // This file is part of the GNU C Library. 2190 // 2191 // The GNU C Library is free software; you can redistribute it and/or 2192 // modify it under the terms of the GNU Lesser General Public 2193 // License as published by the Free Software Foundation; either 2194 // version 2.1 of the License, or (at your option) any later version. 2195 // 2196 // The GNU C Library is distributed in the hope that it will be useful, 2197 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2198 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2199 // Lesser General Public License for more details. 2200 // 2201 // You should have received a copy of the GNU Lesser General Public 2202 // License along with the GNU C Library; if not, see 2203 // <https://www.gnu.org/licenses/>. 2204 2205 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 2206 2207 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2208 // This file is part of the GNU C Library. 2209 // 2210 // The GNU C Library is free software; you can redistribute it and/or 2211 // modify it under the terms of the GNU Lesser General Public 2212 // License as published by the Free Software Foundation; either 2213 // version 2.1 of the License, or (at your option) any later version. 2214 // 2215 // The GNU C Library is distributed in the hope that it will be useful, 2216 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2217 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2218 // Lesser General Public License for more details. 2219 // 2220 // You should have received a copy of the GNU Lesser General Public 2221 // License along with the GNU C Library; if not, see 2222 // <https://www.gnu.org/licenses/>. 2223 2224 // bits/types.h -- definitions of __*_t types underlying *_t types. 2225 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2226 // This file is part of the GNU C Library. 2227 // 2228 // The GNU C Library is free software; you can redistribute it and/or 2229 // modify it under the terms of the GNU Lesser General Public 2230 // License as published by the Free Software Foundation; either 2231 // version 2.1 of the License, or (at your option) any later version. 2232 // 2233 // The GNU C Library is distributed in the hope that it will be useful, 2234 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2235 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2236 // Lesser General Public License for more details. 2237 // 2238 // You should have received a copy of the GNU Lesser General Public 2239 // License along with the GNU C Library; if not, see 2240 // <https://www.gnu.org/licenses/>. 2241 2242 // Never include this file directly; use <sys/types.h> instead. 2243 2244 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2245 // This file is part of the GNU C Library. 2246 // 2247 // The GNU C Library is free software; you can redistribute it and/or 2248 // modify it under the terms of the GNU Lesser General Public 2249 // License as published by the Free Software Foundation; either 2250 // version 2.1 of the License, or (at your option) any later version. 2251 // 2252 // The GNU C Library is distributed in the hope that it will be useful, 2253 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2254 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2255 // Lesser General Public License for more details. 2256 // 2257 // You should have received a copy of the GNU Lesser General Public 2258 // License along with the GNU C Library; if not, see 2259 // <https://www.gnu.org/licenses/>. 2260 2261 // Determine the wordsize from the preprocessor defines. 2262 2263 // Bit size of the time_t type at glibc build time, general case. 2264 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2265 // This file is part of the GNU C Library. 2266 // 2267 // The GNU C Library is free software; you can redistribute it and/or 2268 // modify it under the terms of the GNU Lesser General Public 2269 // License as published by the Free Software Foundation; either 2270 // version 2.1 of the License, or (at your option) any later version. 2271 // 2272 // The GNU C Library is distributed in the hope that it will be useful, 2273 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2274 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2275 // Lesser General Public License for more details. 2276 // 2277 // You should have received a copy of the GNU Lesser General Public 2278 // License along with the GNU C Library; if not, see 2279 // <https://www.gnu.org/licenses/>. 2280 2281 // Determine the wordsize from the preprocessor defines. 2282 2283 // Size in bits of the 'time_t' type of the default ABI. 2284 2285 // Convenience types. 2286 type X__u_char = uint8 /* types.h:31:23 */ 2287 type X__u_short = uint16 /* types.h:32:28 */ 2288 type X__u_int = uint32 /* types.h:33:22 */ 2289 type X__u_long = uint64 /* types.h:34:27 */ 2290 2291 // Fixed-size types, underlying types depend on word size and compiler. 2292 type X__int8_t = int8 /* types.h:37:21 */ 2293 type X__uint8_t = uint8 /* types.h:38:23 */ 2294 type X__int16_t = int16 /* types.h:39:26 */ 2295 type X__uint16_t = uint16 /* types.h:40:28 */ 2296 type X__int32_t = int32 /* types.h:41:20 */ 2297 type X__uint32_t = uint32 /* types.h:42:22 */ 2298 type X__int64_t = int64 /* types.h:44:25 */ 2299 type X__uint64_t = uint64 /* types.h:45:27 */ 2300 2301 // Smallest types with at least a given width. 2302 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 2303 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 2304 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 2305 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 2306 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 2307 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 2308 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 2309 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 2310 2311 // quad_t is also 64 bits. 2312 type X__quad_t = int64 /* types.h:63:18 */ 2313 type X__u_quad_t = uint64 /* types.h:64:27 */ 2314 2315 // Largest integral types. 2316 type X__intmax_t = int64 /* types.h:72:18 */ 2317 type X__uintmax_t = uint64 /* types.h:73:27 */ 2318 2319 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 2320 // macros for each of the OS types we define below. The definitions 2321 // of those macros must use the following macros for underlying types. 2322 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 2323 // variants of each of the following integer types on this machine. 2324 // 2325 // 16 -- "natural" 16-bit type (always short) 2326 // 32 -- "natural" 32-bit type (always int) 2327 // 64 -- "natural" 64-bit type (long or long long) 2328 // LONG32 -- 32-bit type, traditionally long 2329 // QUAD -- 64-bit type, traditionally long long 2330 // WORD -- natural type of __WORDSIZE bits (int or long) 2331 // LONGWORD -- type of __WORDSIZE bits, traditionally long 2332 // 2333 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 2334 // conventional uses of `long' or `long long' type modifiers match the 2335 // types we define, even when a less-adorned type would be the same size. 2336 // This matters for (somewhat) portably writing printf/scanf formats for 2337 // these types, where using the appropriate l or ll format modifiers can 2338 // make the typedefs and the formats match up across all GNU platforms. If 2339 // we used `long' when it's 64 bits where `long long' is expected, then the 2340 // compiler would warn about the formats not matching the argument types, 2341 // and the programmer changing them to shut up the compiler would break the 2342 // program's portability. 2343 // 2344 // Here we assume what is presently the case in all the GCC configurations 2345 // we support: long long is always 64 bits, long is always word/address size, 2346 // and int is always 32 bits. 2347 2348 // No need to mark the typedef with __extension__. 2349 // bits/typesizes.h -- underlying types for *_t. Linux/s390 version. 2350 // Copyright (C) 2003-2020 Free Software Foundation, Inc. 2351 // This file is part of the GNU C Library. 2352 // 2353 // The GNU C Library is free software; you can redistribute it and/or 2354 // modify it under the terms of the GNU Lesser General Public 2355 // License as published by the Free Software Foundation; either 2356 // version 2.1 of the License, or (at your option) any later version. 2357 // 2358 // The GNU C Library is distributed in the hope that it will be useful, 2359 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2360 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2361 // Lesser General Public License for more details. 2362 // 2363 // You should have received a copy of the GNU Lesser General Public 2364 // License along with the GNU C Library; if not, see 2365 // <https://www.gnu.org/licenses/>. 2366 2367 // See <bits/types.h> for the meaning of these macros. This file exists so 2368 // that <bits/types.h> need not vary across different GNU platforms. 2369 2370 // size_t is unsigned long int on s390 -m31. 2371 2372 // Tell the libc code that off_t and off64_t are actually the same type 2373 // for all ABI purposes, even if possibly expressed as different base types 2374 // for C type-checking purposes. 2375 2376 // Same for ino_t and ino64_t. 2377 2378 // And for __rlim_t and __rlim64_t. 2379 2380 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 2381 2382 // Number of descriptors that can fit in an `fd_set'. 2383 2384 // bits/time64.h -- underlying types for __time64_t. Generic version. 2385 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2386 // This file is part of the GNU C Library. 2387 // 2388 // The GNU C Library is free software; you can redistribute it and/or 2389 // modify it under the terms of the GNU Lesser General Public 2390 // License as published by the Free Software Foundation; either 2391 // version 2.1 of the License, or (at your option) any later version. 2392 // 2393 // The GNU C Library is distributed in the hope that it will be useful, 2394 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2395 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2396 // Lesser General Public License for more details. 2397 // 2398 // You should have received a copy of the GNU Lesser General Public 2399 // License along with the GNU C Library; if not, see 2400 // <https://www.gnu.org/licenses/>. 2401 2402 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 2403 2404 // If we already have 64-bit time type then use it. 2405 2406 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 2407 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 2408 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 2409 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 2410 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 2411 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 2412 type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. 2413 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 2414 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 2415 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 2416 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 2417 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 2418 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 2419 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 2420 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 2421 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 2422 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 2423 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 2424 2425 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. 2426 type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. 2427 2428 // Clock ID used in clock and timer functions. 2429 type X__clockid_t = int32 /* types.h:168:29 */ 2430 2431 // Timer ID returned by `timer_create'. 2432 type X__timer_t = uintptr /* types.h:171:12 */ 2433 2434 // Type to represent block size. 2435 type X__blksize_t = int64 /* types.h:174:29 */ 2436 2437 // Types from the Large File Support interface. 2438 2439 // Type to count number of disk blocks. 2440 type X__blkcnt_t = int64 /* types.h:179:28 */ 2441 type X__blkcnt64_t = int64 /* types.h:180:30 */ 2442 2443 // Type to count file system blocks. 2444 type X__fsblkcnt_t = uint64 /* types.h:183:30 */ 2445 type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ 2446 2447 // Type to count file system nodes. 2448 type X__fsfilcnt_t = uint64 /* types.h:187:30 */ 2449 type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ 2450 2451 // Type of miscellaneous file system fields. 2452 type X__fsword_t = int64 /* types.h:191:28 */ 2453 2454 type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. 2455 2456 // Signed long type used in system calls. 2457 type X__syscall_slong_t = int64 /* types.h:196:33 */ 2458 // Unsigned long type used in system calls. 2459 type X__syscall_ulong_t = uint64 /* types.h:198:33 */ 2460 2461 // These few don't really vary by system, they always correspond 2462 // to one of the other defined types. 2463 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). 2464 type X__caddr_t = uintptr /* types.h:203:14 */ 2465 2466 // Duplicates info from stdint.h but this is used in unistd.h. 2467 type X__intptr_t = int64 /* types.h:206:25 */ 2468 2469 // Duplicate info from sys/socket.h. 2470 type X__socklen_t = uint32 /* types.h:209:23 */ 2471 2472 // C99: An integer type that can be accessed as an atomic entity, 2473 // even in the presence of asynchronous interrupts. 2474 // It is not currently necessary for this to be machine-specific. 2475 type X__sig_atomic_t = int32 /* types.h:214:13 */ 2476 2477 // Seconds since the Epoch, visible to user code when time_t is too 2478 // narrow only for consistency with the old way of widening too-narrow 2479 // types. User code should never use __time64_t. 2480 2481 type U_char = X__u_char /* types.h:33:18 */ 2482 type U_short = X__u_short /* types.h:34:19 */ 2483 type U_int = X__u_int /* types.h:35:17 */ 2484 type U_long = X__u_long /* types.h:36:18 */ 2485 type Quad_t = X__quad_t /* types.h:37:18 */ 2486 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 2487 type Fsid_t = X__fsid_t /* types.h:39:18 */ 2488 type Loff_t = X__loff_t /* types.h:42:18 */ 2489 2490 type Ino_t = X__ino64_t /* types.h:49:19 */ 2491 type Ino64_t = X__ino64_t /* types.h:54:19 */ 2492 2493 type Dev_t = X__dev_t /* types.h:59:17 */ 2494 2495 type Gid_t = X__gid_t /* types.h:64:17 */ 2496 2497 type Mode_t = X__mode_t /* types.h:69:18 */ 2498 2499 type Nlink_t = X__nlink_t /* types.h:74:19 */ 2500 2501 type Uid_t = X__uid_t /* types.h:79:17 */ 2502 2503 type Off_t = X__off64_t /* types.h:87:19 */ 2504 type Off64_t = X__off64_t /* types.h:92:19 */ 2505 2506 type Pid_t = X__pid_t /* types.h:97:17 */ 2507 2508 type Id_t = X__id_t /* types.h:103:16 */ 2509 2510 type Ssize_t = X__ssize_t /* types.h:108:19 */ 2511 2512 type Daddr_t = X__daddr_t /* types.h:114:19 */ 2513 type Caddr_t = X__caddr_t /* types.h:115:19 */ 2514 2515 type Key_t = X__key_t /* types.h:121:17 */ 2516 2517 // bits/types.h -- definitions of __*_t types underlying *_t types. 2518 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2519 // This file is part of the GNU C Library. 2520 // 2521 // The GNU C Library is free software; you can redistribute it and/or 2522 // modify it under the terms of the GNU Lesser General Public 2523 // License as published by the Free Software Foundation; either 2524 // version 2.1 of the License, or (at your option) any later version. 2525 // 2526 // The GNU C Library is distributed in the hope that it will be useful, 2527 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2528 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2529 // Lesser General Public License for more details. 2530 // 2531 // You should have received a copy of the GNU Lesser General Public 2532 // License along with the GNU C Library; if not, see 2533 // <https://www.gnu.org/licenses/>. 2534 2535 // Never include this file directly; use <sys/types.h> instead. 2536 2537 // Returned by `clock'. 2538 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 2539 2540 // bits/types.h -- definitions of __*_t types underlying *_t types. 2541 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2542 // This file is part of the GNU C Library. 2543 // 2544 // The GNU C Library is free software; you can redistribute it and/or 2545 // modify it under the terms of the GNU Lesser General Public 2546 // License as published by the Free Software Foundation; either 2547 // version 2.1 of the License, or (at your option) any later version. 2548 // 2549 // The GNU C Library is distributed in the hope that it will be useful, 2550 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2551 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2552 // Lesser General Public License for more details. 2553 // 2554 // You should have received a copy of the GNU Lesser General Public 2555 // License along with the GNU C Library; if not, see 2556 // <https://www.gnu.org/licenses/>. 2557 2558 // Never include this file directly; use <sys/types.h> instead. 2559 2560 // Clock ID used in clock and timer functions. 2561 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 2562 2563 // bits/types.h -- definitions of __*_t types underlying *_t types. 2564 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2565 // This file is part of the GNU C Library. 2566 // 2567 // The GNU C Library is free software; you can redistribute it and/or 2568 // modify it under the terms of the GNU Lesser General Public 2569 // License as published by the Free Software Foundation; either 2570 // version 2.1 of the License, or (at your option) any later version. 2571 // 2572 // The GNU C Library is distributed in the hope that it will be useful, 2573 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2574 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2575 // Lesser General Public License for more details. 2576 // 2577 // You should have received a copy of the GNU Lesser General Public 2578 // License along with the GNU C Library; if not, see 2579 // <https://www.gnu.org/licenses/>. 2580 2581 // Never include this file directly; use <sys/types.h> instead. 2582 2583 // Returned by `time'. 2584 type Time_t = X__time_t /* time_t.h:7:18 */ 2585 2586 // bits/types.h -- definitions of __*_t types underlying *_t types. 2587 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2588 // This file is part of the GNU C Library. 2589 // 2590 // The GNU C Library is free software; you can redistribute it and/or 2591 // modify it under the terms of the GNU Lesser General Public 2592 // License as published by the Free Software Foundation; either 2593 // version 2.1 of the License, or (at your option) any later version. 2594 // 2595 // The GNU C Library is distributed in the hope that it will be useful, 2596 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2597 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2598 // Lesser General Public License for more details. 2599 // 2600 // You should have received a copy of the GNU Lesser General Public 2601 // License along with the GNU C Library; if not, see 2602 // <https://www.gnu.org/licenses/>. 2603 2604 // Never include this file directly; use <sys/types.h> instead. 2605 2606 // Timer ID returned by `timer_create'. 2607 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 2608 2609 // Copyright (C) 1989-2019 Free Software Foundation, Inc. 2610 // 2611 // This file is part of GCC. 2612 // 2613 // GCC is free software; you can redistribute it and/or modify 2614 // it under the terms of the GNU General Public License as published by 2615 // the Free Software Foundation; either version 3, or (at your option) 2616 // any later version. 2617 // 2618 // GCC is distributed in the hope that it will be useful, 2619 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2620 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2621 // GNU General Public License for more details. 2622 // 2623 // Under Section 7 of GPL version 3, you are granted additional 2624 // permissions described in the GCC Runtime Library Exception, version 2625 // 3.1, as published by the Free Software Foundation. 2626 // 2627 // You should have received a copy of the GNU General Public License and 2628 // a copy of the GCC Runtime Library Exception along with this program; 2629 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2630 // <http://www.gnu.org/licenses/>. 2631 2632 // ISO C Standard: 7.17 Common definitions <stddef.h> 2633 2634 // Any one of these symbols __need_* means that GNU libc 2635 // wants us just to define one data type. So don't define 2636 // the symbols that indicate this file's entire job has been done. 2637 2638 // This avoids lossage on SunOS but only if stdtypes.h comes first. 2639 // There's no way to win with the other order! Sun lossage. 2640 2641 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 2642 // Just ignore it. 2643 2644 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 2645 // _TYPE_size_t which will typedef size_t. fixincludes patched the 2646 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 2647 // not defined, and so that defining this macro defines _GCC_SIZE_T. 2648 // If we find that the macros are still defined at this point, we must 2649 // invoke them so that the type is defined as expected. 2650 2651 // In case nobody has defined these types, but we aren't running under 2652 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 2653 // __WCHAR_TYPE__ have reasonable values. This can happen if the 2654 // parts of GCC is compiled by an older compiler, that actually 2655 // include gstddef.h, such as collect2. 2656 2657 // Signed type of difference of two pointers. 2658 2659 // Define this type if we are doing the whole job, 2660 // or if we want this type in particular. 2661 2662 // If this symbol has done its job, get rid of it. 2663 2664 // Unsigned type of `sizeof' something. 2665 2666 // Define this type if we are doing the whole job, 2667 // or if we want this type in particular. 2668 2669 // Wide character type. 2670 // Locale-writers should change this as necessary to 2671 // be big enough to hold unique values not between 0 and 127, 2672 // and not (wchar_t) -1, for each defined multibyte character. 2673 2674 // Define this type if we are doing the whole job, 2675 // or if we want this type in particular. 2676 2677 // A null pointer constant. 2678 2679 // Offset of member MEMBER in a struct of type TYPE. 2680 2681 // Old compatibility names for C types. 2682 type Ulong = uint64 /* types.h:148:27 */ 2683 type Ushort = uint16 /* types.h:149:28 */ 2684 type Uint = uint32 /* types.h:150:22 */ 2685 2686 // These size-specific names are used by some of the inet code. 2687 2688 // Define intN_t types. 2689 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2690 // This file is part of the GNU C Library. 2691 // 2692 // The GNU C Library is free software; you can redistribute it and/or 2693 // modify it under the terms of the GNU Lesser General Public 2694 // License as published by the Free Software Foundation; either 2695 // version 2.1 of the License, or (at your option) any later version. 2696 // 2697 // The GNU C Library is distributed in the hope that it will be useful, 2698 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2699 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2700 // Lesser General Public License for more details. 2701 // 2702 // You should have received a copy of the GNU Lesser General Public 2703 // License along with the GNU C Library; if not, see 2704 // <https://www.gnu.org/licenses/>. 2705 2706 // bits/types.h -- definitions of __*_t types underlying *_t types. 2707 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2708 // This file is part of the GNU C Library. 2709 // 2710 // The GNU C Library is free software; you can redistribute it and/or 2711 // modify it under the terms of the GNU Lesser General Public 2712 // License as published by the Free Software Foundation; either 2713 // version 2.1 of the License, or (at your option) any later version. 2714 // 2715 // The GNU C Library is distributed in the hope that it will be useful, 2716 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2717 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2718 // Lesser General Public License for more details. 2719 // 2720 // You should have received a copy of the GNU Lesser General Public 2721 // License along with the GNU C Library; if not, see 2722 // <https://www.gnu.org/licenses/>. 2723 2724 // Never include this file directly; use <sys/types.h> instead. 2725 2726 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 2727 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 2728 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 2729 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 2730 2731 // These were defined by ISO C without the first `_'. 2732 type U_int8_t = X__uint8_t /* types.h:158:19 */ 2733 type U_int16_t = X__uint16_t /* types.h:159:20 */ 2734 type U_int32_t = X__uint32_t /* types.h:160:20 */ 2735 type U_int64_t = X__uint64_t /* types.h:161:20 */ 2736 2737 type Register_t = int32 /* types.h:164:13 */ 2738 2739 // It also defines `fd_set' and the FD_* macros for `select'. 2740 // `fd_set' type and related macros, and `select'/`pselect' declarations. 2741 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 2742 // This file is part of the GNU C Library. 2743 // 2744 // The GNU C Library is free software; you can redistribute it and/or 2745 // modify it under the terms of the GNU Lesser General Public 2746 // License as published by the Free Software Foundation; either 2747 // version 2.1 of the License, or (at your option) any later version. 2748 // 2749 // The GNU C Library is distributed in the hope that it will be useful, 2750 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2751 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2752 // Lesser General Public License for more details. 2753 // 2754 // You should have received a copy of the GNU Lesser General Public 2755 // License along with the GNU C Library; if not, see 2756 // <https://www.gnu.org/licenses/>. 2757 2758 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 2759 2760 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2761 // This file is part of the GNU C Library. 2762 // 2763 // The GNU C Library is free software; you can redistribute it and/or 2764 // modify it under the terms of the GNU Lesser General Public 2765 // License as published by the Free Software Foundation; either 2766 // version 2.1 of the License, or (at your option) any later version. 2767 // 2768 // The GNU C Library is distributed in the hope that it will be useful, 2769 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2770 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2771 // Lesser General Public License for more details. 2772 // 2773 // You should have received a copy of the GNU Lesser General Public 2774 // License along with the GNU C Library; if not, see 2775 // <https://www.gnu.org/licenses/>. 2776 2777 // Get definition of needed basic types. 2778 // bits/types.h -- definitions of __*_t types underlying *_t types. 2779 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2780 // This file is part of the GNU C Library. 2781 // 2782 // The GNU C Library is free software; you can redistribute it and/or 2783 // modify it under the terms of the GNU Lesser General Public 2784 // License as published by the Free Software Foundation; either 2785 // version 2.1 of the License, or (at your option) any later version. 2786 // 2787 // The GNU C Library is distributed in the hope that it will be useful, 2788 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2789 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2790 // Lesser General Public License for more details. 2791 // 2792 // You should have received a copy of the GNU Lesser General Public 2793 // License along with the GNU C Library; if not, see 2794 // <https://www.gnu.org/licenses/>. 2795 2796 // Never include this file directly; use <sys/types.h> instead. 2797 2798 // Get __FD_* definitions. 2799 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 2800 // This file is part of the GNU C Library. 2801 // 2802 // The GNU C Library is free software; you can redistribute it and/or 2803 // modify it under the terms of the GNU Lesser General Public 2804 // License as published by the Free Software Foundation; either 2805 // version 2.1 of the License, or (at your option) any later version. 2806 // 2807 // The GNU C Library is distributed in the hope that it will be useful, 2808 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2809 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2810 // Lesser General Public License for more details. 2811 // 2812 // You should have received a copy of the GNU Lesser General Public 2813 // License along with the GNU C Library; if not, see 2814 // <https://www.gnu.org/licenses/>. 2815 2816 // We don't use `memset' because this would require a prototype and 2817 // the array isn't too big. 2818 2819 // Get sigset_t. 2820 2821 type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ 2822 2823 // A set of signals to be blocked, unblocked, or waited for. 2824 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 2825 2826 // Get definition of timer specification structures. 2827 2828 // bits/types.h -- definitions of __*_t types underlying *_t types. 2829 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2830 // This file is part of the GNU C Library. 2831 // 2832 // The GNU C Library is free software; you can redistribute it and/or 2833 // modify it under the terms of the GNU Lesser General Public 2834 // License as published by the Free Software Foundation; either 2835 // version 2.1 of the License, or (at your option) any later version. 2836 // 2837 // The GNU C Library is distributed in the hope that it will be useful, 2838 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2839 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2840 // Lesser General Public License for more details. 2841 // 2842 // You should have received a copy of the GNU Lesser General Public 2843 // License along with the GNU C Library; if not, see 2844 // <https://www.gnu.org/licenses/>. 2845 2846 // Never include this file directly; use <sys/types.h> instead. 2847 2848 // A time value that is accurate to the nearest 2849 // microsecond but also has a range of years. 2850 type Timeval = struct { 2851 Ftv_sec X__time_t 2852 Ftv_usec X__suseconds_t 2853 } /* struct_timeval.h:8:1 */ 2854 2855 // NB: Include guard matches what <linux/time.h> uses. 2856 2857 // bits/types.h -- definitions of __*_t types underlying *_t types. 2858 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2859 // This file is part of the GNU C Library. 2860 // 2861 // The GNU C Library is free software; you can redistribute it and/or 2862 // modify it under the terms of the GNU Lesser General Public 2863 // License as published by the Free Software Foundation; either 2864 // version 2.1 of the License, or (at your option) any later version. 2865 // 2866 // The GNU C Library is distributed in the hope that it will be useful, 2867 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2868 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2869 // Lesser General Public License for more details. 2870 // 2871 // You should have received a copy of the GNU Lesser General Public 2872 // License along with the GNU C Library; if not, see 2873 // <https://www.gnu.org/licenses/>. 2874 2875 // Never include this file directly; use <sys/types.h> instead. 2876 2877 // Endian macros for string.h functions 2878 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 2879 // This file is part of the GNU C Library. 2880 // 2881 // The GNU C Library is free software; you can redistribute it and/or 2882 // modify it under the terms of the GNU Lesser General Public 2883 // License as published by the Free Software Foundation; either 2884 // version 2.1 of the License, or (at your option) any later version. 2885 // 2886 // The GNU C Library is distributed in the hope that it will be useful, 2887 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2888 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2889 // Lesser General Public License for more details. 2890 // 2891 // You should have received a copy of the GNU Lesser General Public 2892 // License along with the GNU C Library; if not, see 2893 // <http://www.gnu.org/licenses/>. 2894 2895 // POSIX.1b structure for a time value. This is like a `struct timeval' but 2896 // has nanoseconds instead of microseconds. 2897 type Timespec = struct { 2898 Ftv_sec X__time_t 2899 Ftv_nsec X__syscall_slong_t 2900 } /* struct_timespec.h:10:1 */ 2901 2902 type Suseconds_t = X__suseconds_t /* select.h:43:23 */ 2903 2904 // The fd_set member is required to be an array of longs. 2905 type X__fd_mask = int64 /* select.h:49:18 */ 2906 2907 // Some versions of <linux/posix_types.h> define this macros. 2908 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 2909 2910 // fd_set for select and pselect. 2911 type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ 2912 2913 // Maximum number of file descriptors in `fd_set'. 2914 2915 // Sometimes the fd_set member is assumed to have this type. 2916 type Fd_mask = X__fd_mask /* select.h:77:19 */ 2917 2918 // Define some inlines helping to catch common problems. 2919 2920 type Blksize_t = X__blksize_t /* types.h:185:21 */ 2921 2922 // Types from the Large File Support interface. 2923 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 2924 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 2925 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 2926 2927 type Blkcnt64_t = X__blkcnt64_t /* types.h:219:22 */ // Type to count number of disk blocks. 2928 type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks. 2929 type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes. 2930 2931 // Now add the thread types. 2932 // Declaration of common pthread types for all architectures. 2933 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2934 // This file is part of the GNU C Library. 2935 // 2936 // The GNU C Library is free software; you can redistribute it and/or 2937 // modify it under the terms of the GNU Lesser General Public 2938 // License as published by the Free Software Foundation; either 2939 // version 2.1 of the License, or (at your option) any later version. 2940 // 2941 // The GNU C Library is distributed in the hope that it will be useful, 2942 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2943 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2944 // Lesser General Public License for more details. 2945 // 2946 // You should have received a copy of the GNU Lesser General Public 2947 // License along with the GNU C Library; if not, see 2948 // <https://www.gnu.org/licenses/>. 2949 2950 // For internal mutex and condition variable definitions. 2951 // Common threading primitives definitions for both POSIX and C11. 2952 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 2953 // This file is part of the GNU C Library. 2954 // 2955 // The GNU C Library is free software; you can redistribute it and/or 2956 // modify it under the terms of the GNU Lesser General Public 2957 // License as published by the Free Software Foundation; either 2958 // version 2.1 of the License, or (at your option) any later version. 2959 // 2960 // The GNU C Library is distributed in the hope that it will be useful, 2961 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2962 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2963 // Lesser General Public License for more details. 2964 // 2965 // You should have received a copy of the GNU Lesser General Public 2966 // License along with the GNU C Library; if not, see 2967 // <https://www.gnu.org/licenses/>. 2968 2969 // Arch-specific definitions. Each architecture must define the following 2970 // macros to define the expected sizes of pthread data types: 2971 // 2972 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 2973 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 2974 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 2975 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 2976 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 2977 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 2978 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 2979 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 2980 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 2981 // 2982 // The additional macro defines any constraint for the lock alignment 2983 // inside the thread structures: 2984 // 2985 // __LOCK_ALIGNMENT - for internal lock/futex usage. 2986 // 2987 // Same idea but for the once locking primitive: 2988 // 2989 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 2990 2991 // Machine-specific pthread type layouts. Generic version. 2992 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 2993 // 2994 // This file is part of the GNU C Library. 2995 // 2996 // The GNU C Library is free software; you can redistribute it and/or 2997 // modify it under the terms of the GNU Lesser General Public 2998 // License as published by the Free Software Foundation; either 2999 // version 2.1 of the License, or (at your option) any later version. 3000 // 3001 // The GNU C Library is distributed in the hope that it will be useful, 3002 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3003 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3004 // Lesser General Public License for more details. 3005 // 3006 // You should have received a copy of the GNU Lesser General Public 3007 // License along with the GNU C Library; if not, see 3008 // <http://www.gnu.org/licenses/>. 3009 3010 // Determine the wordsize from the preprocessor defines. 3011 3012 // Common definition of pthread_mutex_t. 3013 3014 type X__pthread_internal_list = struct { 3015 F__prev uintptr 3016 F__next uintptr 3017 } /* thread-shared-types.h:49:9 */ 3018 3019 // Type to count file system inodes. 3020 3021 // Now add the thread types. 3022 // Declaration of common pthread types for all architectures. 3023 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3024 // This file is part of the GNU C Library. 3025 // 3026 // The GNU C Library is free software; you can redistribute it and/or 3027 // modify it under the terms of the GNU Lesser General Public 3028 // License as published by the Free Software Foundation; either 3029 // version 2.1 of the License, or (at your option) any later version. 3030 // 3031 // The GNU C Library is distributed in the hope that it will be useful, 3032 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3033 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3034 // Lesser General Public License for more details. 3035 // 3036 // You should have received a copy of the GNU Lesser General Public 3037 // License along with the GNU C Library; if not, see 3038 // <https://www.gnu.org/licenses/>. 3039 3040 // For internal mutex and condition variable definitions. 3041 // Common threading primitives definitions for both POSIX and C11. 3042 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3043 // This file is part of the GNU C Library. 3044 // 3045 // The GNU C Library is free software; you can redistribute it and/or 3046 // modify it under the terms of the GNU Lesser General Public 3047 // License as published by the Free Software Foundation; either 3048 // version 2.1 of the License, or (at your option) any later version. 3049 // 3050 // The GNU C Library is distributed in the hope that it will be useful, 3051 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3052 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3053 // Lesser General Public License for more details. 3054 // 3055 // You should have received a copy of the GNU Lesser General Public 3056 // License along with the GNU C Library; if not, see 3057 // <https://www.gnu.org/licenses/>. 3058 3059 // Arch-specific definitions. Each architecture must define the following 3060 // macros to define the expected sizes of pthread data types: 3061 // 3062 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 3063 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 3064 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 3065 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 3066 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 3067 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 3068 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 3069 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 3070 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 3071 // 3072 // The additional macro defines any constraint for the lock alignment 3073 // inside the thread structures: 3074 // 3075 // __LOCK_ALIGNMENT - for internal lock/futex usage. 3076 // 3077 // Same idea but for the once locking primitive: 3078 // 3079 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 3080 3081 // Machine-specific pthread type layouts. Generic version. 3082 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3083 // 3084 // This file is part of the GNU C Library. 3085 // 3086 // The GNU C Library is free software; you can redistribute it and/or 3087 // modify it under the terms of the GNU Lesser General Public 3088 // License as published by the Free Software Foundation; either 3089 // version 2.1 of the License, or (at your option) any later version. 3090 // 3091 // The GNU C Library is distributed in the hope that it will be useful, 3092 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3093 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3094 // Lesser General Public License for more details. 3095 // 3096 // You should have received a copy of the GNU Lesser General Public 3097 // License along with the GNU C Library; if not, see 3098 // <http://www.gnu.org/licenses/>. 3099 3100 // Determine the wordsize from the preprocessor defines. 3101 3102 // Common definition of pthread_mutex_t. 3103 3104 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 3105 3106 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 3107 3108 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 3109 3110 // Arch-specific mutex definitions. A generic implementation is provided 3111 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 3112 // can override it by defining: 3113 // 3114 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 3115 // definition). It should contains at least the internal members 3116 // defined in the generic version. 3117 // 3118 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 3119 // atomic operations. 3120 // 3121 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 3122 // It should initialize the mutex internal flag. 3123 3124 // S390 internal mutex struct definitions. 3125 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3126 // This file is part of the GNU C Library. 3127 // 3128 // The GNU C Library is free software; you can redistribute it and/or 3129 // modify it under the terms of the GNU Lesser General Public 3130 // License as published by the Free Software Foundation; either 3131 // version 2.1 of the License, or (at your option) any later version. 3132 // 3133 // The GNU C Library is distributed in the hope that it will be useful, 3134 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3135 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3136 // Lesser General Public License for more details. 3137 // 3138 // You should have received a copy of the GNU Lesser General Public 3139 // License along with the GNU C Library; if not, see 3140 // <http://www.gnu.org/licenses/>. 3141 3142 type X__pthread_mutex_s = struct { 3143 F__lock int32 3144 F__count uint32 3145 F__owner int32 3146 F__nusers uint32 3147 F__kind int32 3148 F__spins int16 3149 F__elision int16 3150 F__list X__pthread_list_t 3151 } /* struct_mutex.h:22:1 */ 3152 3153 // Arch-sepecific read-write lock definitions. A generic implementation is 3154 // provided by struct_rwlock.h. If required, an architecture can override it 3155 // by defining: 3156 // 3157 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 3158 // It should contain at least the internal members defined in the 3159 // generic version. 3160 // 3161 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 3162 // It should initialize the rwlock internal type. 3163 3164 // S390 internal rwlock struct definitions. 3165 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3166 // 3167 // This file is part of the GNU C Library. 3168 // 3169 // The GNU C Library is free software; you can redistribute it and/or 3170 // modify it under the terms of the GNU Lesser General Public 3171 // License as published by the Free Software Foundation; either 3172 // version 2.1 of the License, or (at your option) any later version. 3173 // 3174 // The GNU C Library is distributed in the hope that it will be useful, 3175 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3176 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3177 // Lesser General Public License for more details. 3178 // 3179 // You should have received a copy of the GNU Lesser General Public 3180 // License along with the GNU C Library; if not, see 3181 // <http://www.gnu.org/licenses/>. 3182 3183 type X__pthread_rwlock_arch_t = struct { 3184 F__readers uint32 3185 F__writers uint32 3186 F__wrphase_futex uint32 3187 F__writers_futex uint32 3188 F__pad3 uint32 3189 F__pad4 uint32 3190 F__cur_writer int32 3191 F__shared int32 3192 F__pad1 uint64 3193 F__pad2 uint64 3194 F__flags uint32 3195 F__ccgo_pad1 [4]byte 3196 } /* struct_rwlock.h:23:1 */ 3197 3198 // Common definition of pthread_cond_t. 3199 3200 type X__pthread_cond_s = struct { 3201 F__0 struct{ F__wseq uint64 } 3202 F__8 struct{ F__g1_start uint64 } 3203 F__g_refs [2]uint32 3204 F__g_size [2]uint32 3205 F__g1_orig_size uint32 3206 F__wrefs uint32 3207 F__g_signals [2]uint32 3208 } /* thread-shared-types.h:92:1 */ 3209 3210 // Thread identifiers. The structure of the attribute type is not 3211 // exposed on purpose. 3212 type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ 3213 3214 // Data structures for mutex handling. The structure of the attribute 3215 // type is not exposed on purpose. 3216 type Pthread_mutexattr_t = struct { 3217 F__ccgo_pad1 [0]uint32 3218 F__size [4]uint8 3219 } /* pthreadtypes.h:36:3 */ 3220 3221 // Data structure for condition variable handling. The structure of 3222 // the attribute type is not exposed on purpose. 3223 type Pthread_condattr_t = struct { 3224 F__ccgo_pad1 [0]uint32 3225 F__size [4]uint8 3226 } /* pthreadtypes.h:45:3 */ 3227 3228 // Keys for thread-specific data 3229 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 3230 3231 // Once-only execution 3232 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 3233 3234 type Pthread_attr_t1 = struct { 3235 F__ccgo_pad1 [0]uint64 3236 F__size [56]uint8 3237 } /* pthreadtypes.h:56:1 */ 3238 3239 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 3240 3241 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 3242 3243 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 3244 3245 // Data structure for reader-writer lock variable handling. The 3246 // structure of the attribute type is deliberately not exposed. 3247 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 3248 3249 type Pthread_rwlockattr_t = struct { 3250 F__ccgo_pad1 [0]uint64 3251 F__size [8]uint8 3252 } /* pthreadtypes.h:97:3 */ 3253 3254 // POSIX spinlock data type. 3255 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 3256 3257 // POSIX barriers data type. The structure of the type is 3258 // deliberately not exposed. 3259 type Pthread_barrier_t = struct { 3260 F__ccgo_pad1 [0]uint64 3261 F__size [32]uint8 3262 } /* pthreadtypes.h:112:3 */ 3263 3264 type Pthread_barrierattr_t = struct { 3265 F__ccgo_pad1 [0]uint32 3266 F__size [4]uint8 3267 } /* pthreadtypes.h:118:3 */ 3268 3269 // Copyright (C) 1989-2019 Free Software Foundation, Inc. 3270 // 3271 // This file is part of GCC. 3272 // 3273 // GCC is free software; you can redistribute it and/or modify 3274 // it under the terms of the GNU General Public License as published by 3275 // the Free Software Foundation; either version 3, or (at your option) 3276 // any later version. 3277 // 3278 // GCC is distributed in the hope that it will be useful, 3279 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3280 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3281 // GNU General Public License for more details. 3282 // 3283 // Under Section 7 of GPL version 3, you are granted additional 3284 // permissions described in the GCC Runtime Library Exception, version 3285 // 3.1, as published by the Free Software Foundation. 3286 // 3287 // You should have received a copy of the GNU General Public License and 3288 // a copy of the GCC Runtime Library Exception along with this program; 3289 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3290 // <http://www.gnu.org/licenses/>. 3291 3292 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 3293 3294 // Define __gnuc_va_list. 3295 3296 type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ 3297 3298 // Define the standard macros for the user, 3299 // if this invocation was from the user program. 3300 3301 // Define va_list, if desired, from __gnuc_va_list. 3302 // We deliberately do not define va_list when called from 3303 // stdio.h, because ANSI C says that stdio.h is not supposed to define 3304 // va_list. stdio.h needs to have access to that data type, 3305 // but must not use that name. It should use the name __gnuc_va_list, 3306 // which is safe because it is reserved for the implementation. 3307 3308 // The macro _VA_LIST_ is the same thing used by this file in Ultrix. 3309 // But on BSD NET2 we must not test or define or undef it. 3310 // (Note that the comments in NET 2's ansi.h 3311 // are incorrect for _VA_LIST_--see stdio.h!) 3312 // The macro _VA_LIST_DEFINED is used in Windows NT 3.5 3313 // The macro _VA_LIST is used in SCO Unix 3.2. 3314 // The macro _VA_LIST_T_H is used in the Bull dpx2 3315 // The macro __va_list__ is used by BeOS. 3316 type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */ 3317 3318 // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 3319 // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 3320 // though the former does not conform to the LFS document), but considering 3321 // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 3322 // equivalently requesting no 64-bit operations 3323 3324 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3325 // This file is part of the GNU C Library. 3326 // 3327 // The GNU C Library is free software; you can redistribute it and/or 3328 // modify it under the terms of the GNU Lesser General Public 3329 // License as published by the Free Software Foundation; either 3330 // version 2.1 of the License, or (at your option) any later version. 3331 // 3332 // The GNU C Library is distributed in the hope that it will be useful, 3333 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3334 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3335 // Lesser General Public License for more details. 3336 // 3337 // You should have received a copy of the GNU Lesser General Public 3338 // License along with the GNU C Library; if not, see 3339 // <https://www.gnu.org/licenses/>. 3340 3341 // POSIX Standard: 2.10 Symbolic Constants <unistd.h> 3342 3343 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3344 // This file is part of the GNU C Library. 3345 // 3346 // The GNU C Library is free software; you can redistribute it and/or 3347 // modify it under the terms of the GNU Lesser General Public 3348 // License as published by the Free Software Foundation; either 3349 // version 2.1 of the License, or (at your option) any later version. 3350 // 3351 // The GNU C Library is distributed in the hope that it will be useful, 3352 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3353 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3354 // Lesser General Public License for more details. 3355 // 3356 // You should have received a copy of the GNU Lesser General Public 3357 // License along with the GNU C Library; if not, see 3358 // <https://www.gnu.org/licenses/>. 3359 3360 // These may be used to determine what facilities are present at compile time. 3361 // Their values can be obtained at run time from `sysconf'. 3362 3363 // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. 3364 3365 // These are not #ifdef __USE_POSIX2 because they are 3366 // in the theoretically application-owned namespace. 3367 3368 // The utilities on GNU systems also correspond to this version. 3369 3370 // The utilities on GNU systems also correspond to this version. 3371 3372 // This symbol was required until the 2001 edition of POSIX. 3373 3374 // If defined, the implementation supports the 3375 // C Language Bindings Option. 3376 3377 // If defined, the implementation supports the 3378 // C Language Development Utilities Option. 3379 3380 // If defined, the implementation supports the 3381 // Software Development Utilities Option. 3382 3383 // If defined, the implementation supports the 3384 // creation of locales with the localedef utility. 3385 3386 // X/Open version number to which the library conforms. It is selectable. 3387 3388 // Commands and utilities from XPG4 are available. 3389 3390 // We are compatible with the old published standards as well. 3391 3392 // The X/Open Unix extensions are available. 3393 3394 // The enhanced internationalization capabilities according to XPG4.2 3395 // are present. 3396 3397 // The legacy interfaces are also available. 3398 3399 // Get values of POSIX options: 3400 // 3401 // If these symbols are defined, the corresponding features are 3402 // always available. If not, they may be available sometimes. 3403 // The current values can be obtained with `sysconf'. 3404 // 3405 // _POSIX_JOB_CONTROL Job control is supported. 3406 // _POSIX_SAVED_IDS Processes have a saved set-user-ID 3407 // and a saved set-group-ID. 3408 // _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. 3409 // _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. 3410 // _POSIX_TIMERS POSIX.4 clocks and timers are supported. 3411 // _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. 3412 // _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. 3413 // _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. 3414 // _POSIX_FSYNC The fsync function is present. 3415 // _POSIX_MAPPED_FILES Mapping of files to memory is supported. 3416 // _POSIX_MEMLOCK Locking of all memory is supported. 3417 // _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. 3418 // _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. 3419 // _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. 3420 // _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. 3421 // _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. 3422 // _POSIX_THREADS POSIX.1c pthreads are supported. 3423 // _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. 3424 // _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. 3425 // _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. 3426 // _POSIX_THREAD_PRIORITY_SCHEDULING 3427 // POSIX.1c thread execution scheduling supported. 3428 // _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. 3429 // _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. 3430 // _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. 3431 // _POSIX_PII Protocol-independent interfaces are supported. 3432 // _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. 3433 // _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. 3434 // _POSIX_PII_INTERNET Internet family of protocols supported. 3435 // _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. 3436 // _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. 3437 // _POSIX_PII_OSI ISO/OSI family of protocols supported. 3438 // _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. 3439 // _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. 3440 // _POSIX_POLL Implementation supports `poll' function. 3441 // _POSIX_SELECT Implementation supports `select' and `pselect'. 3442 // 3443 // _XOPEN_REALTIME X/Open realtime support is available. 3444 // _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. 3445 // _XOPEN_SHM Shared memory interface according to XPG4.2. 3446 // 3447 // _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit 3448 // int, long, pointer, and off_t types. 3449 // _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit 3450 // int, long, and pointer and off_t with at least 3451 // 64 bits. 3452 // _XBS5_LP64_OFF64 Implementation provides environment with 32-bit 3453 // int, and 64-bit long, pointer, and off_t types. 3454 // _XBS5_LPBIG_OFFBIG Implementation provides environment with at 3455 // least 32 bits int and long, pointer, and off_t 3456 // with at least 64 bits. 3457 // 3458 // If any of these symbols is defined as -1, the corresponding option is not 3459 // true for any file. If any is defined as other than -1, the corresponding 3460 // option is true for all files. If a symbol is not defined at all, the value 3461 // for a specific file can be obtained from `pathconf' and `fpathconf'. 3462 // 3463 // _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change 3464 // the owner of a file. `chown' can only be used 3465 // to change the group ID of a file to a group of 3466 // which the calling process is a member. 3467 // _POSIX_NO_TRUNC Pathname components longer than 3468 // NAME_MAX generate an error. 3469 // _POSIX_VDISABLE If defined, if the value of an element of the 3470 // `c_cc' member of `struct termios' is 3471 // _POSIX_VDISABLE, no character will have the 3472 // effect associated with that element. 3473 // _POSIX_SYNC_IO Synchronous I/O may be performed. 3474 // _POSIX_ASYNC_IO Asynchronous I/O may be performed. 3475 // _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. 3476 // 3477 // Support for the Large File Support interface is not generally available. 3478 // If it is available the following constants are defined to one. 3479 // _LFS64_LARGEFILE Low-level I/O supports large files. 3480 // _LFS64_STDIO Standard I/O supports large files. 3481 // 3482 3483 // Define POSIX options for Linux. 3484 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 3485 // This file is part of the GNU C Library. 3486 // 3487 // The GNU C Library is free software; you can redistribute it and/or 3488 // modify it under the terms of the GNU Lesser General Public License as 3489 // published by the Free Software Foundation; either version 2.1 of the 3490 // License, or (at your option) any later version. 3491 // 3492 // The GNU C Library is distributed in the hope that it will be useful, 3493 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3494 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3495 // Lesser General Public License for more details. 3496 // 3497 // You should have received a copy of the GNU Lesser General Public 3498 // License along with the GNU C Library; see the file COPYING.LIB. If 3499 // not, see <https://www.gnu.org/licenses/>. 3500 3501 // Job control is supported. 3502 3503 // Processes have a saved set-user-ID and a saved set-group-ID. 3504 3505 // Priority scheduling is not supported with the correct semantics, 3506 // but GNU/Linux applications expect that the corresponding interfaces 3507 // are available, even though the semantics do not meet the POSIX 3508 // requirements. See glibc bug 14829. 3509 3510 // Synchronizing file data is supported. 3511 3512 // The fsync function is present. 3513 3514 // Mapping of files to memory is supported. 3515 3516 // Locking of all memory is supported. 3517 3518 // Locking of ranges of memory is supported. 3519 3520 // Setting of memory protections is supported. 3521 3522 // Some filesystems allow all users to change file ownership. 3523 3524 // `c_cc' member of 'struct termios' structure can be disabled by 3525 // using the value _POSIX_VDISABLE. 3526 3527 // Filenames are not silently truncated. 3528 3529 // X/Open realtime support is available. 3530 3531 // X/Open thread realtime support is available. 3532 3533 // XPG4.2 shared memory is supported. 3534 3535 // Tell we have POSIX threads. 3536 3537 // We have the reentrant functions described in POSIX. 3538 3539 // We provide priority scheduling for threads. 3540 3541 // We support user-defined stack sizes. 3542 3543 // We support user-defined stacks. 3544 3545 // We support priority inheritence. 3546 3547 // We support priority protection, though only for non-robust 3548 // mutexes. 3549 3550 // We support priority inheritence for robust mutexes. 3551 3552 // We do not support priority protection for robust mutexes. 3553 3554 // We support POSIX.1b semaphores. 3555 3556 // Real-time signals are supported. 3557 3558 // We support asynchronous I/O. 3559 // Alternative name for Unix98. 3560 // Support for prioritization is also available. 3561 3562 // The LFS support in asynchronous I/O is also available. 3563 3564 // The rest of the LFS is also available. 3565 3566 // POSIX shared memory objects are implemented. 3567 3568 // CPU-time clocks support needs to be checked at runtime. 3569 3570 // Clock support in threads must be also checked at runtime. 3571 3572 // GNU libc provides regular expression handling. 3573 3574 // Reader/Writer locks are available. 3575 3576 // We have a POSIX shell. 3577 3578 // We support the Timeouts option. 3579 3580 // We support spinlocks. 3581 3582 // The `spawn' function family is supported. 3583 3584 // We have POSIX timers. 3585 3586 // The barrier functions are available. 3587 3588 // POSIX message queues are available. 3589 3590 // Thread process-shared synchronization is supported. 3591 3592 // The monotonic clock might be available. 3593 3594 // The clock selection interfaces are available. 3595 3596 // Advisory information interfaces are available. 3597 3598 // IPv6 support is available. 3599 3600 // Raw socket support is available. 3601 3602 // We have at least one terminal. 3603 3604 // Neither process nor thread sporadic server interfaces is available. 3605 3606 // trace.h is not available. 3607 3608 // Typed memory objects are not available. 3609 3610 // Get the environment definitions from Unix98. 3611 // Copyright (C) 1999-2020 Free Software Foundation, Inc. 3612 // This file is part of the GNU C Library. 3613 // 3614 // The GNU C Library is free software; you can redistribute it and/or 3615 // modify it under the terms of the GNU Lesser General Public 3616 // License as published by the Free Software Foundation; either 3617 // version 2.1 of the License, or (at your option) any later version. 3618 // 3619 // The GNU C Library is distributed in the hope that it will be useful, 3620 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3621 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3622 // Lesser General Public License for more details. 3623 // 3624 // You should have received a copy of the GNU Lesser General Public 3625 // License along with the GNU C Library; if not, see 3626 // <https://www.gnu.org/licenses/>. 3627 3628 // Determine the wordsize from the preprocessor defines. 3629 3630 // This header should define the following symbols under the described 3631 // situations. A value `1' means that the model is always supported, 3632 // `-1' means it is never supported. Undefined means it cannot be 3633 // statically decided. 3634 // 3635 // _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type 3636 // _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type 3637 // 3638 // _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type 3639 // _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type 3640 // 3641 // The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, 3642 // _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, 3643 // _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were 3644 // used in previous versions of the Unix standard and are available 3645 // only for compatibility. 3646 3647 // Environments with 32-bit wide pointers are optionally provided. 3648 // Therefore following macros aren't defined: 3649 // # undef _POSIX_V7_ILP32_OFF32 3650 // # undef _POSIX_V7_ILP32_OFFBIG 3651 // # undef _POSIX_V6_ILP32_OFF32 3652 // # undef _POSIX_V6_ILP32_OFFBIG 3653 // # undef _XBS5_ILP32_OFF32 3654 // # undef _XBS5_ILP32_OFFBIG 3655 // and users need to check at runtime. 3656 3657 // We also have no use (for now) for an environment with bigger pointers 3658 // and offsets. 3659 3660 // By default we have 64-bit wide `long int', pointers and `off_t'. 3661 3662 // Standard file descriptors. 3663 3664 // All functions that are not declared anywhere else. 3665 3666 // bits/types.h -- definitions of __*_t types underlying *_t types. 3667 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3668 // This file is part of the GNU C Library. 3669 // 3670 // The GNU C Library is free software; you can redistribute it and/or 3671 // modify it under the terms of the GNU Lesser General Public 3672 // License as published by the Free Software Foundation; either 3673 // version 2.1 of the License, or (at your option) any later version. 3674 // 3675 // The GNU C Library is distributed in the hope that it will be useful, 3676 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3677 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3678 // Lesser General Public License for more details. 3679 // 3680 // You should have received a copy of the GNU Lesser General Public 3681 // License along with the GNU C Library; if not, see 3682 // <https://www.gnu.org/licenses/>. 3683 3684 // Never include this file directly; use <sys/types.h> instead. 3685 3686 // Copyright (C) 1989-2019 Free Software Foundation, Inc. 3687 // 3688 // This file is part of GCC. 3689 // 3690 // GCC is free software; you can redistribute it and/or modify 3691 // it under the terms of the GNU General Public License as published by 3692 // the Free Software Foundation; either version 3, or (at your option) 3693 // any later version. 3694 // 3695 // GCC is distributed in the hope that it will be useful, 3696 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3697 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3698 // GNU General Public License for more details. 3699 // 3700 // Under Section 7 of GPL version 3, you are granted additional 3701 // permissions described in the GCC Runtime Library Exception, version 3702 // 3.1, as published by the Free Software Foundation. 3703 // 3704 // You should have received a copy of the GNU General Public License and 3705 // a copy of the GCC Runtime Library Exception along with this program; 3706 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3707 // <http://www.gnu.org/licenses/>. 3708 3709 // ISO C Standard: 7.17 Common definitions <stddef.h> 3710 3711 // Any one of these symbols __need_* means that GNU libc 3712 // wants us just to define one data type. So don't define 3713 // the symbols that indicate this file's entire job has been done. 3714 3715 // This avoids lossage on SunOS but only if stdtypes.h comes first. 3716 // There's no way to win with the other order! Sun lossage. 3717 3718 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 3719 // Just ignore it. 3720 3721 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 3722 // _TYPE_size_t which will typedef size_t. fixincludes patched the 3723 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 3724 // not defined, and so that defining this macro defines _GCC_SIZE_T. 3725 // If we find that the macros are still defined at this point, we must 3726 // invoke them so that the type is defined as expected. 3727 3728 // In case nobody has defined these types, but we aren't running under 3729 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 3730 // __WCHAR_TYPE__ have reasonable values. This can happen if the 3731 // parts of GCC is compiled by an older compiler, that actually 3732 // include gstddef.h, such as collect2. 3733 3734 // Signed type of difference of two pointers. 3735 3736 // Define this type if we are doing the whole job, 3737 // or if we want this type in particular. 3738 3739 // If this symbol has done its job, get rid of it. 3740 3741 // Unsigned type of `sizeof' something. 3742 3743 // Define this type if we are doing the whole job, 3744 // or if we want this type in particular. 3745 3746 // Wide character type. 3747 // Locale-writers should change this as necessary to 3748 // be big enough to hold unique values not between 0 and 127, 3749 // and not (wchar_t) -1, for each defined multibyte character. 3750 3751 // Define this type if we are doing the whole job, 3752 // or if we want this type in particular. 3753 3754 // A null pointer constant. 3755 3756 // Offset of member MEMBER in a struct of type TYPE. 3757 3758 // The Single Unix specification says that some more types are 3759 // available here. 3760 3761 type Useconds_t = X__useconds_t /* unistd.h:255:22 */ 3762 3763 type Intptr_t = X__intptr_t /* unistd.h:267:20 */ 3764 3765 type Socklen_t = X__socklen_t /* unistd.h:274:21 */ 3766 3767 // Define some macros helping to catch buffer overflows. 3768 3769 // System-specific extensions. 3770 // System-specific extensions of <unistd.h>, Linux version. 3771 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3772 // This file is part of the GNU C Library. 3773 // 3774 // The GNU C Library is free software; you can redistribute it and/or 3775 // modify it under the terms of the GNU Lesser General Public 3776 // License as published by the Free Software Foundation; either 3777 // version 2.1 of the License, or (at your option) any later version. 3778 // 3779 // The GNU C Library is distributed in the hope that it will be useful, 3780 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3781 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3782 // Lesser General Public License for more details. 3783 // 3784 // You should have received a copy of the GNU Lesser General Public 3785 // License along with the GNU C Library; if not, see 3786 // <https://www.gnu.org/licenses/>. 3787 3788 // MVS linker does not support external names larger than 8 bytes 3789 3790 // 3791 // The 'zlib' compression library provides in-memory compression and 3792 // decompression functions, including integrity checks of the uncompressed data. 3793 // This version of the library supports only one compression method (deflation) 3794 // but other algorithms will be added later and will have the same stream 3795 // interface. 3796 // 3797 // Compression can be done in a single step if the buffers are large enough, 3798 // or can be done by repeated calls of the compression function. In the latter 3799 // case, the application must provide more input and/or consume the output 3800 // (providing more output space) before each call. 3801 // 3802 // The compressed data format used by default by the in-memory functions is 3803 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 3804 // around a deflate stream, which is itself documented in RFC 1951. 3805 // 3806 // The library also supports reading and writing files in gzip (.gz) format 3807 // with an interface similar to that of stdio using the functions that start 3808 // with "gz". The gzip format is different from the zlib format. gzip is a 3809 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 3810 // 3811 // This library can optionally read and write gzip and raw deflate streams in 3812 // memory as well. 3813 // 3814 // The zlib format was designed to be compact and fast for use in memory 3815 // and on communications channels. The gzip format was designed for single- 3816 // file compression on file systems, has a larger header than zlib to maintain 3817 // directory information, and uses a different, slower check method than zlib. 3818 // 3819 // The library does not install any signal handler. The decoder checks 3820 // the consistency of the compressed data, so the library should never crash 3821 // even in the case of corrupted input. 3822 3823 type Alloc_func = uintptr /* zlib.h:81:16 */ 3824 type Free_func = uintptr /* zlib.h:82:16 */ 3825 3826 type Internal_state = struct { 3827 Fstrm Z_streamp 3828 Fstatus int32 3829 F__ccgo_pad1 [4]byte 3830 Fpending_buf uintptr 3831 Fpending_buf_size Ulg 3832 Fpending_out uintptr 3833 Fpending Ulg 3834 Fwrap int32 3835 F__ccgo_pad2 [4]byte 3836 Fgzhead Gz_headerp 3837 Fgzindex Ulg 3838 Fmethod Byte 3839 F__ccgo_pad3 [3]byte 3840 Flast_flush int32 3841 Fw_size UInt 3842 Fw_bits UInt 3843 Fw_mask UInt 3844 F__ccgo_pad4 [4]byte 3845 Fwindow uintptr 3846 Fwindow_size Ulg 3847 Fprev uintptr 3848 Fhead uintptr 3849 Fins_h UInt 3850 Fhash_size UInt 3851 Fhash_bits UInt 3852 Fhash_mask UInt 3853 Fhash_shift UInt 3854 F__ccgo_pad5 [4]byte 3855 Fblock_start int64 3856 Fmatch_length UInt 3857 Fprev_match IPos 3858 Fmatch_available int32 3859 Fstrstart UInt 3860 Fmatch_start UInt 3861 Flookahead UInt 3862 Fprev_length UInt 3863 Fmax_chain_length UInt 3864 Fmax_lazy_match UInt 3865 Flevel int32 3866 Fstrategy int32 3867 Fgood_match UInt 3868 Fnice_match int32 3869 Fdyn_ltree [573]struct { 3870 Ffc struct{ Ffreq Ush } 3871 Fdl struct{ Fdad Ush } 3872 } 3873 Fdyn_dtree [61]struct { 3874 Ffc struct{ Ffreq Ush } 3875 Fdl struct{ Fdad Ush } 3876 } 3877 Fbl_tree [39]struct { 3878 Ffc struct{ Ffreq Ush } 3879 Fdl struct{ Fdad Ush } 3880 } 3881 Fl_desc struct { 3882 Fdyn_tree uintptr 3883 Fmax_code int32 3884 F__ccgo_pad1 [4]byte 3885 Fstat_desc uintptr 3886 } 3887 Fd_desc struct { 3888 Fdyn_tree uintptr 3889 Fmax_code int32 3890 F__ccgo_pad1 [4]byte 3891 Fstat_desc uintptr 3892 } 3893 Fbl_desc struct { 3894 Fdyn_tree uintptr 3895 Fmax_code int32 3896 F__ccgo_pad1 [4]byte 3897 Fstat_desc uintptr 3898 } 3899 Fbl_count [16]Ush 3900 Fheap [573]int32 3901 Fheap_len int32 3902 Fheap_max int32 3903 Fdepth [573]Uch 3904 F__ccgo_pad6 [7]byte 3905 Fl_buf uintptr 3906 Flit_bufsize UInt 3907 Flast_lit UInt 3908 Fd_buf uintptr 3909 Fopt_len Ulg 3910 Fstatic_len Ulg 3911 Fmatches UInt 3912 Finsert UInt 3913 Fbi_buf Ush 3914 F__ccgo_pad7 [2]byte 3915 Fbi_valid int32 3916 Fhigh_water Ulg 3917 } /* zlib.h:84:1 */ 3918 3919 type Z_stream_s = struct { 3920 Fnext_in uintptr 3921 Favail_in UInt 3922 F__ccgo_pad1 [4]byte 3923 Ftotal_in ULong 3924 Fnext_out uintptr 3925 Favail_out UInt 3926 F__ccgo_pad2 [4]byte 3927 Ftotal_out ULong 3928 Fmsg uintptr 3929 Fstate uintptr 3930 Fzalloc Alloc_func 3931 Fzfree Free_func 3932 Fopaque Voidpf 3933 Fdata_type int32 3934 F__ccgo_pad3 [4]byte 3935 Fadler ULong 3936 Freserved ULong 3937 } /* zlib.h:86:9 */ 3938 3939 type Z_stream = Z_stream_s /* zlib.h:106:3 */ 3940 3941 type Z_streamp = uintptr /* zlib.h:108:22 */ 3942 3943 // 3944 // gzip header information passed to and from zlib routines. See RFC 1952 3945 // for more details on the meanings of these fields. 3946 type Gz_header_s = struct { 3947 Ftext int32 3948 F__ccgo_pad1 [4]byte 3949 Ftime ULong 3950 Fxflags int32 3951 Fos int32 3952 Fextra uintptr 3953 Fextra_len UInt 3954 Fextra_max UInt 3955 Fname uintptr 3956 Fname_max UInt 3957 F__ccgo_pad2 [4]byte 3958 Fcomment uintptr 3959 Fcomm_max UInt 3960 Fhcrc int32 3961 Fdone int32 3962 F__ccgo_pad3 [4]byte 3963 } /* zlib.h:114:9 */ 3964 3965 // 3966 // gzip header information passed to and from zlib routines. See RFC 1952 3967 // for more details on the meanings of these fields. 3968 type Gz_header = Gz_header_s /* zlib.h:129:3 */ 3969 3970 type Gz_headerp = uintptr /* zlib.h:131:23 */ 3971 // 3972 // inflateGetHeader() requests that gzip header information be stored in the 3973 // provided gz_header structure. inflateGetHeader() may be called after 3974 // inflateInit2() or inflateReset(), and before the first call of inflate(). 3975 // As inflate() processes the gzip stream, head->done is zero until the header 3976 // is completed, at which time head->done is set to one. If a zlib stream is 3977 // being decoded, then head->done is set to -1 to indicate that there will be 3978 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 3979 // used to force inflate() to return immediately after header processing is 3980 // complete and before any actual data is decompressed. 3981 // 3982 // The text, time, xflags, and os fields are filled in with the gzip header 3983 // contents. hcrc is set to true if there is a header CRC. (The header CRC 3984 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 3985 // contains the maximum number of bytes to write to extra. Once done is true, 3986 // extra_len contains the actual extra field length, and extra contains the 3987 // extra field, or that field truncated if extra_max is less than extra_len. 3988 // If name is not Z_NULL, then up to name_max characters are written there, 3989 // terminated with a zero unless the length is greater than name_max. If 3990 // comment is not Z_NULL, then up to comm_max characters are written there, 3991 // terminated with a zero unless the length is greater than comm_max. When any 3992 // of extra, name, or comment are not Z_NULL and the respective field is not 3993 // present in the header, then that field is set to Z_NULL to signal its 3994 // absence. This allows the use of deflateSetHeader() with the returned 3995 // structure to duplicate the header. However if those fields are set to 3996 // allocated memory, then the application will need to save those pointers 3997 // elsewhere so that they can be eventually freed. 3998 // 3999 // If inflateGetHeader is not used, then the header information is simply 4000 // discarded. The header is always checked for validity, including the header 4001 // CRC if present. inflateReset() will reset the process to discard the header 4002 // information. The application would need to call inflateGetHeader() again to 4003 // retrieve the header from the next gzip stream. 4004 // 4005 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 4006 // stream state was inconsistent. 4007 4008 // 4009 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 4010 // unsigned char FAR *window)); 4011 // 4012 // Initialize the internal stream state for decompression using inflateBack() 4013 // calls. The fields zalloc, zfree and opaque in strm must be initialized 4014 // before the call. If zalloc and zfree are Z_NULL, then the default library- 4015 // derived memory allocation routines are used. windowBits is the base two 4016 // logarithm of the window size, in the range 8..15. window is a caller 4017 // supplied buffer of that size. Except for special applications where it is 4018 // assured that deflate was used with small window sizes, windowBits must be 15 4019 // and a 32K byte window must be supplied to be able to decompress general 4020 // deflate streams. 4021 // 4022 // See inflateBack() for the usage of these routines. 4023 // 4024 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 4025 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 4026 // allocated, or Z_VERSION_ERROR if the version of the library does not match 4027 // the version of the header file. 4028 4029 type In_func = uintptr /* zlib.h:1092:18 */ 4030 type Out_func = uintptr /* zlib.h:1094:13 */ 4031 // 4032 // Same as uncompress, except that sourceLen is a pointer, where the 4033 // length of the source is *sourceLen. On return, *sourceLen is the number of 4034 // source bytes consumed. 4035 4036 // gzip file access functions 4037 4038 // 4039 // This library supports reading and writing files in gzip (.gz) format with 4040 // an interface similar to that of stdio, using the functions that start with 4041 // "gz". The gzip format is different from the zlib format. gzip is a gzip 4042 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 4043 4044 type GzFile_s = struct { 4045 Fhave uint32 4046 F__ccgo_pad1 [4]byte 4047 Fnext uintptr 4048 Fpos Off64_t 4049 } /* zlib.h:1300:9 */ 4050 4051 // 4052 // Same as uncompress, except that sourceLen is a pointer, where the 4053 // length of the source is *sourceLen. On return, *sourceLen is the number of 4054 // source bytes consumed. 4055 4056 // gzip file access functions 4057 4058 // 4059 // This library supports reading and writing files in gzip (.gz) format with 4060 // an interface similar to that of stdio, using the functions that start with 4061 // "gz". The gzip format is different from the zlib format. gzip is a gzip 4062 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 4063 4064 type GzFile = uintptr /* zlib.h:1300:25 */ 4065 4066 // POSIX.1-2008 extended locale interface (see locale.h). 4067 // Definition of locale_t. 4068 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4069 // This file is part of the GNU C Library. 4070 // 4071 // The GNU C Library is free software; you can redistribute it and/or 4072 // modify it under the terms of the GNU Lesser General Public 4073 // License as published by the Free Software Foundation; either 4074 // version 2.1 of the License, or (at your option) any later version. 4075 // 4076 // The GNU C Library is distributed in the hope that it will be useful, 4077 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4078 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4079 // Lesser General Public License for more details. 4080 // 4081 // You should have received a copy of the GNU Lesser General Public 4082 // License along with the GNU C Library; if not, see 4083 // <https://www.gnu.org/licenses/>. 4084 4085 // Definition of struct __locale_struct and __locale_t. 4086 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 4087 // This file is part of the GNU C Library. 4088 // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 4089 // 4090 // The GNU C Library is free software; you can redistribute it and/or 4091 // modify it under the terms of the GNU Lesser General Public 4092 // License as published by the Free Software Foundation; either 4093 // version 2.1 of the License, or (at your option) any later version. 4094 // 4095 // The GNU C Library is distributed in the hope that it will be useful, 4096 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4097 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4098 // Lesser General Public License for more details. 4099 // 4100 // You should have received a copy of the GNU Lesser General Public 4101 // License along with the GNU C Library; if not, see 4102 // <https://www.gnu.org/licenses/>. 4103 4104 // POSIX.1-2008: the locale_t type, representing a locale context 4105 // (implementation-namespace version). This type should be treated 4106 // as opaque by applications; some details are exposed for the sake of 4107 // efficiency in e.g. ctype functions. 4108 4109 type X__locale_struct = struct { 4110 F__locales [13]uintptr 4111 F__ctype_b uintptr 4112 F__ctype_tolower uintptr 4113 F__ctype_toupper uintptr 4114 F__names [13]uintptr 4115 } /* __locale_t.h:28:1 */ 4116 4117 type X__locale_t = uintptr /* __locale_t.h:42:32 */ 4118 4119 type Locale_t = X__locale_t /* locale_t.h:24:20 */ 4120 4121 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4122 // This file is part of the GNU C Library. 4123 // 4124 // The GNU C Library is free software; you can redistribute it and/or 4125 // modify it under the terms of the GNU Lesser General Public 4126 // License as published by the Free Software Foundation; either 4127 // version 2.1 of the License, or (at your option) any later version. 4128 // 4129 // The GNU C Library is distributed in the hope that it will be useful, 4130 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4131 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4132 // Lesser General Public License for more details. 4133 // 4134 // You should have received a copy of the GNU Lesser General Public 4135 // License along with the GNU C Library; if not, see 4136 // <https://www.gnu.org/licenses/>. 4137 4138 // ISO C99 Standard: 7.20 General utilities <stdlib.h> 4139 4140 // Handle feature test macros at the start of a header. 4141 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4142 // This file is part of the GNU C Library. 4143 // 4144 // The GNU C Library is free software; you can redistribute it and/or 4145 // modify it under the terms of the GNU Lesser General Public 4146 // License as published by the Free Software Foundation; either 4147 // version 2.1 of the License, or (at your option) any later version. 4148 // 4149 // The GNU C Library is distributed in the hope that it will be useful, 4150 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4151 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4152 // Lesser General Public License for more details. 4153 // 4154 // You should have received a copy of the GNU Lesser General Public 4155 // License along with the GNU C Library; if not, see 4156 // <https://www.gnu.org/licenses/>. 4157 4158 // This header is internal to glibc and should not be included outside 4159 // of glibc headers. Headers including it must define 4160 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 4161 // cannot have multiple include guards because ISO C feature test 4162 // macros depend on the definition of the macro when an affected 4163 // header is included, not when the first system header is 4164 // included. 4165 4166 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4167 // This file is part of the GNU C Library. 4168 // 4169 // The GNU C Library is free software; you can redistribute it and/or 4170 // modify it under the terms of the GNU Lesser General Public 4171 // License as published by the Free Software Foundation; either 4172 // version 2.1 of the License, or (at your option) any later version. 4173 // 4174 // The GNU C Library is distributed in the hope that it will be useful, 4175 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4176 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4177 // Lesser General Public License for more details. 4178 // 4179 // You should have received a copy of the GNU Lesser General Public 4180 // License along with the GNU C Library; if not, see 4181 // <https://www.gnu.org/licenses/>. 4182 4183 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 4184 // macro. 4185 4186 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 4187 // macro. Most but not all symbols enabled by that macro in TS 4188 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 4189 // still require that macro in C2X. 4190 4191 // ISO/IEC TS 18661-4:2015 defines the 4192 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 4193 // functions, the symbols from this TS are enabled unconditionally in 4194 // C2X. 4195 4196 // ISO/IEC TS 18661-3:2015 defines the 4197 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 4198 4199 // Get size_t, wchar_t and NULL from <stddef.h>. 4200 // Copyright (C) 1989-2019 Free Software Foundation, Inc. 4201 // 4202 // This file is part of GCC. 4203 // 4204 // GCC is free software; you can redistribute it and/or modify 4205 // it under the terms of the GNU General Public License as published by 4206 // the Free Software Foundation; either version 3, or (at your option) 4207 // any later version. 4208 // 4209 // GCC is distributed in the hope that it will be useful, 4210 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4211 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4212 // GNU General Public License for more details. 4213 // 4214 // Under Section 7 of GPL version 3, you are granted additional 4215 // permissions described in the GCC Runtime Library Exception, version 4216 // 3.1, as published by the Free Software Foundation. 4217 // 4218 // You should have received a copy of the GNU General Public License and 4219 // a copy of the GCC Runtime Library Exception along with this program; 4220 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 4221 // <http://www.gnu.org/licenses/>. 4222 4223 // ISO C Standard: 7.17 Common definitions <stddef.h> 4224 4225 // Any one of these symbols __need_* means that GNU libc 4226 // wants us just to define one data type. So don't define 4227 // the symbols that indicate this file's entire job has been done. 4228 4229 // This avoids lossage on SunOS but only if stdtypes.h comes first. 4230 // There's no way to win with the other order! Sun lossage. 4231 4232 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 4233 // Just ignore it. 4234 4235 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 4236 // _TYPE_size_t which will typedef size_t. fixincludes patched the 4237 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 4238 // not defined, and so that defining this macro defines _GCC_SIZE_T. 4239 // If we find that the macros are still defined at this point, we must 4240 // invoke them so that the type is defined as expected. 4241 4242 // In case nobody has defined these types, but we aren't running under 4243 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 4244 // __WCHAR_TYPE__ have reasonable values. This can happen if the 4245 // parts of GCC is compiled by an older compiler, that actually 4246 // include gstddef.h, such as collect2. 4247 4248 // Signed type of difference of two pointers. 4249 4250 // Define this type if we are doing the whole job, 4251 // or if we want this type in particular. 4252 4253 // If this symbol has done its job, get rid of it. 4254 4255 // Unsigned type of `sizeof' something. 4256 4257 // Define this type if we are doing the whole job, 4258 // or if we want this type in particular. 4259 4260 // Wide character type. 4261 // Locale-writers should change this as necessary to 4262 // be big enough to hold unique values not between 0 and 127, 4263 // and not (wchar_t) -1, for each defined multibyte character. 4264 4265 // Define this type if we are doing the whole job, 4266 // or if we want this type in particular. 4267 4268 // A null pointer constant. 4269 4270 // Offset of member MEMBER in a struct of type TYPE. 4271 4272 // XPG requires a few symbols from <sys/wait.h> being defined. 4273 // Definitions of flag bits for `waitpid' et al. 4274 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 4275 // This file is part of the GNU C Library. 4276 // 4277 // The GNU C Library is free software; you can redistribute it and/or 4278 // modify it under the terms of the GNU Lesser General Public 4279 // License as published by the Free Software Foundation; either 4280 // version 2.1 of the License, or (at your option) any later version. 4281 // 4282 // The GNU C Library is distributed in the hope that it will be useful, 4283 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4284 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4285 // Lesser General Public License for more details. 4286 // 4287 // You should have received a copy of the GNU Lesser General Public 4288 // License along with the GNU C Library; if not, see 4289 // <https://www.gnu.org/licenses/>. 4290 4291 // Bits in the third argument to `waitpid'. 4292 4293 // Bits in the fourth argument to `waitid'. 4294 4295 // The following values are used by the `waitid' function. 4296 4297 // The Linux kernel defines these bare, rather than an enum, 4298 // which causes a conflict if the include order is reversed. 4299 4300 type Idtype_t = uint32 /* waitflags.h:57:3 */ 4301 // Definitions of status bits for `wait' et al. 4302 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 4303 // This file is part of the GNU C Library. 4304 // 4305 // The GNU C Library is free software; you can redistribute it and/or 4306 // modify it under the terms of the GNU Lesser General Public 4307 // License as published by the Free Software Foundation; either 4308 // version 2.1 of the License, or (at your option) any later version. 4309 // 4310 // The GNU C Library is distributed in the hope that it will be useful, 4311 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4312 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4313 // Lesser General Public License for more details. 4314 // 4315 // You should have received a copy of the GNU Lesser General Public 4316 // License along with the GNU C Library; if not, see 4317 // <https://www.gnu.org/licenses/>. 4318 4319 // Everything extant so far uses these same bits. 4320 4321 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 4322 4323 // If WIFSIGNALED(STATUS), the terminating signal. 4324 4325 // If WIFSTOPPED(STATUS), the signal that stopped the child. 4326 4327 // Nonzero if STATUS indicates normal termination. 4328 4329 // Nonzero if STATUS indicates termination by a signal. 4330 4331 // Nonzero if STATUS indicates the child is stopped. 4332 4333 // Nonzero if STATUS indicates the child continued after a stop. We only 4334 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 4335 4336 // Nonzero if STATUS indicates the child dumped core. 4337 4338 // Macros for constructing status values. 4339 4340 // Define the macros <sys/wait.h> also would define this way. 4341 4342 // _FloatN API tests for enablement. 4343 // Macros to control TS 18661-3 glibc features on ldbl-128 platforms. 4344 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4345 // This file is part of the GNU C Library. 4346 // 4347 // The GNU C Library is free software; you can redistribute it and/or 4348 // modify it under the terms of the GNU Lesser General Public 4349 // License as published by the Free Software Foundation; either 4350 // version 2.1 of the License, or (at your option) any later version. 4351 // 4352 // The GNU C Library is distributed in the hope that it will be useful, 4353 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4354 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4355 // Lesser General Public License for more details. 4356 // 4357 // You should have received a copy of the GNU Lesser General Public 4358 // License along with the GNU C Library; if not, see 4359 // <https://www.gnu.org/licenses/>. 4360 4361 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4362 // This file is part of the GNU C Library. 4363 // 4364 // The GNU C Library is free software; you can redistribute it and/or 4365 // modify it under the terms of the GNU Lesser General Public 4366 // License as published by the Free Software Foundation; either 4367 // version 2.1 of the License, or (at your option) any later version. 4368 // 4369 // The GNU C Library is distributed in the hope that it will be useful, 4370 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4371 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4372 // Lesser General Public License for more details. 4373 // 4374 // You should have received a copy of the GNU Lesser General Public 4375 // License along with the GNU C Library; if not, see 4376 // <https://www.gnu.org/licenses/>. 4377 4378 // Properties of long double type. ldbl-opt version. 4379 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4380 // This file is part of the GNU C Library. 4381 // 4382 // The GNU C Library is free software; you can redistribute it and/or 4383 // modify it under the terms of the GNU Lesser General Public 4384 // License published by the Free Software Foundation; either 4385 // version 2.1 of the License, or (at your option) any later version. 4386 // 4387 // The GNU C Library is distributed in the hope that it will be useful, 4388 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4389 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4390 // Lesser General Public License for more details. 4391 // 4392 // You should have received a copy of the GNU Lesser General Public 4393 // License along with the GNU C Library; if not, see 4394 // <https://www.gnu.org/licenses/>. 4395 4396 // Defined to 1 if the current compiler invocation provides a 4397 // floating-point type with the IEEE 754 binary128 format, and this 4398 // glibc includes corresponding *f128 interfaces for it. 4399 4400 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 4401 // from the default float, double and long double types in this glibc. 4402 4403 // Defined to 1 if the current compiler invocation provides a 4404 // floating-point type with the right format for _Float64x, and this 4405 // glibc includes corresponding *f64x interfaces for it. 4406 4407 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 4408 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 4409 // the format of _Float128, which must be different from that of long 4410 // double. 4411 4412 // Defined to concatenate the literal suffix to be used with _Float128 4413 // types, if __HAVE_FLOAT128 is 1. 4414 4415 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 4416 4417 // The remaining of this file provides support for older compilers. 4418 4419 // The type _Float128 exists only since GCC 7.0. 4420 4421 // Various built-in functions do not exist before GCC 7.0. 4422 4423 // Macros to control TS 18661-3 glibc features where the same 4424 // definitions are appropriate for all platforms. 4425 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 4426 // This file is part of the GNU C Library. 4427 // 4428 // The GNU C Library is free software; you can redistribute it and/or 4429 // modify it under the terms of the GNU Lesser General Public 4430 // License as published by the Free Software Foundation; either 4431 // version 2.1 of the License, or (at your option) any later version. 4432 // 4433 // The GNU C Library is distributed in the hope that it will be useful, 4434 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4435 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4436 // Lesser General Public License for more details. 4437 // 4438 // You should have received a copy of the GNU Lesser General Public 4439 // License along with the GNU C Library; if not, see 4440 // <https://www.gnu.org/licenses/>. 4441 4442 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4443 // This file is part of the GNU C Library. 4444 // 4445 // The GNU C Library is free software; you can redistribute it and/or 4446 // modify it under the terms of the GNU Lesser General Public 4447 // License as published by the Free Software Foundation; either 4448 // version 2.1 of the License, or (at your option) any later version. 4449 // 4450 // The GNU C Library is distributed in the hope that it will be useful, 4451 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4452 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4453 // Lesser General Public License for more details. 4454 // 4455 // You should have received a copy of the GNU Lesser General Public 4456 // License along with the GNU C Library; if not, see 4457 // <https://www.gnu.org/licenses/>. 4458 4459 // Properties of long double type. ldbl-opt version. 4460 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 4461 // This file is part of the GNU C Library. 4462 // 4463 // The GNU C Library is free software; you can redistribute it and/or 4464 // modify it under the terms of the GNU Lesser General Public 4465 // License published by the Free Software Foundation; either 4466 // version 2.1 of the License, or (at your option) any later version. 4467 // 4468 // The GNU C Library is distributed in the hope that it will be useful, 4469 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4470 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4471 // Lesser General Public License for more details. 4472 // 4473 // You should have received a copy of the GNU Lesser General Public 4474 // License along with the GNU C Library; if not, see 4475 // <https://www.gnu.org/licenses/>. 4476 4477 // This header should be included at the bottom of each bits/floatn.h. 4478 // It defines the following macros for each _FloatN and _FloatNx type, 4479 // where the same definitions, or definitions based only on the macros 4480 // in bits/floatn.h, are appropriate for all glibc configurations. 4481 4482 // Defined to 1 if the current compiler invocation provides a 4483 // floating-point type with the right format for this type, and this 4484 // glibc includes corresponding *fN or *fNx interfaces for it. 4485 4486 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 4487 // type is the first with its format in the sequence of (the default 4488 // choices for) float, double, long double, _Float16, _Float32, 4489 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 4490 // glibc; that is, if functions present once per floating-point format 4491 // rather than once per type are present for this type. 4492 // 4493 // All configurations supported by glibc have _Float32 the same format 4494 // as float, _Float64 and _Float32x the same format as double, the 4495 // _Float64x the same format as either long double or _Float128. No 4496 // configurations support _Float128x or, as of GCC 7, have compiler 4497 // support for a type meeting the requirements for _Float128x. 4498 4499 // Defined to 1 if the corresponding _FloatN type is not binary compatible 4500 // with the corresponding ISO C type in the current compilation unit as 4501 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 4502 // in glibc. 4503 4504 // Defined to 1 if any _FloatN or _FloatNx types that are not 4505 // ABI-distinct are however distinct types at the C language level (so 4506 // for the purposes of __builtin_types_compatible_p and _Generic). 4507 4508 // Defined to concatenate the literal suffix to be used with _FloatN 4509 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 4510 // literal suffixes exist since GCC 7, for C only. 4511 4512 // Defined to a complex type if __HAVE_<type> is 1. 4513 4514 // The remaining of this file provides support for older compilers. 4515 4516 // If double, long double and _Float64 all have the same set of 4517 // values, TS 18661-3 requires the usual arithmetic conversions on 4518 // long double and _Float64 to produce _Float64. For this to be the 4519 // case when building with a compiler without a distinct _Float64 4520 // type, _Float64 must be a typedef for long double, not for 4521 // double. 4522 4523 // Returned by `div'. 4524 type Div_t = struct { 4525 Fquot int32 4526 Frem int32 4527 } /* stdlib.h:62:5 */ 4528 4529 // Returned by `ldiv'. 4530 type Ldiv_t = struct { 4531 Fquot int64 4532 Frem int64 4533 } /* stdlib.h:70:5 */ 4534 4535 // Returned by `lldiv'. 4536 type Lldiv_t = struct { 4537 Fquot int64 4538 Frem int64 4539 } /* stdlib.h:80:5 */ 4540 4541 // Reentrant versions of the `random' family of functions. 4542 // These functions all use the following data structure to contain 4543 // state, rather than global state variables. 4544 4545 type Random_data = struct { 4546 Ffptr uintptr 4547 Frptr uintptr 4548 Fstate uintptr 4549 Frand_type int32 4550 Frand_deg int32 4551 Frand_sep int32 4552 F__ccgo_pad1 [4]byte 4553 Fend_ptr uintptr 4554 } /* stdlib.h:423:1 */ 4555 4556 // Data structure for communication with thread safe versions. This 4557 // type is to be regarded as opaque. It's only exported because users 4558 // have to allocate objects of this type. 4559 type Drand48_data = struct { 4560 F__x [3]uint16 4561 F__old_x [3]uint16 4562 F__c uint16 4563 F__init uint16 4564 F__a uint64 4565 } /* stdlib.h:490:1 */ 4566 4567 // Shorthand for type of comparison functions. 4568 type X__compar_fn_t = uintptr /* stdlib.h:808:13 */ 4569 4570 // Floating-point inline functions for stdlib.h. 4571 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 4572 // This file is part of the GNU C Library. 4573 // 4574 // The GNU C Library is free software; you can redistribute it and/or 4575 // modify it under the terms of the GNU Lesser General Public 4576 // License as published by the Free Software Foundation; either 4577 // version 2.1 of the License, or (at your option) any later version. 4578 // 4579 // The GNU C Library is distributed in the hope that it will be useful, 4580 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4581 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4582 // Lesser General Public License for more details. 4583 // 4584 // You should have received a copy of the GNU Lesser General Public 4585 // License along with the GNU C Library; if not, see 4586 // <https://www.gnu.org/licenses/>. 4587 4588 // Define some macros helping to catch buffer overflows. 4589 4590 // since "static" is used to mean two completely different things in C, we 4591 // define "local" for the non-static meaning of "static", for readability 4592 // (compile with -Dlocal if your debugger can't find static symbols) 4593 4594 type Uch = uint8 /* zutil.h:43:24 */ 4595 type Uchf = Uch /* zutil.h:44:17 */ 4596 type Ush = uint16 /* zutil.h:45:24 */ 4597 type Ushf = Ush /* zutil.h:46:17 */ 4598 type Ulg = uint64 /* zutil.h:47:24 */ 4599 4600 // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 4601 4602 // use NO_DIVIDE if your processor does not do division in hardware -- 4603 // try it both ways to see which is faster 4604 4605 // ========================================================================= 4606 func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */ 4607 var sum2 uint64 4608 var n uint32 4609 4610 // split Adler-32 into component sums 4611 sum2 = ((adler >> 16) & uint64(0xffff)) 4612 adler = adler & (uint64(0xffff)) 4613 4614 // in case user likes doing a byte at a time, keep it fast 4615 if len == uint64(1) { 4616 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(buf)))) 4617 if adler >= uint64(BASE) { 4618 adler = adler - (uint64(BASE)) 4619 } 4620 sum2 = sum2 + (adler) 4621 if sum2 >= uint64(BASE) { 4622 sum2 = sum2 - (uint64(BASE)) 4623 } 4624 return (adler | (sum2 << 16)) 4625 } 4626 4627 // initial Adler-32 value (deferred check for len == 1 speed) 4628 if buf == uintptr(Z_NULL) { 4629 return uint64(1) 4630 } 4631 4632 // in case short lengths are provided, keep it somewhat fast 4633 if len < uint64(16) { 4634 for libc.PostDecUint64(&len, 1) != 0 { 4635 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 4636 sum2 = sum2 + (adler) 4637 } 4638 if adler >= uint64(BASE) { 4639 adler = adler - (uint64(BASE)) 4640 } 4641 sum2 = sum2 % (uint64(BASE)) // only added so many BASE's 4642 return (adler | (sum2 << 16)) 4643 } 4644 4645 // do length NMAX blocks -- requires just one modulo operation 4646 for len >= uint64(NMAX) { 4647 len = len - (uint64(NMAX)) 4648 n = (uint32(NMAX / 16)) // NMAX is divisible by 16 4649 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 4650 { 4651 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 4652 sum2 = sum2 + (adler) 4653 } 4654 { 4655 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 4656 sum2 = sum2 + (adler) 4657 } 4658 4659 { 4660 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 4661 sum2 = sum2 + (adler) 4662 } 4663 { 4664 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 4665 sum2 = sum2 + (adler) 4666 } 4667 4668 { 4669 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 4670 sum2 = sum2 + (adler) 4671 } 4672 { 4673 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 4674 sum2 = sum2 + (adler) 4675 } 4676 4677 { 4678 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 4679 sum2 = sum2 + (adler) 4680 } 4681 { 4682 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 4683 sum2 = sum2 + (adler) 4684 } 4685 4686 { 4687 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 4688 sum2 = sum2 + (adler) 4689 } 4690 { 4691 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 4692 sum2 = sum2 + (adler) 4693 } 4694 4695 { 4696 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 4697 sum2 = sum2 + (adler) 4698 } 4699 { 4700 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 4701 sum2 = sum2 + (adler) 4702 } 4703 4704 { 4705 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 4706 sum2 = sum2 + (adler) 4707 } 4708 { 4709 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 4710 sum2 = sum2 + (adler) 4711 } 4712 4713 { 4714 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 4715 sum2 = sum2 + (adler) 4716 } 4717 { 4718 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 4719 sum2 = sum2 + (adler) 4720 } 4721 4722 // 16 sums unrolled 4723 buf += uintptr(16) 4724 } 4725 adler = adler % (uint64(BASE)) 4726 sum2 = sum2 % (uint64(BASE)) 4727 } 4728 4729 // do remaining bytes (less than NMAX, still just one modulo) 4730 if len != 0 { // avoid modulos if none remaining 4731 for len >= uint64(16) { 4732 len = len - (uint64(16)) 4733 { 4734 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 4735 sum2 = sum2 + (adler) 4736 } 4737 { 4738 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 4739 sum2 = sum2 + (adler) 4740 } 4741 4742 { 4743 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 4744 sum2 = sum2 + (adler) 4745 } 4746 { 4747 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 4748 sum2 = sum2 + (adler) 4749 } 4750 4751 { 4752 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 4753 sum2 = sum2 + (adler) 4754 } 4755 { 4756 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 4757 sum2 = sum2 + (adler) 4758 } 4759 4760 { 4761 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 4762 sum2 = sum2 + (adler) 4763 } 4764 { 4765 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 4766 sum2 = sum2 + (adler) 4767 } 4768 4769 { 4770 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 4771 sum2 = sum2 + (adler) 4772 } 4773 { 4774 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 4775 sum2 = sum2 + (adler) 4776 } 4777 4778 { 4779 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 4780 sum2 = sum2 + (adler) 4781 } 4782 { 4783 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 4784 sum2 = sum2 + (adler) 4785 } 4786 4787 { 4788 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 4789 sum2 = sum2 + (adler) 4790 } 4791 { 4792 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 4793 sum2 = sum2 + (adler) 4794 } 4795 4796 { 4797 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 4798 sum2 = sum2 + (adler) 4799 } 4800 { 4801 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 4802 sum2 = sum2 + (adler) 4803 } 4804 4805 buf += uintptr(16) 4806 } 4807 for libc.PostDecUint64(&len, 1) != 0 { 4808 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 4809 sum2 = sum2 + (adler) 4810 } 4811 adler = adler % (uint64(BASE)) 4812 sum2 = sum2 % (uint64(BASE)) 4813 } 4814 4815 // return recombined sums 4816 return (adler | (sum2 << 16)) 4817 } 4818 4819 // ========================================================================= 4820 func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */ 4821 return Xadler32_z(tls, adler, buf, uint64(len)) 4822 } 4823 4824 // ========================================================================= 4825 func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:143:13: */ 4826 var sum1 uint64 4827 var sum2 uint64 4828 var rem uint32 4829 4830 // for negative len, return invalid adler32 as a clue for debugging 4831 if len2 < int64(0) { 4832 return 0xffffffff 4833 } 4834 4835 // the derivation of this formula is left as an exercise for the reader 4836 len2 = len2 % (int64(BASE)) // assumes len2 >= 0 4837 rem = uint32(len2) 4838 sum1 = (adler1 & uint64(0xffff)) 4839 sum2 = (uint64(rem) * sum1) 4840 sum2 = sum2 % (uint64(BASE)) 4841 sum1 = sum1 + (((adler2 & uint64(0xffff)) + uint64(BASE)) - uint64(1)) 4842 sum2 = sum2 + (((((adler1 >> 16) & uint64(0xffff)) + ((adler2 >> 16) & uint64(0xffff))) + uint64(BASE)) - ULong(rem)) 4843 if sum1 >= uint64(BASE) { 4844 sum1 = sum1 - (uint64(BASE)) 4845 } 4846 if sum1 >= uint64(BASE) { 4847 sum1 = sum1 - (uint64(BASE)) 4848 } 4849 if sum2 >= (uint64(uint64(BASE)) << 1) { 4850 sum2 = sum2 - (uint64(uint64(BASE)) << 1) 4851 } 4852 if sum2 >= uint64(BASE) { 4853 sum2 = sum2 - (uint64(BASE)) 4854 } 4855 return (sum1 | (sum2 << 16)) 4856 } 4857 4858 // ========================================================================= 4859 func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */ 4860 return adler32_combine_(tls, adler1, adler2, len2) 4861 } 4862 4863 func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:180:15: */ 4864 return adler32_combine_(tls, adler1, adler2, len2) 4865 } 4866 4867 // =========================================================================== 4868 // Compresses the source buffer into the destination buffer. The level 4869 // parameter has the same meaning as in deflateInit. sourceLen is the byte 4870 // length of the source buffer. Upon entry, destLen is the total size of the 4871 // destination buffer, which must be at least 0.1% larger than sourceLen plus 4872 // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 4873 // 4874 // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 4875 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, 4876 // Z_STREAM_ERROR if the level parameter is invalid. 4877 func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */ 4878 bp := tls.Alloc(112) 4879 defer tls.Free(112) 4880 4881 // var stream Z_stream at bp, 112 4882 4883 var err int32 4884 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 4885 var left ULong 4886 4887 left = *(*ULongf)(unsafe.Pointer(destLen)) 4888 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 4889 4890 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0) 4891 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0) 4892 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0) 4893 4894 err = XdeflateInit_(tls, bp /* &stream */, level, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 4895 if err != Z_OK { 4896 return err 4897 } 4898 4899 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest 4900 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0) 4901 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source 4902 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0) 4903 4904 for ok := true; ok; ok = (err == Z_OK) { 4905 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out == UInt(0) { 4906 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 { 4907 if left > ULong(max) { 4908 return max 4909 } 4910 return UInt(left) 4911 }() 4912 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out)) 4913 } 4914 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in == UInt(0) { 4915 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 { 4916 if sourceLen > ULong(max) { 4917 return max 4918 } 4919 return UInt(sourceLen) 4920 }() 4921 sourceLen = sourceLen - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in)) 4922 } 4923 err = Xdeflate(tls, bp /* &stream */, func() int32 { 4924 if sourceLen != 0 { 4925 return Z_NO_FLUSH 4926 } 4927 return Z_FINISH 4928 }()) 4929 } 4930 4931 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out 4932 XdeflateEnd(tls, bp /* &stream */) 4933 if err == Z_STREAM_END { 4934 return Z_OK 4935 } 4936 return err 4937 } 4938 4939 // =========================================================================== 4940 func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */ 4941 return Xcompress2(tls, dest, destLen, source, sourceLen, -1) 4942 } 4943 4944 // =========================================================================== 4945 // If the default memLevel or windowBits for deflateInit() is changed, then 4946 // this function needs to be updated. 4947 // 4948 func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */ 4949 return ((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) 4950 } 4951 4952 // ======================================================================== 4953 // Tables of CRC-32s of all single-byte values, made by make_crc_table(). 4954 // crc32.h -- tables for rapid CRC calculation 4955 // Generated automatically by crc32.c 4956 4957 var crc_table = [8][256]Z_crc_t{ 4958 { 4959 uint32(0x00000000), uint32(0x77073096), uint32(0xee0e612c), uint32(0x990951ba), uint32(0x076dc419), 4960 uint32(0x706af48f), uint32(0xe963a535), uint32(0x9e6495a3), uint32(0x0edb8832), uint32(0x79dcb8a4), 4961 uint32(0xe0d5e91e), uint32(0x97d2d988), uint32(0x09b64c2b), uint32(0x7eb17cbd), uint32(0xe7b82d07), 4962 uint32(0x90bf1d91), uint32(0x1db71064), uint32(0x6ab020f2), uint32(0xf3b97148), uint32(0x84be41de), 4963 uint32(0x1adad47d), uint32(0x6ddde4eb), uint32(0xf4d4b551), uint32(0x83d385c7), uint32(0x136c9856), 4964 uint32(0x646ba8c0), uint32(0xfd62f97a), uint32(0x8a65c9ec), uint32(0x14015c4f), uint32(0x63066cd9), 4965 uint32(0xfa0f3d63), uint32(0x8d080df5), uint32(0x3b6e20c8), uint32(0x4c69105e), uint32(0xd56041e4), 4966 uint32(0xa2677172), uint32(0x3c03e4d1), uint32(0x4b04d447), uint32(0xd20d85fd), uint32(0xa50ab56b), 4967 uint32(0x35b5a8fa), uint32(0x42b2986c), uint32(0xdbbbc9d6), uint32(0xacbcf940), uint32(0x32d86ce3), 4968 uint32(0x45df5c75), uint32(0xdcd60dcf), uint32(0xabd13d59), uint32(0x26d930ac), uint32(0x51de003a), 4969 uint32(0xc8d75180), uint32(0xbfd06116), uint32(0x21b4f4b5), uint32(0x56b3c423), uint32(0xcfba9599), 4970 uint32(0xb8bda50f), uint32(0x2802b89e), uint32(0x5f058808), uint32(0xc60cd9b2), uint32(0xb10be924), 4971 uint32(0x2f6f7c87), uint32(0x58684c11), uint32(0xc1611dab), uint32(0xb6662d3d), uint32(0x76dc4190), 4972 uint32(0x01db7106), uint32(0x98d220bc), uint32(0xefd5102a), uint32(0x71b18589), uint32(0x06b6b51f), 4973 uint32(0x9fbfe4a5), uint32(0xe8b8d433), uint32(0x7807c9a2), uint32(0x0f00f934), uint32(0x9609a88e), 4974 uint32(0xe10e9818), uint32(0x7f6a0dbb), uint32(0x086d3d2d), uint32(0x91646c97), uint32(0xe6635c01), 4975 uint32(0x6b6b51f4), uint32(0x1c6c6162), uint32(0x856530d8), uint32(0xf262004e), uint32(0x6c0695ed), 4976 uint32(0x1b01a57b), uint32(0x8208f4c1), uint32(0xf50fc457), uint32(0x65b0d9c6), uint32(0x12b7e950), 4977 uint32(0x8bbeb8ea), uint32(0xfcb9887c), uint32(0x62dd1ddf), uint32(0x15da2d49), uint32(0x8cd37cf3), 4978 uint32(0xfbd44c65), uint32(0x4db26158), uint32(0x3ab551ce), uint32(0xa3bc0074), uint32(0xd4bb30e2), 4979 uint32(0x4adfa541), uint32(0x3dd895d7), uint32(0xa4d1c46d), uint32(0xd3d6f4fb), uint32(0x4369e96a), 4980 uint32(0x346ed9fc), uint32(0xad678846), uint32(0xda60b8d0), uint32(0x44042d73), uint32(0x33031de5), 4981 uint32(0xaa0a4c5f), uint32(0xdd0d7cc9), uint32(0x5005713c), uint32(0x270241aa), uint32(0xbe0b1010), 4982 uint32(0xc90c2086), uint32(0x5768b525), uint32(0x206f85b3), uint32(0xb966d409), uint32(0xce61e49f), 4983 uint32(0x5edef90e), uint32(0x29d9c998), uint32(0xb0d09822), uint32(0xc7d7a8b4), uint32(0x59b33d17), 4984 uint32(0x2eb40d81), uint32(0xb7bd5c3b), uint32(0xc0ba6cad), uint32(0xedb88320), uint32(0x9abfb3b6), 4985 uint32(0x03b6e20c), uint32(0x74b1d29a), uint32(0xead54739), uint32(0x9dd277af), uint32(0x04db2615), 4986 uint32(0x73dc1683), uint32(0xe3630b12), uint32(0x94643b84), uint32(0x0d6d6a3e), uint32(0x7a6a5aa8), 4987 uint32(0xe40ecf0b), uint32(0x9309ff9d), uint32(0x0a00ae27), uint32(0x7d079eb1), uint32(0xf00f9344), 4988 uint32(0x8708a3d2), uint32(0x1e01f268), uint32(0x6906c2fe), uint32(0xf762575d), uint32(0x806567cb), 4989 uint32(0x196c3671), uint32(0x6e6b06e7), uint32(0xfed41b76), uint32(0x89d32be0), uint32(0x10da7a5a), 4990 uint32(0x67dd4acc), uint32(0xf9b9df6f), uint32(0x8ebeeff9), uint32(0x17b7be43), uint32(0x60b08ed5), 4991 uint32(0xd6d6a3e8), uint32(0xa1d1937e), uint32(0x38d8c2c4), uint32(0x4fdff252), uint32(0xd1bb67f1), 4992 uint32(0xa6bc5767), uint32(0x3fb506dd), uint32(0x48b2364b), uint32(0xd80d2bda), uint32(0xaf0a1b4c), 4993 uint32(0x36034af6), uint32(0x41047a60), uint32(0xdf60efc3), uint32(0xa867df55), uint32(0x316e8eef), 4994 uint32(0x4669be79), uint32(0xcb61b38c), uint32(0xbc66831a), uint32(0x256fd2a0), uint32(0x5268e236), 4995 uint32(0xcc0c7795), uint32(0xbb0b4703), uint32(0x220216b9), uint32(0x5505262f), uint32(0xc5ba3bbe), 4996 uint32(0xb2bd0b28), uint32(0x2bb45a92), uint32(0x5cb36a04), uint32(0xc2d7ffa7), uint32(0xb5d0cf31), 4997 uint32(0x2cd99e8b), uint32(0x5bdeae1d), uint32(0x9b64c2b0), uint32(0xec63f226), uint32(0x756aa39c), 4998 uint32(0x026d930a), uint32(0x9c0906a9), uint32(0xeb0e363f), uint32(0x72076785), uint32(0x05005713), 4999 uint32(0x95bf4a82), uint32(0xe2b87a14), uint32(0x7bb12bae), uint32(0x0cb61b38), uint32(0x92d28e9b), 5000 uint32(0xe5d5be0d), uint32(0x7cdcefb7), uint32(0x0bdbdf21), uint32(0x86d3d2d4), uint32(0xf1d4e242), 5001 uint32(0x68ddb3f8), uint32(0x1fda836e), uint32(0x81be16cd), uint32(0xf6b9265b), uint32(0x6fb077e1), 5002 uint32(0x18b74777), uint32(0x88085ae6), uint32(0xff0f6a70), uint32(0x66063bca), uint32(0x11010b5c), 5003 uint32(0x8f659eff), uint32(0xf862ae69), uint32(0x616bffd3), uint32(0x166ccf45), uint32(0xa00ae278), 5004 uint32(0xd70dd2ee), uint32(0x4e048354), uint32(0x3903b3c2), uint32(0xa7672661), uint32(0xd06016f7), 5005 uint32(0x4969474d), uint32(0x3e6e77db), uint32(0xaed16a4a), uint32(0xd9d65adc), uint32(0x40df0b66), 5006 uint32(0x37d83bf0), uint32(0xa9bcae53), uint32(0xdebb9ec5), uint32(0x47b2cf7f), uint32(0x30b5ffe9), 5007 uint32(0xbdbdf21c), uint32(0xcabac28a), uint32(0x53b39330), uint32(0x24b4a3a6), uint32(0xbad03605), 5008 uint32(0xcdd70693), uint32(0x54de5729), uint32(0x23d967bf), uint32(0xb3667a2e), uint32(0xc4614ab8), 5009 uint32(0x5d681b02), uint32(0x2a6f2b94), uint32(0xb40bbe37), uint32(0xc30c8ea1), uint32(0x5a05df1b), 5010 uint32(0x2d02ef8d), 5011 }, 5012 { 5013 uint32(0x00000000), uint32(0x191b3141), uint32(0x32366282), uint32(0x2b2d53c3), uint32(0x646cc504), 5014 uint32(0x7d77f445), uint32(0x565aa786), uint32(0x4f4196c7), uint32(0xc8d98a08), uint32(0xd1c2bb49), 5015 uint32(0xfaefe88a), uint32(0xe3f4d9cb), uint32(0xacb54f0c), uint32(0xb5ae7e4d), uint32(0x9e832d8e), 5016 uint32(0x87981ccf), uint32(0x4ac21251), uint32(0x53d92310), uint32(0x78f470d3), uint32(0x61ef4192), 5017 uint32(0x2eaed755), uint32(0x37b5e614), uint32(0x1c98b5d7), uint32(0x05838496), uint32(0x821b9859), 5018 uint32(0x9b00a918), uint32(0xb02dfadb), uint32(0xa936cb9a), uint32(0xe6775d5d), uint32(0xff6c6c1c), 5019 uint32(0xd4413fdf), uint32(0xcd5a0e9e), uint32(0x958424a2), uint32(0x8c9f15e3), uint32(0xa7b24620), 5020 uint32(0xbea97761), uint32(0xf1e8e1a6), uint32(0xe8f3d0e7), uint32(0xc3de8324), uint32(0xdac5b265), 5021 uint32(0x5d5daeaa), uint32(0x44469feb), uint32(0x6f6bcc28), uint32(0x7670fd69), uint32(0x39316bae), 5022 uint32(0x202a5aef), uint32(0x0b07092c), uint32(0x121c386d), uint32(0xdf4636f3), uint32(0xc65d07b2), 5023 uint32(0xed705471), uint32(0xf46b6530), uint32(0xbb2af3f7), uint32(0xa231c2b6), uint32(0x891c9175), 5024 uint32(0x9007a034), uint32(0x179fbcfb), uint32(0x0e848dba), uint32(0x25a9de79), uint32(0x3cb2ef38), 5025 uint32(0x73f379ff), uint32(0x6ae848be), uint32(0x41c51b7d), uint32(0x58de2a3c), uint32(0xf0794f05), 5026 uint32(0xe9627e44), uint32(0xc24f2d87), uint32(0xdb541cc6), uint32(0x94158a01), uint32(0x8d0ebb40), 5027 uint32(0xa623e883), uint32(0xbf38d9c2), uint32(0x38a0c50d), uint32(0x21bbf44c), uint32(0x0a96a78f), 5028 uint32(0x138d96ce), uint32(0x5ccc0009), uint32(0x45d73148), uint32(0x6efa628b), uint32(0x77e153ca), 5029 uint32(0xbabb5d54), uint32(0xa3a06c15), uint32(0x888d3fd6), uint32(0x91960e97), uint32(0xded79850), 5030 uint32(0xc7cca911), uint32(0xece1fad2), uint32(0xf5facb93), uint32(0x7262d75c), uint32(0x6b79e61d), 5031 uint32(0x4054b5de), uint32(0x594f849f), uint32(0x160e1258), uint32(0x0f152319), uint32(0x243870da), 5032 uint32(0x3d23419b), uint32(0x65fd6ba7), uint32(0x7ce65ae6), uint32(0x57cb0925), uint32(0x4ed03864), 5033 uint32(0x0191aea3), uint32(0x188a9fe2), uint32(0x33a7cc21), uint32(0x2abcfd60), uint32(0xad24e1af), 5034 uint32(0xb43fd0ee), uint32(0x9f12832d), uint32(0x8609b26c), uint32(0xc94824ab), uint32(0xd05315ea), 5035 uint32(0xfb7e4629), uint32(0xe2657768), uint32(0x2f3f79f6), uint32(0x362448b7), uint32(0x1d091b74), 5036 uint32(0x04122a35), uint32(0x4b53bcf2), uint32(0x52488db3), uint32(0x7965de70), uint32(0x607eef31), 5037 uint32(0xe7e6f3fe), uint32(0xfefdc2bf), uint32(0xd5d0917c), uint32(0xcccba03d), uint32(0x838a36fa), 5038 uint32(0x9a9107bb), uint32(0xb1bc5478), uint32(0xa8a76539), uint32(0x3b83984b), uint32(0x2298a90a), 5039 uint32(0x09b5fac9), uint32(0x10aecb88), uint32(0x5fef5d4f), uint32(0x46f46c0e), uint32(0x6dd93fcd), 5040 uint32(0x74c20e8c), uint32(0xf35a1243), uint32(0xea412302), uint32(0xc16c70c1), uint32(0xd8774180), 5041 uint32(0x9736d747), uint32(0x8e2de606), uint32(0xa500b5c5), uint32(0xbc1b8484), uint32(0x71418a1a), 5042 uint32(0x685abb5b), uint32(0x4377e898), uint32(0x5a6cd9d9), uint32(0x152d4f1e), uint32(0x0c367e5f), 5043 uint32(0x271b2d9c), uint32(0x3e001cdd), uint32(0xb9980012), uint32(0xa0833153), uint32(0x8bae6290), 5044 uint32(0x92b553d1), uint32(0xddf4c516), uint32(0xc4eff457), uint32(0xefc2a794), uint32(0xf6d996d5), 5045 uint32(0xae07bce9), uint32(0xb71c8da8), uint32(0x9c31de6b), uint32(0x852aef2a), uint32(0xca6b79ed), 5046 uint32(0xd37048ac), uint32(0xf85d1b6f), uint32(0xe1462a2e), uint32(0x66de36e1), uint32(0x7fc507a0), 5047 uint32(0x54e85463), uint32(0x4df36522), uint32(0x02b2f3e5), uint32(0x1ba9c2a4), uint32(0x30849167), 5048 uint32(0x299fa026), uint32(0xe4c5aeb8), uint32(0xfdde9ff9), uint32(0xd6f3cc3a), uint32(0xcfe8fd7b), 5049 uint32(0x80a96bbc), uint32(0x99b25afd), uint32(0xb29f093e), uint32(0xab84387f), uint32(0x2c1c24b0), 5050 uint32(0x350715f1), uint32(0x1e2a4632), uint32(0x07317773), uint32(0x4870e1b4), uint32(0x516bd0f5), 5051 uint32(0x7a468336), uint32(0x635db277), uint32(0xcbfad74e), uint32(0xd2e1e60f), uint32(0xf9ccb5cc), 5052 uint32(0xe0d7848d), uint32(0xaf96124a), uint32(0xb68d230b), uint32(0x9da070c8), uint32(0x84bb4189), 5053 uint32(0x03235d46), uint32(0x1a386c07), uint32(0x31153fc4), uint32(0x280e0e85), uint32(0x674f9842), 5054 uint32(0x7e54a903), uint32(0x5579fac0), uint32(0x4c62cb81), uint32(0x8138c51f), uint32(0x9823f45e), 5055 uint32(0xb30ea79d), uint32(0xaa1596dc), uint32(0xe554001b), uint32(0xfc4f315a), uint32(0xd7626299), 5056 uint32(0xce7953d8), uint32(0x49e14f17), uint32(0x50fa7e56), uint32(0x7bd72d95), uint32(0x62cc1cd4), 5057 uint32(0x2d8d8a13), uint32(0x3496bb52), uint32(0x1fbbe891), uint32(0x06a0d9d0), uint32(0x5e7ef3ec), 5058 uint32(0x4765c2ad), uint32(0x6c48916e), uint32(0x7553a02f), uint32(0x3a1236e8), uint32(0x230907a9), 5059 uint32(0x0824546a), uint32(0x113f652b), uint32(0x96a779e4), uint32(0x8fbc48a5), uint32(0xa4911b66), 5060 uint32(0xbd8a2a27), uint32(0xf2cbbce0), uint32(0xebd08da1), uint32(0xc0fdde62), uint32(0xd9e6ef23), 5061 uint32(0x14bce1bd), uint32(0x0da7d0fc), uint32(0x268a833f), uint32(0x3f91b27e), uint32(0x70d024b9), 5062 uint32(0x69cb15f8), uint32(0x42e6463b), uint32(0x5bfd777a), uint32(0xdc656bb5), uint32(0xc57e5af4), 5063 uint32(0xee530937), uint32(0xf7483876), uint32(0xb809aeb1), uint32(0xa1129ff0), uint32(0x8a3fcc33), 5064 uint32(0x9324fd72), 5065 }, 5066 { 5067 uint32(0x00000000), uint32(0x01c26a37), uint32(0x0384d46e), uint32(0x0246be59), uint32(0x0709a8dc), 5068 uint32(0x06cbc2eb), uint32(0x048d7cb2), uint32(0x054f1685), uint32(0x0e1351b8), uint32(0x0fd13b8f), 5069 uint32(0x0d9785d6), uint32(0x0c55efe1), uint32(0x091af964), uint32(0x08d89353), uint32(0x0a9e2d0a), 5070 uint32(0x0b5c473d), uint32(0x1c26a370), uint32(0x1de4c947), uint32(0x1fa2771e), uint32(0x1e601d29), 5071 uint32(0x1b2f0bac), uint32(0x1aed619b), uint32(0x18abdfc2), uint32(0x1969b5f5), uint32(0x1235f2c8), 5072 uint32(0x13f798ff), uint32(0x11b126a6), uint32(0x10734c91), uint32(0x153c5a14), uint32(0x14fe3023), 5073 uint32(0x16b88e7a), uint32(0x177ae44d), uint32(0x384d46e0), uint32(0x398f2cd7), uint32(0x3bc9928e), 5074 uint32(0x3a0bf8b9), uint32(0x3f44ee3c), uint32(0x3e86840b), uint32(0x3cc03a52), uint32(0x3d025065), 5075 uint32(0x365e1758), uint32(0x379c7d6f), uint32(0x35dac336), uint32(0x3418a901), uint32(0x3157bf84), 5076 uint32(0x3095d5b3), uint32(0x32d36bea), uint32(0x331101dd), uint32(0x246be590), uint32(0x25a98fa7), 5077 uint32(0x27ef31fe), uint32(0x262d5bc9), uint32(0x23624d4c), uint32(0x22a0277b), uint32(0x20e69922), 5078 uint32(0x2124f315), uint32(0x2a78b428), uint32(0x2bbade1f), uint32(0x29fc6046), uint32(0x283e0a71), 5079 uint32(0x2d711cf4), uint32(0x2cb376c3), uint32(0x2ef5c89a), uint32(0x2f37a2ad), uint32(0x709a8dc0), 5080 uint32(0x7158e7f7), uint32(0x731e59ae), uint32(0x72dc3399), uint32(0x7793251c), uint32(0x76514f2b), 5081 uint32(0x7417f172), uint32(0x75d59b45), uint32(0x7e89dc78), uint32(0x7f4bb64f), uint32(0x7d0d0816), 5082 uint32(0x7ccf6221), uint32(0x798074a4), uint32(0x78421e93), uint32(0x7a04a0ca), uint32(0x7bc6cafd), 5083 uint32(0x6cbc2eb0), uint32(0x6d7e4487), uint32(0x6f38fade), uint32(0x6efa90e9), uint32(0x6bb5866c), 5084 uint32(0x6a77ec5b), uint32(0x68315202), uint32(0x69f33835), uint32(0x62af7f08), uint32(0x636d153f), 5085 uint32(0x612bab66), uint32(0x60e9c151), uint32(0x65a6d7d4), uint32(0x6464bde3), uint32(0x662203ba), 5086 uint32(0x67e0698d), uint32(0x48d7cb20), uint32(0x4915a117), uint32(0x4b531f4e), uint32(0x4a917579), 5087 uint32(0x4fde63fc), uint32(0x4e1c09cb), uint32(0x4c5ab792), uint32(0x4d98dda5), uint32(0x46c49a98), 5088 uint32(0x4706f0af), uint32(0x45404ef6), uint32(0x448224c1), uint32(0x41cd3244), uint32(0x400f5873), 5089 uint32(0x4249e62a), uint32(0x438b8c1d), uint32(0x54f16850), uint32(0x55330267), uint32(0x5775bc3e), 5090 uint32(0x56b7d609), uint32(0x53f8c08c), uint32(0x523aaabb), uint32(0x507c14e2), uint32(0x51be7ed5), 5091 uint32(0x5ae239e8), uint32(0x5b2053df), uint32(0x5966ed86), uint32(0x58a487b1), uint32(0x5deb9134), 5092 uint32(0x5c29fb03), uint32(0x5e6f455a), uint32(0x5fad2f6d), uint32(0xe1351b80), uint32(0xe0f771b7), 5093 uint32(0xe2b1cfee), uint32(0xe373a5d9), uint32(0xe63cb35c), uint32(0xe7fed96b), uint32(0xe5b86732), 5094 uint32(0xe47a0d05), uint32(0xef264a38), uint32(0xeee4200f), uint32(0xeca29e56), uint32(0xed60f461), 5095 uint32(0xe82fe2e4), uint32(0xe9ed88d3), uint32(0xebab368a), uint32(0xea695cbd), uint32(0xfd13b8f0), 5096 uint32(0xfcd1d2c7), uint32(0xfe976c9e), uint32(0xff5506a9), uint32(0xfa1a102c), uint32(0xfbd87a1b), 5097 uint32(0xf99ec442), uint32(0xf85cae75), uint32(0xf300e948), uint32(0xf2c2837f), uint32(0xf0843d26), 5098 uint32(0xf1465711), uint32(0xf4094194), uint32(0xf5cb2ba3), uint32(0xf78d95fa), uint32(0xf64fffcd), 5099 uint32(0xd9785d60), uint32(0xd8ba3757), uint32(0xdafc890e), uint32(0xdb3ee339), uint32(0xde71f5bc), 5100 uint32(0xdfb39f8b), uint32(0xddf521d2), uint32(0xdc374be5), uint32(0xd76b0cd8), uint32(0xd6a966ef), 5101 uint32(0xd4efd8b6), uint32(0xd52db281), uint32(0xd062a404), uint32(0xd1a0ce33), uint32(0xd3e6706a), 5102 uint32(0xd2241a5d), uint32(0xc55efe10), uint32(0xc49c9427), uint32(0xc6da2a7e), uint32(0xc7184049), 5103 uint32(0xc25756cc), uint32(0xc3953cfb), uint32(0xc1d382a2), uint32(0xc011e895), uint32(0xcb4dafa8), 5104 uint32(0xca8fc59f), uint32(0xc8c97bc6), uint32(0xc90b11f1), uint32(0xcc440774), uint32(0xcd866d43), 5105 uint32(0xcfc0d31a), uint32(0xce02b92d), uint32(0x91af9640), uint32(0x906dfc77), uint32(0x922b422e), 5106 uint32(0x93e92819), uint32(0x96a63e9c), uint32(0x976454ab), uint32(0x9522eaf2), uint32(0x94e080c5), 5107 uint32(0x9fbcc7f8), uint32(0x9e7eadcf), uint32(0x9c381396), uint32(0x9dfa79a1), uint32(0x98b56f24), 5108 uint32(0x99770513), uint32(0x9b31bb4a), uint32(0x9af3d17d), uint32(0x8d893530), uint32(0x8c4b5f07), 5109 uint32(0x8e0de15e), uint32(0x8fcf8b69), uint32(0x8a809dec), uint32(0x8b42f7db), uint32(0x89044982), 5110 uint32(0x88c623b5), uint32(0x839a6488), uint32(0x82580ebf), uint32(0x801eb0e6), uint32(0x81dcdad1), 5111 uint32(0x8493cc54), uint32(0x8551a663), uint32(0x8717183a), uint32(0x86d5720d), uint32(0xa9e2d0a0), 5112 uint32(0xa820ba97), uint32(0xaa6604ce), uint32(0xaba46ef9), uint32(0xaeeb787c), uint32(0xaf29124b), 5113 uint32(0xad6fac12), uint32(0xacadc625), uint32(0xa7f18118), uint32(0xa633eb2f), uint32(0xa4755576), 5114 uint32(0xa5b73f41), uint32(0xa0f829c4), uint32(0xa13a43f3), uint32(0xa37cfdaa), uint32(0xa2be979d), 5115 uint32(0xb5c473d0), uint32(0xb40619e7), uint32(0xb640a7be), uint32(0xb782cd89), uint32(0xb2cddb0c), 5116 uint32(0xb30fb13b), uint32(0xb1490f62), uint32(0xb08b6555), uint32(0xbbd72268), uint32(0xba15485f), 5117 uint32(0xb853f606), uint32(0xb9919c31), uint32(0xbcde8ab4), uint32(0xbd1ce083), uint32(0xbf5a5eda), 5118 uint32(0xbe9834ed), 5119 }, 5120 { 5121 uint32(0x00000000), uint32(0xb8bc6765), uint32(0xaa09c88b), uint32(0x12b5afee), uint32(0x8f629757), 5122 uint32(0x37def032), uint32(0x256b5fdc), uint32(0x9dd738b9), uint32(0xc5b428ef), uint32(0x7d084f8a), 5123 uint32(0x6fbde064), uint32(0xd7018701), uint32(0x4ad6bfb8), uint32(0xf26ad8dd), uint32(0xe0df7733), 5124 uint32(0x58631056), uint32(0x5019579f), uint32(0xe8a530fa), uint32(0xfa109f14), uint32(0x42acf871), 5125 uint32(0xdf7bc0c8), uint32(0x67c7a7ad), uint32(0x75720843), uint32(0xcdce6f26), uint32(0x95ad7f70), 5126 uint32(0x2d111815), uint32(0x3fa4b7fb), uint32(0x8718d09e), uint32(0x1acfe827), uint32(0xa2738f42), 5127 uint32(0xb0c620ac), uint32(0x087a47c9), uint32(0xa032af3e), uint32(0x188ec85b), uint32(0x0a3b67b5), 5128 uint32(0xb28700d0), uint32(0x2f503869), uint32(0x97ec5f0c), uint32(0x8559f0e2), uint32(0x3de59787), 5129 uint32(0x658687d1), uint32(0xdd3ae0b4), uint32(0xcf8f4f5a), uint32(0x7733283f), uint32(0xeae41086), 5130 uint32(0x525877e3), uint32(0x40edd80d), uint32(0xf851bf68), uint32(0xf02bf8a1), uint32(0x48979fc4), 5131 uint32(0x5a22302a), uint32(0xe29e574f), uint32(0x7f496ff6), uint32(0xc7f50893), uint32(0xd540a77d), 5132 uint32(0x6dfcc018), uint32(0x359fd04e), uint32(0x8d23b72b), uint32(0x9f9618c5), uint32(0x272a7fa0), 5133 uint32(0xbafd4719), uint32(0x0241207c), uint32(0x10f48f92), uint32(0xa848e8f7), uint32(0x9b14583d), 5134 uint32(0x23a83f58), uint32(0x311d90b6), uint32(0x89a1f7d3), uint32(0x1476cf6a), uint32(0xaccaa80f), 5135 uint32(0xbe7f07e1), uint32(0x06c36084), uint32(0x5ea070d2), uint32(0xe61c17b7), uint32(0xf4a9b859), 5136 uint32(0x4c15df3c), uint32(0xd1c2e785), uint32(0x697e80e0), uint32(0x7bcb2f0e), uint32(0xc377486b), 5137 uint32(0xcb0d0fa2), uint32(0x73b168c7), uint32(0x6104c729), uint32(0xd9b8a04c), uint32(0x446f98f5), 5138 uint32(0xfcd3ff90), uint32(0xee66507e), uint32(0x56da371b), uint32(0x0eb9274d), uint32(0xb6054028), 5139 uint32(0xa4b0efc6), uint32(0x1c0c88a3), uint32(0x81dbb01a), uint32(0x3967d77f), uint32(0x2bd27891), 5140 uint32(0x936e1ff4), uint32(0x3b26f703), uint32(0x839a9066), uint32(0x912f3f88), uint32(0x299358ed), 5141 uint32(0xb4446054), uint32(0x0cf80731), uint32(0x1e4da8df), uint32(0xa6f1cfba), uint32(0xfe92dfec), 5142 uint32(0x462eb889), uint32(0x549b1767), uint32(0xec277002), uint32(0x71f048bb), uint32(0xc94c2fde), 5143 uint32(0xdbf98030), uint32(0x6345e755), uint32(0x6b3fa09c), uint32(0xd383c7f9), uint32(0xc1366817), 5144 uint32(0x798a0f72), uint32(0xe45d37cb), uint32(0x5ce150ae), uint32(0x4e54ff40), uint32(0xf6e89825), 5145 uint32(0xae8b8873), uint32(0x1637ef16), uint32(0x048240f8), uint32(0xbc3e279d), uint32(0x21e91f24), 5146 uint32(0x99557841), uint32(0x8be0d7af), uint32(0x335cb0ca), uint32(0xed59b63b), uint32(0x55e5d15e), 5147 uint32(0x47507eb0), uint32(0xffec19d5), uint32(0x623b216c), uint32(0xda874609), uint32(0xc832e9e7), 5148 uint32(0x708e8e82), uint32(0x28ed9ed4), uint32(0x9051f9b1), uint32(0x82e4565f), uint32(0x3a58313a), 5149 uint32(0xa78f0983), uint32(0x1f336ee6), uint32(0x0d86c108), uint32(0xb53aa66d), uint32(0xbd40e1a4), 5150 uint32(0x05fc86c1), uint32(0x1749292f), uint32(0xaff54e4a), uint32(0x322276f3), uint32(0x8a9e1196), 5151 uint32(0x982bbe78), uint32(0x2097d91d), uint32(0x78f4c94b), uint32(0xc048ae2e), uint32(0xd2fd01c0), 5152 uint32(0x6a4166a5), uint32(0xf7965e1c), uint32(0x4f2a3979), uint32(0x5d9f9697), uint32(0xe523f1f2), 5153 uint32(0x4d6b1905), uint32(0xf5d77e60), uint32(0xe762d18e), uint32(0x5fdeb6eb), uint32(0xc2098e52), 5154 uint32(0x7ab5e937), uint32(0x680046d9), uint32(0xd0bc21bc), uint32(0x88df31ea), uint32(0x3063568f), 5155 uint32(0x22d6f961), uint32(0x9a6a9e04), uint32(0x07bda6bd), uint32(0xbf01c1d8), uint32(0xadb46e36), 5156 uint32(0x15080953), uint32(0x1d724e9a), uint32(0xa5ce29ff), uint32(0xb77b8611), uint32(0x0fc7e174), 5157 uint32(0x9210d9cd), uint32(0x2aacbea8), uint32(0x38191146), uint32(0x80a57623), uint32(0xd8c66675), 5158 uint32(0x607a0110), uint32(0x72cfaefe), uint32(0xca73c99b), uint32(0x57a4f122), uint32(0xef189647), 5159 uint32(0xfdad39a9), uint32(0x45115ecc), uint32(0x764dee06), uint32(0xcef18963), uint32(0xdc44268d), 5160 uint32(0x64f841e8), uint32(0xf92f7951), uint32(0x41931e34), uint32(0x5326b1da), uint32(0xeb9ad6bf), 5161 uint32(0xb3f9c6e9), uint32(0x0b45a18c), uint32(0x19f00e62), uint32(0xa14c6907), uint32(0x3c9b51be), 5162 uint32(0x842736db), uint32(0x96929935), uint32(0x2e2efe50), uint32(0x2654b999), uint32(0x9ee8defc), 5163 uint32(0x8c5d7112), uint32(0x34e11677), uint32(0xa9362ece), uint32(0x118a49ab), uint32(0x033fe645), 5164 uint32(0xbb838120), uint32(0xe3e09176), uint32(0x5b5cf613), uint32(0x49e959fd), uint32(0xf1553e98), 5165 uint32(0x6c820621), uint32(0xd43e6144), uint32(0xc68bceaa), uint32(0x7e37a9cf), uint32(0xd67f4138), 5166 uint32(0x6ec3265d), uint32(0x7c7689b3), uint32(0xc4caeed6), uint32(0x591dd66f), uint32(0xe1a1b10a), 5167 uint32(0xf3141ee4), uint32(0x4ba87981), uint32(0x13cb69d7), uint32(0xab770eb2), uint32(0xb9c2a15c), 5168 uint32(0x017ec639), uint32(0x9ca9fe80), uint32(0x241599e5), uint32(0x36a0360b), uint32(0x8e1c516e), 5169 uint32(0x866616a7), uint32(0x3eda71c2), uint32(0x2c6fde2c), uint32(0x94d3b949), uint32(0x090481f0), 5170 uint32(0xb1b8e695), uint32(0xa30d497b), uint32(0x1bb12e1e), uint32(0x43d23e48), uint32(0xfb6e592d), 5171 uint32(0xe9dbf6c3), uint32(0x516791a6), uint32(0xccb0a91f), uint32(0x740cce7a), uint32(0x66b96194), 5172 uint32(0xde0506f1), 5173 }, 5174 { 5175 uint32(0x00000000), uint32(0x96300777), uint32(0x2c610eee), uint32(0xba510999), uint32(0x19c46d07), 5176 uint32(0x8ff46a70), uint32(0x35a563e9), uint32(0xa395649e), uint32(0x3288db0e), uint32(0xa4b8dc79), 5177 uint32(0x1ee9d5e0), uint32(0x88d9d297), uint32(0x2b4cb609), uint32(0xbd7cb17e), uint32(0x072db8e7), 5178 uint32(0x911dbf90), uint32(0x6410b71d), uint32(0xf220b06a), uint32(0x4871b9f3), uint32(0xde41be84), 5179 uint32(0x7dd4da1a), uint32(0xebe4dd6d), uint32(0x51b5d4f4), uint32(0xc785d383), uint32(0x56986c13), 5180 uint32(0xc0a86b64), uint32(0x7af962fd), uint32(0xecc9658a), uint32(0x4f5c0114), uint32(0xd96c0663), 5181 uint32(0x633d0ffa), uint32(0xf50d088d), uint32(0xc8206e3b), uint32(0x5e10694c), uint32(0xe44160d5), 5182 uint32(0x727167a2), uint32(0xd1e4033c), uint32(0x47d4044b), uint32(0xfd850dd2), uint32(0x6bb50aa5), 5183 uint32(0xfaa8b535), uint32(0x6c98b242), uint32(0xd6c9bbdb), uint32(0x40f9bcac), uint32(0xe36cd832), 5184 uint32(0x755cdf45), uint32(0xcf0dd6dc), uint32(0x593dd1ab), uint32(0xac30d926), uint32(0x3a00de51), 5185 uint32(0x8051d7c8), uint32(0x1661d0bf), uint32(0xb5f4b421), uint32(0x23c4b356), uint32(0x9995bacf), 5186 uint32(0x0fa5bdb8), uint32(0x9eb80228), uint32(0x0888055f), uint32(0xb2d90cc6), uint32(0x24e90bb1), 5187 uint32(0x877c6f2f), uint32(0x114c6858), uint32(0xab1d61c1), uint32(0x3d2d66b6), uint32(0x9041dc76), 5188 uint32(0x0671db01), uint32(0xbc20d298), uint32(0x2a10d5ef), uint32(0x8985b171), uint32(0x1fb5b606), 5189 uint32(0xa5e4bf9f), uint32(0x33d4b8e8), uint32(0xa2c90778), uint32(0x34f9000f), uint32(0x8ea80996), 5190 uint32(0x18980ee1), uint32(0xbb0d6a7f), uint32(0x2d3d6d08), uint32(0x976c6491), uint32(0x015c63e6), 5191 uint32(0xf4516b6b), uint32(0x62616c1c), uint32(0xd8306585), uint32(0x4e0062f2), uint32(0xed95066c), 5192 uint32(0x7ba5011b), uint32(0xc1f40882), uint32(0x57c40ff5), uint32(0xc6d9b065), uint32(0x50e9b712), 5193 uint32(0xeab8be8b), uint32(0x7c88b9fc), uint32(0xdf1ddd62), uint32(0x492dda15), uint32(0xf37cd38c), 5194 uint32(0x654cd4fb), uint32(0x5861b24d), uint32(0xce51b53a), uint32(0x7400bca3), uint32(0xe230bbd4), 5195 uint32(0x41a5df4a), uint32(0xd795d83d), uint32(0x6dc4d1a4), uint32(0xfbf4d6d3), uint32(0x6ae96943), 5196 uint32(0xfcd96e34), uint32(0x468867ad), uint32(0xd0b860da), uint32(0x732d0444), uint32(0xe51d0333), 5197 uint32(0x5f4c0aaa), uint32(0xc97c0ddd), uint32(0x3c710550), uint32(0xaa410227), uint32(0x10100bbe), 5198 uint32(0x86200cc9), uint32(0x25b56857), uint32(0xb3856f20), uint32(0x09d466b9), uint32(0x9fe461ce), 5199 uint32(0x0ef9de5e), uint32(0x98c9d929), uint32(0x2298d0b0), uint32(0xb4a8d7c7), uint32(0x173db359), 5200 uint32(0x810db42e), uint32(0x3b5cbdb7), uint32(0xad6cbac0), uint32(0x2083b8ed), uint32(0xb6b3bf9a), 5201 uint32(0x0ce2b603), uint32(0x9ad2b174), uint32(0x3947d5ea), uint32(0xaf77d29d), uint32(0x1526db04), 5202 uint32(0x8316dc73), uint32(0x120b63e3), uint32(0x843b6494), uint32(0x3e6a6d0d), uint32(0xa85a6a7a), 5203 uint32(0x0bcf0ee4), uint32(0x9dff0993), uint32(0x27ae000a), uint32(0xb19e077d), uint32(0x44930ff0), 5204 uint32(0xd2a30887), uint32(0x68f2011e), uint32(0xfec20669), uint32(0x5d5762f7), uint32(0xcb676580), 5205 uint32(0x71366c19), uint32(0xe7066b6e), uint32(0x761bd4fe), uint32(0xe02bd389), uint32(0x5a7ada10), 5206 uint32(0xcc4add67), uint32(0x6fdfb9f9), uint32(0xf9efbe8e), uint32(0x43beb717), uint32(0xd58eb060), 5207 uint32(0xe8a3d6d6), uint32(0x7e93d1a1), uint32(0xc4c2d838), uint32(0x52f2df4f), uint32(0xf167bbd1), 5208 uint32(0x6757bca6), uint32(0xdd06b53f), uint32(0x4b36b248), uint32(0xda2b0dd8), uint32(0x4c1b0aaf), 5209 uint32(0xf64a0336), uint32(0x607a0441), uint32(0xc3ef60df), uint32(0x55df67a8), uint32(0xef8e6e31), 5210 uint32(0x79be6946), uint32(0x8cb361cb), uint32(0x1a8366bc), uint32(0xa0d26f25), uint32(0x36e26852), 5211 uint32(0x95770ccc), uint32(0x03470bbb), uint32(0xb9160222), uint32(0x2f260555), uint32(0xbe3bbac5), 5212 uint32(0x280bbdb2), uint32(0x925ab42b), uint32(0x046ab35c), uint32(0xa7ffd7c2), uint32(0x31cfd0b5), 5213 uint32(0x8b9ed92c), uint32(0x1daede5b), uint32(0xb0c2649b), uint32(0x26f263ec), uint32(0x9ca36a75), 5214 uint32(0x0a936d02), uint32(0xa906099c), uint32(0x3f360eeb), uint32(0x85670772), uint32(0x13570005), 5215 uint32(0x824abf95), uint32(0x147ab8e2), uint32(0xae2bb17b), uint32(0x381bb60c), uint32(0x9b8ed292), 5216 uint32(0x0dbed5e5), uint32(0xb7efdc7c), uint32(0x21dfdb0b), uint32(0xd4d2d386), uint32(0x42e2d4f1), 5217 uint32(0xf8b3dd68), uint32(0x6e83da1f), uint32(0xcd16be81), uint32(0x5b26b9f6), uint32(0xe177b06f), 5218 uint32(0x7747b718), uint32(0xe65a0888), uint32(0x706a0fff), uint32(0xca3b0666), uint32(0x5c0b0111), 5219 uint32(0xff9e658f), uint32(0x69ae62f8), uint32(0xd3ff6b61), uint32(0x45cf6c16), uint32(0x78e20aa0), 5220 uint32(0xeed20dd7), uint32(0x5483044e), uint32(0xc2b30339), uint32(0x612667a7), uint32(0xf71660d0), 5221 uint32(0x4d476949), uint32(0xdb776e3e), uint32(0x4a6ad1ae), uint32(0xdc5ad6d9), uint32(0x660bdf40), 5222 uint32(0xf03bd837), uint32(0x53aebca9), uint32(0xc59ebbde), uint32(0x7fcfb247), uint32(0xe9ffb530), 5223 uint32(0x1cf2bdbd), uint32(0x8ac2baca), uint32(0x3093b353), uint32(0xa6a3b424), uint32(0x0536d0ba), 5224 uint32(0x9306d7cd), uint32(0x2957de54), uint32(0xbf67d923), uint32(0x2e7a66b3), uint32(0xb84a61c4), 5225 uint32(0x021b685d), uint32(0x942b6f2a), uint32(0x37be0bb4), uint32(0xa18e0cc3), uint32(0x1bdf055a), 5226 uint32(0x8def022d), 5227 }, 5228 { 5229 uint32(0x00000000), uint32(0x41311b19), uint32(0x82623632), uint32(0xc3532d2b), uint32(0x04c56c64), 5230 uint32(0x45f4777d), uint32(0x86a75a56), uint32(0xc796414f), uint32(0x088ad9c8), uint32(0x49bbc2d1), 5231 uint32(0x8ae8effa), uint32(0xcbd9f4e3), uint32(0x0c4fb5ac), uint32(0x4d7eaeb5), uint32(0x8e2d839e), 5232 uint32(0xcf1c9887), uint32(0x5112c24a), uint32(0x1023d953), uint32(0xd370f478), uint32(0x9241ef61), 5233 uint32(0x55d7ae2e), uint32(0x14e6b537), uint32(0xd7b5981c), uint32(0x96848305), uint32(0x59981b82), 5234 uint32(0x18a9009b), uint32(0xdbfa2db0), uint32(0x9acb36a9), uint32(0x5d5d77e6), uint32(0x1c6c6cff), 5235 uint32(0xdf3f41d4), uint32(0x9e0e5acd), uint32(0xa2248495), uint32(0xe3159f8c), uint32(0x2046b2a7), 5236 uint32(0x6177a9be), uint32(0xa6e1e8f1), uint32(0xe7d0f3e8), uint32(0x2483dec3), uint32(0x65b2c5da), 5237 uint32(0xaaae5d5d), uint32(0xeb9f4644), uint32(0x28cc6b6f), uint32(0x69fd7076), uint32(0xae6b3139), 5238 uint32(0xef5a2a20), uint32(0x2c09070b), uint32(0x6d381c12), uint32(0xf33646df), uint32(0xb2075dc6), 5239 uint32(0x715470ed), uint32(0x30656bf4), uint32(0xf7f32abb), uint32(0xb6c231a2), uint32(0x75911c89), 5240 uint32(0x34a00790), uint32(0xfbbc9f17), uint32(0xba8d840e), uint32(0x79dea925), uint32(0x38efb23c), 5241 uint32(0xff79f373), uint32(0xbe48e86a), uint32(0x7d1bc541), uint32(0x3c2ade58), uint32(0x054f79f0), 5242 uint32(0x447e62e9), uint32(0x872d4fc2), uint32(0xc61c54db), uint32(0x018a1594), uint32(0x40bb0e8d), 5243 uint32(0x83e823a6), uint32(0xc2d938bf), uint32(0x0dc5a038), uint32(0x4cf4bb21), uint32(0x8fa7960a), 5244 uint32(0xce968d13), uint32(0x0900cc5c), uint32(0x4831d745), uint32(0x8b62fa6e), uint32(0xca53e177), 5245 uint32(0x545dbbba), uint32(0x156ca0a3), uint32(0xd63f8d88), uint32(0x970e9691), uint32(0x5098d7de), 5246 uint32(0x11a9ccc7), uint32(0xd2fae1ec), uint32(0x93cbfaf5), uint32(0x5cd76272), uint32(0x1de6796b), 5247 uint32(0xdeb55440), uint32(0x9f844f59), uint32(0x58120e16), uint32(0x1923150f), uint32(0xda703824), 5248 uint32(0x9b41233d), uint32(0xa76bfd65), uint32(0xe65ae67c), uint32(0x2509cb57), uint32(0x6438d04e), 5249 uint32(0xa3ae9101), uint32(0xe29f8a18), uint32(0x21cca733), uint32(0x60fdbc2a), uint32(0xafe124ad), 5250 uint32(0xeed03fb4), uint32(0x2d83129f), uint32(0x6cb20986), uint32(0xab2448c9), uint32(0xea1553d0), 5251 uint32(0x29467efb), uint32(0x687765e2), uint32(0xf6793f2f), uint32(0xb7482436), uint32(0x741b091d), 5252 uint32(0x352a1204), uint32(0xf2bc534b), uint32(0xb38d4852), uint32(0x70de6579), uint32(0x31ef7e60), 5253 uint32(0xfef3e6e7), uint32(0xbfc2fdfe), uint32(0x7c91d0d5), uint32(0x3da0cbcc), uint32(0xfa368a83), 5254 uint32(0xbb07919a), uint32(0x7854bcb1), uint32(0x3965a7a8), uint32(0x4b98833b), uint32(0x0aa99822), 5255 uint32(0xc9fab509), uint32(0x88cbae10), uint32(0x4f5def5f), uint32(0x0e6cf446), uint32(0xcd3fd96d), 5256 uint32(0x8c0ec274), uint32(0x43125af3), uint32(0x022341ea), uint32(0xc1706cc1), uint32(0x804177d8), 5257 uint32(0x47d73697), uint32(0x06e62d8e), uint32(0xc5b500a5), uint32(0x84841bbc), uint32(0x1a8a4171), 5258 uint32(0x5bbb5a68), uint32(0x98e87743), uint32(0xd9d96c5a), uint32(0x1e4f2d15), uint32(0x5f7e360c), 5259 uint32(0x9c2d1b27), uint32(0xdd1c003e), uint32(0x120098b9), uint32(0x533183a0), uint32(0x9062ae8b), 5260 uint32(0xd153b592), uint32(0x16c5f4dd), uint32(0x57f4efc4), uint32(0x94a7c2ef), uint32(0xd596d9f6), 5261 uint32(0xe9bc07ae), uint32(0xa88d1cb7), uint32(0x6bde319c), uint32(0x2aef2a85), uint32(0xed796bca), 5262 uint32(0xac4870d3), uint32(0x6f1b5df8), uint32(0x2e2a46e1), uint32(0xe136de66), uint32(0xa007c57f), 5263 uint32(0x6354e854), uint32(0x2265f34d), uint32(0xe5f3b202), uint32(0xa4c2a91b), uint32(0x67918430), 5264 uint32(0x26a09f29), uint32(0xb8aec5e4), uint32(0xf99fdefd), uint32(0x3accf3d6), uint32(0x7bfde8cf), 5265 uint32(0xbc6ba980), uint32(0xfd5ab299), uint32(0x3e099fb2), uint32(0x7f3884ab), uint32(0xb0241c2c), 5266 uint32(0xf1150735), uint32(0x32462a1e), uint32(0x73773107), uint32(0xb4e17048), uint32(0xf5d06b51), 5267 uint32(0x3683467a), uint32(0x77b25d63), uint32(0x4ed7facb), uint32(0x0fe6e1d2), uint32(0xccb5ccf9), 5268 uint32(0x8d84d7e0), uint32(0x4a1296af), uint32(0x0b238db6), uint32(0xc870a09d), uint32(0x8941bb84), 5269 uint32(0x465d2303), uint32(0x076c381a), uint32(0xc43f1531), uint32(0x850e0e28), uint32(0x42984f67), 5270 uint32(0x03a9547e), uint32(0xc0fa7955), uint32(0x81cb624c), uint32(0x1fc53881), uint32(0x5ef42398), 5271 uint32(0x9da70eb3), uint32(0xdc9615aa), uint32(0x1b0054e5), uint32(0x5a314ffc), uint32(0x996262d7), 5272 uint32(0xd85379ce), uint32(0x174fe149), uint32(0x567efa50), uint32(0x952dd77b), uint32(0xd41ccc62), 5273 uint32(0x138a8d2d), uint32(0x52bb9634), uint32(0x91e8bb1f), uint32(0xd0d9a006), uint32(0xecf37e5e), 5274 uint32(0xadc26547), uint32(0x6e91486c), uint32(0x2fa05375), uint32(0xe836123a), uint32(0xa9070923), 5275 uint32(0x6a542408), uint32(0x2b653f11), uint32(0xe479a796), uint32(0xa548bc8f), uint32(0x661b91a4), 5276 uint32(0x272a8abd), uint32(0xe0bccbf2), uint32(0xa18dd0eb), uint32(0x62defdc0), uint32(0x23efe6d9), 5277 uint32(0xbde1bc14), uint32(0xfcd0a70d), uint32(0x3f838a26), uint32(0x7eb2913f), uint32(0xb924d070), 5278 uint32(0xf815cb69), uint32(0x3b46e642), uint32(0x7a77fd5b), uint32(0xb56b65dc), uint32(0xf45a7ec5), 5279 uint32(0x370953ee), uint32(0x763848f7), uint32(0xb1ae09b8), uint32(0xf09f12a1), uint32(0x33cc3f8a), 5280 uint32(0x72fd2493), 5281 }, 5282 { 5283 uint32(0x00000000), uint32(0x376ac201), uint32(0x6ed48403), uint32(0x59be4602), uint32(0xdca80907), 5284 uint32(0xebc2cb06), uint32(0xb27c8d04), uint32(0x85164f05), uint32(0xb851130e), uint32(0x8f3bd10f), 5285 uint32(0xd685970d), uint32(0xe1ef550c), uint32(0x64f91a09), uint32(0x5393d808), uint32(0x0a2d9e0a), 5286 uint32(0x3d475c0b), uint32(0x70a3261c), uint32(0x47c9e41d), uint32(0x1e77a21f), uint32(0x291d601e), 5287 uint32(0xac0b2f1b), uint32(0x9b61ed1a), uint32(0xc2dfab18), uint32(0xf5b56919), uint32(0xc8f23512), 5288 uint32(0xff98f713), uint32(0xa626b111), uint32(0x914c7310), uint32(0x145a3c15), uint32(0x2330fe14), 5289 uint32(0x7a8eb816), uint32(0x4de47a17), uint32(0xe0464d38), uint32(0xd72c8f39), uint32(0x8e92c93b), 5290 uint32(0xb9f80b3a), uint32(0x3cee443f), uint32(0x0b84863e), uint32(0x523ac03c), uint32(0x6550023d), 5291 uint32(0x58175e36), uint32(0x6f7d9c37), uint32(0x36c3da35), uint32(0x01a91834), uint32(0x84bf5731), 5292 uint32(0xb3d59530), uint32(0xea6bd332), uint32(0xdd011133), uint32(0x90e56b24), uint32(0xa78fa925), 5293 uint32(0xfe31ef27), uint32(0xc95b2d26), uint32(0x4c4d6223), uint32(0x7b27a022), uint32(0x2299e620), 5294 uint32(0x15f32421), uint32(0x28b4782a), uint32(0x1fdeba2b), uint32(0x4660fc29), uint32(0x710a3e28), 5295 uint32(0xf41c712d), uint32(0xc376b32c), uint32(0x9ac8f52e), uint32(0xada2372f), uint32(0xc08d9a70), 5296 uint32(0xf7e75871), uint32(0xae591e73), uint32(0x9933dc72), uint32(0x1c259377), uint32(0x2b4f5176), 5297 uint32(0x72f11774), uint32(0x459bd575), uint32(0x78dc897e), uint32(0x4fb64b7f), uint32(0x16080d7d), 5298 uint32(0x2162cf7c), uint32(0xa4748079), uint32(0x931e4278), uint32(0xcaa0047a), uint32(0xfdcac67b), 5299 uint32(0xb02ebc6c), uint32(0x87447e6d), uint32(0xdefa386f), uint32(0xe990fa6e), uint32(0x6c86b56b), 5300 uint32(0x5bec776a), uint32(0x02523168), uint32(0x3538f369), uint32(0x087faf62), uint32(0x3f156d63), 5301 uint32(0x66ab2b61), uint32(0x51c1e960), uint32(0xd4d7a665), uint32(0xe3bd6464), uint32(0xba032266), 5302 uint32(0x8d69e067), uint32(0x20cbd748), uint32(0x17a11549), uint32(0x4e1f534b), uint32(0x7975914a), 5303 uint32(0xfc63de4f), uint32(0xcb091c4e), uint32(0x92b75a4c), uint32(0xa5dd984d), uint32(0x989ac446), 5304 uint32(0xaff00647), uint32(0xf64e4045), uint32(0xc1248244), uint32(0x4432cd41), uint32(0x73580f40), 5305 uint32(0x2ae64942), uint32(0x1d8c8b43), uint32(0x5068f154), uint32(0x67023355), uint32(0x3ebc7557), 5306 uint32(0x09d6b756), uint32(0x8cc0f853), uint32(0xbbaa3a52), uint32(0xe2147c50), uint32(0xd57ebe51), 5307 uint32(0xe839e25a), uint32(0xdf53205b), uint32(0x86ed6659), uint32(0xb187a458), uint32(0x3491eb5d), 5308 uint32(0x03fb295c), uint32(0x5a456f5e), uint32(0x6d2fad5f), uint32(0x801b35e1), uint32(0xb771f7e0), 5309 uint32(0xeecfb1e2), uint32(0xd9a573e3), uint32(0x5cb33ce6), uint32(0x6bd9fee7), uint32(0x3267b8e5), 5310 uint32(0x050d7ae4), uint32(0x384a26ef), uint32(0x0f20e4ee), uint32(0x569ea2ec), uint32(0x61f460ed), 5311 uint32(0xe4e22fe8), uint32(0xd388ede9), uint32(0x8a36abeb), uint32(0xbd5c69ea), uint32(0xf0b813fd), 5312 uint32(0xc7d2d1fc), uint32(0x9e6c97fe), uint32(0xa90655ff), uint32(0x2c101afa), uint32(0x1b7ad8fb), 5313 uint32(0x42c49ef9), uint32(0x75ae5cf8), uint32(0x48e900f3), uint32(0x7f83c2f2), uint32(0x263d84f0), 5314 uint32(0x115746f1), uint32(0x944109f4), uint32(0xa32bcbf5), uint32(0xfa958df7), uint32(0xcdff4ff6), 5315 uint32(0x605d78d9), uint32(0x5737bad8), uint32(0x0e89fcda), uint32(0x39e33edb), uint32(0xbcf571de), 5316 uint32(0x8b9fb3df), uint32(0xd221f5dd), uint32(0xe54b37dc), uint32(0xd80c6bd7), uint32(0xef66a9d6), 5317 uint32(0xb6d8efd4), uint32(0x81b22dd5), uint32(0x04a462d0), uint32(0x33cea0d1), uint32(0x6a70e6d3), 5318 uint32(0x5d1a24d2), uint32(0x10fe5ec5), uint32(0x27949cc4), uint32(0x7e2adac6), uint32(0x494018c7), 5319 uint32(0xcc5657c2), uint32(0xfb3c95c3), uint32(0xa282d3c1), uint32(0x95e811c0), uint32(0xa8af4dcb), 5320 uint32(0x9fc58fca), uint32(0xc67bc9c8), uint32(0xf1110bc9), uint32(0x740744cc), uint32(0x436d86cd), 5321 uint32(0x1ad3c0cf), uint32(0x2db902ce), uint32(0x4096af91), uint32(0x77fc6d90), uint32(0x2e422b92), 5322 uint32(0x1928e993), uint32(0x9c3ea696), uint32(0xab546497), uint32(0xf2ea2295), uint32(0xc580e094), 5323 uint32(0xf8c7bc9f), uint32(0xcfad7e9e), uint32(0x9613389c), uint32(0xa179fa9d), uint32(0x246fb598), 5324 uint32(0x13057799), uint32(0x4abb319b), uint32(0x7dd1f39a), uint32(0x3035898d), uint32(0x075f4b8c), 5325 uint32(0x5ee10d8e), uint32(0x698bcf8f), uint32(0xec9d808a), uint32(0xdbf7428b), uint32(0x82490489), 5326 uint32(0xb523c688), uint32(0x88649a83), uint32(0xbf0e5882), uint32(0xe6b01e80), uint32(0xd1dadc81), 5327 uint32(0x54cc9384), uint32(0x63a65185), uint32(0x3a181787), uint32(0x0d72d586), uint32(0xa0d0e2a9), 5328 uint32(0x97ba20a8), uint32(0xce0466aa), uint32(0xf96ea4ab), uint32(0x7c78ebae), uint32(0x4b1229af), 5329 uint32(0x12ac6fad), uint32(0x25c6adac), uint32(0x1881f1a7), uint32(0x2feb33a6), uint32(0x765575a4), 5330 uint32(0x413fb7a5), uint32(0xc429f8a0), uint32(0xf3433aa1), uint32(0xaafd7ca3), uint32(0x9d97bea2), 5331 uint32(0xd073c4b5), uint32(0xe71906b4), uint32(0xbea740b6), uint32(0x89cd82b7), uint32(0x0cdbcdb2), 5332 uint32(0x3bb10fb3), uint32(0x620f49b1), uint32(0x55658bb0), uint32(0x6822d7bb), uint32(0x5f4815ba), 5333 uint32(0x06f653b8), uint32(0x319c91b9), uint32(0xb48adebc), uint32(0x83e01cbd), uint32(0xda5e5abf), 5334 uint32(0xed3498be), 5335 }, 5336 { 5337 uint32(0x00000000), uint32(0x6567bcb8), uint32(0x8bc809aa), uint32(0xeeafb512), uint32(0x5797628f), 5338 uint32(0x32f0de37), uint32(0xdc5f6b25), uint32(0xb938d79d), uint32(0xef28b4c5), uint32(0x8a4f087d), 5339 uint32(0x64e0bd6f), uint32(0x018701d7), uint32(0xb8bfd64a), uint32(0xddd86af2), uint32(0x3377dfe0), 5340 uint32(0x56106358), uint32(0x9f571950), uint32(0xfa30a5e8), uint32(0x149f10fa), uint32(0x71f8ac42), 5341 uint32(0xc8c07bdf), uint32(0xada7c767), uint32(0x43087275), uint32(0x266fcecd), uint32(0x707fad95), 5342 uint32(0x1518112d), uint32(0xfbb7a43f), uint32(0x9ed01887), uint32(0x27e8cf1a), uint32(0x428f73a2), 5343 uint32(0xac20c6b0), uint32(0xc9477a08), uint32(0x3eaf32a0), uint32(0x5bc88e18), uint32(0xb5673b0a), 5344 uint32(0xd00087b2), uint32(0x6938502f), uint32(0x0c5fec97), uint32(0xe2f05985), uint32(0x8797e53d), 5345 uint32(0xd1878665), uint32(0xb4e03add), uint32(0x5a4f8fcf), uint32(0x3f283377), uint32(0x8610e4ea), 5346 uint32(0xe3775852), uint32(0x0dd8ed40), uint32(0x68bf51f8), uint32(0xa1f82bf0), uint32(0xc49f9748), 5347 uint32(0x2a30225a), uint32(0x4f579ee2), uint32(0xf66f497f), uint32(0x9308f5c7), uint32(0x7da740d5), 5348 uint32(0x18c0fc6d), uint32(0x4ed09f35), uint32(0x2bb7238d), uint32(0xc518969f), uint32(0xa07f2a27), 5349 uint32(0x1947fdba), uint32(0x7c204102), uint32(0x928ff410), uint32(0xf7e848a8), uint32(0x3d58149b), 5350 uint32(0x583fa823), uint32(0xb6901d31), uint32(0xd3f7a189), uint32(0x6acf7614), uint32(0x0fa8caac), 5351 uint32(0xe1077fbe), uint32(0x8460c306), uint32(0xd270a05e), uint32(0xb7171ce6), uint32(0x59b8a9f4), 5352 uint32(0x3cdf154c), uint32(0x85e7c2d1), uint32(0xe0807e69), uint32(0x0e2fcb7b), uint32(0x6b4877c3), 5353 uint32(0xa20f0dcb), uint32(0xc768b173), uint32(0x29c70461), uint32(0x4ca0b8d9), uint32(0xf5986f44), 5354 uint32(0x90ffd3fc), uint32(0x7e5066ee), uint32(0x1b37da56), uint32(0x4d27b90e), uint32(0x284005b6), 5355 uint32(0xc6efb0a4), uint32(0xa3880c1c), uint32(0x1ab0db81), uint32(0x7fd76739), uint32(0x9178d22b), 5356 uint32(0xf41f6e93), uint32(0x03f7263b), uint32(0x66909a83), uint32(0x883f2f91), uint32(0xed589329), 5357 uint32(0x546044b4), uint32(0x3107f80c), uint32(0xdfa84d1e), uint32(0xbacff1a6), uint32(0xecdf92fe), 5358 uint32(0x89b82e46), uint32(0x67179b54), uint32(0x027027ec), uint32(0xbb48f071), uint32(0xde2f4cc9), 5359 uint32(0x3080f9db), uint32(0x55e74563), uint32(0x9ca03f6b), uint32(0xf9c783d3), uint32(0x176836c1), 5360 uint32(0x720f8a79), uint32(0xcb375de4), uint32(0xae50e15c), uint32(0x40ff544e), uint32(0x2598e8f6), 5361 uint32(0x73888bae), uint32(0x16ef3716), uint32(0xf8408204), uint32(0x9d273ebc), uint32(0x241fe921), 5362 uint32(0x41785599), uint32(0xafd7e08b), uint32(0xcab05c33), uint32(0x3bb659ed), uint32(0x5ed1e555), 5363 uint32(0xb07e5047), uint32(0xd519ecff), uint32(0x6c213b62), uint32(0x094687da), uint32(0xe7e932c8), 5364 uint32(0x828e8e70), uint32(0xd49eed28), uint32(0xb1f95190), uint32(0x5f56e482), uint32(0x3a31583a), 5365 uint32(0x83098fa7), uint32(0xe66e331f), uint32(0x08c1860d), uint32(0x6da63ab5), uint32(0xa4e140bd), 5366 uint32(0xc186fc05), uint32(0x2f294917), uint32(0x4a4ef5af), uint32(0xf3762232), uint32(0x96119e8a), 5367 uint32(0x78be2b98), uint32(0x1dd99720), uint32(0x4bc9f478), uint32(0x2eae48c0), uint32(0xc001fdd2), 5368 uint32(0xa566416a), uint32(0x1c5e96f7), uint32(0x79392a4f), uint32(0x97969f5d), uint32(0xf2f123e5), 5369 uint32(0x05196b4d), uint32(0x607ed7f5), uint32(0x8ed162e7), uint32(0xebb6de5f), uint32(0x528e09c2), 5370 uint32(0x37e9b57a), uint32(0xd9460068), uint32(0xbc21bcd0), uint32(0xea31df88), uint32(0x8f566330), 5371 uint32(0x61f9d622), uint32(0x049e6a9a), uint32(0xbda6bd07), uint32(0xd8c101bf), uint32(0x366eb4ad), 5372 uint32(0x53090815), uint32(0x9a4e721d), uint32(0xff29cea5), uint32(0x11867bb7), uint32(0x74e1c70f), 5373 uint32(0xcdd91092), uint32(0xa8beac2a), uint32(0x46111938), uint32(0x2376a580), uint32(0x7566c6d8), 5374 uint32(0x10017a60), uint32(0xfeaecf72), uint32(0x9bc973ca), uint32(0x22f1a457), uint32(0x479618ef), 5375 uint32(0xa939adfd), uint32(0xcc5e1145), uint32(0x06ee4d76), uint32(0x6389f1ce), uint32(0x8d2644dc), 5376 uint32(0xe841f864), uint32(0x51792ff9), uint32(0x341e9341), uint32(0xdab12653), uint32(0xbfd69aeb), 5377 uint32(0xe9c6f9b3), uint32(0x8ca1450b), uint32(0x620ef019), uint32(0x07694ca1), uint32(0xbe519b3c), 5378 uint32(0xdb362784), uint32(0x35999296), uint32(0x50fe2e2e), uint32(0x99b95426), uint32(0xfcdee89e), 5379 uint32(0x12715d8c), uint32(0x7716e134), uint32(0xce2e36a9), uint32(0xab498a11), uint32(0x45e63f03), 5380 uint32(0x208183bb), uint32(0x7691e0e3), uint32(0x13f65c5b), uint32(0xfd59e949), uint32(0x983e55f1), 5381 uint32(0x2106826c), uint32(0x44613ed4), uint32(0xaace8bc6), uint32(0xcfa9377e), uint32(0x38417fd6), 5382 uint32(0x5d26c36e), uint32(0xb389767c), uint32(0xd6eecac4), uint32(0x6fd61d59), uint32(0x0ab1a1e1), 5383 uint32(0xe41e14f3), uint32(0x8179a84b), uint32(0xd769cb13), uint32(0xb20e77ab), uint32(0x5ca1c2b9), 5384 uint32(0x39c67e01), uint32(0x80fea99c), uint32(0xe5991524), uint32(0x0b36a036), uint32(0x6e511c8e), 5385 uint32(0xa7166686), uint32(0xc271da3e), uint32(0x2cde6f2c), uint32(0x49b9d394), uint32(0xf0810409), 5386 uint32(0x95e6b8b1), uint32(0x7b490da3), uint32(0x1e2eb11b), uint32(0x483ed243), uint32(0x2d596efb), 5387 uint32(0xc3f6dbe9), uint32(0xa6916751), uint32(0x1fa9b0cc), uint32(0x7ace0c74), uint32(0x9461b966), 5388 uint32(0xf10605de), 5389 }, 5390 } /* crc32.h:5:25 */ 5391 5392 // ========================================================================= 5393 // This function can be used by asm versions of crc32() 5394 func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */ 5395 return uintptr(uintptr(unsafe.Pointer(&crc_table))) 5396 } 5397 5398 // ========================================================================= 5399 5400 // ========================================================================= 5401 func Xcrc32_z(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:202:23: */ 5402 bp := tls.Alloc(4) 5403 defer tls.Free(4) 5404 5405 if buf == uintptr(Z_NULL) { 5406 return 0 5407 } 5408 5409 if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) { 5410 // var endian Z_crc_t at bp, 4 5411 5412 *(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1) 5413 if *(*uint8)(unsafe.Pointer(bp /* &endian */)) != 0 { 5414 return crc32_little(tls, crc, buf, len) 5415 } else { 5416 return crc32_big(tls, crc, buf, len) 5417 } 5418 } 5419 crc = (crc ^ 0xffffffff) 5420 for len >= uint64(8) { 5421 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5422 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5423 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5424 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5425 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5426 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5427 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5428 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5429 len = len - (uint64(8)) 5430 } 5431 if len != 0 { 5432 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 5433 crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8)) 5434 } 5435 } 5436 return (crc ^ 0xffffffff) 5437 } 5438 5439 // ========================================================================= 5440 func Xcrc32(tls *libc.TLS, crc uint64, buf uintptr, len UInt) uint64 { /* crc32.c:237:23: */ 5441 return Xcrc32_z(tls, crc, buf, uint64(len)) 5442 } 5443 5444 // 5445 // This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit 5446 // integer pointer type. This violates the strict aliasing rule, where a 5447 // compiler can assume, for optimization purposes, that two pointers to 5448 // fundamentally different types won't ever point to the same memory. This can 5449 // manifest as a problem only if one of the pointers is written to. This code 5450 // only reads from those pointers. So long as this code remains isolated in 5451 // this compilation unit, there won't be a problem. For this reason, this code 5452 // should not be copied and pasted into a compilation unit in which other code 5453 // writes to the buffer that is passed to these routines. 5454 // 5455 5456 // ========================================================================= 5457 5458 // ========================================================================= 5459 func crc32_little(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:266:21: */ 5460 var c Z_crc_t 5461 var buf4 uintptr 5462 5463 c = Z_crc_t(crc) 5464 c = ^c 5465 for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) { 5466 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)) 5467 len-- 5468 } 5469 5470 buf4 = buf 5471 for len >= uint64(32) { 5472 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5473 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))) 5474 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5475 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))) 5476 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5477 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))) 5478 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5479 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))) 5480 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5481 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))) 5482 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5483 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))) 5484 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5485 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))) 5486 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5487 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))) 5488 len = len - (uint64(32)) 5489 } 5490 for len >= uint64(4) { 5491 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5492 c = (((*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 3*1024) + uintptr((c&Z_crc_t(0xff)))*4)) ^ *(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 2*1024) + uintptr(((c>>8)&Z_crc_t(0xff)))*4))) ^ *(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 1*1024) + uintptr(((c>>16)&Z_crc_t(0xff)))*4))) ^ *(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr((c>>24))*4))) 5493 len = len - (uint64(4)) 5494 } 5495 buf = buf4 5496 5497 if len != 0 { 5498 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 5499 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)) 5500 } 5501 } 5502 c = ^c 5503 return uint64(c) 5504 } 5505 5506 // ========================================================================= 5507 5508 // ========================================================================= 5509 func crc32_big(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:306:21: */ 5510 var c Z_crc_t 5511 var buf4 uintptr 5512 5513 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)) 5514 c = ^c 5515 for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) { 5516 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)) 5517 len-- 5518 } 5519 5520 buf4 = buf 5521 for len >= uint64(32) { 5522 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5523 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))) 5524 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5525 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))) 5526 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5527 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))) 5528 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5529 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))) 5530 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5531 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))) 5532 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5533 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))) 5534 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5535 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))) 5536 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5537 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))) 5538 len = len - (uint64(32)) 5539 } 5540 for len >= uint64(4) { 5541 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 5542 c = (((*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 4*1024) + uintptr((c&Z_crc_t(0xff)))*4)) ^ *(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 5*1024) + uintptr(((c>>8)&Z_crc_t(0xff)))*4))) ^ *(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 6*1024) + uintptr(((c>>16)&Z_crc_t(0xff)))*4))) ^ *(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table)) + 7*1024) + uintptr((c>>24))*4))) 5543 len = len - (uint64(4)) 5544 } 5545 buf = buf4 5546 5547 if len != 0 { 5548 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 5549 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)) 5550 } 5551 } 5552 c = ^c 5553 return (uint64((((((c) >> 24) & Z_crc_t(0xff)) + (((c) >> 8) & Z_crc_t(0xff00))) + (((c) & Z_crc_t(0xff00)) << 8)) + (((c) & Z_crc_t(0xff)) << 24))) 5554 } 5555 5556 // ========================================================================= 5557 func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint64) uint64 { /* crc32.c:344:21: */ 5558 var sum uint64 5559 5560 sum = uint64(0) 5561 for vec != 0 { 5562 if (vec & uint64(1)) != 0 { 5563 sum = sum ^ (*(*uint64)(unsafe.Pointer(mat))) 5564 } 5565 vec >>= 1 5566 mat += 8 5567 } 5568 return sum 5569 } 5570 5571 // ========================================================================= 5572 func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */ 5573 var n int32 5574 5575 for n = 0; n < GF2_DIM; n++ { 5576 *(*uint64)(unsafe.Pointer(square + uintptr(n)*8)) = gf2_matrix_times(tls, mat, *(*uint64)(unsafe.Pointer(mat + uintptr(n)*8))) 5577 } 5578 } 5579 5580 // ========================================================================= 5581 func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:372:13: */ 5582 bp := tls.Alloc(512) 5583 defer tls.Free(512) 5584 5585 var n int32 5586 var row uint64 5587 // var even [32]uint64 at bp+256, 256 5588 // even-power-of-two zeros operator 5589 // var odd [32]uint64 at bp, 256 5590 // odd-power-of-two zeros operator 5591 5592 // degenerate case (also disallow negative lengths) 5593 if len2 <= int64(0) { 5594 return crc1 5595 } 5596 5597 // put operator for one zero bit in odd 5598 *(*uint64)(unsafe.Pointer(bp /* &odd[0] */)) = 0xedb88320 // CRC-32 polynomial 5599 row = uint64(1) 5600 for n = 1; n < GF2_DIM; n++ { 5601 *(*uint64)(unsafe.Pointer(bp /* &odd[0] */ + uintptr(n)*8)) = row 5602 row <<= 1 5603 } 5604 5605 // put operator for two zero bits in even 5606 gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */) 5607 5608 // put operator for four zero bits in odd 5609 gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */) 5610 5611 // apply len2 zeros to crc1 (first square will put the operator for one 5612 // zero byte, eight zero bits, in even) 5613 for ok := true; ok; ok = (len2 != int64(0)) { 5614 // apply zeros operator for this bit of len2 5615 gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */) 5616 if (len2 & int64(1)) != 0 { 5617 crc1 = gf2_matrix_times(tls, bp+256 /* &even[0] */, crc1) 5618 } 5619 len2 >>= 1 5620 5621 // if no more bits set, then done 5622 if len2 == int64(0) { 5623 break 5624 } 5625 5626 // another iteration of the loop with odd and even swapped 5627 gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */) 5628 if (len2 & int64(1)) != 0 { 5629 crc1 = gf2_matrix_times(tls, bp /* &odd[0] */, crc1) 5630 } 5631 len2 >>= 1 5632 5633 // if no more bits set, then done 5634 } 5635 5636 // return combined crc 5637 crc1 = crc1 ^ (crc2) 5638 return crc1 5639 } 5640 5641 // ========================================================================= 5642 func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */ 5643 return crc32_combine_(tls, crc1, crc2, len2) 5644 } 5645 5646 func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:436:15: */ 5647 return crc32_combine_(tls, crc1, crc2, len2) 5648 } 5649 5650 // Reverse the bytes in a 32-bit value 5651 5652 // define NO_GZIP when compiling if you want to disable gzip header and 5653 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 5654 // the crc code when it is not needed. For shared libraries, gzip encoding 5655 // should be left enabled. 5656 5657 // =========================================================================== 5658 // Internal compression state. 5659 5660 // number of length codes, not counting the special END_BLOCK code 5661 5662 // number of literal bytes 0..255 5663 5664 // number of Literal or Length codes, including the END_BLOCK code 5665 5666 // number of distance codes 5667 5668 // number of codes used to transfer the bit lengths 5669 5670 // maximum heap size 5671 5672 // All codes must not exceed MAX_BITS bits 5673 5674 // size of bit buffer in bi_buf 5675 5676 // Stream status 5677 5678 // Data structure describing a single value and its code string. 5679 type Ct_data_s = struct { 5680 Ffc struct{ Ffreq Ush } 5681 Fdl struct{ Fdad Ush } 5682 } /* zlib.h:84:1 */ 5683 5684 // Reverse the bytes in a 32-bit value 5685 5686 // define NO_GZIP when compiling if you want to disable gzip header and 5687 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 5688 // the crc code when it is not needed. For shared libraries, gzip encoding 5689 // should be left enabled. 5690 5691 // =========================================================================== 5692 // Internal compression state. 5693 5694 // number of length codes, not counting the special END_BLOCK code 5695 5696 // number of literal bytes 0..255 5697 5698 // number of Literal or Length codes, including the END_BLOCK code 5699 5700 // number of distance codes 5701 5702 // number of codes used to transfer the bit lengths 5703 5704 // maximum heap size 5705 5706 // All codes must not exceed MAX_BITS bits 5707 5708 // size of bit buffer in bi_buf 5709 5710 // Stream status 5711 5712 // Data structure describing a single value and its code string. 5713 type Ct_data = Ct_data_s /* deflate.h:77:7 */ 5714 5715 type Static_tree_desc_s = struct { 5716 Fstatic_tree uintptr 5717 Fextra_bits uintptr 5718 Fextra_base int32 5719 Felems int32 5720 Fmax_length int32 5721 F__ccgo_pad1 [4]byte 5722 } /* deflate.h:84:9 */ 5723 5724 type Tree_desc_s = struct { 5725 Fdyn_tree uintptr 5726 Fmax_code int32 5727 F__ccgo_pad1 [4]byte 5728 Fstat_desc uintptr 5729 } /* zlib.h:84:1 */ 5730 5731 type Tree_desc = Tree_desc_s /* deflate.h:90:7 */ 5732 5733 type Pos = Ush /* deflate.h:92:13 */ 5734 type Posf = Pos /* deflate.h:93:17 */ 5735 type IPos = uint32 /* deflate.h:94:18 */ 5736 5737 // A Pos is an index in the character window. We use short instead of int to 5738 // save space in the various tables. IPos is used only for parameter passing. 5739 5740 type Deflate_state = Internal_state /* deflate.h:276:7 */ 5741 5742 var Xdeflate_copyright = *(*[69]uint8)(unsafe.Pointer(ts + 7 /* " deflate 1.2.11 ..." */)) /* deflate.c:54:12 */ 5743 // 5744 // If you use the zlib library in a product, an acknowledgment is welcome 5745 // in the documentation of your product. If for some reason you cannot 5746 // include such an acknowledgment, I would appreciate that you keep this 5747 // copyright string in the executable of your product. 5748 // 5749 5750 // =========================================================================== 5751 // Function prototypes. 5752 type Block_state = uint32 /* deflate.c:71:3 */ 5753 5754 type Compress_func = uintptr /* deflate.c:73:21 */ 5755 5756 // =========================================================================== 5757 // Local data 5758 5759 // Tail of hash chains 5760 5761 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 5762 5763 // Values for max_lazy_match, good_match and max_chain_length, depending on 5764 // the desired pack level (0..9). The values given below have been tuned to 5765 // exclude worst case performance for pathological files. Better values may be 5766 // found for specific files. 5767 type Config_s = struct { 5768 Fgood_length Ush 5769 Fmax_lazy Ush 5770 Fnice_length Ush 5771 Fmax_chain Ush 5772 Ffunc Compress_func 5773 } /* deflate.c:120:9 */ 5774 5775 // =========================================================================== 5776 // Local data 5777 5778 // Tail of hash chains 5779 5780 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 5781 5782 // Values for max_lazy_match, good_match and max_chain_length, depending on 5783 // the desired pack level (0..9). The values given below have been tuned to 5784 // exclude worst case performance for pathological files. Better values may be 5785 // found for specific files. 5786 type Config = Config_s /* deflate.c:126:3 */ 5787 5788 var configuration_table = [10]Config{ 5789 // good lazy nice chain 5790 /* 0 */ {Ffunc: 0}, // store only 5791 /* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches 5792 /* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0}, 5793 /* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 5794 5795 /* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches 5796 /* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 5797 /* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0}, 5798 /* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0}, 5799 /* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0}, 5800 /* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */ 5801 5802 // max compression 5803 5804 // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 5805 // For deflate_fast() (levels <= 3) good is ignored and lazy has a different 5806 // meaning. 5807 5808 // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH 5809 5810 // =========================================================================== 5811 // Update a hash value with the given input byte 5812 // IN assertion: all calls to UPDATE_HASH are made with consecutive input 5813 // characters, so that a running hash key can be computed from the previous 5814 // key instead of complete recalculation each time. 5815 5816 // =========================================================================== 5817 // Insert string str in the dictionary and set match_head to the previous head 5818 // of the hash chain (the most recent string with same hash key). Return 5819 // the previous length of the hash chain. 5820 // If this file is compiled with -DFASTEST, the compression level is forced 5821 // to 1, and no hash chains are maintained. 5822 // IN assertion: all calls to INSERT_STRING are made with consecutive input 5823 // characters and the first MIN_MATCH bytes of str are valid (except for 5824 // the last MIN_MATCH-1 bytes of the input file). 5825 5826 // =========================================================================== 5827 // Initialize the hash table (avoiding 64K overflow for 16 bit systems). 5828 // prev[] will be initialized on the fly. 5829 5830 // =========================================================================== 5831 // Slide the hash table when sliding the window down (could be avoided with 32 5832 // bit values at the expense of memory usage). We slide even when level == 0 to 5833 // keep the hash table consistent if we switch back to level > 0 later. 5834 func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */ 5835 var n uint32 5836 var m uint32 5837 var p uintptr 5838 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5839 5840 n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size 5841 p = ((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2) 5842 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 5843 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 5844 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 5845 if m >= wsize { 5846 return (uint16(m - wsize)) 5847 } 5848 return uint16(NIL) 5849 }() 5850 } 5851 n = wsize 5852 p = ((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2) 5853 for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 { 5854 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 5855 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 5856 if m >= wsize { 5857 return (uint16(m - wsize)) 5858 } 5859 return uint16(NIL) 5860 }() 5861 // If n is not on any hash chain, prev[n] is garbage but 5862 // its value will never be used. 5863 } 5864 } 5865 5866 // ========================================================================= 5867 func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */ 5868 return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, 5869 Z_DEFAULT_STRATEGY, version, stream_size) 5870 // To do: ignore strm->next_in if we use it as window 5871 } 5872 5873 // ========================================================================= 5874 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: */ 5875 var s uintptr 5876 var wrap int32 = 1 5877 var overlay uintptr 5878 // We overlay pending_buf and d_buf+l_buf. This works since the average 5879 // output size for (length,distance) codes is <= 24 bits. 5880 5881 if ((version == uintptr(Z_NULL)) || (int32(*(*uint8)(unsafe.Pointer(version))) != int32(my_version[0]))) || (uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{}))) { 5882 return -6 5883 } 5884 if strm == uintptr(Z_NULL) { 5885 return -2 5886 } 5887 5888 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 5889 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 5890 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 5891 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 5892 }{Xzcalloc})) 5893 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 5894 } 5895 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 5896 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 5897 f func(*libc.TLS, Voidpf, Voidpf) 5898 }{Xzcfree})) 5899 } 5900 5901 if level == (-1) { 5902 level = 6 5903 } 5904 5905 if windowBits < 0 { // suppress zlib wrapper 5906 wrap = 0 5907 windowBits = -windowBits 5908 } else if windowBits > 15 { 5909 wrap = 2 // write gzip wrapper instead 5910 windowBits = windowBits - (16) 5911 } 5912 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)) { 5913 return -2 5914 } 5915 if windowBits == 8 { 5916 windowBits = 9 5917 } // until 256-byte window bug fixed 5918 s = (*struct { 5919 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5920 })(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{}))) 5921 if s == uintptr(Z_NULL) { 5922 return -4 5923 } 5924 (*Z_stream)(unsafe.Pointer(strm)).Fstate = s 5925 (*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm 5926 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset() 5927 5928 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 5929 (*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL) 5930 (*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits) 5931 (*Deflate_state)(unsafe.Pointer(s)).Fw_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)) 5932 (*Deflate_state)(unsafe.Pointer(s)).Fw_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)) 5933 5934 (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = (UInt(memLevel) + UInt(7)) 5935 (*Deflate_state)(unsafe.Pointer(s)).Fhash_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)) 5936 (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) 5937 (*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH)) - UInt(1)) / UInt(MIN_MATCH)) 5938 5939 (*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct { 5940 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5941 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, (uint32(uint64(2) * uint64(unsafe.Sizeof(Byte(0)))))) 5942 (*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct { 5943 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5944 })(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)))) 5945 (*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct { 5946 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5947 })(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)))) 5948 5949 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64(0) // nothing written to s->window yet 5950 5951 (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = (UInt(int32(1) << (memLevel + 6))) // 16K elements by default 5952 5953 overlay = (*struct { 5954 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5955 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize, (uint32(uint64(unsafe.Sizeof(Ush(0))) + uint64(2)))) 5956 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay 5957 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2))) 5958 5959 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)) { 5960 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 5961 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-4))] 5962 XdeflateEnd(tls, strm) 5963 return -4 5964 } 5965 (*Deflate_state)(unsafe.Pointer(s)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2) 5966 (*Deflate_state)(unsafe.Pointer(s)).Fl_buf = ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((uint64(1) + uint64(unsafe.Sizeof(Ush(0)))) * uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)))) 5967 5968 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 5969 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 5970 (*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method) 5971 5972 return XdeflateReset(tls, strm) 5973 } 5974 5975 var my_version = *(*[7]uint8)(unsafe.Pointer(ts /* "1.2.11" */)) /* deflate.c:253:23 */ 5976 5977 // ========================================================================= 5978 // Check for a valid deflate stream state. Return 0 if ok, 1 if not. 5979 func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */ 5980 var s uintptr 5981 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 5982 return 1 5983 } 5984 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5985 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)) { 5986 return 1 5987 } 5988 return 0 5989 } 5990 5991 // ========================================================================= 5992 func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */ 5993 var s uintptr 5994 var str UInt 5995 var n UInt 5996 var wrap int32 5997 var avail uint32 5998 var next uintptr 5999 6000 if (deflateStateCheck(tls, strm) != 0) || (dictionary == uintptr(Z_NULL)) { 6001 return -2 6002 } 6003 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6004 wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap 6005 if ((wrap == 2) || ((wrap == 1) && ((*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE))) || ((*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0) { 6006 return -2 6007 } 6008 6009 // when using zlib wrappers, compute Adler-32 for provided dictionary 6010 if wrap == 1 { 6011 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) 6012 } 6013 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf 6014 6015 // if dictionary would fill window, just replace the history 6016 if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 6017 if wrap == 0 { // already empty otherwise 6018 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6019 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0))))) 6020 6021 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 6022 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 6023 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6024 } 6025 dictionary += (uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size)) // use the tail 6026 dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6027 } 6028 6029 // insert dictionary into window and hash 6030 avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6031 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 6032 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength 6033 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary 6034 fill_window(tls, s) 6035 for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 6036 str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 6037 n = ((*Deflate_state)(unsafe.Pointer(s)).Flookahead - (UInt(MIN_MATCH - 1))) 6038 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 6039 (*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) 6040 *(*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)) 6041 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 6042 str++ 6043 } 6044 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str 6045 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = (UInt(MIN_MATCH - 1)) 6046 fill_window(tls, s) 6047 } 6048 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 6049 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6050 (*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 6051 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 6052 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 6053 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 6054 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 6055 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail 6056 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 6057 return Z_OK 6058 } 6059 6060 // ========================================================================= 6061 func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */ 6062 var s uintptr 6063 var len UInt 6064 6065 if deflateStateCheck(tls, strm) != 0 { 6066 return -2 6067 } 6068 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6069 len = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) 6070 if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 6071 len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6072 } 6073 if (dictionary != uintptr(Z_NULL)) && (len != 0) { 6074 libc.Xmemcpy(tls, dictionary, ((((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - uintptr(len)), uint64(len)) 6075 } 6076 if dictLength != uintptr(Z_NULL) { 6077 *(*UInt)(unsafe.Pointer(dictLength)) = len 6078 } 6079 return Z_OK 6080 } 6081 6082 // ========================================================================= 6083 func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */ 6084 var s uintptr 6085 6086 if deflateStateCheck(tls, strm) != 0 { 6087 return -2 6088 } 6089 6090 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, uint64(0)) 6091 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically 6092 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN 6093 6094 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6095 (*Deflate_state)(unsafe.Pointer(s)).Fpending = uint64(0) 6096 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 6097 6098 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 { 6099 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH); 6100 } 6101 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 { 6102 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6103 return GZIP_STATE 6104 } 6105 return func() int32 { 6106 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 { 6107 return INIT_STATE 6108 } 6109 return BUSY_STATE 6110 }() 6111 }() 6112 (*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint64 { 6113 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6114 return Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6115 } 6116 return Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6117 }() 6118 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH 6119 6120 X_tr_init(tls, s) 6121 6122 return Z_OK 6123 } 6124 6125 // ========================================================================= 6126 func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */ 6127 var ret int32 6128 6129 ret = XdeflateResetKeep(tls, strm) 6130 if ret == Z_OK { 6131 lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 6132 } 6133 return ret 6134 } 6135 6136 // ========================================================================= 6137 func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */ 6138 if (deflateStateCheck(tls, strm) != 0) || ((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2) { 6139 return -2 6140 } 6141 (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head 6142 return Z_OK 6143 } 6144 6145 // ========================================================================= 6146 func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */ 6147 if deflateStateCheck(tls, strm) != 0 { 6148 return -2 6149 } 6150 if pending != uintptr(Z_NULL) { 6151 *(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) 6152 } 6153 if bits != uintptr(Z_NULL) { 6154 *(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid 6155 } 6156 return Z_OK 6157 } 6158 6159 // ========================================================================= 6160 func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */ 6161 var s uintptr 6162 var put int32 6163 6164 if deflateStateCheck(tls, strm) != 0 { 6165 return -2 6166 } 6167 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6168 if ((*Deflate_state)(unsafe.Pointer(s)).Fd_buf) < ((*Deflate_state)(unsafe.Pointer(s)).Fpending_out + uintptr((int32((Buf_size + 7)) >> 3))) { 6169 return -5 6170 } 6171 for ok := true; ok; ok = bits != 0 { 6172 put = (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 6173 if put > bits { 6174 put = bits 6175 } 6176 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((value & ((int32(1) << put) - 1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))))) 6177 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (put) 6178 X_tr_flush_bits(tls, s) 6179 value >>= put 6180 bits = bits - (put) 6181 } 6182 return Z_OK 6183 } 6184 6185 // ========================================================================= 6186 func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */ 6187 var s uintptr 6188 var func1 Compress_func 6189 6190 if deflateStateCheck(tls, strm) != 0 { 6191 return -2 6192 } 6193 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6194 6195 if level == (-1) { 6196 level = 6 6197 } 6198 if (((level < 0) || (level > 9)) || (strategy < 0)) || (strategy > Z_FIXED) { 6199 return -2 6200 } 6201 func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc 6202 6203 if ((strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy) || (func1 != configuration_table[level].Ffunc)) && ((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0) { 6204 // Flush the last buffer: 6205 var err int32 = Xdeflate(tls, strm, Z_BLOCK) 6206 if err == (-2) { 6207 return err 6208 } 6209 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6210 return -5 6211 } 6212 } 6213 if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level { 6214 if ((*Deflate_state)(unsafe.Pointer(s)).Flevel == 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0)) { 6215 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) { 6216 slide_hash(tls, s) 6217 } else { 6218 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6219 } 6220 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0))))) 6221 6222 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0) 6223 } 6224 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 6225 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy) 6226 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length) 6227 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length) 6228 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain) 6229 } 6230 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 6231 return Z_OK 6232 } 6233 6234 // ========================================================================= 6235 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: */ 6236 var s uintptr 6237 6238 if deflateStateCheck(tls, strm) != 0 { 6239 return -2 6240 } 6241 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6242 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length) 6243 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy) 6244 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length 6245 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain) 6246 return Z_OK 6247 } 6248 6249 // ========================================================================= 6250 // For the default windowBits of 15 and memLevel of 8, this function returns 6251 // a close to exact, as well as small, upper bound on the compressed size. 6252 // They are coded as constants here for a reason--if the #define's are 6253 // changed, then this function needs to be changed as well. The return 6254 // value for 15 and 8 only works for those exact settings. 6255 // 6256 // For any setting other than those defaults for windowBits and memLevel, 6257 // the value returned is a conservative worst case for the maximum expansion 6258 // resulting from using fixed blocks instead of stored blocks, which deflate 6259 // can emit on compressed data for some combinations of the parameters. 6260 // 6261 // This function could be more sophisticated to provide closer upper bounds for 6262 // every combination of windowBits and memLevel. But even the conservative 6263 // upper bound of about 14% expansion does not seem onerous for output buffer 6264 // allocation. 6265 func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */ 6266 var s uintptr 6267 var complen ULong 6268 var wraplen ULong 6269 6270 // conservative upper bound for compressed data 6271 complen = (((sourceLen + ((sourceLen + uint64(7)) >> 3)) + ((sourceLen + uint64(63)) >> 6)) + uint64(5)) 6272 6273 // if can't get parameters, return conservative bound plus zlib wrapper 6274 if deflateStateCheck(tls, strm) != 0 { 6275 return (complen + uint64(6)) 6276 } 6277 6278 // compute wrapper length 6279 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6280 switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap { 6281 case 0: // raw deflate 6282 wraplen = uint64(0) 6283 break 6284 case 1: // zlib wrapper 6285 wraplen = (ULong(6 + (func() int32 { 6286 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { 6287 return 4 6288 } 6289 return 0 6290 }()))) 6291 break 6292 case 2: // gzip wrapper 6293 wraplen = uint64(18) 6294 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header 6295 var str uintptr 6296 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6297 wraplen = wraplen + (ULong(UInt(2) + (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)) 6298 } 6299 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname 6300 if str != uintptr(Z_NULL) { 6301 for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 6302 wraplen++ 6303 } 6304 } 6305 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment 6306 if str != uintptr(Z_NULL) { 6307 for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 6308 wraplen++ 6309 } 6310 } 6311 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6312 wraplen = wraplen + (uint64(2)) 6313 } 6314 } 6315 break 6316 default: // for compiler happiness 6317 wraplen = uint64(6) 6318 } 6319 6320 // if not default parameters, return conservative bound 6321 if ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15)) || ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != (UInt(8 + 7))) { 6322 return (complen + wraplen) 6323 } 6324 6325 // default settings: return tight bound for that case 6326 return ((((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) - uint64(6)) + wraplen) 6327 } 6328 6329 // ========================================================================= 6330 // Put a short in the pending buffer. The 16-bit value is put in MSB order. 6331 // IN assertion: the stream state is correct and there is enough room in 6332 // pending_buf. 6333 func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */ 6334 { 6335 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b >> 8)) 6336 } 6337 6338 { 6339 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b & UInt(0xff))) 6340 } 6341 6342 } 6343 6344 // ========================================================================= 6345 // Flush as much pending output as possible. All deflate() output, except for 6346 // some deflate_stored() output, goes through this function so some 6347 // applications may wish to modify it to avoid allocating a large 6348 // strm->next_out buffer and copying into it. (See also read_buf()). 6349 func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */ 6350 var len uint32 6351 var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6352 6353 X_tr_flush_bits(tls, s) 6354 len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending) 6355 if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out { 6356 len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 6357 } 6358 if len == uint32(0) { 6359 return 6360 } 6361 6362 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len)) 6363 *(*uintptr)(unsafe.Pointer(strm + 24 /* &.next_out */)) += (uintptr(len)) 6364 *(*uintptr)(unsafe.Pointer(s + 32 /* &.pending_out */)) += (uintptr(len)) 6365 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(len)) 6366 *(*UInt)(unsafe.Pointer(strm + 32 /* &.avail_out */)) -= (len) 6367 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) -= (Ulg(len)) 6368 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == uint64(0) { 6369 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 6370 } 6371 } 6372 6373 // =========================================================================== 6374 // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. 6375 6376 // ========================================================================= 6377 func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */ 6378 var old_flush int32 // value of flush param for previous deflate call 6379 var s uintptr 6380 6381 if ((deflateStateCheck(tls, strm) != 0) || (flush > Z_BLOCK)) || (flush < 0) { 6382 return -2 6383 } 6384 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 6385 6386 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)) { 6387 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-2))]; return -2 }() 6388 } 6389 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6390 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6391 } 6392 6393 old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush 6394 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush 6395 6396 // Flush as much pending output as possible 6397 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6398 flush_pending(tls, strm) 6399 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6400 // Since avail_out is 0, deflate will be called again with 6401 // more output space, but possibly with both pending and 6402 // avail_in equal to zero. There won't be anything to do, 6403 // but this is not an error situation so make sure we 6404 // return OK instead of BUF_ERROR at next call of deflate: 6405 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6406 return Z_OK 6407 } 6408 6409 // Make sure there is something to do and avoid duplicate consecutive 6410 // flushes. For repeated and useless calls with Z_FINISH, we keep 6411 // returning Z_STREAM_END instead of Z_BUF_ERROR. 6412 } else if (((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((((flush) * 2) - (func() int32 { 6413 if (flush) > 4 { 6414 return 9 6415 } 6416 return 0 6417 }())) <= (((old_flush) * 2) - (func() int32 { 6418 if (old_flush) > 4 { 6419 return 9 6420 } 6421 return 0 6422 }())))) && (flush != Z_FINISH) { 6423 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6424 } 6425 6426 // User must not provide more input after the first FINISH: 6427 if ((*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE) && ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) { 6428 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 6429 } 6430 6431 // Write the header 6432 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE { 6433 // zlib header 6434 var header UInt = ((UInt(Z_DEFLATED) + (((*Deflate_state)(unsafe.Pointer(s)).Fw_bits - UInt(8)) << 4)) << 8) 6435 var level_flags UInt 6436 6437 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6438 level_flags = UInt(0) 6439 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 { 6440 level_flags = UInt(1) 6441 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 { 6442 level_flags = UInt(2) 6443 } else { 6444 level_flags = UInt(3) 6445 } 6446 header = header | (level_flags << 6) 6447 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 6448 header = header | (UInt(PRESET_DICT)) 6449 } 6450 header = header + (UInt(31) - (header % UInt(31))) 6451 6452 putShortMSB(tls, s, header) 6453 6454 // Save the adler32 of the preset dictionary: 6455 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 6456 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 6457 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff)))) 6458 } 6459 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6460 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6461 6462 // Compression must start with an empty pending buffer 6463 flush_pending(tls, strm) 6464 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6465 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6466 return Z_OK 6467 } 6468 } 6469 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE { 6470 // gzip header 6471 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6472 { 6473 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31) 6474 } 6475 6476 { 6477 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139) 6478 } 6479 6480 { 6481 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8) 6482 } 6483 6484 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) { 6485 { 6486 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6487 } 6488 6489 { 6490 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6491 } 6492 6493 { 6494 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6495 } 6496 6497 { 6498 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6499 } 6500 6501 { 6502 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 6503 } 6504 6505 { 6506 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 6507 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 6508 return uint8(2) 6509 } 6510 return func() uint8 { 6511 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6512 return uint8(4) 6513 } 6514 return uint8(0) 6515 }() 6516 }() 6517 } 6518 6519 { 6520 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE) 6521 } 6522 6523 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6524 6525 // Compression must start with an empty pending buffer 6526 flush_pending(tls, strm) 6527 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6528 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6529 return Z_OK 6530 } 6531 } else { 6532 { 6533 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((((func() int32 { 6534 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { 6535 return 1 6536 } 6537 return 0 6538 }()) + (func() int32 { 6539 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6540 return 2 6541 } 6542 return 0 6543 }())) + (func() int32 { 6544 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) { 6545 return 0 6546 } 6547 return 4 6548 }())) + (func() int32 { 6549 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) { 6550 return 0 6551 } 6552 return 8 6553 }())) + (func() int32 { 6554 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) { 6555 return 0 6556 } 6557 return 16 6558 }()))) 6559 } 6560 6561 { 6562 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & uint64(0xff))) 6563 } 6564 6565 { 6566 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8) & uint64(0xff))) 6567 } 6568 6569 { 6570 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16) & uint64(0xff))) 6571 } 6572 6573 { 6574 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24) & uint64(0xff))) 6575 } 6576 6577 { 6578 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 6579 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 6580 return uint8(2) 6581 } 6582 return func() uint8 { 6583 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 6584 return uint8(4) 6585 } 6586 return uint8(0) 6587 }() 6588 }() 6589 } 6590 6591 { 6592 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff)) 6593 } 6594 6595 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6596 { 6597 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff))) 6598 } 6599 6600 { 6601 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8) & UInt(0xff))) 6602 } 6603 6604 } 6605 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6606 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf, 6607 uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)) 6608 } 6609 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 6610 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE 6611 } 6612 } 6613 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE { 6614 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 6615 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6616 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)) 6617 for ((*Deflate_state)(unsafe.Pointer(s)).Fpending + Ulg(left)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6618 var copy UInt = (UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)) 6619 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 6620 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(copy)) 6621 (*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size 6622 for ok := true; ok; ok = 0 != 0 { 6623 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6624 (*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)))) 6625 } 6626 } 6627 *(*Ulg)(unsafe.Pointer(s + 64 /* &.gzindex */)) += (Ulg(copy)) 6628 flush_pending(tls, strm) 6629 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6630 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6631 return Z_OK 6632 } 6633 beg = uint64(0) 6634 left = left - (copy) 6635 } 6636 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 6637 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(left)) 6638 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (Ulg(left)) 6639 for ok1 := true; ok1; ok1 = 0 != 0 { 6640 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6641 (*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)))) 6642 } 6643 } 6644 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 6645 } 6646 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE 6647 } 6648 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE { 6649 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) { 6650 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6651 var val int32 6652 for ok2 := true; ok2; ok2 = (val != 0) { 6653 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6654 for ok3 := true; ok3; ok3 = 0 != 0 { 6655 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6656 (*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)))) 6657 } 6658 } 6659 flush_pending(tls, strm) 6660 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6661 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6662 return Z_OK 6663 } 6664 beg = uint64(0) 6665 } 6666 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 6667 { 6668 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 6669 } 6670 6671 } 6672 for ok4 := true; ok4; ok4 = 0 != 0 { 6673 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6674 (*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)))) 6675 } 6676 } 6677 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 6678 } 6679 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE 6680 } 6681 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE { 6682 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) { 6683 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 6684 var val int32 6685 for ok5 := true; ok5; ok5 = (val != 0) { 6686 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6687 for ok6 := true; ok6; ok6 = 0 != 0 { 6688 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6689 (*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)))) 6690 } 6691 } 6692 flush_pending(tls, strm) 6693 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6694 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6695 return Z_OK 6696 } 6697 beg = uint64(0) 6698 } 6699 val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1))))) 6700 { 6701 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 6702 } 6703 6704 } 6705 for ok7 := true; ok7; ok7 = 0 != 0 { 6706 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 6707 (*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)))) 6708 } 6709 } 6710 } 6711 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE 6712 } 6713 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE { 6714 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 6715 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending + uint64(2)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 6716 flush_pending(tls, strm) 6717 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6718 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6719 return Z_OK 6720 } 6721 } 6722 { 6723 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xff))) 6724 } 6725 6726 { 6727 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & uint64(0xff))) 6728 } 6729 6730 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 6731 } 6732 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 6733 6734 // Compression must start with an empty pending buffer 6735 flush_pending(tls, strm) 6736 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6737 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 6738 return Z_OK 6739 } 6740 } 6741 6742 // Start a new block or continue the current one. 6743 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)) { 6744 var bstate Block_state 6745 6746 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 { 6747 bstate = deflate_stored(tls, s, flush) 6748 } else { 6749 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY { 6750 bstate = deflate_huff(tls, s, flush) 6751 } else { 6752 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE { 6753 bstate = deflate_rle(tls, s, flush) 6754 } else { 6755 bstate = (*struct { 6756 f func(*libc.TLS, uintptr, int32) Block_state 6757 })(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush) 6758 } 6759 } 6760 } 6761 6762 if (bstate == Finish_started) || (bstate == Finish_done) { 6763 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 6764 } 6765 if (bstate == Need_more) || (bstate == Finish_started) { 6766 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6767 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above 6768 } 6769 return Z_OK 6770 // If flush != Z_NO_FLUSH && avail_out == 0, the next call 6771 // of deflate should use the same flush parameter to make sure 6772 // that the flush is complete. So we don't have to output an 6773 // empty block here, this will be done at next call. This also 6774 // ensures that for a very small output buffer, we emit at most 6775 // one empty block. 6776 } 6777 if bstate == Block_done { 6778 if flush == Z_PARTIAL_FLUSH { 6779 X_tr_align(tls, s) 6780 } else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH 6781 X_tr_stored_block(tls, s, uintptr(0), uint64(0), 0) 6782 // For a full flush, this empty block will be recognized 6783 // as a special marker by inflate_sync(). 6784 if flush == Z_FULL_FLUSH { 6785 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 6786 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0))))) 6787 // forget history 6788 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6789 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 6790 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 6791 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6792 } 6793 } 6794 } 6795 flush_pending(tls, strm) 6796 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 6797 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above 6798 return Z_OK 6799 } 6800 } 6801 } 6802 6803 if flush != Z_FINISH { 6804 return Z_OK 6805 } 6806 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { 6807 return Z_STREAM_END 6808 } 6809 6810 // Write the trailer 6811 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 6812 { 6813 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xff))) 6814 } 6815 6816 { 6817 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & uint64(0xff))) 6818 } 6819 6820 { 6821 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16) & uint64(0xff))) 6822 } 6823 6824 { 6825 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24) & uint64(0xff))) 6826 } 6827 6828 { 6829 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & uint64(0xff))) 6830 } 6831 6832 { 6833 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8) & uint64(0xff))) 6834 } 6835 6836 { 6837 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16) & uint64(0xff))) 6838 } 6839 6840 { 6841 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24) & uint64(0xff))) 6842 } 6843 6844 } else { 6845 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 6846 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff)))) 6847 } 6848 flush_pending(tls, strm) 6849 // If avail_out is zero, the application will call deflate again 6850 // to flush the rest. 6851 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 { 6852 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap 6853 } // write the trailer only once! 6854 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 6855 return Z_OK 6856 } 6857 return Z_STREAM_END 6858 } 6859 6860 // ========================================================================= 6861 func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */ 6862 var status int32 6863 6864 if deflateStateCheck(tls, strm) != 0 { 6865 return -2 6866 } 6867 6868 status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus 6869 6870 /* Deallocate in reverse order of allocations: */ 6871 { 6872 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { 6873 (*struct { 6874 f func(*libc.TLS, Voidpf, Voidpf) 6875 })(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) 6876 } 6877 } 6878 6879 { 6880 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { 6881 (*struct { 6882 f func(*libc.TLS, Voidpf, Voidpf) 6883 })(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) 6884 } 6885 } 6886 6887 { 6888 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { 6889 (*struct { 6890 f func(*libc.TLS, Voidpf, Voidpf) 6891 })(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) 6892 } 6893 } 6894 6895 { 6896 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { 6897 (*struct { 6898 f func(*libc.TLS, Voidpf, Voidpf) 6899 })(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) 6900 } 6901 } 6902 6903 (*struct { 6904 f func(*libc.TLS, Voidpf, Voidpf) 6905 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 6906 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 6907 6908 if status == BUSY_STATE { 6909 return -3 6910 } 6911 return Z_OK 6912 } 6913 6914 // ========================================================================= 6915 // Copy the source state to the destination state. 6916 // To simplify the source, this is not supported for 16-bit MSDOS (which 6917 // doesn't have enough memory anyway to duplicate compression states). 6918 func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */ 6919 var ds uintptr 6920 var ss uintptr 6921 var overlay uintptr 6922 6923 if (deflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 6924 return -2 6925 } 6926 6927 ss = (*Z_stream)(unsafe.Pointer(source)).Fstate 6928 6929 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 6930 6931 ds = (*struct { 6932 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6933 })(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{}))) 6934 if ds == uintptr(Z_NULL) { 6935 return -4 6936 } 6937 (*Z_stream)(unsafe.Pointer(dest)).Fstate = ds 6938 libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{}))) 6939 (*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest 6940 6941 (*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct { 6942 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6943 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((dest))).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, (uint32(uint64(2) * uint64(unsafe.Sizeof(Byte(0)))))) 6944 (*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct { 6945 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6946 })(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)))) 6947 (*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct { 6948 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6949 })(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)))) 6950 overlay = (*struct { 6951 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 6952 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((dest))).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize, (uint32(uint64(unsafe.Sizeof(Ush(0))) + uint64(2)))) 6953 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay 6954 6955 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)) { 6956 XdeflateEnd(tls, dest) 6957 return -4 6958 } 6959 // following zmemcpy do not work for 16-bit MSDOS 6960 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fwindow, (*Deflate_state)(unsafe.Pointer(ss)).Fwindow, ((uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size * UInt(2))) * uint64(unsafe.Sizeof(Byte(0))))) 6961 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fprev, (*Deflate_state)(unsafe.Pointer(ss)).Fprev, (uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size) * uint64(unsafe.Sizeof(Pos(0))))) 6962 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fhead, (*Deflate_state)(unsafe.Pointer(ss)).Fhead, (uint64((*Deflate_state)(unsafe.Pointer(ds)).Fhash_size) * uint64(unsafe.Sizeof(Pos(0))))) 6963 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf, uint64(UInt((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf_size))) 6964 6965 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_out = ((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(((int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_out) - int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf)) / 1))) 6966 (*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2) 6967 (*Deflate_state)(unsafe.Pointer(ds)).Fl_buf = ((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(((uint64(1) + uint64(unsafe.Sizeof(Ush(0)))) * uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)))) 6968 6969 (*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 212 /* &.dyn_ltree */ 6970 (*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2504 /* &.dyn_dtree */ 6971 (*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2748 /* &.bl_tree */ 6972 6973 return Z_OK 6974 } 6975 6976 // =========================================================================== 6977 // Read a new buffer from the current input stream, update the adler32 6978 // and total number of bytes read. All deflate() input goes through 6979 // this function so some applications may wish to modify it to avoid 6980 // allocating a large strm->next_in buffer and copying from it. 6981 // (See also flush_pending()). 6982 func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */ 6983 var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 6984 6985 if len > size { 6986 len = size 6987 } 6988 if len == uint32(0) { 6989 return uint32(0) 6990 } 6991 6992 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len) 6993 6994 libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len)) 6995 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 { 6996 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 6997 } else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 { 6998 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 6999 } 7000 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 7001 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len)) 7002 7003 return len 7004 } 7005 7006 // =========================================================================== 7007 // Initialize the "longest match" routines for a new zlib stream 7008 func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */ 7009 (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = (uint64(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 7010 7011 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 7012 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0))))) 7013 7014 // Set the default configuration parameters: 7015 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) 7016 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) 7017 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) 7018 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) 7019 7020 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 7021 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 7022 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 7023 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 7024 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 7025 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7026 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0) 7027 } 7028 7029 // =========================================================================== 7030 // Set match_start to the longest match starting at the given string and 7031 // return its length. Matches shorter or equal to prev_length are discarded, 7032 // in which case the result is equal to prev_length and match_start is 7033 // garbage. 7034 // IN assertions: cur_match is the head of the hash chain for the current 7035 // string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 7036 // OUT assertion: the match length is not greater than s->lookahead. 7037 // For 80x86 and 680x0, an optimized version will be provided in match.asm or 7038 // match.S. The code will be functionally equivalent. 7039 func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */ 7040 var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length // max hash chain length 7041 var scan uintptr = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) // current string 7042 var match uintptr // matched string 7043 var len int32 // length of current match 7044 var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length) // best match length so far 7045 var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match // stop if match long enough 7046 var limit IPos 7047 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1))) { 7048 limit = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) 7049 } else { 7050 limit = uint32(NIL) 7051 } 7052 // Stop when cur_match becomes <= limit. To simplify the code, 7053 // we prevent matches with the string of window index 0. 7054 var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev 7055 var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask 7056 7057 var strend uintptr = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 7058 var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 7059 var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 7060 7061 // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 7062 // It is easy to get rid of this optimization if necessary. 7063 7064 // Do not waste too much time if we already have a good match: 7065 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match { 7066 chain_length >>= 2 7067 } 7068 // Do not look for matches beyond the end of the input. This is necessary 7069 // to make deflate deterministic. 7070 if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7071 nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 7072 } 7073 7074 for ok := true; ok; ok = (((libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr((cur_match&wmask))*2))))) > limit) && 7075 (libc.PreDecUint32(&chain_length, 1) != uint32(0))) { 7076 7077 match = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match)) 7078 7079 // Skip to next match if the match length cannot increase 7080 // or if the match length is less than 2. Note that the checks below 7081 // for insufficient lookahead only occur occasionally for performance 7082 // reasons. Therefore uninitialized memory will be accessed, and 7083 // conditional jumps will be made that depend on those values. 7084 // However the length of the match is limited to the lookahead, so 7085 // the output of deflate is not affected by the uninitialized values. 7086 7087 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)))) { 7088 continue 7089 } 7090 7091 // The check at best_len-1 can be removed because it will be made 7092 // again later. (This heuristic is not always a win.) 7093 // It is not necessary to compare scan[2] and match[2] since they 7094 // are always equal when the other bytes match, given that 7095 // the hash keys are equal and that HASH_BITS >= 8. 7096 scan += uintptr(2) 7097 match++ 7098 7099 // We check for insufficient lookahead only every 8th comparison; 7100 // the 256th check will be made at strstart+258. 7101 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)) { 7102 } 7103 7104 len = (MAX_MATCH - (int32((int64(strend) - int64(scan)) / 1))) 7105 scan = (strend - uintptr(MAX_MATCH)) 7106 7107 if len > best_len { 7108 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match 7109 best_len = len 7110 if len >= nice_match { 7111 break 7112 } 7113 scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 7114 scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 7115 } 7116 } 7117 7118 if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7119 return UInt(best_len) 7120 } 7121 return (*Deflate_state)(unsafe.Pointer(s)).Flookahead 7122 } 7123 7124 // =========================================================================== 7125 // Fill the window when the lookahead becomes insufficient. 7126 // Updates strstart and lookahead. 7127 // 7128 // IN assertion: lookahead < MIN_LOOKAHEAD 7129 // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD 7130 // At least one byte has been read, or avail_in == 0; reads are 7131 // performed for at least two bytes (required for the zip translate_eol 7132 // option -- not supported here). 7133 func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */ 7134 var n uint32 7135 var more uint32 // Amount of free space at the end of the window. 7136 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7137 7138 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))) { 7139 more = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7140 7141 // Deal with !@#$% 64K limit: 7142 if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) { 7143 if ((more == uint32(0)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0))) && ((*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0)) { 7144 more = wsize 7145 7146 } else if more == libc.Uint32(libc.Uint32FromInt32(-1)) { 7147 // Very unlikely, but possible on 16 bit machine if 7148 // strstart == 0 && lookahead == 1 (input done a byte at time) 7149 more-- 7150 } 7151 } 7152 7153 // If the window is almost full and there is insufficient lookahead, 7154 // move the upper half to the lower one to make room in the upper half. 7155 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= (wsize + ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) { 7156 7157 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(wsize)), (uint64(wsize - more))) 7158 *(*UInt)(unsafe.Pointer(s + 176 /* &.match_start */)) -= (wsize) 7159 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= (wsize) // we now have strstart >= MAX_DIST 7160 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64(wsize)) 7161 slide_hash(tls, s) 7162 more = more + (wsize) 7163 } 7164 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) { 7165 break 7166 } 7167 7168 // If there was no sliding: 7169 // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && 7170 // more == window_size - lookahead - strstart 7171 // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) 7172 // => more >= window_size - 2*WSIZE + 2 7173 // In the BIG_MEM or MMAP case (not yet supported), 7174 // window_size == input_size + MIN_LOOKAHEAD && 7175 // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. 7176 // Otherwise, window_size == 2*WSIZE so more >= 2. 7177 // If there was sliding, more >= WSIZE. So in all cases, more >= 2. 7178 7179 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) 7180 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) += (n) 7181 7182 // Initialize the hash value now that we have some input: 7183 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) >= UInt(MIN_MATCH) { 7184 var str UInt = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 7185 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) 7186 (*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) 7187 for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 { 7188 (*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) 7189 *(*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)) 7190 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 7191 str++ 7192 (*Deflate_state)(unsafe.Pointer(s)).Finsert-- 7193 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) < UInt(MIN_MATCH) { 7194 break 7195 } 7196 } 7197 } 7198 // If the whole input has less than MIN_MATCH bytes, ins_h is garbage, 7199 // but this is not important since only literal bytes will be emitted. 7200 7201 } 7202 7203 // If the WIN_INIT bytes after the end of the current data have never been 7204 // written, then zero those bytes in order to avoid memory check reports of 7205 // the use of uninitialized (or uninitialised as Julian writes) bytes by 7206 // the longest match routines. Update the high water mark for the next 7207 // time through here. WIN_INIT is set to MAX_MATCH since the longest match 7208 // routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. 7209 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size { 7210 var curr Ulg = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead))) 7211 var init1 Ulg 7212 7213 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { 7214 // Previous high water mark below current data -- zero WIN_INIT 7215 // bytes or up to end of window, whichever is less. 7216 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr) 7217 if init1 > uint64(MAX_MATCH) { 7218 init1 = uint64(MAX_MATCH) 7219 } 7220 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(curr)), 0, uint64(uint32(init1))) 7221 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = (curr + init1) 7222 } else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (curr + uint64(MAX_MATCH)) { 7223 // High water mark at or above current data, but below current data 7224 // plus WIN_INIT -- zero out to current data plus WIN_INIT, or up 7225 // to end of window, whichever is less. 7226 init1 = ((curr + uint64(MAX_MATCH)) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 7227 if init1 > ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) { 7228 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 7229 } 7230 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)), 0, uint64(uint32(init1))) 7231 *(*Ulg)(unsafe.Pointer(s + 5944 /* &.high_water */)) += (init1) 7232 } 7233 } 7234 7235 } 7236 7237 // =========================================================================== 7238 // Flush the current block, with given end-of-file flag. 7239 // IN assertion: strstart is set to the end of the current match. 7240 7241 // Same but force premature exit if necessary. 7242 7243 // Maximum stored block length in deflate format (not including header). 7244 7245 // Minimum of a and b. 7246 7247 // =========================================================================== 7248 // Copy without compression as much as possible from the input stream, return 7249 // the current block state. 7250 // 7251 // In case deflateParams() is used to later switch to a non-zero compression 7252 // level, s->matches (otherwise unused when storing) keeps track of the number 7253 // of hash table slides to perform. If s->matches is 1, then one hash table 7254 // slide will be done when switching. If s->matches is 2, the maximum value 7255 // allowed here, then the hash table will be cleared, since two or more slides 7256 // is the same as a clear. 7257 // 7258 // deflate_stored() is written to minimize the number of times an input byte is 7259 // copied. It is most efficient with large input and output buffers, which 7260 // maximizes the opportunites to have a single copy from next_in to next_out. 7261 func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */ 7262 // Smallest worthy block size when not flushing or finishing. By default 7263 // this is 32K. This can be as small as 507 bytes for memLevel == 1. For 7264 // large input and output buffers, the stored block size will be larger. 7265 var min_block uint32 = func() uint32 { 7266 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5)) > (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 7267 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7268 } 7269 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5))) 7270 }() 7271 7272 // Copy as many min_block or larger stored blocks directly to next_out as 7273 // possible. If flushing, copy the remaining available input to next_out as 7274 // stored blocks, if there is enough space. 7275 var len uint32 7276 var left uint32 7277 var have uint32 7278 var last uint32 = uint32(0) 7279 var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 7280 for ok := true; ok; ok = (last == uint32(0)) { 7281 // Set len to the maximum size block that we can copy directly with the 7282 // available input data and output space. Set left to how much of that 7283 // would be copied from what's left in the window. 7284 len = uint32(MAX_STORED) // maximum deflate stored block length 7285 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 7286 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header 7287 break 7288 } 7289 // maximum stored block length that will fit in avail_out: 7290 have = ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have) 7291 left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window 7292 if Ulg(len) > (Ulg(left) + Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 7293 len = (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) 7294 } // limit len to the input 7295 if len > have { 7296 len = have 7297 } // limit len to the output 7298 7299 // If the stored block would be less than min_block in length, or if 7300 // unable to copy all of the available input when flushing, then try 7301 // copying to the window and the pending buffer instead. Also don't 7302 // write an empty block when flushing -- deflate() does that. 7303 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))) { 7304 break 7305 } 7306 7307 // Make a dummy stored block in pending to get the header bytes, 7308 // including any pending bits. This also updates the debugging counts. 7309 if (flush == Z_FINISH) && (len == (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 7310 last = uint32(1) 7311 } else { 7312 last = uint32(0) 7313 } 7314 X_tr_stored_block(tls, s, uintptr(0), uint64(0), int32(last)) 7315 7316 // Replace the lengths in the dummy stored block with len. 7317 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(4))))) = Bytef(len) 7318 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(3))))) = (Bytef(len >> 8)) 7319 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(2))))) = Bytef(^len) 7320 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(1))))) = (Bytef(^len >> 8)) 7321 7322 // Write the stored block header bytes. 7323 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7324 7325 // Copy uncompressed bytes from the window to next_out. 7326 if left != 0 { 7327 if left > len { 7328 left = len 7329 } 7330 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint64(left)) 7331 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(left)) 7332 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (left) 7333 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(left)) 7334 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(left)) 7335 len = len - (left) 7336 } 7337 7338 // Copy uncompressed bytes directly from next_in to next_out, updating 7339 // the check value. 7340 if len != 0 { 7341 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len) 7342 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(len)) 7343 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (len) 7344 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(len)) 7345 } 7346 } 7347 7348 // Update the sliding window with the last s->w_size bytes of the copied 7349 // data, or append all of the copied data to the existing window if less 7350 // than s->w_size bytes were copied. Also update the number of bytes to 7351 // insert in the hash tables, in the event that deflateParams() switches to 7352 // a non-zero compression level. 7353 used = used - ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) // number of input bytes directly copied 7354 if used != 0 { 7355 // If any input was used, then no unused input remains in the window, 7356 // therefore s->block_start == s->strstart. 7357 if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history 7358 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash 7359 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in - uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), uint64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 7360 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7361 } else { 7362 if ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) <= Ulg(used) { 7363 // Slide the window down. 7364 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7365 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) 7366 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 7367 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 7368 } // add a pending slide_hash() 7369 } 7370 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in - uintptr(used)), uint64(used)) 7371 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (used) 7372 } 7373 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7374 *(*UInt)(unsafe.Pointer(s + 5932 /* &.insert */)) += (func() uint32 { 7375 if (used) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) { 7376 return ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 7377 } 7378 return used 7379 }()) 7380 } 7381 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 7382 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7383 } 7384 7385 // If the last block was written to next_out, then done. 7386 if last != 0 { 7387 return Finish_done 7388 } 7389 7390 // If flushing and all input has been consumed, then done. 7391 if (((flush != Z_NO_FLUSH) && (flush != Z_FINISH)) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start) { 7392 return Block_done 7393 } 7394 7395 // Fill the window with any remaining input. 7396 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uint64(1))) 7397 if ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have) && ((*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 7398 // Slide the window down. 7399 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 7400 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 7401 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) 7402 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 7403 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 7404 } // add a pending slide_hash() 7405 have = have + ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) // more space now 7406 } 7407 if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 7408 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 7409 } 7410 if have != 0 { 7411 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), have) 7412 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (have) 7413 } 7414 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 7415 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7416 } 7417 7418 // There was not enough avail_out to write a complete worthy or flushed 7419 // stored block to next_out. Write a stored block to pending instead, if we 7420 // have enough input for a worthy block, or if flushing and there is enough 7421 // room for the remaining input as a stored block in the pending buffer. 7422 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 7423 // maximum stored block length that will fit in pending: 7424 have = func() uint32 { 7425 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) > (uint64(MAX_STORED)) { 7426 return uint32(MAX_STORED) 7427 } 7428 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))) 7429 }() 7430 min_block = func() uint32 { 7431 if (have) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 7432 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 7433 } 7434 return have 7435 }() 7436 left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 7437 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)) { 7438 len = func() uint32 { 7439 if (left) > (have) { 7440 return have 7441 } 7442 return left 7443 }() 7444 if ((flush == Z_FINISH) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (len == left) { 7445 last = uint32(1) 7446 } else { 7447 last = uint32(0) 7448 } 7449 X_tr_stored_block(tls, s, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint64(len), int32(last)) 7450 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(len)) 7451 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7452 } 7453 7454 // We've done all we can with the available input and output. 7455 if last != 0 { 7456 return Finish_started 7457 } 7458 return Need_more 7459 } 7460 7461 // =========================================================================== 7462 // Compress as much as possible from the input stream, return the current 7463 // block state. 7464 // This function does not perform lazy evaluation of matches and inserts 7465 // new strings in the dictionary only for unmatched strings or for short 7466 // matches. It is used only for the fast compression options. 7467 func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */ 7468 var hash_head IPos // head of the hash chain 7469 var bflush int32 // set if current block must be flushed 7470 7471 for { 7472 // Make sure that we always have enough lookahead, except 7473 // at the end of the input file. We need MAX_MATCH bytes 7474 // for the next match, plus MIN_MATCH bytes to insert the 7475 // string following the next match. 7476 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 7477 fill_window(tls, s) 7478 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 7479 return Need_more 7480 } 7481 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7482 break 7483 } // flush the current block 7484 } 7485 7486 // Insert the string window[strstart .. strstart+2] in the 7487 // dictionary, and set hash_head to the head of the hash chain: 7488 hash_head = IPos(NIL) 7489 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 7490 (*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) 7491 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)))) 7492 *(*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) 7493 } 7494 7495 // Find the longest match, discarding those <= prev_length. 7496 // At this point we have always match_length < MIN_MATCH 7497 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)))) { 7498 // To simplify the code, we prevent matches with the string 7499 // of window index 0 (in particular we have to avoid a match 7500 // of the string with itself at the start of the input file). 7501 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 7502 // longest_match() sets match_start 7503 } 7504 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 7505 7506 { 7507 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 7508 var dist Ush = (Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)) 7509 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7510 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7511 dist-- 7512 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7513 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 7514 if (int32(dist)) < 256 { 7515 return int32(X_dist_code[dist]) 7516 } 7517 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7518 }()))*4 /* &.fc */))++ 7519 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7520 } 7521 7522 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7523 7524 // Insert new strings in the hash table only if the match length 7525 // is not too large. This saves time but degrades compression. 7526 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)) { 7527 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table 7528 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0)) { 7529 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7530 (*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) 7531 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)))) 7532 *(*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) 7533 // strstart never exceeds WSIZE-MAX_MATCH, so there are 7534 // always MIN_MATCH bytes ahead. 7535 } 7536 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7537 } else { 7538 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7539 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7540 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))) 7541 (*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) 7542 // If lookahead < MIN_MATCH, ins_h is garbage, but it does not 7543 // matter since it will be recomputed at next deflate call. 7544 } 7545 } else { 7546 // No match, output a literal byte 7547 7548 { 7549 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7550 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7551 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7552 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7553 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7554 } 7555 7556 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7557 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7558 } 7559 if bflush != 0 { 7560 { 7561 X_tr_flush_block(tls, s, func() uintptr { 7562 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7563 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7564 } 7565 return uintptr(Z_NULL) 7566 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7567 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7568 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7569 } 7570 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7571 if 0 != 0 { 7572 return Finish_started 7573 } 7574 return Need_more 7575 } 7576 } 7577 7578 } 7579 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 7580 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 7581 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 7582 } 7583 return (uint32(MIN_MATCH - 1)) 7584 }() 7585 if flush == Z_FINISH { 7586 { 7587 { 7588 X_tr_flush_block(tls, s, func() uintptr { 7589 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7590 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7591 } 7592 return uintptr(Z_NULL) 7593 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7594 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7595 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7596 } 7597 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7598 if 1 != 0 { 7599 return Finish_started 7600 } 7601 return Need_more 7602 } 7603 } 7604 7605 return Finish_done 7606 } 7607 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7608 { 7609 X_tr_flush_block(tls, s, func() uintptr { 7610 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7611 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7612 } 7613 return uintptr(Z_NULL) 7614 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7615 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7616 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7617 } 7618 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7619 if 0 != 0 { 7620 return Finish_started 7621 } 7622 return Need_more 7623 } 7624 } 7625 7626 return Block_done 7627 } 7628 7629 // =========================================================================== 7630 // Same as above, but achieves better compression. We use a lazy 7631 // evaluation for matches: a match is finally adopted only if there is 7632 // no better match at the next window position. 7633 func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */ 7634 var hash_head IPos // head of hash chain 7635 var bflush int32 // set if current block must be flushed 7636 7637 // Process the input block. 7638 for { 7639 // Make sure that we always have enough lookahead, except 7640 // at the end of the input file. We need MAX_MATCH bytes 7641 // for the next match, plus MIN_MATCH bytes to insert the 7642 // string following the next match. 7643 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 7644 fill_window(tls, s) 7645 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 7646 return Need_more 7647 } 7648 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7649 break 7650 } // flush the current block 7651 } 7652 7653 // Insert the string window[strstart .. strstart+2] in the 7654 // dictionary, and set hash_head to the head of the hash chain: 7655 hash_head = IPos(NIL) 7656 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 7657 (*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) 7658 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)))) 7659 *(*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) 7660 } 7661 7662 // Find the longest match, discarding those <= prev_length. 7663 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 7664 (*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start 7665 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7666 7667 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)))) { 7668 // To simplify the code, we prevent matches with the string 7669 // of window index 0 (in particular we have to avoid a match 7670 // of the string with itself at the start of the input file). 7671 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 7672 // longest_match() sets match_start 7673 7674 if ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5)) && (((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED) || 7675 (((*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)))) { 7676 7677 // If prev_match is also MIN_MATCH, match_start is garbage 7678 // but we will ignore the current match anyway. 7679 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7680 } 7681 } 7682 // If there was a match at the previous step and the current 7683 // match is not better, output the previous match: 7684 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) { 7685 var max_insert UInt = (((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) - UInt(MIN_MATCH)) 7686 // Do not insert strings in hash table beyond this. 7687 7688 { 7689 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))) 7690 var dist Ush = (Ush(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)) 7691 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7692 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7693 dist-- 7694 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7695 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 7696 if (int32(dist)) < 256 { 7697 return int32(X_dist_code[dist]) 7698 } 7699 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7700 }()))*4 /* &.fc */))++ 7701 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7702 } 7703 7704 // Insert in hash table all strings up to the end of the match. 7705 // strstart-1 and strstart are already inserted. If there is not 7706 // enough lookahead, the last two strings are not inserted in 7707 // the hash table. 7708 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)) 7709 *(*UInt)(unsafe.Pointer(s + 184 /* &.prev_length */)) -= (UInt(2)) 7710 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0)) { 7711 if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert { 7712 (*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) 7713 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)))) 7714 *(*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) 7715 } 7716 } 7717 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7718 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 7719 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7720 7721 if bflush != 0 { 7722 { 7723 X_tr_flush_block(tls, s, func() uintptr { 7724 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7725 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7726 } 7727 return uintptr(Z_NULL) 7728 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7729 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7730 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7731 } 7732 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7733 if 0 != 0 { 7734 return Finish_started 7735 } 7736 return Need_more 7737 } 7738 } 7739 7740 } else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 7741 // If there was no match at the previous position, output a 7742 // single literal. If there was a match but the current match 7743 // is longer, truncate the previous match to a single literal. 7744 7745 { 7746 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 7747 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7748 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7749 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7750 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7751 } 7752 7753 if bflush != 0 { 7754 { 7755 X_tr_flush_block(tls, s, func() uintptr { 7756 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7757 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7758 } 7759 return uintptr(Z_NULL) 7760 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7761 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7762 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7763 } 7764 7765 } 7766 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7767 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7768 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7769 return Need_more 7770 } 7771 } else { 7772 // There is no previous match to compare with, wait for 7773 // the next step to decide. 7774 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1 7775 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7776 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7777 } 7778 } 7779 7780 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 7781 7782 { 7783 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 7784 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7785 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7786 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7787 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7788 } 7789 7790 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 7791 } 7792 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 7793 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 7794 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 7795 } 7796 return (uint32(MIN_MATCH - 1)) 7797 }() 7798 if flush == Z_FINISH { 7799 { 7800 { 7801 X_tr_flush_block(tls, s, func() uintptr { 7802 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7803 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7804 } 7805 return uintptr(Z_NULL) 7806 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7807 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7808 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7809 } 7810 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7811 if 1 != 0 { 7812 return Finish_started 7813 } 7814 return Need_more 7815 } 7816 } 7817 7818 return Finish_done 7819 } 7820 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7821 { 7822 X_tr_flush_block(tls, s, func() uintptr { 7823 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7824 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7825 } 7826 return uintptr(Z_NULL) 7827 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7828 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7829 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7830 } 7831 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7832 if 0 != 0 { 7833 return Finish_started 7834 } 7835 return Need_more 7836 } 7837 } 7838 7839 return Block_done 7840 } 7841 7842 // =========================================================================== 7843 // For Z_RLE, simply look for runs of bytes, generate matches only of distance 7844 // one. Do not maintain a hash table. (It will be regenerated if this run of 7845 // deflate switches away from Z_RLE.) 7846 func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */ 7847 var bflush int32 // set if current block must be flushed 7848 var prev UInt // byte at distance one to match 7849 var scan uintptr 7850 var strend uintptr // scan goes up to strend for length of run 7851 7852 for { 7853 // Make sure that we always have enough lookahead, except 7854 // at the end of the input file. We need MAX_MATCH bytes 7855 // for the longest run, plus one for the unrolled loop. 7856 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) { 7857 fill_window(tls, s) 7858 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH)) && (flush == Z_NO_FLUSH) { 7859 return Need_more 7860 } 7861 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7862 break 7863 } // flush the current block 7864 } 7865 7866 // See how many times the previous byte repeats 7867 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7868 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0)) { 7869 scan = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uintptr(1)) 7870 prev = UInt(*(*Bytef)(unsafe.Pointer(scan))) 7871 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))))) { 7872 strend = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 7873 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)) { 7874 } 7875 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MAX_MATCH) - (UInt((int64(strend) - int64(scan)) / 1))) 7876 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 7877 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 7878 } 7879 } 7880 7881 } 7882 7883 // Emit match if have run of MIN_MATCH or longer, else emit literal 7884 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 7885 7886 { 7887 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 7888 var dist Ush = Ush(1) 7889 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 7890 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 7891 dist-- 7892 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 7893 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 7894 if (int32(dist)) < 256 { 7895 return int32(X_dist_code[dist]) 7896 } 7897 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 7898 }()))*4 /* &.fc */))++ 7899 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7900 } 7901 7902 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7903 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 7904 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 7905 } else { 7906 // No match, output a literal byte 7907 7908 { 7909 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 7910 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 7911 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 7912 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 7913 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 7914 } 7915 7916 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 7917 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 7918 } 7919 if bflush != 0 { 7920 { 7921 X_tr_flush_block(tls, s, func() uintptr { 7922 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7923 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7924 } 7925 return uintptr(Z_NULL) 7926 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7927 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7928 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7929 } 7930 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7931 if 0 != 0 { 7932 return Finish_started 7933 } 7934 return Need_more 7935 } 7936 } 7937 7938 } 7939 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 7940 if flush == Z_FINISH { 7941 { 7942 { 7943 X_tr_flush_block(tls, s, func() uintptr { 7944 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7945 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7946 } 7947 return uintptr(Z_NULL) 7948 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 7949 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7950 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7951 } 7952 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7953 if 1 != 0 { 7954 return Finish_started 7955 } 7956 return Need_more 7957 } 7958 } 7959 7960 return Finish_done 7961 } 7962 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 7963 { 7964 X_tr_flush_block(tls, s, func() uintptr { 7965 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 7966 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 7967 } 7968 return uintptr(Z_NULL) 7969 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 7970 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 7971 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 7972 } 7973 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 7974 if 0 != 0 { 7975 return Finish_started 7976 } 7977 return Need_more 7978 } 7979 } 7980 7981 return Block_done 7982 } 7983 7984 // =========================================================================== 7985 // For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. 7986 // (It will be regenerated if this run of deflate switches away from Huffman.) 7987 func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */ 7988 var bflush int32 // set if current block must be flushed 7989 7990 for { 7991 // Make sure that we have a literal to write. 7992 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7993 fill_window(tls, s) 7994 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 7995 if flush == Z_NO_FLUSH { 7996 return Need_more 7997 } 7998 break // flush the current block 7999 } 8000 } 8001 8002 // Output a literal byte 8003 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 8004 8005 { 8006 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 8007 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 8008 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 8009 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 8010 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 8011 } 8012 8013 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 8014 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 8015 if bflush != 0 { 8016 { 8017 X_tr_flush_block(tls, s, func() uintptr { 8018 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8019 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8020 } 8021 return uintptr(Z_NULL) 8022 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 8023 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8024 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8025 } 8026 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8027 if 0 != 0 { 8028 return Finish_started 8029 } 8030 return Need_more 8031 } 8032 } 8033 8034 } 8035 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 8036 if flush == Z_FINISH { 8037 { 8038 { 8039 X_tr_flush_block(tls, s, func() uintptr { 8040 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8041 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8042 } 8043 return uintptr(Z_NULL) 8044 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 8045 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8046 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8047 } 8048 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8049 if 1 != 0 { 8050 return Finish_started 8051 } 8052 return Need_more 8053 } 8054 } 8055 8056 return Finish_done 8057 } 8058 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 8059 { 8060 X_tr_flush_block(tls, s, func() uintptr { 8061 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 8062 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 8063 } 8064 return uintptr(Z_NULL) 8065 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 8066 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 8067 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 8068 } 8069 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 8070 if 0 != 0 { 8071 return Finish_started 8072 } 8073 return Need_more 8074 } 8075 } 8076 8077 return Block_done 8078 } 8079 8080 // Seconds since the Epoch, visible to user code when time_t is too 8081 // narrow only for consistency with the old way of widening too-narrow 8082 // types. User code should never use __time64_t. 8083 8084 // bits/types.h -- definitions of __*_t types underlying *_t types. 8085 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8086 // This file is part of the GNU C Library. 8087 // 8088 // The GNU C Library is free software; you can redistribute it and/or 8089 // modify it under the terms of the GNU Lesser General Public 8090 // License as published by the Free Software Foundation; either 8091 // version 2.1 of the License, or (at your option) any later version. 8092 // 8093 // The GNU C Library is distributed in the hope that it will be useful, 8094 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8095 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8096 // Lesser General Public License for more details. 8097 // 8098 // You should have received a copy of the GNU Lesser General Public 8099 // License along with the GNU C Library; if not, see 8100 // <https://www.gnu.org/licenses/>. 8101 8102 // Never include this file directly; use <sys/types.h> instead. 8103 8104 // Integral type unchanged by default argument promotions that can 8105 // hold any value corresponding to members of the extended character 8106 // set, as well as at least one value that does not correspond to any 8107 // member of the extended character set. 8108 8109 // Conversion state information. 8110 type X__mbstate_t = struct { 8111 F__count int32 8112 F__value struct{ F__wch uint32 } 8113 } /* __mbstate_t.h:21:3 */ 8114 8115 // The tag name of this struct is _G_fpos_t to preserve historic 8116 // C++ mangled names for functions taking fpos_t arguments. 8117 // That name should not be used in new code. 8118 type X_G_fpos_t = struct { 8119 F__pos X__off_t 8120 F__state X__mbstate_t 8121 } /* __fpos_t.h:10:9 */ 8122 8123 // The tag name of this struct is _G_fpos_t to preserve historic 8124 // C++ mangled names for functions taking fpos_t arguments. 8125 // That name should not be used in new code. 8126 type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ 8127 8128 // bits/types.h -- definitions of __*_t types underlying *_t types. 8129 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8130 // This file is part of the GNU C Library. 8131 // 8132 // The GNU C Library is free software; you can redistribute it and/or 8133 // modify it under the terms of the GNU Lesser General Public 8134 // License as published by the Free Software Foundation; either 8135 // version 2.1 of the License, or (at your option) any later version. 8136 // 8137 // The GNU C Library is distributed in the hope that it will be useful, 8138 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8139 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8140 // Lesser General Public License for more details. 8141 // 8142 // You should have received a copy of the GNU Lesser General Public 8143 // License along with the GNU C Library; if not, see 8144 // <https://www.gnu.org/licenses/>. 8145 8146 // Never include this file directly; use <sys/types.h> instead. 8147 8148 // The tag name of this struct is _G_fpos64_t to preserve historic 8149 // C++ mangled names for functions taking fpos_t and/or fpos64_t 8150 // arguments. That name should not be used in new code. 8151 type X_G_fpos64_t = struct { 8152 F__pos X__off64_t 8153 F__state X__mbstate_t 8154 } /* __fpos64_t.h:10:9 */ 8155 8156 // bits/types.h -- definitions of __*_t types underlying *_t types. 8157 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8158 // This file is part of the GNU C Library. 8159 // 8160 // The GNU C Library is free software; you can redistribute it and/or 8161 // modify it under the terms of the GNU Lesser General Public 8162 // License as published by the Free Software Foundation; either 8163 // version 2.1 of the License, or (at your option) any later version. 8164 // 8165 // The GNU C Library is distributed in the hope that it will be useful, 8166 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8167 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8168 // Lesser General Public License for more details. 8169 // 8170 // You should have received a copy of the GNU Lesser General Public 8171 // License along with the GNU C Library; if not, see 8172 // <https://www.gnu.org/licenses/>. 8173 8174 // Never include this file directly; use <sys/types.h> instead. 8175 8176 // The tag name of this struct is _G_fpos64_t to preserve historic 8177 // C++ mangled names for functions taking fpos_t and/or fpos64_t 8178 // arguments. That name should not be used in new code. 8179 type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ 8180 8181 type X_IO_FILE = struct { 8182 F_flags int32 8183 F__ccgo_pad1 [4]byte 8184 F_IO_read_ptr uintptr 8185 F_IO_read_end uintptr 8186 F_IO_read_base uintptr 8187 F_IO_write_base uintptr 8188 F_IO_write_ptr uintptr 8189 F_IO_write_end uintptr 8190 F_IO_buf_base uintptr 8191 F_IO_buf_end uintptr 8192 F_IO_save_base uintptr 8193 F_IO_backup_base uintptr 8194 F_IO_save_end uintptr 8195 F_markers uintptr 8196 F_chain uintptr 8197 F_fileno int32 8198 F_flags2 int32 8199 F_old_offset X__off_t 8200 F_cur_column uint16 8201 F_vtable_offset int8 8202 F_shortbuf [1]uint8 8203 F__ccgo_pad2 [4]byte 8204 F_lock uintptr 8205 F_offset X__off64_t 8206 F_codecvt uintptr 8207 F_wide_data uintptr 8208 F_freeres_list uintptr 8209 F_freeres_buf uintptr 8210 F__pad5 Size_t 8211 F_mode int32 8212 F_unused2 [20]uint8 8213 } /* __FILE.h:4:1 */ 8214 8215 type X__FILE = X_IO_FILE /* __FILE.h:5:25 */ 8216 8217 // The opaque type of streams. This is the definition used elsewhere. 8218 type FILE = X_IO_FILE /* FILE.h:7:25 */ 8219 8220 // The type of the second argument to `fgetpos' and `fsetpos'. 8221 type Fpos_t = X__fpos_t /* stdio.h:84:18 */ 8222 type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */ 8223 8224 // Floating-point inline functions for stdlib.h. 8225 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 8226 // This file is part of the GNU C Library. 8227 // 8228 // The GNU C Library is free software; you can redistribute it and/or 8229 // modify it under the terms of the GNU Lesser General Public 8230 // License as published by the Free Software Foundation; either 8231 // version 2.1 of the License, or (at your option) any later version. 8232 // 8233 // The GNU C Library is distributed in the hope that it will be useful, 8234 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8235 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8236 // Lesser General Public License for more details. 8237 // 8238 // You should have received a copy of the GNU Lesser General Public 8239 // License along with the GNU C Library; if not, see 8240 // <https://www.gnu.org/licenses/>. 8241 8242 // Define some macros helping to catch buffer overflows. 8243 8244 // Copyright (C) 1992-2019 Free Software Foundation, Inc. 8245 // 8246 // This file is part of GCC. 8247 // 8248 // GCC is free software; you can redistribute it and/or modify it under 8249 // the terms of the GNU General Public License as published by the Free 8250 // Software Foundation; either version 3, or (at your option) any later 8251 // version. 8252 // 8253 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY 8254 // WARRANTY; without even the implied warranty of MERCHANTABILITY or 8255 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 8256 // for more details. 8257 // 8258 // Under Section 7 of GPL version 3, you are granted additional 8259 // permissions described in the GCC Runtime Library Exception, version 8260 // 3.1, as published by the Free Software Foundation. 8261 // 8262 // You should have received a copy of the GNU General Public License and 8263 // a copy of the GCC Runtime Library Exception along with this program; 8264 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 8265 // <http://www.gnu.org/licenses/>. 8266 8267 // This administrivia gets added to the beginning of limits.h 8268 // if the system has its own version of limits.h. 8269 8270 // We use _GCC_LIMITS_H_ because we want this not to match 8271 // any macros that the system's limits.h uses for its own purposes. 8272 8273 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 8274 // This file is part of the GNU C Library. 8275 // 8276 // The GNU C Library is free software; you can redistribute it and/or 8277 // modify it under the terms of the GNU Lesser General Public 8278 // License as published by the Free Software Foundation; either 8279 // version 2.1 of the License, or (at your option) any later version. 8280 // 8281 // The GNU C Library is distributed in the hope that it will be useful, 8282 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8283 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8284 // Lesser General Public License for more details. 8285 // 8286 // You should have received a copy of the GNU Lesser General Public 8287 // License along with the GNU C Library; if not, see 8288 // <https://www.gnu.org/licenses/>. 8289 8290 // POSIX Standard: 6.5 File Control Operations <fcntl.h> 8291 8292 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 8293 // This file is part of the GNU C Library. 8294 // 8295 // The GNU C Library is free software; you can redistribute it and/or 8296 // modify it under the terms of the GNU Lesser General Public 8297 // License as published by the Free Software Foundation; either 8298 // version 2.1 of the License, or (at your option) any later version. 8299 // 8300 // The GNU C Library is distributed in the hope that it will be useful, 8301 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8302 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8303 // Lesser General Public License for more details. 8304 // 8305 // You should have received a copy of the GNU Lesser General Public 8306 // License along with the GNU C Library; if not, see 8307 // <https://www.gnu.org/licenses/>. 8308 8309 // This must be early so <bits/fcntl.h> can define types winningly. 8310 8311 // Get __mode_t, __dev_t and __off_t . 8312 // bits/types.h -- definitions of __*_t types underlying *_t types. 8313 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 8314 // This file is part of the GNU C Library. 8315 // 8316 // The GNU C Library is free software; you can redistribute it and/or 8317 // modify it under the terms of the GNU Lesser General Public 8318 // License as published by the Free Software Foundation; either 8319 // version 2.1 of the License, or (at your option) any later version. 8320 // 8321 // The GNU C Library is distributed in the hope that it will be useful, 8322 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8323 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8324 // Lesser General Public License for more details. 8325 // 8326 // You should have received a copy of the GNU Lesser General Public 8327 // License along with the GNU C Library; if not, see 8328 // <https://www.gnu.org/licenses/>. 8329 8330 // Never include this file directly; use <sys/types.h> instead. 8331 8332 // Get the definitions of O_*, F_*, FD_*: all the 8333 // numbers and flag bits for `open', `fcntl', et al. 8334 // O_*, F_*, FD_* bit values for Linux. 8335 // Copyright (C) 2000-2020 Free Software Foundation, Inc. 8336 // This file is part of the GNU C Library. 8337 // 8338 // The GNU C Library is free software; you can redistribute it and/or 8339 // modify it under the terms of the GNU Lesser General Public 8340 // License as published by the Free Software Foundation; either 8341 // version 2.1 of the License, or (at your option) any later version. 8342 // 8343 // The GNU C Library is distributed in the hope that it will be useful, 8344 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8345 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8346 // Lesser General Public License for more details. 8347 // 8348 // You should have received a copy of the GNU Lesser General Public 8349 // License along with the GNU C Library; if not, see 8350 // <https://www.gnu.org/licenses/>. 8351 8352 // Determine the wordsize from the preprocessor defines. 8353 8354 // Not necessary, files are always with 64bit off_t. 8355 8356 // Not necessary, we always have 64-bit offsets. 8357 8358 type Flock = struct { 8359 Fl_type int16 8360 Fl_whence int16 8361 F__ccgo_pad1 [4]byte 8362 Fl_start X__off_t 8363 Fl_len X__off_t 8364 Fl_pid X__pid_t 8365 F__ccgo_pad2 [4]byte 8366 } /* fcntl.h:37:1 */ 8367 8368 type Flock64 = struct { 8369 Fl_type int16 8370 Fl_whence int16 8371 F__ccgo_pad1 [4]byte 8372 Fl_start X__off64_t 8373 Fl_len X__off64_t 8374 Fl_pid X__pid_t 8375 F__ccgo_pad2 [4]byte 8376 } /* fcntl.h:52:1 */ 8377 8378 // Include generic Linux declarations. 8379 // O_*, F_*, FD_* bit values for Linux. 8380 // Copyright (C) 2001-2020 Free Software Foundation, Inc. 8381 // This file is part of the GNU C Library. 8382 // 8383 // The GNU C Library is free software; you can redistribute it and/or 8384 // modify it under the terms of the GNU Lesser General Public 8385 // License as published by the Free Software Foundation; either 8386 // version 2.1 of the License, or (at your option) any later version. 8387 // 8388 // The GNU C Library is distributed in the hope that it will be useful, 8389 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8390 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8391 // Lesser General Public License for more details. 8392 // 8393 // You should have received a copy of the GNU Lesser General Public 8394 // License along with the GNU C Library; if not, see 8395 // <https://www.gnu.org/licenses/>. 8396 8397 // This file contains shared definitions between Linux architectures 8398 // and is included by <bits/fcntl.h> to declare them. The various 8399 // #ifndef cases allow the architecture specific file to define those 8400 // values with different values. 8401 // 8402 // A minimal <bits/fcntl.h> contains just: 8403 // 8404 // struct flock {...} 8405 // #ifdef __USE_LARGEFILE64 8406 // struct flock64 {...} 8407 // #endif 8408 // #include <bits/fcntl-linux.h> 8409 8410 // open/fcntl. 8411 8412 // open file description locks. 8413 // 8414 // Usually record locks held by a process are released on *any* close and are 8415 // not inherited across a fork. 8416 // 8417 // These cmd values will set locks that conflict with process-associated record 8418 // locks, but are "owned" by the opened file description, not the process. 8419 // This means that they are inherited across fork or clone with CLONE_FILES 8420 // like BSD (flock) locks, and they are only released automatically when the 8421 // last reference to the the file description against which they were acquired 8422 // is put. 8423 8424 // For now, Linux has no separate synchronicity options for read 8425 // operations. We define O_RSYNC therefore as the same as O_SYNC 8426 // since this is a superset. 8427 8428 // Values for the second argument to `fcntl'. 8429 8430 // For F_[GET|SET]FD. 8431 8432 // For posix fcntl() and `l_type' field of a `struct flock' for lockf(). 8433 8434 // For old implementation of BSD flock. 8435 8436 // Operations for BSD flock, also used by the kernel implementation. 8437 8438 // Define some more compatibility macros to be backward compatible with 8439 // BSD systems which did not managed to hide these kernel macros. 8440 8441 // Advise to `posix_fadvise'. 8442 8443 // Values for `*at' functions. 8444 8445 // Detect if open needs mode as a third argument (or for openat as a fourth 8446 // argument). 8447 8448 // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. 8449 // Earlier POSIX standards permitted any type ending in `_t' to be defined 8450 // by any POSIX header, so we don't conditionalize the definitions here. 8451 8452 // For XPG all symbols from <sys/stat.h> should also be available. 8453 // NB: Include guard matches what <linux/time.h> uses. 8454 // Copyright (C) 2000-2020 Free Software Foundation, Inc. 8455 // This file is part of the GNU C Library. 8456 // 8457 // The GNU C Library is free software; you can redistribute it and/or 8458 // modify it under the terms of the GNU Lesser General Public 8459 // License as published by the Free Software Foundation; either 8460 // version 2.1 of the License, or (at your option) any later version. 8461 // 8462 // The GNU C Library is distributed in the hope that it will be useful, 8463 // but WITHOUT ANY WARRANTY; without even the implied warranty of 8464 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8465 // Lesser General Public License for more details. 8466 // 8467 // You should have received a copy of the GNU Lesser General Public 8468 // License along with the GNU C Library; if not, see 8469 // <https://www.gnu.org/licenses/>. 8470 8471 // Determine the wordsize from the preprocessor defines. 8472 8473 // Versions of the `struct stat' data structure. 8474 8475 // Versions of the `xmknod' interface. 8476 8477 type Stat = struct { 8478 Fst_dev X__dev_t 8479 Fst_ino X__ino_t 8480 Fst_nlink X__nlink_t 8481 Fst_mode X__mode_t 8482 Fst_uid X__uid_t 8483 Fst_gid X__gid_t 8484 F__glibc_reserved0 int32 8485 Fst_rdev X__dev_t 8486 Fst_size X__off_t 8487 Fst_atim struct { 8488 Ftv_sec X__time_t 8489 Ftv_nsec X__syscall_slong_t 8490 } 8491 Fst_mtim struct { 8492 Ftv_sec X__time_t 8493 Ftv_nsec X__syscall_slong_t 8494 } 8495 Fst_ctim struct { 8496 Ftv_sec X__time_t 8497 Ftv_nsec X__syscall_slong_t 8498 } 8499 Fst_blksize X__blksize_t 8500 Fst_blocks X__blkcnt_t 8501 F__glibc_reserved [3]int64 8502 } /* stat.h:50:1 */ 8503 8504 // Note stat64 is the same shape as stat. 8505 type Stat64 = struct { 8506 Fst_dev X__dev_t 8507 Fst_ino X__ino64_t 8508 Fst_nlink X__nlink_t 8509 Fst_mode X__mode_t 8510 Fst_uid X__uid_t 8511 Fst_gid X__gid_t 8512 F__glibc_reserved0 int32 8513 Fst_rdev X__dev_t 8514 Fst_size X__off_t 8515 Fst_atim struct { 8516 Ftv_sec X__time_t 8517 Ftv_nsec X__syscall_slong_t 8518 } 8519 Fst_mtim struct { 8520 Ftv_sec X__time_t 8521 Ftv_nsec X__syscall_slong_t 8522 } 8523 Fst_ctim struct { 8524 Ftv_sec X__time_t 8525 Ftv_nsec X__syscall_slong_t 8526 } 8527 Fst_blksize X__blksize_t 8528 Fst_blocks X__blkcnt64_t 8529 F__glibc_reserved [3]int64 8530 } /* stat.h:147:1 */ 8531 8532 // provide prototypes for these when building zlib without LFS 8533 8534 // default memLevel 8535 8536 // default i/o buffer size -- double this for output when reading (this and 8537 // twice this must be able to fit in an unsigned type) 8538 8539 // gzip modes, also provide a little integrity check on the passed structure 8540 8541 // values for gz_state how 8542 8543 // internal gzip file state data structure 8544 type Gz_state = struct { 8545 Fx GzFile_s 8546 Fmode int32 8547 Ffd int32 8548 Fpath uintptr 8549 Fsize uint32 8550 Fwant uint32 8551 Fin uintptr 8552 Fout uintptr 8553 Fdirect int32 8554 Fhow int32 8555 Fstart Off64_t 8556 Feof int32 8557 Fpast int32 8558 Flevel int32 8559 Fstrategy int32 8560 Fskip Off64_t 8561 Fseek int32 8562 Ferr int32 8563 Fmsg uintptr 8564 Fstrm Z_stream 8565 } /* gzguts.h:201:3 */ 8566 type Gz_statep = uintptr /* gzguts.h:202:22 */ 8567 8568 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 8569 // value -- needed when comparing unsigned to z_off64_t, which is signed 8570 // (possible z_off64_t types off_t, off64_t, and long are all signed) 8571 8572 // gzclose() is in a separate file so that it is linked in only if it is used. 8573 // That way the other gzclose functions can be used instead to avoid linking in 8574 // unneeded compression or decompression routines. 8575 func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */ 8576 var state Gz_statep 8577 8578 if file == (uintptr(0)) { 8579 return -2 8580 } 8581 state = file 8582 8583 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8584 return Xgzclose_r(tls, file) 8585 } 8586 return Xgzclose_w(tls, file) 8587 } 8588 8589 // Reset gzip file state 8590 func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */ 8591 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) // no output data available 8592 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ... 8593 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 // not at end of file 8594 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 // have not read past end yet 8595 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header 8596 } 8597 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 // no seek request pending 8598 Xgz_error(tls, state, Z_OK, uintptr(0)) // clear error 8599 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0) // no uncompressed data yet 8600 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet 8601 } 8602 8603 // Open a gzip file either by name or file descriptor. 8604 func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */ 8605 bp := tls.Alloc(16) 8606 defer tls.Free(16) 8607 8608 var state Gz_statep 8609 var len Z_size_t 8610 var oflag int32 8611 var cloexec int32 = 0 8612 var exclusive int32 = 0 8613 8614 // check input 8615 if path == (uintptr(0)) { 8616 return uintptr(0) 8617 } 8618 8619 // allocate gzFile structure to return 8620 state = libc.Xmalloc(tls, uint64(unsafe.Sizeof(Gz_state{}))) 8621 if state == (uintptr(0)) { 8622 return uintptr(0) 8623 } 8624 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) // no buffers allocated yet 8625 (*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size 8626 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) // no error message yet 8627 8628 // interpret mode 8629 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE 8630 (*Gz_state)(unsafe.Pointer(state)).Flevel = -1 8631 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY 8632 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 8633 for *(*uint8)(unsafe.Pointer(mode)) != 0 { 8634 if (int32(*(*uint8)(unsafe.Pointer(mode))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(mode))) <= '9') { 8635 (*Gz_state)(unsafe.Pointer(state)).Flevel = (int32(*(*uint8)(unsafe.Pointer(mode))) - '0') 8636 } else { 8637 switch int32(*(*uint8)(unsafe.Pointer(mode))) { 8638 case 'r': 8639 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ 8640 break 8641 fallthrough 8642 case 'w': 8643 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE 8644 break 8645 fallthrough 8646 case 'a': 8647 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND 8648 break 8649 fallthrough 8650 case '+': // can't read and write at the same time 8651 libc.Xfree(tls, state) 8652 return uintptr(0) 8653 fallthrough 8654 case 'b': // ignore -- will request binary anyway 8655 break 8656 fallthrough 8657 case 'e': 8658 cloexec = 1 8659 break 8660 fallthrough 8661 case 'x': 8662 exclusive = 1 8663 break 8664 fallthrough 8665 case 'f': 8666 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED 8667 break 8668 fallthrough 8669 case 'h': 8670 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY 8671 break 8672 fallthrough 8673 case 'R': 8674 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE 8675 break 8676 fallthrough 8677 case 'F': 8678 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED 8679 break 8680 fallthrough 8681 case 'T': 8682 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 8683 break 8684 fallthrough 8685 default: // could consider as an error, but just ignore 8686 8687 } 8688 } 8689 mode++ 8690 } 8691 8692 // must provide an "r", "w", or "a" 8693 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE { 8694 libc.Xfree(tls, state) 8695 return uintptr(0) 8696 } 8697 8698 // can't force transparent read 8699 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8700 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 8701 libc.Xfree(tls, state) 8702 return uintptr(0) 8703 } 8704 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file 8705 } 8706 8707 // save the path name for error messages 8708 len = libc.Xstrlen(tls, path) 8709 (*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, (len + uint64(1))) 8710 if (*Gz_state)(unsafe.Pointer(state)).Fpath == (uintptr(0)) { 8711 libc.Xfree(tls, state) 8712 return uintptr(0) 8713 } 8714 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, (len + uint64(1)), ts+76 /* "%s" */, libc.VaList(bp, path)) 8715 8716 // compute the flags for open() 8717 oflag = ((0 | (func() int32 { 8718 if cloexec != 0 { 8719 return 02000000 8720 } 8721 return 0 8722 }())) | (func() int32 { 8723 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8724 return O_RDONLY 8725 } 8726 return (((O_WRONLY | O_CREAT) | (func() int32 { 8727 if exclusive != 0 { 8728 return O_EXCL 8729 } 8730 return 0 8731 }())) | (func() int32 { 8732 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE { 8733 return O_TRUNC 8734 } 8735 return O_APPEND 8736 }())) 8737 }())) 8738 8739 // open the file with the appropriate flags (or just use fd) 8740 (*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 { 8741 if fd > -1 { 8742 return fd 8743 } 8744 return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666)) 8745 }() 8746 if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 { 8747 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 8748 libc.Xfree(tls, state) 8749 return uintptr(0) 8750 } 8751 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND { 8752 libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct 8753 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE // simplify later checks 8754 } 8755 8756 // save the current position for rewinding (only if reading) 8757 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8758 (*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 8759 if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) { 8760 (*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0) 8761 } 8762 } 8763 8764 // initialize stream 8765 gz_reset(tls, state) 8766 8767 // return stream 8768 return state 8769 } 8770 8771 // -- see zlib.h -- 8772 func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */ 8773 return gz_open(tls, path, -1, mode) 8774 } 8775 8776 // -- see zlib.h -- 8777 func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */ 8778 return gz_open(tls, path, -1, mode) 8779 } 8780 8781 // -- see zlib.h -- 8782 func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */ 8783 bp := tls.Alloc(8) 8784 defer tls.Free(8) 8785 8786 var path uintptr // identifier for error messages 8787 var gz GzFile 8788 8789 if (fd == -1) || ((libc.AssignUintptr(&path, libc.Xmalloc(tls, (uint64(7)+(uint64(3)*uint64(unsafe.Sizeof(int32(0)))))))) == (uintptr(0))) { 8790 return uintptr(0) 8791 } 8792 libc.Xsnprintf(tls, path, (uint64(7) + (uint64(3) * uint64(unsafe.Sizeof(int32(0))))), ts+79 /* "<fd:%d>" */, libc.VaList(bp, fd)) 8793 gz = gz_open(tls, path, fd, mode) 8794 libc.Xfree(tls, path) 8795 return gz 8796 } 8797 8798 // -- see zlib.h -- 8799 8800 // -- see zlib.h -- 8801 func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */ 8802 var state Gz_statep 8803 8804 // get internal structure and check integrity 8805 if file == (uintptr(0)) { 8806 return -1 8807 } 8808 state = file 8809 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8810 return -1 8811 } 8812 8813 // make sure we haven't already allocated memory 8814 if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { 8815 return -1 8816 } 8817 8818 // check and set requested size 8819 if (size << 1) < size { 8820 return -1 8821 } // need to be able to double it 8822 if size < uint32(2) { 8823 size = uint32(2) 8824 } // need two bytes to check magic header 8825 (*Gz_state)(unsafe.Pointer(state)).Fwant = size 8826 return 0 8827 } 8828 8829 // -- see zlib.h -- 8830 func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */ 8831 var state Gz_statep 8832 8833 // get internal structure 8834 if file == (uintptr(0)) { 8835 return -1 8836 } 8837 state = file 8838 8839 // check that we're reading and that there's no error 8840 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8841 return -1 8842 } 8843 8844 // back up and start over 8845 if libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) { 8846 return -1 8847 } 8848 gz_reset(tls, state) 8849 return 0 8850 } 8851 8852 // -- see zlib.h -- 8853 func Xgzseek64(tls *libc.TLS, file GzFile, offset Off64_t, whence int32) Off64_t { /* gzlib.c:366:19: */ 8854 var n uint32 8855 var ret Off64_t 8856 var state Gz_statep 8857 8858 // get internal structure and check integrity 8859 if file == (uintptr(0)) { 8860 return int64(-1) 8861 } 8862 state = file 8863 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8864 return int64(-1) 8865 } 8866 8867 // check that there's no error 8868 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 8869 return int64(-1) 8870 } 8871 8872 // can only seek from start or relative to current position 8873 if (whence != SEEK_SET) && (whence != SEEK_CUR) { 8874 return int64(-1) 8875 } 8876 8877 // normalize offset to a SEEK_CUR specification 8878 if whence == SEEK_SET { 8879 offset = offset - ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 8880 } else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8881 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fskip) 8882 } 8883 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8884 8885 // if within raw area while reading, just go there 8886 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)) { 8887 ret = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (offset - Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)), SEEK_CUR) 8888 if ret == int64(-1) { 8889 return int64(-1) 8890 } 8891 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 8892 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 8893 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 8894 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8895 Xgz_error(tls, state, Z_OK, uintptr(0)) 8896 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 8897 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (offset) 8898 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 8899 } 8900 8901 // calculate skip amount, rewinding if needed for back seek when reading 8902 if offset < int64(0) { 8903 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards 8904 return int64(-1) 8905 } 8906 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 8907 if offset < int64(0) { // before start of file! 8908 return int64(-1) 8909 } 8910 if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset 8911 return int64(-1) 8912 } 8913 } 8914 8915 // if reading, skip what's in output buffer (one less gzgetc() check) 8916 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 8917 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset) { 8918 n = uint32(offset) 8919 } else { 8920 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8921 } 8922 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 8923 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 8924 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 8925 offset = offset - (Off64_t(n)) 8926 } 8927 8928 // request skip (if not zero) 8929 if offset != 0 { 8930 (*Gz_state)(unsafe.Pointer(state)).Fseek = 1 8931 (*Gz_state)(unsafe.Pointer(state)).Fskip = offset 8932 } 8933 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset) 8934 } 8935 8936 // -- see zlib.h -- 8937 func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:443:17: */ 8938 var ret Off64_t 8939 8940 ret = Xgzseek64(tls, file, offset, whence) 8941 if ret == ret { 8942 return ret 8943 } 8944 return int64(-1) 8945 } 8946 8947 // -- see zlib.h -- 8948 func Xgztell64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:455:19: */ 8949 var state Gz_statep 8950 8951 // get internal structure and check integrity 8952 if file == (uintptr(0)) { 8953 return int64(-1) 8954 } 8955 state = file 8956 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8957 return int64(-1) 8958 } 8959 8960 // return position 8961 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + (func() int64 { 8962 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8963 return (*Gz_state)(unsafe.Pointer(state)).Fskip 8964 } 8965 return int64(0) 8966 }())) 8967 } 8968 8969 // -- see zlib.h -- 8970 func Xgztell(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:472:17: */ 8971 var ret Off64_t 8972 8973 ret = Xgztell64(tls, file) 8974 if ret == ret { 8975 return ret 8976 } 8977 return int64(-1) 8978 } 8979 8980 // -- see zlib.h -- 8981 func Xgzoffset64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:482:19: */ 8982 var offset Off64_t 8983 var state Gz_statep 8984 8985 // get internal structure and check integrity 8986 if file == (uintptr(0)) { 8987 return int64(-1) 8988 } 8989 state = file 8990 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 8991 return int64(-1) 8992 } 8993 8994 // compute and return effective offset in file 8995 offset = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 8996 if offset == int64(-1) { 8997 return int64(-1) 8998 } 8999 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading 9000 offset = offset - (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) 9001 } // don't count buffered input 9002 return offset 9003 } 9004 9005 // -- see zlib.h -- 9006 func Xgzoffset(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:505:17: */ 9007 var ret Off64_t 9008 9009 ret = Xgzoffset64(tls, file) 9010 if ret == ret { 9011 return ret 9012 } 9013 return int64(-1) 9014 } 9015 9016 // -- see zlib.h -- 9017 func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */ 9018 var state Gz_statep 9019 9020 // get internal structure and check integrity 9021 if file == (uintptr(0)) { 9022 return 0 9023 } 9024 state = file 9025 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 9026 return 0 9027 } 9028 9029 // return end-of-file state 9030 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 9031 return (*Gz_state)(unsafe.Pointer(state)).Fpast 9032 } 9033 return 0 9034 } 9035 9036 // -- see zlib.h -- 9037 func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */ 9038 var state Gz_statep 9039 9040 // get internal structure and check integrity 9041 if file == (uintptr(0)) { 9042 return uintptr(0) 9043 } 9044 state = file 9045 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 9046 return uintptr(0) 9047 } 9048 9049 // return error information 9050 if errnum != (uintptr(0)) { 9051 *(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr 9052 } 9053 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-4) { 9054 return ts + 87 /* "out of memory" */ 9055 } 9056 return func() uintptr { 9057 if (*Gz_state)(unsafe.Pointer(state)).Fmsg == (uintptr(0)) { 9058 return ts + 101 /* "" */ 9059 } 9060 return (*Gz_state)(unsafe.Pointer(state)).Fmsg 9061 }() 9062 } 9063 9064 // -- see zlib.h -- 9065 func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */ 9066 var state Gz_statep 9067 9068 // get internal structure and check integrity 9069 if file == (uintptr(0)) { 9070 return 9071 } 9072 state = file 9073 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 9074 return 9075 } 9076 9077 // clear error and end-of-file 9078 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 9079 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 9080 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9081 } 9082 Xgz_error(tls, state, Z_OK, uintptr(0)) 9083 } 9084 9085 // Create an error message in allocated memory and set state->err and 9086 // state->msg accordingly. Free any previous error message already there. Do 9087 // not try to free or allocate space if the error is Z_MEM_ERROR (out of 9088 // memory). Simply save the error message as a static string. If there is an 9089 // allocation failure constructing the error message, then convert the error to 9090 // out of memory. 9091 func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */ 9092 bp := tls.Alloc(24) 9093 defer tls.Free(24) 9094 9095 // free previously allocated message and clear 9096 if (*Gz_state)(unsafe.Pointer(state)).Fmsg != (uintptr(0)) { 9097 if (*Gz_state)(unsafe.Pointer(state)).Ferr != (-4) { 9098 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg) 9099 } 9100 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) 9101 } 9102 9103 // if fatal, set state->x.have to 0 so that the gzgetc() macro fails 9104 if (err != Z_OK) && (err != (-5)) { 9105 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9106 } 9107 9108 // set error code, and if no message, then done 9109 (*Gz_state)(unsafe.Pointer(state)).Ferr = err 9110 if msg == (uintptr(0)) { 9111 return 9112 } 9113 9114 // for an out of memory error, return literal string when requested 9115 if err == (-4) { 9116 return 9117 } 9118 9119 // construct error message with path 9120 if (libc.AssignPtrUintptr(state+112 /* &.msg */, libc.Xmalloc(tls, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg))+uint64(3))))) == (uintptr(0)) { 9121 (*Gz_state)(unsafe.Pointer(state)).Ferr = -4 9122 return 9123 } 9124 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) + libc.Xstrlen(tls, msg)) + uint64(3)), 9125 ts+102 /* "%s%s%s" */, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109 /* ": " */, msg)) 9126 } 9127 9128 // Use read() to load a buffer -- return -1 on error, otherwise 0. Read from 9129 // state->fd, and update state->eof, state->err, and state->msg as appropriate. 9130 // This function needs to loop on read(), since read() is not guaranteed to 9131 // read the number of bytes requested, depending on the type of descriptor. 9132 func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */ 9133 var ret int32 9134 var get uint32 9135 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 9136 9137 *(*uint32)(unsafe.Pointer(have)) = uint32(0) 9138 for ok := true; ok; ok = (*(*uint32)(unsafe.Pointer(have)) < len) { 9139 get = (len - *(*uint32)(unsafe.Pointer(have))) 9140 if get > max { 9141 get = max 9142 } 9143 ret = int32(libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (buf + uintptr(*(*uint32)(unsafe.Pointer(have)))), uint64(get))) 9144 if ret <= 0 { 9145 break 9146 } 9147 *(*uint32)(unsafe.Pointer(have)) += (uint32(ret)) 9148 } 9149 if ret < 0 { 9150 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9151 return -1 9152 } 9153 if ret == 0 { 9154 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 9155 } 9156 return 0 9157 } 9158 9159 // Load up input buffer and set eof flag if last data loaded -- return -1 on 9160 // error, 0 otherwise. Note that the eof flag is set when the end of the input 9161 // file is reached, even though there may be unused data in the buffer. Once 9162 // that data has been used, no more attempts will be made to read the file. 9163 // If strm->avail_in != 0, then the current data is moved to the beginning of 9164 // the input buffer, and then the remainder of the buffer is loaded with the 9165 // available data from the input file. 9166 func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */ 9167 bp := tls.Alloc(4) 9168 defer tls.Free(4) 9169 9170 // var got uint32 at bp, 4 9171 9172 var strm Z_streamp = (state + 120 /* &.strm */) 9173 9174 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 9175 return -1 9176 } 9177 if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 { 9178 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start 9179 var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin 9180 var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 9181 var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9182 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 9183 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) 9184 } 9185 } 9186 if gz_load(tls, state, ((*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)), 9187 ((*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in), bp /* &got */) == -1 { 9188 return -1 9189 } 9190 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (*(*uint32)(unsafe.Pointer(bp /* got */))) 9191 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9192 } 9193 return 0 9194 } 9195 9196 // Look for gzip header, set up for inflate or copy. state->x.have must be 0. 9197 // If this is the first time in, allocate required memory. state->how will be 9198 // left unchanged if there is no more input data available, will be set to COPY 9199 // if there is no gzip header and direct copying will be performed, or it will 9200 // be set to GZIP for decompression. If direct copying, then leftover input 9201 // data from the input buffer will be copied to the output buffer. In that 9202 // case, all further file reads will be directly to either the output buffer or 9203 // a user buffer. If decompressing, the inflate state will be initialized. 9204 // gz_look() will return 0 on success or -1 on failure. 9205 func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */ 9206 var strm Z_streamp = (state + 120 /* &.strm */) 9207 9208 // allocate read buffers and inflate memory 9209 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { 9210 // allocate buffers 9211 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 9212 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))) 9213 if ((*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0))) || ((*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0))) { 9214 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9215 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9216 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9217 return -1 9218 } 9219 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 9220 9221 // allocate inflate memory 9222 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL) 9223 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL) 9224 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL) 9225 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 9226 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL) 9227 if (XinflateInit2_(tls, (state+120 /* &.strm */), (15+16), ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) { // gunzip 9228 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9229 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9230 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) 9231 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9232 return -1 9233 } 9234 } 9235 9236 // get at least the magic bytes in the input buffer 9237 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) { 9238 if gz_avail(tls, state) == -1 { 9239 return -1 9240 } 9241 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9242 return 0 9243 } 9244 } 9245 9246 // look for gzip magic bytes -- if there, do gzip decoding (note: there is 9247 // a logical dilemma here when considering the case of a partially written 9248 // gzip file, to wit, if a single 31 byte is written, then we cannot tell 9249 // whether this is a single-byte file, or just a partially written gzip 9250 // file -- for here we assume that if a gzip file is being written, then 9251 // the header will be written in a single operation, so that reading a 9252 // single byte is sufficient indication that it is not a gzip file) 9253 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) { 9254 XinflateReset(tls, strm) 9255 (*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2 9256 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 9257 return 0 9258 } 9259 9260 // no gzip header -- if we were decoding gzip before, then this is trailing 9261 // garbage. Ignore the trailing garbage and finish. 9262 if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 { 9263 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 9264 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 9265 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9266 return 0 9267 } 9268 9269 // doing raw i/o, copy any leftover input to output -- this assumes that 9270 // the output buffer is larger than the input buffer, which also assures 9271 // space for gzungetc() 9272 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9273 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 9274 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64((*Z_stream)(unsafe.Pointer(strm)).Favail_in)) 9275 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9276 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 9277 } 9278 (*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1 9279 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 9280 return 0 9281 } 9282 9283 // Decompress from input to the provided next_out and avail_out in the state. 9284 // On return, state->x.have and state->x.next point to the just decompressed 9285 // data. If the gzip stream completes, state->how is reset to LOOK to look for 9286 // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 9287 // on success, -1 on failure. 9288 func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */ 9289 var ret int32 = Z_OK 9290 var had uint32 9291 var strm Z_streamp = (state + 120 /* &.strm */) 9292 9293 // fill output buffer up to end of deflate stream 9294 had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9295 for ok := true; ok; ok = (((*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0) && (ret != Z_STREAM_END)) { 9296 // get more input for inflate() 9297 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && (gz_avail(tls, state) == -1) { 9298 return -1 9299 } 9300 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 9301 Xgz_error(tls, state, -5, ts+112 /* "unexpected end o..." */) 9302 break 9303 } 9304 9305 // decompress and handle errors 9306 ret = Xinflate(tls, strm, Z_NO_FLUSH) 9307 if (ret == (-2)) || (ret == Z_NEED_DICT) { 9308 Xgz_error(tls, state, -2, 9309 ts+135 /* "internal error: ..." */) 9310 return -1 9311 } 9312 if ret == (-4) { 9313 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9314 return -1 9315 } 9316 if ret == (-3) { // deflate stream invalid 9317 Xgz_error(tls, state, -3, 9318 func() uintptr { 9319 if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == (uintptr(0)) { 9320 return ts + 174 /* "compressed data ..." */ 9321 } 9322 return (*Z_stream)(unsafe.Pointer(strm)).Fmsg 9323 }()) 9324 return -1 9325 } 9326 } 9327 9328 // update available output 9329 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out) 9330 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 9331 9332 // if the gzip stream completed successfully, look for another 9333 if ret == Z_STREAM_END { 9334 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK 9335 } 9336 9337 // good decompression 9338 return 0 9339 } 9340 9341 // Fetch data and put it in the output buffer. Assumes state->x.have is 0. 9342 // Data is either copied from the input file or decompressed from the input 9343 // file depending on state->how. If state->how is LOOK, then a gzip header is 9344 // looked for to determine whether to copy or decompress. Returns -1 on error, 9345 // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the 9346 // end of the input file has been reached and all data has been processed. 9347 func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */ 9348 var strm Z_streamp = (state + 120 /* &.strm */) 9349 9350 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))) { 9351 switch (*Gz_state)(unsafe.Pointer(state)).Fhow { 9352 case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP 9353 if gz_look(tls, state) == -1 { 9354 return -1 9355 } 9356 if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK { 9357 return 0 9358 } 9359 break 9360 case COPY1: // -> COPY 9361 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, ((*Gz_state)(unsafe.Pointer(state)).Fsize<<1), (state /* &.x */ /* &.have */)) == 9362 -1 { 9363 return -1 9364 } 9365 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9366 return 0 9367 case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream) 9368 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) 9369 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9370 if gz_decomp(tls, state) == -1 { 9371 return -1 9372 } 9373 } 9374 } 9375 return 0 9376 } 9377 9378 // Skip len uncompressed bytes of output. Return -1 on error, 0 on success. 9379 func gz_skip(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzread.c:259:11: */ 9380 var n uint32 9381 9382 // skip over len bytes or reach end-of-file, whichever comes first 9383 for len != 0 { 9384 // skip over whatever is in output buffer 9385 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9386 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len) { 9387 n = uint32(len) 9388 } else { 9389 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9390 } 9391 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 9392 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 9393 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 9394 len = len - (Off64_t(n)) 9395 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 9396 break 9397 } else { 9398 // get more output, looking for header if required 9399 if gz_fetch(tls, state) == -1 { 9400 return -1 9401 } 9402 } 9403 } 9404 return 0 9405 } 9406 9407 // Read len bytes into buf from file, or less than len up to the end of the 9408 // input. Return the number of bytes read. If zero is returned, either the 9409 // end of file was reached, or there was an error. state->err must be 9410 // consulted in that case to determine which. 9411 func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */ 9412 bp := tls.Alloc(4) 9413 defer tls.Free(4) 9414 9415 var got Z_size_t 9416 // var n uint32 at bp, 4 9417 9418 // if len is zero, avoid unnecessary operations 9419 if len == uint64(0) { 9420 return uint64(0) 9421 } 9422 9423 // process a skip request 9424 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9425 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9426 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9427 return uint64(0) 9428 } 9429 } 9430 9431 // get len bytes to buf, or less than len if at the end 9432 got = uint64(0) 9433 for ok := true; ok; ok = len != 0 { 9434 // set n to the maximum amount of len that fits in an unsigned int 9435 *(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1) 9436 if Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */))) > len { 9437 *(*uint32)(unsafe.Pointer(bp /* n */)) = uint32(len) 9438 } 9439 9440 // first just try copying data from the output buffer 9441 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9442 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp /* n */)) { 9443 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9444 } 9445 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9446 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9447 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (*(*uint32)(unsafe.Pointer(bp /* n */))) 9448 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 9449 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end 9450 break 9451 } else if ((*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK) || (*(*uint32)(unsafe.Pointer(bp /* n */)) < ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)) { 9452 // get more output, looking for header if required 9453 if gz_fetch(tls, state) == -1 { 9454 return uint64(0) 9455 } 9456 continue // no progress yet -- go back to copy above 9457 // the copy above assures that we will leave with space in the 9458 // output buffer, allowing at least one gzungetc() to succeed 9459 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly 9460 if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp /* n */)), bp /* &n */) == -1 { 9461 return uint64(0) 9462 } 9463 } else { // state->how == GZIP 9464 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */)) 9465 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf 9466 if gz_decomp(tls, state) == -1 { 9467 return uint64(0) 9468 } 9469 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9470 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 9471 } 9472 9473 // update progress 9474 len = len - (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9475 buf = (buf + uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9476 got = got + (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9477 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 9478 } 9479 9480 // return number of bytes read into user buffer 9481 return got 9482 } 9483 9484 // -- see zlib.h -- 9485 func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */ 9486 var state Gz_statep 9487 9488 // get internal structure 9489 if file == (uintptr(0)) { 9490 return -1 9491 } 9492 state = file 9493 9494 // check that we're reading and that there's no (serious) error 9495 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9496 return -1 9497 } 9498 9499 // since an int is returned, make sure len fits in one, otherwise return 9500 // with an error (this avoids a flaw in the interface) 9501 if int32(len) < 0 { 9502 Xgz_error(tls, state, -2, ts+196 /* "request does not..." */) 9503 return -1 9504 } 9505 9506 // read len or fewer bytes to buf 9507 len = uint32(gz_read(tls, state, buf, uint64(len))) 9508 9509 // check for an error 9510 if ((len == uint32(0)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 9511 return -1 9512 } 9513 9514 // return the number of bytes read (this is assured to fit in an int) 9515 return int32(len) 9516 } 9517 9518 // -- see zlib.h -- 9519 func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */ 9520 var len Z_size_t 9521 var state Gz_statep 9522 9523 // get internal structure 9524 if file == (uintptr(0)) { 9525 return uint64(0) 9526 } 9527 state = file 9528 9529 // check that we're reading and that there's no (serious) error 9530 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9531 return uint64(0) 9532 } 9533 9534 // compute bytes to read -- error on overflow 9535 len = (nitems * size) 9536 if (size != 0) && ((len / size) != nitems) { 9537 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 9538 return uint64(0) 9539 } 9540 9541 // read len or fewer bytes to buf, return the number of full items read 9542 if len != 0 { 9543 return (gz_read(tls, state, buf, len) / size) 9544 } 9545 return uint64(0) 9546 } 9547 9548 // -- see zlib.h -- 9549 func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */ 9550 bp := tls.Alloc(1) 9551 defer tls.Free(1) 9552 9553 var ret int32 9554 // var buf [1]uint8 at bp, 1 9555 9556 var state Gz_statep 9557 9558 // get internal structure 9559 if file == (uintptr(0)) { 9560 return -1 9561 } 9562 state = file 9563 9564 // check that we're reading and that there's no (serious) error 9565 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9566 return -1 9567 } 9568 9569 // try output buffer (no need to check for skip request) 9570 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 9571 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave-- 9572 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 9573 return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext), 1)))) 9574 } 9575 9576 // nothing there -- try gz_read() 9577 ret = int32(gz_read(tls, state, bp /* &buf[0] */, uint64(1))) 9578 if ret < 1 { 9579 return -1 9580 } 9581 return int32(*(*uint8)(unsafe.Pointer(bp /* &buf[0] */))) 9582 } 9583 9584 func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */ 9585 return Xgzgetc(tls, file) 9586 } 9587 9588 // -- see zlib.h -- 9589 func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */ 9590 var state Gz_statep 9591 9592 // get internal structure 9593 if file == (uintptr(0)) { 9594 return -1 9595 } 9596 state = file 9597 9598 // check that we're reading and that there's no (serious) error 9599 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9600 return -1 9601 } 9602 9603 // process a skip request 9604 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9605 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9606 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9607 return -1 9608 } 9609 } 9610 9611 // can't push EOF 9612 if c < 0 { 9613 return -1 9614 } 9615 9616 // if output buffer empty, put byte at end (allows more pushing) 9617 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 9618 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) 9619 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) - uintptr(1)) 9620 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 9621 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 9622 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9623 return c 9624 } 9625 9626 // if no room, give up (must have already done a gzungetc()) 9627 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) { 9628 Xgz_error(tls, state, -3, ts+260 /* "out of room to p..." */) 9629 return -1 9630 } 9631 9632 // slide output data if needed and insert byte before existing data 9633 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout { 9634 var src uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 9635 var dest uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) 9636 for src > (*Gz_state)(unsafe.Pointer(state)).Fout { 9637 *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1))) 9638 } 9639 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest 9640 } 9641 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++ 9642 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext-- 9643 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 9644 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 9645 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 9646 return c 9647 } 9648 9649 // -- see zlib.h -- 9650 func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */ 9651 var left uint32 9652 var n uint32 9653 var str uintptr 9654 var eol uintptr 9655 var state Gz_statep 9656 9657 // check parameters and get internal structure 9658 if ((file == (uintptr(0))) || (buf == (uintptr(0)))) || (len < 1) { 9659 return uintptr(0) 9660 } 9661 state = file 9662 9663 // check that we're reading and that there's no (serious) error 9664 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 9665 return uintptr(0) 9666 } 9667 9668 // process a skip request 9669 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9670 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9671 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9672 return uintptr(0) 9673 } 9674 } 9675 9676 // copy output bytes up to new line or len - 1, whichever comes first -- 9677 // append a terminating zero to the string (we don't check for a zero in 9678 // the contents, let the user worry about that) 9679 str = buf 9680 left = (uint32(len) - uint32(1)) 9681 if left != 0 { 9682 for ok := true; ok; ok = ((left != 0) && (eol == (uintptr(0)))) { 9683 // assure that something is in the output buffer 9684 if ((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0)) && (gz_fetch(tls, state) == -1) { 9685 return uintptr(0) 9686 } // error 9687 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file 9688 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end 9689 break // return what we have 9690 } 9691 9692 // look for end-of-line in current output buffer 9693 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left { 9694 n = left 9695 } else { 9696 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 9697 } 9698 eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', uint64(n)) 9699 if eol != (uintptr(0)) { 9700 n = ((uint32((int64(eol) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) + uint32(1)) 9701 } 9702 9703 // copy through end-of-line, or remainder if not found 9704 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n)) 9705 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 9706 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 9707 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 9708 left = left - (n) 9709 buf += uintptr(n) 9710 } 9711 } 9712 9713 // return terminated string, or if nothing, end of file 9714 if buf == str { 9715 return uintptr(0) 9716 } 9717 *(*uint8)(unsafe.Pointer(buf)) = uint8(0) 9718 return str 9719 } 9720 9721 // -- see zlib.h -- 9722 func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */ 9723 var state Gz_statep 9724 9725 // get internal structure 9726 if file == (uintptr(0)) { 9727 return 0 9728 } 9729 state = file 9730 9731 // if the state is not known, but we can find out, then do so (this is 9732 // mainly for right after a gzopen() or gzdopen()) 9733 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)) { 9734 gz_look(tls, state) 9735 } 9736 9737 // return 1 if transparent, 0 if processing a gzip stream 9738 return (*Gz_state)(unsafe.Pointer(state)).Fdirect 9739 } 9740 9741 // -- see zlib.h -- 9742 func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */ 9743 var ret int32 9744 var err int32 9745 var state Gz_statep 9746 9747 // get internal structure 9748 if file == (uintptr(0)) { 9749 return -2 9750 } 9751 state = file 9752 9753 // check that we're reading 9754 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { 9755 return -2 9756 } 9757 9758 // free memory and close file 9759 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 9760 XinflateEnd(tls, (state + 120 /* &.strm */)) 9761 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9762 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9763 } 9764 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-5) { 9765 err = -5 9766 } else { 9767 err = Z_OK 9768 } 9769 Xgz_error(tls, state, Z_OK, uintptr(0)) 9770 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 9771 ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) 9772 libc.Xfree(tls, state) 9773 if ret != 0 { 9774 return -1 9775 } 9776 return err 9777 } 9778 9779 // Initialize state for writing a gzip file. Mark initialization by setting 9780 // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on 9781 // success. 9782 func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */ 9783 var ret int32 9784 var strm Z_streamp = (state + 120 /* &.strm */) 9785 9786 // allocate input buffer (double size for gzprintf) 9787 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))) 9788 if (*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0)) { 9789 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9790 return -1 9791 } 9792 9793 // only need output buffer and deflate state if compressing 9794 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9795 // allocate output buffer 9796 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 9797 if (*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0)) { 9798 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9799 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9800 return -1 9801 } 9802 9803 // allocate deflate memory, set up for gzip compression 9804 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL) 9805 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL) 9806 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL) 9807 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{}))) 9808 if ret != Z_OK { 9809 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9810 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9811 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 9812 return -1 9813 } 9814 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0) 9815 } 9816 9817 // mark state as initialized 9818 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 9819 9820 // initialize write buffer if compressing 9821 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9822 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 9823 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9824 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 9825 } 9826 return 0 9827 } 9828 9829 // Compress whatever is at avail_in and next_in and write to the output file. 9830 // Return -1 if there is an error writing to the output file or if gz_init() 9831 // fails to allocate memory, otherwise 0. flush is assumed to be a valid 9832 // deflate() flush value. If flush is Z_FINISH, then the deflate() state is 9833 // reset to start a new gzip stream. If gz->direct is true, then simply write 9834 // to the output file without compressing, and ignore flush. 9835 func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */ 9836 var ret int32 9837 var writ int32 9838 var have uint32 9839 var put uint32 9840 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 9841 var strm Z_streamp = (state + 120 /* &.strm */) 9842 9843 // allocate memory if this is the first time through 9844 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9845 return -1 9846 } 9847 9848 // write directly if requested 9849 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 9850 for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 9851 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max { 9852 put = max 9853 } else { 9854 put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9855 } 9856 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(put))) 9857 if writ < 0 { 9858 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9859 return -1 9860 } 9861 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (uint32(writ)) 9862 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(writ)) 9863 } 9864 return 0 9865 } 9866 9867 // run deflate() on provided input until it produces no more output 9868 ret = Z_OK 9869 for ok := true; ok; ok = have != 0 { 9870 // write out current buffer contents if full, or if flushing, but if 9871 // doing Z_FINISH then don't write until we get to Z_STREAM_END 9872 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0)) || ((flush != Z_NO_FLUSH) && ((flush != Z_FINISH) || (ret == Z_STREAM_END))) { 9873 for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext { 9874 if ((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) > int64(int32(max)) { 9875 put = max 9876 } else { 9877 put = (uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) 9878 } 9879 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(put))) 9880 if writ < 0 { 9881 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))) 9882 return -1 9883 } 9884 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(writ)) 9885 } 9886 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 9887 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 9888 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 9889 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 9890 } 9891 } 9892 9893 // compress 9894 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9895 ret = Xdeflate(tls, strm, flush) 9896 if ret == (-2) { 9897 Xgz_error(tls, state, -2, 9898 ts+291 /* "internal error: ..." */) 9899 return -1 9900 } 9901 have = have - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 9902 } 9903 9904 // if that completed a deflate stream, allow another to start 9905 if flush == Z_FINISH { 9906 XdeflateReset(tls, strm) 9907 } 9908 9909 // all done, no errors 9910 return 0 9911 } 9912 9913 // Compress len zeros to output. Return -1 on a write error or memory 9914 // allocation failure by gz_comp(), or 0 on success. 9915 func gz_zero(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzwrite.c:145:11: */ 9916 var first int32 9917 var n uint32 9918 var strm Z_streamp = (state + 120 /* &.strm */) 9919 9920 // consume whatever's left in the input buffer 9921 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9922 return -1 9923 } 9924 9925 // compress len zeros (len guaranteed > 0) 9926 first = 1 9927 for len != 0 { 9928 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fsize) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len) { 9929 n = uint32(len) 9930 } else { 9931 n = (*Gz_state)(unsafe.Pointer(state)).Fsize 9932 } 9933 if first != 0 { 9934 libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n)) 9935 first = 0 9936 } 9937 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = n 9938 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9939 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 9940 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 9941 return -1 9942 } 9943 len = len - (Off64_t(n)) 9944 } 9945 return 0 9946 } 9947 9948 // Write len bytes from buf to file. Return the number of bytes written. If 9949 // the returned value is less than len, then there was an error. 9950 func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */ 9951 var put Z_size_t = len 9952 9953 // if len is zero, avoid unnecessary operations 9954 if len == uint64(0) { 9955 return uint64(0) 9956 } 9957 9958 // allocate memory if this is the first time through 9959 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 9960 return uint64(0) 9961 } 9962 9963 // check for seek request 9964 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 9965 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 9966 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 9967 return uint64(0) 9968 } 9969 } 9970 9971 // for small len, copy to input buffer, otherwise compress directly 9972 if len < Z_size_t((*Gz_state)(unsafe.Pointer(state)).Fsize) { 9973 // copy to input buffer, compress when full 9974 for ok := true; ok; ok = len != 0 { 9975 var have uint32 9976 var copy uint32 9977 9978 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 9979 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 9980 } 9981 have = (uint32(((int64((*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in + uintptr((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in))) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1)) 9982 copy = ((*Gz_state)(unsafe.Pointer(state)).Fsize - have) 9983 if Z_size_t(copy) > len { 9984 copy = uint32(len) 9985 } 9986 libc.Xmemcpy(tls, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have)), buf, uint64(copy)) 9987 *(*UInt)(unsafe.Pointer(state + 120 /* &.strm */ + 8 /* &.avail_in */)) += (copy) 9988 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(copy)) 9989 buf = (buf + uintptr(copy)) 9990 len = len - (Z_size_t(copy)) 9991 if (len != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9992 return uint64(0) 9993 } 9994 } 9995 } else { 9996 // consume whatever's left in the input buffer 9997 if ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 9998 return uint64(0) 9999 } 10000 10001 // directly compress user buffer to file 10002 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf 10003 for ok1 := true; ok1; ok1 = len != 0 { 10004 var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1)) 10005 if Z_size_t(n) > len { 10006 n = uint32(len) 10007 } 10008 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n 10009 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n)) 10010 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 10011 return uint64(0) 10012 } 10013 len = len - (Z_size_t(n)) 10014 } 10015 } 10016 10017 // input was all buffered or compressed 10018 return put 10019 } 10020 10021 // -- see zlib.h -- 10022 func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */ 10023 var state Gz_statep 10024 10025 // get internal structure 10026 if file == (uintptr(0)) { 10027 return 0 10028 } 10029 state = file 10030 10031 // check that we're writing and that there's no error 10032 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10033 return 0 10034 } 10035 10036 // since an int is returned, make sure len fits in one, otherwise return 10037 // with an error (this avoids a flaw in the interface) 10038 if int32(len) < 0 { 10039 Xgz_error(tls, state, -3, ts+330 /* "requested length..." */) 10040 return 0 10041 } 10042 10043 // write len bytes from buf (the return value will fit in an int) 10044 return int32(gz_write(tls, state, buf, uint64(len))) 10045 } 10046 10047 // -- see zlib.h -- 10048 func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */ 10049 var len Z_size_t 10050 var state Gz_statep 10051 10052 // get internal structure 10053 if file == (uintptr(0)) { 10054 return uint64(0) 10055 } 10056 state = file 10057 10058 // check that we're writing and that there's no error 10059 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10060 return uint64(0) 10061 } 10062 10063 // compute bytes to read -- error on overflow 10064 len = (nitems * size) 10065 if (size != 0) && ((len / size) != nitems) { 10066 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 10067 return uint64(0) 10068 } 10069 10070 // write len bytes to buf, return the number of full items written 10071 if len != 0 { 10072 return (gz_write(tls, state, buf, len) / size) 10073 } 10074 return uint64(0) 10075 } 10076 10077 // -- see zlib.h -- 10078 func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */ 10079 bp := tls.Alloc(1) 10080 defer tls.Free(1) 10081 10082 var have uint32 10083 // var buf [1]uint8 at bp, 1 10084 10085 var state Gz_statep 10086 var strm Z_streamp 10087 10088 // get internal structure 10089 if file == (uintptr(0)) { 10090 return -1 10091 } 10092 state = file 10093 strm = (state + 120 /* &.strm */) 10094 10095 // check that we're writing and that there's no error 10096 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10097 return -1 10098 } 10099 10100 // check for seek request 10101 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10102 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10103 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10104 return -1 10105 } 10106 } 10107 10108 // try writing to input buffer for speed (state->size == 0 if buffer not 10109 // initialized) 10110 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10111 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 10112 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 10113 } 10114 have = (uint32(((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in))) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1)) 10115 if have < (*Gz_state)(unsafe.Pointer(state)).Fsize { 10116 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c) 10117 (*Z_stream)(unsafe.Pointer(strm)).Favail_in++ 10118 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 10119 return (c & 0xff) 10120 } 10121 } 10122 10123 // no room in buffer or not initialized, use gz_write() 10124 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */)) = uint8(c) 10125 if gz_write(tls, state, bp /* &buf[0] */, uint64(1)) != uint64(1) { 10126 return -1 10127 } 10128 return (c & 0xff) 10129 } 10130 10131 // -- see zlib.h -- 10132 func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */ 10133 var ret int32 10134 var len Z_size_t 10135 var state Gz_statep 10136 10137 // get internal structure 10138 if file == (uintptr(0)) { 10139 return -1 10140 } 10141 state = file 10142 10143 // check that we're writing and that there's no error 10144 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10145 return -1 10146 } 10147 10148 // write string 10149 len = libc.Xstrlen(tls, str) 10150 ret = int32(gz_write(tls, state, str, len)) 10151 if (ret == 0) && (len != uint64(0)) { 10152 return -1 10153 } 10154 return ret 10155 } 10156 10157 // Copyright (C) 1989-2019 Free Software Foundation, Inc. 10158 // 10159 // This file is part of GCC. 10160 // 10161 // GCC is free software; you can redistribute it and/or modify 10162 // it under the terms of the GNU General Public License as published by 10163 // the Free Software Foundation; either version 3, or (at your option) 10164 // any later version. 10165 // 10166 // GCC is distributed in the hope that it will be useful, 10167 // but WITHOUT ANY WARRANTY; without even the implied warranty of 10168 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10169 // GNU General Public License for more details. 10170 // 10171 // Under Section 7 of GPL version 3, you are granted additional 10172 // permissions described in the GCC Runtime Library Exception, version 10173 // 3.1, as published by the Free Software Foundation. 10174 // 10175 // You should have received a copy of the GNU General Public License and 10176 // a copy of the GCC Runtime Library Exception along with this program; 10177 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 10178 // <http://www.gnu.org/licenses/>. 10179 10180 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 10181 10182 // -- see zlib.h -- 10183 func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */ 10184 var len int32 10185 var left uint32 10186 var next uintptr 10187 var state Gz_statep 10188 var strm Z_streamp 10189 10190 // get internal structure 10191 if file == (uintptr(0)) { 10192 return -2 10193 } 10194 state = file 10195 strm = (state + 120 /* &.strm */) 10196 10197 // check that we're writing and that there's no error 10198 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10199 return -2 10200 } 10201 10202 // make sure we have some buffer space 10203 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 10204 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10205 } 10206 10207 // check for seek request 10208 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10209 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10210 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10211 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10212 } 10213 } 10214 10215 // do the printf() into the input buffer, put length in len -- the input 10216 // buffer is double-sized just for this function, so there is guaranteed to 10217 // be state->size bytes available after the current contents 10218 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 10219 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 10220 } 10221 next = (((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_in) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1))) + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)) 10222 *(*uint8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1))))) = uint8(0) 10223 len = libc.Xvsnprintf(tls, next, uint64((*Gz_state)(unsafe.Pointer(state)).Fsize), format, va) 10224 10225 // check that printf() results fit in buffer 10226 if ((len == 0) || (uint32(len) >= (*Gz_state)(unsafe.Pointer(state)).Fsize)) || (int32(*(*uint8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1)))))) != 0) { 10227 return 0 10228 } 10229 10230 // update buffer and position, compress first half if past that 10231 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (uint32(len)) 10232 *(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(len)) 10233 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize { 10234 left = ((*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize) 10235 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize 10236 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 10237 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10238 } 10239 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize)), uint64(left)) 10240 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 10241 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = left 10242 } 10243 return len 10244 } 10245 10246 func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */ 10247 var va1 Va_list 10248 _ = va1 10249 var ret int32 10250 10251 va1 = va 10252 ret = Xgzvprintf(tls, file, format, va1) 10253 _ = va1 10254 return ret 10255 } 10256 10257 // -- see zlib.h -- 10258 func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */ 10259 var state Gz_statep 10260 10261 // get internal structure 10262 if file == (uintptr(0)) { 10263 return -2 10264 } 10265 state = file 10266 10267 // check that we're writing and that there's no error 10268 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10269 return -2 10270 } 10271 10272 // check flush parameter 10273 if (flush < 0) || (flush > Z_FINISH) { 10274 return -2 10275 } 10276 10277 // check for seek request 10278 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10279 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10280 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10281 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10282 } 10283 } 10284 10285 // compress remaining data with requested flush 10286 gz_comp(tls, state, flush) 10287 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10288 } 10289 10290 // -- see zlib.h -- 10291 func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */ 10292 var state Gz_statep 10293 var strm Z_streamp 10294 10295 // get internal structure 10296 if file == (uintptr(0)) { 10297 return -2 10298 } 10299 state = file 10300 strm = (state + 120 /* &.strm */) 10301 10302 // check that we're writing and that there's no error 10303 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 10304 return -2 10305 } 10306 10307 // if no change is requested, then do nothing 10308 if (level == (*Gz_state)(unsafe.Pointer(state)).Flevel) && (strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy) { 10309 return Z_OK 10310 } 10311 10312 // check for seek request 10313 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10314 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10315 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10316 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10317 } 10318 } 10319 10320 // change compression parameters for subsequent input 10321 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10322 // flush previous input with previous parameters before changing 10323 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_BLOCK) == -1) { 10324 return (*Gz_state)(unsafe.Pointer(state)).Ferr 10325 } 10326 XdeflateParams(tls, strm, level, strategy) 10327 } 10328 (*Gz_state)(unsafe.Pointer(state)).Flevel = level 10329 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy 10330 return Z_OK 10331 } 10332 10333 // -- see zlib.h -- 10334 func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */ 10335 var ret int32 = Z_OK 10336 var state Gz_statep 10337 10338 // get internal structure 10339 if file == (uintptr(0)) { 10340 return -2 10341 } 10342 state = file 10343 10344 // check that we're writing 10345 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 10346 return -2 10347 } 10348 10349 // check for seek request 10350 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 10351 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 10352 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 10353 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 10354 } 10355 } 10356 10357 // flush, free memory, and close file 10358 if gz_comp(tls, state, Z_FINISH) == -1 { 10359 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 10360 } 10361 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 10362 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 10363 XdeflateEnd(tls, (state + 120 /* &.strm */)) 10364 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 10365 } 10366 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 10367 } 10368 Xgz_error(tls, state, Z_OK, uintptr(0)) 10369 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 10370 if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 { 10371 ret = -1 10372 } 10373 libc.Xfree(tls, state) 10374 return ret 10375 } 10376 10377 // Reverse the bytes in a 32-bit value 10378 10379 // inftrees.h -- header to use inftrees.c 10380 // Copyright (C) 1995-2005, 2010 Mark Adler 10381 // For conditions of distribution and use, see copyright notice in zlib.h 10382 10383 // WARNING: this file should *not* be used by applications. It is 10384 // part of the implementation of the compression library and is 10385 // subject to change. Applications should only use zlib.h. 10386 // 10387 10388 // Structure for decoding tables. Each entry provides either the 10389 // information needed to do the operation requested by the code that 10390 // indexed that table entry, or it provides a pointer to another 10391 // table that indexes more bits of the code. op indicates whether 10392 // the entry is a pointer to another table, a literal, a length or 10393 // distance, an end-of-block, or an invalid code. For a table 10394 // pointer, the low four bits of op is the number of index bits of 10395 // that table. For a length or distance, the low four bits of op 10396 // is the number of extra bits to get after the code. bits is 10397 // the number of bits in this code or part of the code to drop off 10398 // of the bit buffer. val is the actual byte to output in the case 10399 // of a literal, the base length or distance, or the offset from 10400 // the current table to the next table. Each entry is four bytes. 10401 type Code = struct { 10402 Fop uint8 10403 Fbits uint8 10404 Fval uint16 10405 } /* inftrees.h:28:3 */ 10406 10407 // op values as set by inflate_table(): 10408 // 00000000 - literal 10409 // 0000tttt - table link, tttt != 0 is the number of table index bits 10410 // 0001eeee - length or distance, eeee is the number of extra bits 10411 // 01100000 - end of block 10412 // 01000000 - invalid code 10413 // 10414 10415 // Maximum size of the dynamic table. The maximum number of code structures is 10416 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 10417 // codes. These values were found by exhaustive searches using the program 10418 // examples/enough.c found in the zlib distribtution. The arguments to that 10419 // program are the number of symbols, the initial root table size, and the 10420 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 10421 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 10422 // The initial root table size (9 or 6) is found in the fifth argument of the 10423 // inflate_table() calls in inflate.c and infback.c. If the root table size is 10424 // changed, then these maximum sizes would be need to be recalculated and 10425 // updated. 10426 10427 // Type of code to build for inflate_table() 10428 type Codetype = uint32 /* inftrees.h:58:3 */ 10429 // inflate.h -- internal inflate state definition 10430 // Copyright (C) 1995-2016 Mark Adler 10431 // For conditions of distribution and use, see copyright notice in zlib.h 10432 10433 // WARNING: this file should *not* be used by applications. It is 10434 // part of the implementation of the compression library and is 10435 // subject to change. Applications should only use zlib.h. 10436 // 10437 10438 // define NO_GZIP when compiling if you want to disable gzip header and 10439 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 10440 // the crc code when it is not needed. For shared libraries, gzip decoding 10441 // should be left enabled. 10442 10443 // Possible inflate modes between inflate() calls 10444 type Inflate_mode = uint32 /* inflate.h:53:3 */ 10445 10446 // 10447 // State transitions between above modes - 10448 // 10449 // (most modes can go to BAD or MEM on error -- not shown for clarity) 10450 // 10451 // Process header: 10452 // HEAD -> (gzip) or (zlib) or (raw) 10453 // (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> 10454 // HCRC -> TYPE 10455 // (zlib) -> DICTID or TYPE 10456 // DICTID -> DICT -> TYPE 10457 // (raw) -> TYPEDO 10458 // Read deflate blocks: 10459 // TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK 10460 // STORED -> COPY_ -> COPY -> TYPE 10461 // TABLE -> LENLENS -> CODELENS -> LEN_ 10462 // LEN_ -> LEN 10463 // Read deflate codes in fixed or dynamic block: 10464 // LEN -> LENEXT or LIT or TYPE 10465 // LENEXT -> DIST -> DISTEXT -> MATCH -> LEN 10466 // LIT -> LEN 10467 // Process trailer: 10468 // CHECK -> LENGTH -> DONE 10469 // 10470 10471 // State maintained between inflate() calls -- approximately 7K bytes, not 10472 // including the allocated sliding window, which is up to 32K bytes. 10473 type Inflate_state = struct { 10474 Fstrm Z_streamp 10475 Fmode Inflate_mode 10476 Flast int32 10477 Fwrap int32 10478 Fhavedict int32 10479 Fflags int32 10480 Fdmax uint32 10481 Fcheck uint64 10482 Ftotal uint64 10483 Fhead Gz_headerp 10484 Fwbits uint32 10485 Fwsize uint32 10486 Fwhave uint32 10487 Fwnext uint32 10488 Fwindow uintptr 10489 Fhold uint64 10490 Fbits uint32 10491 Flength uint32 10492 Foffset uint32 10493 Fextra uint32 10494 Flencode uintptr 10495 Fdistcode uintptr 10496 Flenbits uint32 10497 Fdistbits uint32 10498 Fncode uint32 10499 Fnlen uint32 10500 Fndist uint32 10501 Fhave uint32 10502 Fnext uintptr 10503 Flens [320]uint16 10504 Fwork [288]uint16 10505 Fcodes [1444]Code 10506 Fsane int32 10507 Fback int32 10508 Fwas uint32 10509 F__ccgo_pad1 [4]byte 10510 } /* inflate.h:82:1 */ 10511 10512 // 10513 // strm provides memory allocation functions in zalloc and zfree, or 10514 // Z_NULL to use the library memory allocation functions. 10515 // 10516 // windowBits is in the range 8..15, and window is a user-supplied 10517 // window and output buffer that is 2**windowBits bytes. 10518 // 10519 func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */ 10520 var state uintptr 10521 10522 if ((version == uintptr(Z_NULL)) || (int32(*(*uint8)(unsafe.Pointer(version))) != int32(*(*uint8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) { 10523 return -6 10524 } 10525 if (((strm == uintptr(Z_NULL)) || (window == uintptr(Z_NULL))) || (windowBits < 8)) || (windowBits > 15) { 10526 return -2 10527 } 10528 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 10529 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 10530 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 10531 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 10532 }{Xzcalloc})) 10533 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 10534 } 10535 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 10536 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 10537 f func(*libc.TLS, Voidpf, Voidpf) 10538 }{Xzcfree})) 10539 } 10540 state = (*struct { 10541 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 10542 })(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{}))) 10543 if state == uintptr(Z_NULL) { 10544 return -4 10545 } 10546 10547 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 10548 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 10549 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits) 10550 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << windowBits) 10551 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = window 10552 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10553 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10554 return Z_OK 10555 } 10556 10557 // 10558 // Return state with length and distance decoding tables and index sizes set to 10559 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 10560 // If BUILDFIXED is defined, then instead this routine builds the tables the 10561 // first time it's called, and returns those tables the first time and 10562 // thereafter. This reduces the size of the code by about 2K bytes, in 10563 // exchange for a little execution time. However, BUILDFIXED should not be 10564 // used for threaded applications, since the rewriting of the tables and virgin 10565 // may not be thread-safe. 10566 // 10567 func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */ 10568 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix)) 10569 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 10570 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix)) 10571 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 10572 } 10573 10574 var lenfix = [512]Code{ 10575 {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)}, 10576 {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)}, 10577 {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)}, 10578 {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)}, 10579 {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)}, 10580 {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)}, 10581 {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)}, 10582 {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)}, 10583 {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)}, 10584 {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)}, 10585 {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)}, 10586 {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)}, 10587 {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)}, 10588 {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)}, 10589 {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)}, 10590 {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)}, 10591 {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)}, 10592 {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)}, 10593 {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)}, 10594 {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)}, 10595 {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)}, 10596 {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)}, 10597 {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)}, 10598 {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)}, 10599 {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)}, 10600 {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)}, 10601 {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)}, 10602 {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)}, 10603 {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)}, 10604 {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)}, 10605 {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)}, 10606 {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)}, 10607 {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)}, 10608 {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)}, 10609 {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)}, 10610 {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)}, 10611 {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)}, 10612 {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)}, 10613 {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)}, 10614 {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)}, 10615 {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)}, 10616 {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)}, 10617 {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)}, 10618 {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)}, 10619 {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)}, 10620 {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)}, 10621 {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)}, 10622 {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)}, 10623 {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)}, 10624 {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)}, 10625 {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)}, 10626 {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)}, 10627 {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)}, 10628 {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)}, 10629 {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)}, 10630 {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)}, 10631 {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)}, 10632 {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)}, 10633 {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)}, 10634 {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)}, 10635 {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)}, 10636 {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)}, 10637 {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)}, 10638 {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)}, 10639 {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)}, 10640 {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)}, 10641 {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)}, 10642 {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)}, 10643 {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)}, 10644 {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)}, 10645 {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)}, 10646 {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)}, 10647 {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)}, 10648 {Fbits: uint8(9), Fval: uint16(255)}, 10649 } /* inffixed.h:10:23 */ 10650 var distfix = [32]Code{ 10651 {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)}, 10652 {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)}, 10653 {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)}, 10654 {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)}, 10655 {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)}, 10656 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 10657 } /* inffixed.h:87:23 */ 10658 10659 // Macros for inflateBack(): 10660 10661 // Load returned state from inflate_fast() 10662 10663 // Set state from registers for inflate_fast() 10664 10665 // Clear the input bit accumulator 10666 10667 // Assure that some input is available. If input is requested, but denied, 10668 // then return a Z_BUF_ERROR from inflateBack(). 10669 10670 // Get a byte of input into the bit accumulator, or return from inflateBack() 10671 // with an error if there is no input available. 10672 10673 // Assure that there are at least n bits in the bit accumulator. If there is 10674 // not enough available input to do that, then return from inflateBack() with 10675 // an error. 10676 10677 // Return the low n bits of the bit accumulator (n < 16) 10678 10679 // Remove n bits from the bit accumulator 10680 10681 // Remove zero to seven bits as needed to go to a byte boundary 10682 10683 // Assure that some output space is available, by writing out the window 10684 // if it's full. If the write fails, return from inflateBack() with a 10685 // Z_BUF_ERROR. 10686 10687 // 10688 // strm provides the memory allocation functions and window buffer on input, 10689 // and provides information on the unused input on return. For Z_DATA_ERROR 10690 // returns, strm will also provide an error message. 10691 // 10692 // in() and out() are the call-back input and output functions. When 10693 // inflateBack() needs more input, it calls in(). When inflateBack() has 10694 // filled the window with output, or when it completes with data in the 10695 // window, it calls out() to write out the data. The application must not 10696 // change the provided input until in() is called again or inflateBack() 10697 // returns. The application must not change the window/output buffer until 10698 // inflateBack() returns. 10699 // 10700 // in() and out() are called with a descriptor parameter provided in the 10701 // inflateBack() call. This parameter can be a structure that provides the 10702 // information required to do the read or write, as well as accumulated 10703 // information on the input and output such as totals and check values. 10704 // 10705 // in() should return zero on failure. out() should return non-zero on 10706 // failure. If either in() or out() fails, than inflateBack() returns a 10707 // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it 10708 // was in() or out() that caused in the error. Otherwise, inflateBack() 10709 // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format 10710 // error, or Z_MEM_ERROR if it could not allocate memory for the state. 10711 // inflateBack() can also return Z_STREAM_ERROR if the input parameters 10712 // are not correct, i.e. strm is Z_NULL or the state was not initialized. 10713 // 10714 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: */ 10715 bp := tls.Alloc(8) 10716 defer tls.Free(8) 10717 10718 var state uintptr 10719 // var next uintptr at bp, 8 10720 // next input 10721 var put uintptr // next output 10722 var have uint32 10723 var left uint32 // available input and output 10724 var hold uint64 // bit buffer 10725 var bits uint32 // bits in bit buffer 10726 var copy uint32 // number of stored or match bytes to copy 10727 var from uintptr // where to copy match bytes from 10728 var here Code // current decoding table entry 10729 var last Code // parent table entry 10730 var len uint32 // length to copy for repeats, bits to drop 10731 var ret int32 10732 10733 // Check that the strm exists and that the state was initialized 10734 if !((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) { 10735 goto __1 10736 } 10737 return -2 10738 __1: 10739 ; 10740 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10741 10742 // Reset the state 10743 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 10744 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10745 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 10746 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10747 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 10748 if *(*uintptr)(unsafe.Pointer(bp /* next */)) != uintptr(Z_NULL) { 10749 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 10750 } else { 10751 have = uint32(0) 10752 } 10753 hold = uint64(0) 10754 bits = uint32(0) 10755 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10756 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10757 10758 // Inflate until end of block marked as last 10759 __2: 10760 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 10761 case TYPE: 10762 goto __6 10763 10764 case STORED: 10765 goto __7 10766 10767 case TABLE: 10768 goto __8 10769 10770 case LEN: 10771 goto __9 10772 10773 case DONE: 10774 goto __10 10775 10776 case BAD: 10777 goto __11 10778 10779 default: 10780 goto __12 10781 } 10782 goto __5 10783 __6: 10784 // determine and dispatch block type 10785 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 10786 goto __13 10787 } 10788 __14: 10789 hold >>= (bits & uint32(7)) 10790 bits = bits - (bits & uint32(7)) 10791 goto __15 10792 __15: 10793 if 0 != 0 { 10794 goto __14 10795 } 10796 goto __16 10797 __16: 10798 ; 10799 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 10800 goto __5 10801 __13: 10802 ; 10803 __17: 10804 __20: 10805 if !(bits < (uint32(3))) { 10806 goto __21 10807 } 10808 __22: 10809 __25: 10810 if !(have == uint32(0)) { 10811 goto __28 10812 } 10813 have = (*struct { 10814 f func(*libc.TLS, uintptr, uintptr) uint32 10815 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10816 if !(have == uint32(0)) { 10817 goto __29 10818 } 10819 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10820 ret = -5 10821 goto inf_leave 10822 __29: 10823 ; 10824 __28: 10825 ; 10826 goto __26 10827 __26: 10828 if 0 != 0 { 10829 goto __25 10830 } 10831 goto __27 10832 __27: 10833 ; 10834 have-- 10835 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10836 bits = bits + (uint32(8)) 10837 goto __23 10838 __23: 10839 if 0 != 0 { 10840 goto __22 10841 } 10842 goto __24 10843 __24: 10844 ; 10845 goto __20 10846 __21: 10847 ; 10848 goto __18 10849 __18: 10850 if 0 != 0 { 10851 goto __17 10852 } 10853 goto __19 10854 __19: 10855 ; 10856 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 10857 __30: 10858 hold >>= 1 10859 bits = bits - (uint32(1)) 10860 goto __31 10861 __31: 10862 if 0 != 0 { 10863 goto __30 10864 } 10865 goto __32 10866 __32: 10867 ; 10868 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 10869 case uint32(0): 10870 goto __34 10871 case uint32(1): 10872 goto __35 10873 case uint32(2): 10874 goto __36 10875 case uint32(3): 10876 goto __37 10877 } 10878 goto __33 10879 __34: // stored block 10880 ; 10881 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 10882 goto __33 10883 __35: // fixed block 10884 fixedtables(tls, state) 10885 10886 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes 10887 goto __33 10888 __36: // dynamic block 10889 ; 10890 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 10891 goto __33 10892 __37: 10893 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 10894 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10895 __33: 10896 ; 10897 __38: 10898 hold >>= 2 10899 bits = bits - (uint32(2)) 10900 goto __39 10901 __39: 10902 if 0 != 0 { 10903 goto __38 10904 } 10905 goto __40 10906 __40: 10907 ; 10908 goto __5 10909 10910 __7: 10911 // get and verify stored block length 10912 __41: 10913 hold >>= (bits & uint32(7)) 10914 bits = bits - (bits & uint32(7)) 10915 goto __42 10916 __42: 10917 if 0 != 0 { 10918 goto __41 10919 } 10920 goto __43 10921 __43: 10922 ; // go to byte boundary 10923 __44: 10924 __47: 10925 if !(bits < (uint32(32))) { 10926 goto __48 10927 } 10928 __49: 10929 __52: 10930 if !(have == uint32(0)) { 10931 goto __55 10932 } 10933 have = (*struct { 10934 f func(*libc.TLS, uintptr, uintptr) uint32 10935 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10936 if !(have == uint32(0)) { 10937 goto __56 10938 } 10939 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10940 ret = -5 10941 goto inf_leave 10942 __56: 10943 ; 10944 __55: 10945 ; 10946 goto __53 10947 __53: 10948 if 0 != 0 { 10949 goto __52 10950 } 10951 goto __54 10952 __54: 10953 ; 10954 have-- 10955 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10956 bits = bits + (uint32(8)) 10957 goto __50 10958 __50: 10959 if 0 != 0 { 10960 goto __49 10961 } 10962 goto __51 10963 __51: 10964 ; 10965 goto __47 10966 __48: 10967 ; 10968 goto __45 10969 __45: 10970 if 0 != 0 { 10971 goto __44 10972 } 10973 goto __46 10974 __46: 10975 ; 10976 if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) { 10977 goto __57 10978 } 10979 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 10980 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10981 goto __5 10982 __57: 10983 ; 10984 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 10985 10986 __58: 10987 hold = uint64(0) 10988 bits = uint32(0) 10989 goto __59 10990 __59: 10991 if 0 != 0 { 10992 goto __58 10993 } 10994 goto __60 10995 __60: 10996 ; 10997 10998 // copy stored block from input to output 10999 __61: 11000 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) { 11001 goto __62 11002 } 11003 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 11004 __63: 11005 if !(have == uint32(0)) { 11006 goto __66 11007 } 11008 have = (*struct { 11009 f func(*libc.TLS, uintptr, uintptr) uint32 11010 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11011 if !(have == uint32(0)) { 11012 goto __67 11013 } 11014 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11015 ret = -5 11016 goto inf_leave 11017 __67: 11018 ; 11019 __66: 11020 ; 11021 goto __64 11022 __64: 11023 if 0 != 0 { 11024 goto __63 11025 } 11026 goto __65 11027 __65: 11028 ; 11029 __68: 11030 if !(left == uint32(0)) { 11031 goto __71 11032 } 11033 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11034 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11035 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 11036 if !((*struct { 11037 f func(*libc.TLS, uintptr, uintptr, uint32) int32 11038 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 11039 goto __72 11040 } 11041 ret = -5 11042 goto inf_leave 11043 __72: 11044 ; 11045 __71: 11046 ; 11047 goto __69 11048 __69: 11049 if 0 != 0 { 11050 goto __68 11051 } 11052 goto __70 11053 __70: 11054 ; 11055 if !(copy > have) { 11056 goto __73 11057 } 11058 copy = have 11059 __73: 11060 ; 11061 if !(copy > left) { 11062 goto __74 11063 } 11064 copy = left 11065 __74: 11066 ; 11067 libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy)) 11068 have = have - (copy) 11069 *(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy) 11070 left = left - (copy) 11071 put += uintptr(copy) 11072 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 11073 goto __61 11074 __62: 11075 ; 11076 11077 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11078 goto __5 11079 11080 __8: 11081 // get dynamic table entries descriptor 11082 __75: 11083 __78: 11084 if !(bits < (uint32(14))) { 11085 goto __79 11086 } 11087 __80: 11088 __83: 11089 if !(have == uint32(0)) { 11090 goto __86 11091 } 11092 have = (*struct { 11093 f func(*libc.TLS, uintptr, uintptr) uint32 11094 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11095 if !(have == uint32(0)) { 11096 goto __87 11097 } 11098 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11099 ret = -5 11100 goto inf_leave 11101 __87: 11102 ; 11103 __86: 11104 ; 11105 goto __84 11106 __84: 11107 if 0 != 0 { 11108 goto __83 11109 } 11110 goto __85 11111 __85: 11112 ; 11113 have-- 11114 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11115 bits = bits + (uint32(8)) 11116 goto __81 11117 __81: 11118 if 0 != 0 { 11119 goto __80 11120 } 11121 goto __82 11122 __82: 11123 ; 11124 goto __78 11125 __79: 11126 ; 11127 goto __76 11128 __76: 11129 if 0 != 0 { 11130 goto __75 11131 } 11132 goto __77 11133 __77: 11134 ; 11135 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 11136 __88: 11137 hold >>= 5 11138 bits = bits - (uint32(5)) 11139 goto __89 11140 __89: 11141 if 0 != 0 { 11142 goto __88 11143 } 11144 goto __90 11145 __90: 11146 ; 11147 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 11148 __91: 11149 hold >>= 5 11150 bits = bits - (uint32(5)) 11151 goto __92 11152 __92: 11153 if 0 != 0 { 11154 goto __91 11155 } 11156 goto __93 11157 __93: 11158 ; 11159 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 11160 __94: 11161 hold >>= 4 11162 bits = bits - (uint32(4)) 11163 goto __95 11164 __95: 11165 if 0 != 0 { 11166 goto __94 11167 } 11168 goto __96 11169 __96: 11170 ; 11171 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 11172 goto __97 11173 } 11174 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 11175 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11176 goto __5 11177 __97: 11178 ; 11179 11180 // get code length code lengths (not a typo) 11181 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 11182 __98: 11183 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 11184 goto __99 11185 } 11186 __100: 11187 __103: 11188 if !(bits < (uint32(3))) { 11189 goto __104 11190 } 11191 __105: 11192 __108: 11193 if !(have == uint32(0)) { 11194 goto __111 11195 } 11196 have = (*struct { 11197 f func(*libc.TLS, uintptr, uintptr) uint32 11198 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11199 if !(have == uint32(0)) { 11200 goto __112 11201 } 11202 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11203 ret = -5 11204 goto inf_leave 11205 __112: 11206 ; 11207 __111: 11208 ; 11209 goto __109 11210 __109: 11211 if 0 != 0 { 11212 goto __108 11213 } 11214 goto __110 11215 __110: 11216 ; 11217 have-- 11218 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11219 bits = bits + (uint32(8)) 11220 goto __106 11221 __106: 11222 if 0 != 0 { 11223 goto __105 11224 } 11225 goto __107 11226 __107: 11227 ; 11228 goto __103 11229 __104: 11230 ; 11231 goto __101 11232 __101: 11233 if 0 != 0 { 11234 goto __100 11235 } 11236 goto __102 11237 __102: 11238 ; 11239 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 11240 __113: 11241 hold >>= 3 11242 bits = bits - (uint32(3)) 11243 goto __114 11244 __114: 11245 if 0 != 0 { 11246 goto __113 11247 } 11248 goto __115 11249 __115: 11250 ; 11251 goto __98 11252 __99: 11253 ; 11254 __116: 11255 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 11256 goto __117 11257 } 11258 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 11259 goto __116 11260 __117: 11261 ; 11262 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 11263 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11264 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 11265 ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */), 11266 (state + 120 /* &.lenbits */), state+792 /* &.work */) 11267 if !(ret != 0) { 11268 goto __118 11269 } 11270 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 11271 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11272 goto __5 11273 __118: 11274 ; 11275 11276 // get length and distance code code lengths 11277 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 11278 __119: 11279 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 11280 goto __120 11281 } 11282 __121: 11283 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 11284 if !((uint32(here.Fbits)) <= bits) { 11285 goto __124 11286 } 11287 goto __123 11288 __124: 11289 ; 11290 __125: 11291 __128: 11292 if !(have == uint32(0)) { 11293 goto __131 11294 } 11295 have = (*struct { 11296 f func(*libc.TLS, uintptr, uintptr) uint32 11297 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11298 if !(have == uint32(0)) { 11299 goto __132 11300 } 11301 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11302 ret = -5 11303 goto inf_leave 11304 __132: 11305 ; 11306 __131: 11307 ; 11308 goto __129 11309 __129: 11310 if 0 != 0 { 11311 goto __128 11312 } 11313 goto __130 11314 __130: 11315 ; 11316 have-- 11317 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11318 bits = bits + (uint32(8)) 11319 goto __126 11320 __126: 11321 if 0 != 0 { 11322 goto __125 11323 } 11324 goto __127 11325 __127: 11326 ; 11327 goto __122 11328 __122: 11329 goto __121 11330 goto __123 11331 __123: 11332 ; 11333 if !(int32(here.Fval) < 16) { 11334 goto __133 11335 } 11336 __135: 11337 hold >>= int32(here.Fbits) 11338 bits = bits - (uint32(here.Fbits)) 11339 goto __136 11340 __136: 11341 if 0 != 0 { 11342 goto __135 11343 } 11344 goto __137 11345 __137: 11346 ; 11347 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 11348 goto __134 11349 __133: 11350 if !(int32(here.Fval) == 16) { 11351 goto __138 11352 } 11353 __140: 11354 __143: 11355 if !(bits < (uint32(int32(here.Fbits) + 2))) { 11356 goto __144 11357 } 11358 __145: 11359 __148: 11360 if !(have == uint32(0)) { 11361 goto __151 11362 } 11363 have = (*struct { 11364 f func(*libc.TLS, uintptr, uintptr) uint32 11365 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11366 if !(have == uint32(0)) { 11367 goto __152 11368 } 11369 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11370 ret = -5 11371 goto inf_leave 11372 __152: 11373 ; 11374 __151: 11375 ; 11376 goto __149 11377 __149: 11378 if 0 != 0 { 11379 goto __148 11380 } 11381 goto __150 11382 __150: 11383 ; 11384 have-- 11385 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11386 bits = bits + (uint32(8)) 11387 goto __146 11388 __146: 11389 if 0 != 0 { 11390 goto __145 11391 } 11392 goto __147 11393 __147: 11394 ; 11395 goto __143 11396 __144: 11397 ; 11398 goto __141 11399 __141: 11400 if 0 != 0 { 11401 goto __140 11402 } 11403 goto __142 11404 __142: 11405 ; 11406 __153: 11407 hold >>= int32(here.Fbits) 11408 bits = bits - (uint32(here.Fbits)) 11409 goto __154 11410 __154: 11411 if 0 != 0 { 11412 goto __153 11413 } 11414 goto __155 11415 __155: 11416 ; 11417 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 11418 goto __156 11419 } 11420 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11421 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11422 goto __120 11423 __156: 11424 ; 11425 len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 11426 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 11427 __157: 11428 hold >>= 2 11429 bits = bits - (uint32(2)) 11430 goto __158 11431 __158: 11432 if 0 != 0 { 11433 goto __157 11434 } 11435 goto __159 11436 __159: 11437 ; 11438 goto __139 11439 __138: 11440 if !(int32(here.Fval) == 17) { 11441 goto __160 11442 } 11443 __162: 11444 __165: 11445 if !(bits < (uint32(int32(here.Fbits) + 3))) { 11446 goto __166 11447 } 11448 __167: 11449 __170: 11450 if !(have == uint32(0)) { 11451 goto __173 11452 } 11453 have = (*struct { 11454 f func(*libc.TLS, uintptr, uintptr) uint32 11455 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11456 if !(have == uint32(0)) { 11457 goto __174 11458 } 11459 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11460 ret = -5 11461 goto inf_leave 11462 __174: 11463 ; 11464 __173: 11465 ; 11466 goto __171 11467 __171: 11468 if 0 != 0 { 11469 goto __170 11470 } 11471 goto __172 11472 __172: 11473 ; 11474 have-- 11475 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11476 bits = bits + (uint32(8)) 11477 goto __168 11478 __168: 11479 if 0 != 0 { 11480 goto __167 11481 } 11482 goto __169 11483 __169: 11484 ; 11485 goto __165 11486 __166: 11487 ; 11488 goto __163 11489 __163: 11490 if 0 != 0 { 11491 goto __162 11492 } 11493 goto __164 11494 __164: 11495 ; 11496 __175: 11497 hold >>= int32(here.Fbits) 11498 bits = bits - (uint32(here.Fbits)) 11499 goto __176 11500 __176: 11501 if 0 != 0 { 11502 goto __175 11503 } 11504 goto __177 11505 __177: 11506 ; 11507 len = uint32(0) 11508 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 11509 __178: 11510 hold >>= 3 11511 bits = bits - (uint32(3)) 11512 goto __179 11513 __179: 11514 if 0 != 0 { 11515 goto __178 11516 } 11517 goto __180 11518 __180: 11519 ; 11520 goto __161 11521 __160: 11522 __181: 11523 __184: 11524 if !(bits < (uint32(int32(here.Fbits) + 7))) { 11525 goto __185 11526 } 11527 __186: 11528 __189: 11529 if !(have == uint32(0)) { 11530 goto __192 11531 } 11532 have = (*struct { 11533 f func(*libc.TLS, uintptr, uintptr) uint32 11534 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11535 if !(have == uint32(0)) { 11536 goto __193 11537 } 11538 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11539 ret = -5 11540 goto inf_leave 11541 __193: 11542 ; 11543 __192: 11544 ; 11545 goto __190 11546 __190: 11547 if 0 != 0 { 11548 goto __189 11549 } 11550 goto __191 11551 __191: 11552 ; 11553 have-- 11554 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11555 bits = bits + (uint32(8)) 11556 goto __187 11557 __187: 11558 if 0 != 0 { 11559 goto __186 11560 } 11561 goto __188 11562 __188: 11563 ; 11564 goto __184 11565 __185: 11566 ; 11567 goto __182 11568 __182: 11569 if 0 != 0 { 11570 goto __181 11571 } 11572 goto __183 11573 __183: 11574 ; 11575 __194: 11576 hold >>= int32(here.Fbits) 11577 bits = bits - (uint32(here.Fbits)) 11578 goto __195 11579 __195: 11580 if 0 != 0 { 11581 goto __194 11582 } 11583 goto __196 11584 __196: 11585 ; 11586 len = uint32(0) 11587 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 11588 __197: 11589 hold >>= 7 11590 bits = bits - (uint32(7)) 11591 goto __198 11592 __198: 11593 if 0 != 0 { 11594 goto __197 11595 } 11596 goto __199 11597 __199: 11598 ; 11599 __161: 11600 ; 11601 __139: 11602 ; 11603 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 11604 goto __200 11605 } 11606 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 11607 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11608 goto __120 11609 __200: 11610 ; 11611 __201: 11612 if !(libc.PostDecUint32(©, 1) != 0) { 11613 goto __202 11614 } 11615 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 11616 goto __201 11617 __202: 11618 ; 11619 __134: 11620 ; 11621 goto __119 11622 __120: 11623 ; 11624 11625 // handle error breaks in while 11626 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 11627 goto __203 11628 } 11629 goto __5 11630 __203: 11631 ; 11632 11633 // check for end-of-block code (better have one) 11634 if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) { 11635 goto __204 11636 } 11637 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 11638 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11639 goto __5 11640 __204: 11641 ; 11642 11643 // build code tables -- note: do not change the lenbits or distbits 11644 // values here (9 and 6) without reading the comments in inftrees.h 11645 // concerning the ENOUGH constants, which depend on those values 11646 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 11647 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11648 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 11649 ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */), 11650 (state + 120 /* &.lenbits */), state+792 /* &.work */) 11651 if !(ret != 0) { 11652 goto __205 11653 } 11654 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 11655 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11656 goto __5 11657 __205: 11658 ; 11659 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 11660 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 11661 ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 11662 (state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */) 11663 if !(ret != 0) { 11664 goto __206 11665 } 11666 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 11667 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11668 goto __5 11669 __206: 11670 ; 11671 11672 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11673 11674 __9: 11675 // use inflate_fast() if we have enough input and output 11676 if !((have >= uint32(6)) && (left >= uint32(258))) { 11677 goto __207 11678 } 11679 __208: 11680 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 11681 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 11682 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 11683 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 11684 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11685 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11686 goto __209 11687 __209: 11688 if 0 != 0 { 11689 goto __208 11690 } 11691 goto __210 11692 __210: 11693 ; 11694 if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 11695 goto __211 11696 } 11697 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - left) 11698 __211: 11699 ; 11700 Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 11701 __212: 11702 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11703 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11704 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11705 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11706 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11707 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11708 goto __213 11709 __213: 11710 if 0 != 0 { 11711 goto __212 11712 } 11713 goto __214 11714 __214: 11715 ; 11716 goto __5 11717 __207: 11718 ; 11719 11720 // get a literal, length, or end-of-block code 11721 __215: 11722 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 11723 if !((uint32(here.Fbits)) <= bits) { 11724 goto __218 11725 } 11726 goto __217 11727 __218: 11728 ; 11729 __219: 11730 __222: 11731 if !(have == uint32(0)) { 11732 goto __225 11733 } 11734 have = (*struct { 11735 f func(*libc.TLS, uintptr, uintptr) uint32 11736 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11737 if !(have == uint32(0)) { 11738 goto __226 11739 } 11740 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11741 ret = -5 11742 goto inf_leave 11743 __226: 11744 ; 11745 __225: 11746 ; 11747 goto __223 11748 __223: 11749 if 0 != 0 { 11750 goto __222 11751 } 11752 goto __224 11753 __224: 11754 ; 11755 have-- 11756 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11757 bits = bits + (uint32(8)) 11758 goto __220 11759 __220: 11760 if 0 != 0 { 11761 goto __219 11762 } 11763 goto __221 11764 __221: 11765 ; 11766 goto __216 11767 __216: 11768 goto __215 11769 goto __217 11770 __217: 11771 ; 11772 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 11773 goto __227 11774 } 11775 last = here 11776 __228: 11777 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)) 11778 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 11779 goto __231 11780 } 11781 goto __230 11782 __231: 11783 ; 11784 __232: 11785 __235: 11786 if !(have == uint32(0)) { 11787 goto __238 11788 } 11789 have = (*struct { 11790 f func(*libc.TLS, uintptr, uintptr) uint32 11791 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11792 if !(have == uint32(0)) { 11793 goto __239 11794 } 11795 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11796 ret = -5 11797 goto inf_leave 11798 __239: 11799 ; 11800 __238: 11801 ; 11802 goto __236 11803 __236: 11804 if 0 != 0 { 11805 goto __235 11806 } 11807 goto __237 11808 __237: 11809 ; 11810 have-- 11811 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11812 bits = bits + (uint32(8)) 11813 goto __233 11814 __233: 11815 if 0 != 0 { 11816 goto __232 11817 } 11818 goto __234 11819 __234: 11820 ; 11821 goto __229 11822 __229: 11823 goto __228 11824 goto __230 11825 __230: 11826 ; 11827 __240: 11828 hold >>= int32(last.Fbits) 11829 bits = bits - (uint32(last.Fbits)) 11830 goto __241 11831 __241: 11832 if 0 != 0 { 11833 goto __240 11834 } 11835 goto __242 11836 __242: 11837 ; 11838 __227: 11839 ; 11840 __243: 11841 hold >>= int32(here.Fbits) 11842 bits = bits - (uint32(here.Fbits)) 11843 goto __244 11844 __244: 11845 if 0 != 0 { 11846 goto __243 11847 } 11848 goto __245 11849 __245: 11850 ; 11851 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 11852 11853 // process literal 11854 if !(int32(here.Fop) == 0) { 11855 goto __246 11856 } 11857 11858 __247: 11859 if !(left == uint32(0)) { 11860 goto __250 11861 } 11862 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11863 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11864 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 11865 if !((*struct { 11866 f func(*libc.TLS, uintptr, uintptr, uint32) int32 11867 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 11868 goto __251 11869 } 11870 ret = -5 11871 goto inf_leave 11872 __251: 11873 ; 11874 __250: 11875 ; 11876 goto __248 11877 __248: 11878 if 0 != 0 { 11879 goto __247 11880 } 11881 goto __249 11882 __249: 11883 ; 11884 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 11885 left-- 11886 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 11887 goto __5 11888 __246: 11889 ; 11890 11891 // process end of block 11892 if !((int32(here.Fop) & 32) != 0) { 11893 goto __252 11894 } 11895 11896 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11897 goto __5 11898 __252: 11899 ; 11900 11901 // invalid code 11902 if !((int32(here.Fop) & 64) != 0) { 11903 goto __253 11904 } 11905 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 11906 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11907 goto __5 11908 __253: 11909 ; 11910 11911 // length code -- get extra bits, if any 11912 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 11913 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 11914 goto __254 11915 } 11916 __255: 11917 __258: 11918 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 11919 goto __259 11920 } 11921 __260: 11922 __263: 11923 if !(have == uint32(0)) { 11924 goto __266 11925 } 11926 have = (*struct { 11927 f func(*libc.TLS, uintptr, uintptr) uint32 11928 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 11929 if !(have == uint32(0)) { 11930 goto __267 11931 } 11932 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 11933 ret = -5 11934 goto inf_leave 11935 __267: 11936 ; 11937 __266: 11938 ; 11939 goto __264 11940 __264: 11941 if 0 != 0 { 11942 goto __263 11943 } 11944 goto __265 11945 __265: 11946 ; 11947 have-- 11948 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 11949 bits = bits + (uint32(8)) 11950 goto __261 11951 __261: 11952 if 0 != 0 { 11953 goto __260 11954 } 11955 goto __262 11956 __262: 11957 ; 11958 goto __258 11959 __259: 11960 ; 11961 goto __256 11962 __256: 11963 if 0 != 0 { 11964 goto __255 11965 } 11966 goto __257 11967 __257: 11968 ; 11969 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 11970 __268: 11971 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 11972 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 11973 goto __269 11974 __269: 11975 if 0 != 0 { 11976 goto __268 11977 } 11978 goto __270 11979 __270: 11980 ; 11981 __254: 11982 ; 11983 11984 // get distance code 11985 __271: 11986 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 11987 if !((uint32(here.Fbits)) <= bits) { 11988 goto __274 11989 } 11990 goto __273 11991 __274: 11992 ; 11993 __275: 11994 __278: 11995 if !(have == uint32(0)) { 11996 goto __281 11997 } 11998 have = (*struct { 11999 f func(*libc.TLS, uintptr, uintptr) uint32 12000 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 12001 if !(have == uint32(0)) { 12002 goto __282 12003 } 12004 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 12005 ret = -5 12006 goto inf_leave 12007 __282: 12008 ; 12009 __281: 12010 ; 12011 goto __279 12012 __279: 12013 if 0 != 0 { 12014 goto __278 12015 } 12016 goto __280 12017 __280: 12018 ; 12019 have-- 12020 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 12021 bits = bits + (uint32(8)) 12022 goto __276 12023 __276: 12024 if 0 != 0 { 12025 goto __275 12026 } 12027 goto __277 12028 __277: 12029 ; 12030 goto __272 12031 __272: 12032 goto __271 12033 goto __273 12034 __273: 12035 ; 12036 if !((int32(here.Fop) & 0xf0) == 0) { 12037 goto __283 12038 } 12039 last = here 12040 __284: 12041 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)) 12042 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 12043 goto __287 12044 } 12045 goto __286 12046 __287: 12047 ; 12048 __288: 12049 __291: 12050 if !(have == uint32(0)) { 12051 goto __294 12052 } 12053 have = (*struct { 12054 f func(*libc.TLS, uintptr, uintptr) uint32 12055 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 12056 if !(have == uint32(0)) { 12057 goto __295 12058 } 12059 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 12060 ret = -5 12061 goto inf_leave 12062 __295: 12063 ; 12064 __294: 12065 ; 12066 goto __292 12067 __292: 12068 if 0 != 0 { 12069 goto __291 12070 } 12071 goto __293 12072 __293: 12073 ; 12074 have-- 12075 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 12076 bits = bits + (uint32(8)) 12077 goto __289 12078 __289: 12079 if 0 != 0 { 12080 goto __288 12081 } 12082 goto __290 12083 __290: 12084 ; 12085 goto __285 12086 __285: 12087 goto __284 12088 goto __286 12089 __286: 12090 ; 12091 __296: 12092 hold >>= int32(last.Fbits) 12093 bits = bits - (uint32(last.Fbits)) 12094 goto __297 12095 __297: 12096 if 0 != 0 { 12097 goto __296 12098 } 12099 goto __298 12100 __298: 12101 ; 12102 __283: 12103 ; 12104 __299: 12105 hold >>= int32(here.Fbits) 12106 bits = bits - (uint32(here.Fbits)) 12107 goto __300 12108 __300: 12109 if 0 != 0 { 12110 goto __299 12111 } 12112 goto __301 12113 __301: 12114 ; 12115 if !((int32(here.Fop) & 64) != 0) { 12116 goto __302 12117 } 12118 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 12119 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12120 goto __5 12121 __302: 12122 ; 12123 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 12124 12125 // get distance extra bits, if any 12126 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 12127 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 12128 goto __303 12129 } 12130 __304: 12131 __307: 12132 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 12133 goto __308 12134 } 12135 __309: 12136 __312: 12137 if !(have == uint32(0)) { 12138 goto __315 12139 } 12140 have = (*struct { 12141 f func(*libc.TLS, uintptr, uintptr) uint32 12142 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 12143 if !(have == uint32(0)) { 12144 goto __316 12145 } 12146 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 12147 ret = -5 12148 goto inf_leave 12149 __316: 12150 ; 12151 __315: 12152 ; 12153 goto __313 12154 __313: 12155 if 0 != 0 { 12156 goto __312 12157 } 12158 goto __314 12159 __314: 12160 ; 12161 have-- 12162 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 12163 bits = bits + (uint32(8)) 12164 goto __310 12165 __310: 12166 if 0 != 0 { 12167 goto __309 12168 } 12169 goto __311 12170 __311: 12171 ; 12172 goto __307 12173 __308: 12174 ; 12175 goto __305 12176 __305: 12177 if 0 != 0 { 12178 goto __304 12179 } 12180 goto __306 12181 __306: 12182 ; 12183 *(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 12184 __317: 12185 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 12186 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 12187 goto __318 12188 __318: 12189 if 0 != 0 { 12190 goto __317 12191 } 12192 goto __319 12193 __319: 12194 ; 12195 __303: 12196 ; 12197 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (func() uint32 { 12198 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 12199 return left 12200 } 12201 return uint32(0) 12202 }()))) { 12203 goto __320 12204 } 12205 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 12206 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12207 goto __5 12208 __320: 12209 ; 12210 12211 // copy match from window to output 12212 __321: 12213 __324: 12214 if !(left == uint32(0)) { 12215 goto __327 12216 } 12217 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 12218 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12219 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 12220 if !((*struct { 12221 f func(*libc.TLS, uintptr, uintptr, uint32) int32 12222 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 12223 goto __328 12224 } 12225 ret = -5 12226 goto inf_leave 12227 __328: 12228 ; 12229 __327: 12230 ; 12231 goto __325 12232 __325: 12233 if 0 != 0 { 12234 goto __324 12235 } 12236 goto __326 12237 __326: 12238 ; 12239 copy = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset) 12240 if !(copy < left) { 12241 goto __329 12242 } 12243 from = (put + uintptr(copy)) 12244 copy = (left - copy) 12245 goto __330 12246 __329: 12247 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 12248 copy = left 12249 __330: 12250 ; 12251 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 12252 goto __331 12253 } 12254 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 12255 __331: 12256 ; 12257 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 12258 left = left - (copy) 12259 __332: 12260 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12261 goto __333 12262 __333: 12263 if libc.PreDecUint32(©, 1) != 0 { 12264 goto __332 12265 } 12266 goto __334 12267 __334: 12268 ; 12269 goto __322 12270 __322: 12271 if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { 12272 goto __321 12273 } 12274 goto __323 12275 __323: 12276 ; 12277 goto __5 12278 12279 __10: 12280 // inflate stream terminated properly -- write leftover output 12281 ret = Z_STREAM_END 12282 if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 12283 goto __335 12284 } 12285 if !((*struct { 12286 f func(*libc.TLS, uintptr, uintptr, uint32) int32 12287 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, ((*Inflate_state)(unsafe.Pointer(state)).Fwsize-left)) != 0) { 12288 goto __336 12289 } 12290 ret = -5 12291 __336: 12292 ; 12293 __335: 12294 ; 12295 goto inf_leave 12296 12297 __11: 12298 ret = -3 12299 goto inf_leave 12300 12301 __12: // can't happen, but makes compilers happy 12302 ret = -2 12303 goto inf_leave 12304 __5: 12305 ; 12306 goto __3 12307 __3: 12308 goto __2 12309 goto __4 12310 __4: 12311 ; 12312 12313 // Return unused input 12314 inf_leave: 12315 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 12316 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 12317 return ret 12318 } 12319 12320 var order = // permutation of code lengths 12321 [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 */ 12322 12323 func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */ 12324 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 12325 return -2 12326 } 12327 (*struct { 12328 f func(*libc.TLS, Voidpf, Voidpf) 12329 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 12330 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 12331 12332 return Z_OK 12333 } 12334 12335 // 12336 // Decode literal, length, and distance codes and write out the resulting 12337 // literal and match bytes until either not enough input or output is 12338 // available, an end-of-block is encountered, or a data error is encountered. 12339 // When large enough input and output buffers are supplied to inflate(), for 12340 // example, a 16K input buffer and a 64K output buffer, more than 95% of the 12341 // inflate execution time is spent in this routine. 12342 // 12343 // Entry assumptions: 12344 // 12345 // state->mode == LEN 12346 // strm->avail_in >= 6 12347 // strm->avail_out >= 258 12348 // start >= strm->avail_out 12349 // state->bits < 8 12350 // 12351 // On return, state->mode is one of: 12352 // 12353 // LEN -- ran out of enough output space or enough available input 12354 // TYPE -- reached end of block code, inflate() to interpret next block 12355 // BAD -- error in block data 12356 // 12357 // Notes: 12358 // 12359 // - The maximum input bits used by a length/distance pair is 15 bits for the 12360 // length code, 5 bits for the length extra, 15 bits for the distance code, 12361 // and 13 bits for the distance extra. This totals 48 bits, or six bytes. 12362 // Therefore if strm->avail_in >= 6, then there is enough input to avoid 12363 // checking for available input while decoding. 12364 // 12365 // - The maximum bytes that a single length/distance pair can output is 258 12366 // bytes, which is the maximum length that can be coded. inflate_fast() 12367 // requires strm->avail_out >= 258 for each loop to avoid checking for 12368 // output space. 12369 // 12370 func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */ 12371 var state uintptr 12372 var in uintptr // local strm->next_in 12373 var last uintptr // have enough input while in < last 12374 var out uintptr // local strm->next_out 12375 var beg uintptr // inflate()'s initial strm->next_out 12376 var end uintptr // while out < end, enough space available 12377 var wsize uint32 // window size or zero if not using window 12378 var whave uint32 // valid bytes in the window 12379 var wnext uint32 // window write index 12380 var window uintptr // allocated sliding window, if wsize != 0 12381 var hold uint64 // local strm->hold 12382 var bits uint32 // local strm->bits 12383 var lcode uintptr // local strm->lencode 12384 var dcode uintptr // local strm->distcode 12385 var lmask uint32 // mask for first level of length codes 12386 var dmask uint32 // mask for first level of distance codes 12387 var here Code // retrieved table entry 12388 var op uint32 // code bits, operation, extra bits, or 12389 // window position, window bytes to copy 12390 var len uint32 // match length, unused bytes 12391 var dist uint32 // match distance 12392 var from uintptr // where to copy match from 12393 12394 // copy state to local variables 12395 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12396 in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 12397 last = (in + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_in - UInt(5)))) 12398 out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 12399 beg = (out - uintptr((start - (*Z_stream)(unsafe.Pointer(strm)).Favail_out))) 12400 end = (out + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_out - UInt(257)))) 12401 wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 12402 whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 12403 wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext 12404 window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 12405 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 12406 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 12407 lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode 12408 dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode 12409 lmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Flenbits) - uint32(1)) 12410 dmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fdistbits) - uint32(1)) 12411 12412 // decode literals and length/distances until end-of-block or not enough 12413 // input data or output space 12414 __1: 12415 if !(bits < uint32(15)) { 12416 goto __4 12417 } 12418 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12419 bits = bits + (uint32(8)) 12420 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12421 bits = bits + (uint32(8)) 12422 __4: 12423 ; 12424 here = *(*Code)(unsafe.Pointer(lcode + uintptr((hold&uint64(lmask)))*4)) 12425 dolen: 12426 op = uint32(here.Fbits) 12427 hold >>= op 12428 bits = bits - (op) 12429 op = uint32(here.Fop) 12430 if !(op == uint32(0)) { 12431 goto __5 12432 } // literal 12433 12434 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval) 12435 goto __6 12436 __5: 12437 if !((op & uint32(16)) != 0) { 12438 goto __7 12439 } // length base 12440 len = uint32(here.Fval) 12441 op = op & (uint32(15)) // number of extra bits 12442 if !(op != 0) { 12443 goto __9 12444 } 12445 if !(bits < op) { 12446 goto __10 12447 } 12448 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12449 bits = bits + (uint32(8)) 12450 __10: 12451 ; 12452 len = len + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 12453 hold >>= op 12454 bits = bits - (op) 12455 __9: 12456 ; 12457 12458 if !(bits < uint32(15)) { 12459 goto __11 12460 } 12461 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12462 bits = bits + (uint32(8)) 12463 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12464 bits = bits + (uint32(8)) 12465 __11: 12466 ; 12467 here = *(*Code)(unsafe.Pointer(dcode + uintptr((hold&uint64(dmask)))*4)) 12468 dodist: 12469 op = uint32(here.Fbits) 12470 hold >>= op 12471 bits = bits - (op) 12472 op = uint32(here.Fop) 12473 if !((op & uint32(16)) != 0) { 12474 goto __12 12475 } // distance base 12476 dist = uint32(here.Fval) 12477 op = op & (uint32(15)) // number of extra bits 12478 if !(bits < op) { 12479 goto __14 12480 } 12481 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12482 bits = bits + (uint32(8)) 12483 if !(bits < op) { 12484 goto __15 12485 } 12486 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 12487 bits = bits + (uint32(8)) 12488 __15: 12489 ; 12490 __14: 12491 ; 12492 dist = dist + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 12493 hold >>= op 12494 bits = bits - (op) 12495 12496 op = (uint32((int64(out) - int64(beg)) / 1)) // max distance in output 12497 if !(dist > op) { 12498 goto __16 12499 } // see if copy from window 12500 op = (dist - op) // distance back in window 12501 if !(op > whave) { 12502 goto __18 12503 } 12504 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 12505 goto __19 12506 } 12507 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 12508 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12509 goto __3 12510 __19: 12511 ; 12512 __18: 12513 ; 12514 from = window 12515 if !(wnext == uint32(0)) { 12516 goto __20 12517 } // very common case 12518 from += (uintptr(wsize - op)) 12519 if !(op < len) { 12520 goto __22 12521 } // some from window 12522 len = len - (op) 12523 __23: 12524 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12525 goto __24 12526 __24: 12527 if libc.PreDecUint32(&op, 1) != 0 { 12528 goto __23 12529 } 12530 goto __25 12531 __25: 12532 ; 12533 from = (out - uintptr(dist)) // rest from output 12534 __22: 12535 ; 12536 goto __21 12537 __20: 12538 if !(wnext < op) { 12539 goto __26 12540 } // wrap around window 12541 from += (uintptr((wsize + wnext) - op)) 12542 op = op - (wnext) 12543 if !(op < len) { 12544 goto __28 12545 } // some from end of window 12546 len = len - (op) 12547 __29: 12548 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12549 goto __30 12550 __30: 12551 if libc.PreDecUint32(&op, 1) != 0 { 12552 goto __29 12553 } 12554 goto __31 12555 __31: 12556 ; 12557 from = window 12558 if !(wnext < len) { 12559 goto __32 12560 } // some from start of window 12561 op = wnext 12562 len = len - (op) 12563 __33: 12564 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12565 goto __34 12566 __34: 12567 if libc.PreDecUint32(&op, 1) != 0 { 12568 goto __33 12569 } 12570 goto __35 12571 __35: 12572 ; 12573 from = (out - uintptr(dist)) // rest from output 12574 __32: 12575 ; 12576 __28: 12577 ; 12578 goto __27 12579 __26: // contiguous in window 12580 from += (uintptr(wnext - op)) 12581 if !(op < len) { 12582 goto __36 12583 } // some from window 12584 len = len - (op) 12585 __37: 12586 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12587 goto __38 12588 __38: 12589 if libc.PreDecUint32(&op, 1) != 0 { 12590 goto __37 12591 } 12592 goto __39 12593 __39: 12594 ; 12595 from = (out - uintptr(dist)) // rest from output 12596 __36: 12597 ; 12598 __27: 12599 ; 12600 __21: 12601 ; 12602 __40: 12603 if !(len > uint32(2)) { 12604 goto __41 12605 } 12606 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12607 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12608 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12609 len = len - (uint32(3)) 12610 goto __40 12611 __41: 12612 ; 12613 if !(len != 0) { 12614 goto __42 12615 } 12616 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12617 if !(len > uint32(1)) { 12618 goto __43 12619 } 12620 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12621 __43: 12622 ; 12623 __42: 12624 ; 12625 goto __17 12626 __16: 12627 from = (out - uintptr(dist)) // copy direct from output 12628 __44: // minimum length is three 12629 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12630 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12631 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12632 len = len - (uint32(3)) 12633 goto __45 12634 __45: 12635 if len > uint32(2) { 12636 goto __44 12637 } 12638 goto __46 12639 __46: 12640 ; 12641 if !(len != 0) { 12642 goto __47 12643 } 12644 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12645 if !(len > uint32(1)) { 12646 goto __48 12647 } 12648 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 12649 __48: 12650 ; 12651 __47: 12652 ; 12653 __17: 12654 ; 12655 goto __13 12656 __12: 12657 if !((op & uint32(64)) == uint32(0)) { 12658 goto __49 12659 } // 2nd level distance code 12660 here = *(*Code)(unsafe.Pointer(dcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4)) 12661 goto dodist 12662 goto __50 12663 __49: 12664 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 12665 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12666 goto __3 12667 __50: 12668 ; 12669 __13: 12670 ; 12671 goto __8 12672 __7: 12673 if !((op & uint32(64)) == uint32(0)) { 12674 goto __51 12675 } // 2nd level length code 12676 here = *(*Code)(unsafe.Pointer(lcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4)) 12677 goto dolen 12678 goto __52 12679 __51: 12680 if !((op & uint32(32)) != 0) { 12681 goto __53 12682 } // end-of-block 12683 12684 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12685 goto __3 12686 goto __54 12687 __53: 12688 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 12689 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12690 goto __3 12691 __54: 12692 ; 12693 __52: 12694 ; 12695 __8: 12696 ; 12697 __6: 12698 ; 12699 goto __2 12700 __2: 12701 if (in < last) && (out < end) { 12702 goto __1 12703 } 12704 goto __3 12705 __3: 12706 ; 12707 12708 // return unused bytes (on entry, bits < 8, so in won't go too far back) 12709 len = (bits >> 3) 12710 in -= uintptr(len) 12711 bits = bits - (len << 3) 12712 hold = hold & (uint64((uint32(1) << bits) - uint32(1))) 12713 12714 // update state and return 12715 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in 12716 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out 12717 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 { 12718 if in < last { 12719 return (uint32(int64(5) + ((int64(last) - int64(in)) / 1))) 12720 } 12721 return (uint32(int64(5) - ((int64(in) - int64(last)) / 1))) 12722 }() 12723 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 { 12724 if out < end { 12725 return (uint32(int64(257) + ((int64(end) - int64(out)) / 1))) 12726 } 12727 return (uint32(int64(257) - ((int64(out) - int64(end)) / 1))) 12728 }() 12729 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 12730 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 12731 return 12732 } 12733 12734 // 12735 // inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): 12736 // - Using bit fields for code structure 12737 // - Different op definition to avoid & for extra bits (do & for table bits) 12738 // - Three separate decoding do-loops for direct, window, and wnext == 0 12739 // - Special case for distance > 1 copies to do overlapped load and store copy 12740 // - Explicit branch predictions (based on measured branch probabilities) 12741 // - Deferring match copy and interspersed it with decoding subsequent codes 12742 // - Swapping literal/length else 12743 // - Swapping window/direct else 12744 // - Larger unrolled copy loops (three is about right) 12745 // - Moving len -= 3 statement into middle of loop 12746 // 12747 12748 func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */ 12749 var state uintptr 12750 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 12751 return 1 12752 } 12753 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12754 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) { 12755 return 1 12756 } 12757 return 0 12758 } 12759 12760 func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */ 12761 var state uintptr 12762 12763 if inflateStateCheck(tls, strm) != 0 { 12764 return -2 12765 } 12766 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12767 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, libc.AssignPtrUint64(state+40 /* &.total */, uint64(0))) 12768 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 12769 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite 12770 (*Z_stream)(unsafe.Pointer(strm)).Fadler = (ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)) 12771 } 12772 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD 12773 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 12774 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0 12775 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 12776 (*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL) 12777 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 12778 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 12779 (*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+112 /* &.distcode */, libc.AssignPtrUintptr(state+144 /* &.next */, state+1368 /* &.codes */)) 12780 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 12781 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 12782 12783 return Z_OK 12784 } 12785 12786 func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */ 12787 var state uintptr 12788 12789 if inflateStateCheck(tls, strm) != 0 { 12790 return -2 12791 } 12792 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12793 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) 12794 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 12795 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 12796 return XinflateResetKeep(tls, strm) 12797 } 12798 12799 func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */ 12800 var wrap int32 12801 var state uintptr 12802 12803 // get the state 12804 if inflateStateCheck(tls, strm) != 0 { 12805 return -2 12806 } 12807 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12808 12809 // extract wrap request from windowBits parameter 12810 if windowBits < 0 { 12811 wrap = 0 12812 windowBits = -windowBits 12813 } else { 12814 wrap = ((windowBits >> 4) + 5) 12815 if windowBits < 48 { 12816 windowBits = windowBits & (15) 12817 } 12818 } 12819 12820 // set number of window bits, free window if different 12821 if (windowBits != 0) && ((windowBits < 8) || (windowBits > 15)) { 12822 return -2 12823 } 12824 if ((*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL)) && ((*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits)) { 12825 (*struct { 12826 f func(*libc.TLS, Voidpf, Voidpf) 12827 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 12828 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 12829 } 12830 12831 // update state and reset the rest of it 12832 (*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap 12833 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits) 12834 return XinflateReset(tls, strm) 12835 } 12836 12837 func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */ 12838 var ret int32 12839 var state uintptr 12840 12841 if ((version == uintptr(Z_NULL)) || (int32(*(*uint8)(unsafe.Pointer(version))) != int32(*(*uint8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) { 12842 return -6 12843 } 12844 if strm == uintptr(Z_NULL) { 12845 return -2 12846 } 12847 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 12848 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 12849 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 12850 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 12851 }{Xzcalloc})) 12852 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 12853 } 12854 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 12855 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 12856 f func(*libc.TLS, Voidpf, Voidpf) 12857 }{Xzcfree})) 12858 } 12859 state = (*struct { 12860 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 12861 })(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{}))) 12862 if state == uintptr(Z_NULL) { 12863 return -4 12864 } 12865 12866 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 12867 (*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm 12868 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 12869 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2() 12870 ret = XinflateReset2(tls, strm, windowBits) 12871 if ret != Z_OK { 12872 (*struct { 12873 f func(*libc.TLS, Voidpf, Voidpf) 12874 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state) 12875 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 12876 } 12877 return ret 12878 } 12879 12880 func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */ 12881 return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size) 12882 } 12883 12884 func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */ 12885 var state uintptr 12886 12887 if inflateStateCheck(tls, strm) != 0 { 12888 return -2 12889 } 12890 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 12891 if bits < 0 { 12892 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 12893 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 12894 return Z_OK 12895 } 12896 if (bits > 16) || (((*Inflate_state)(unsafe.Pointer(state)).Fbits + UInt(bits)) > uint32(32)) { 12897 return -2 12898 } 12899 value = int32(int64(value) & ((int64(1) << bits) - int64(1))) 12900 *(*uint64)(unsafe.Pointer(state + 80 /* &.hold */)) += (uint64(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)) 12901 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) += (UInt(bits)) 12902 return Z_OK 12903 } 12904 12905 // 12906 // Return state with length and distance decoding tables and index sizes set to 12907 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 12908 // If BUILDFIXED is defined, then instead this routine builds the tables the 12909 // first time it's called, and returns those tables the first time and 12910 // thereafter. This reduces the size of the code by about 2K bytes, in 12911 // exchange for a little execution time. However, BUILDFIXED should not be 12912 // used for threaded applications, since the rewriting of the tables and virgin 12913 // may not be thread-safe. 12914 // 12915 func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */ 12916 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1)) 12917 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 12918 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1)) 12919 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 12920 } 12921 12922 var lenfix1 = [512]Code{ 12923 {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)}, 12924 {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)}, 12925 {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)}, 12926 {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)}, 12927 {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)}, 12928 {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)}, 12929 {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)}, 12930 {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)}, 12931 {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)}, 12932 {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)}, 12933 {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)}, 12934 {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)}, 12935 {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)}, 12936 {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)}, 12937 {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)}, 12938 {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)}, 12939 {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)}, 12940 {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)}, 12941 {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)}, 12942 {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)}, 12943 {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)}, 12944 {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)}, 12945 {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)}, 12946 {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)}, 12947 {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)}, 12948 {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)}, 12949 {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)}, 12950 {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)}, 12951 {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)}, 12952 {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)}, 12953 {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)}, 12954 {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)}, 12955 {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)}, 12956 {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)}, 12957 {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)}, 12958 {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)}, 12959 {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)}, 12960 {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)}, 12961 {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)}, 12962 {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)}, 12963 {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)}, 12964 {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)}, 12965 {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)}, 12966 {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)}, 12967 {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)}, 12968 {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)}, 12969 {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)}, 12970 {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)}, 12971 {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)}, 12972 {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)}, 12973 {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)}, 12974 {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)}, 12975 {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)}, 12976 {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)}, 12977 {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)}, 12978 {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)}, 12979 {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)}, 12980 {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)}, 12981 {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)}, 12982 {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)}, 12983 {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)}, 12984 {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)}, 12985 {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)}, 12986 {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)}, 12987 {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)}, 12988 {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)}, 12989 {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)}, 12990 {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)}, 12991 {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)}, 12992 {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)}, 12993 {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)}, 12994 {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)}, 12995 {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)}, 12996 {Fbits: uint8(9), Fval: uint16(255)}, 12997 } /* inffixed.h:10:23 */ 12998 var distfix1 = [32]Code{ 12999 {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)}, 13000 {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)}, 13001 {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)}, 13002 {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)}, 13003 {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)}, 13004 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 13005 } /* inffixed.h:87:23 */ 13006 13007 // 13008 // Update the window with the last wsize (normally 32K) bytes written before 13009 // returning. If window does not exist yet, create it. This is only called 13010 // when a window is already in use, or when output has been written during this 13011 // inflate call, but the end of the deflate stream has not been reached yet. 13012 // It is also called to create a window for dictionary data when a dictionary 13013 // is loaded. 13014 // 13015 // Providing output buffers larger than 32K to inflate() should provide a speed 13016 // advantage, since only the last 32K of output is copied to the sliding window 13017 // upon return from inflate(), and since all distances after the first 32K of 13018 // output will fall in the output data, making match copies simpler and faster. 13019 // The advantage may be dependent on the size of the processor's data caches. 13020 // 13021 func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */ 13022 var state uintptr 13023 var dist uint32 13024 13025 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13026 13027 // if it hasn't been done already, allocate space for the window 13028 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 13029 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct { 13030 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 13031 })(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)))) 13032 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 13033 return 1 13034 } 13035 } 13036 13037 // if window not in use yet, initialize 13038 if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) { 13039 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 13040 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 13041 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 13042 } 13043 13044 // copy state->wsize or less output bytes into the circular window 13045 if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 13046 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize)), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize)) 13047 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 13048 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 13049 } else { 13050 dist = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext) 13051 if dist > copy { 13052 dist = copy 13053 } 13054 libc.Xmemcpy(tls, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), (end - uintptr(copy)), uint64(dist)) 13055 copy = copy - (dist) 13056 if copy != 0 { 13057 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr(copy)), uint64(copy)) 13058 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy 13059 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 13060 } else { 13061 *(*uint32)(unsafe.Pointer(state + 68 /* &.wnext */)) += (dist) 13062 if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 13063 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 13064 } 13065 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 13066 *(*uint32)(unsafe.Pointer(state + 64 /* &.whave */)) += (dist) 13067 } 13068 } 13069 } 13070 return 0 13071 } 13072 13073 // Macros for inflate(): 13074 13075 // check function to use adler32() for zlib or crc32() for gzip 13076 13077 // check macros for header crc 13078 13079 // Load registers with state in inflate() for speed 13080 13081 // Restore state from registers in inflate() 13082 13083 // Clear the input bit accumulator 13084 13085 // Get a byte of input into the bit accumulator, or return from inflate() 13086 // if there is no input available. 13087 13088 // Assure that there are at least n bits in the bit accumulator. If there is 13089 // not enough available input to do that, then return from inflate(). 13090 13091 // Return the low n bits of the bit accumulator (n < 16) 13092 13093 // Remove n bits from the bit accumulator 13094 13095 // Remove zero to seven bits as needed to go to a byte boundary 13096 13097 // 13098 // inflate() uses a state machine to process as much input data and generate as 13099 // much output data as possible before returning. The state machine is 13100 // structured roughly as follows: 13101 // 13102 // for (;;) switch (state) { 13103 // ... 13104 // case STATEn: 13105 // if (not enough input data or output space to make progress) 13106 // return; 13107 // ... make progress ... 13108 // state = STATEm; 13109 // break; 13110 // ... 13111 // } 13112 // 13113 // so when inflate() is called again, the same case is attempted again, and 13114 // if the appropriate resources are provided, the machine proceeds to the 13115 // next state. The NEEDBITS() macro is usually the way the state evaluates 13116 // whether it can proceed or should return. NEEDBITS() does the return if 13117 // the requested bits are not available. The typical use of the BITS macros 13118 // is: 13119 // 13120 // NEEDBITS(n); 13121 // ... do something with BITS(n) ... 13122 // DROPBITS(n); 13123 // 13124 // where NEEDBITS(n) either returns from inflate() if there isn't enough 13125 // input left to load n bits into the accumulator, or it continues. BITS(n) 13126 // gives the low n bits in the accumulator. When done, DROPBITS(n) drops 13127 // the low n bits off the accumulator. INITBITS() clears the accumulator 13128 // and sets the number of available bits to zero. BYTEBITS() discards just 13129 // enough bits to put the accumulator on a byte boundary. After BYTEBITS() 13130 // and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. 13131 // 13132 // NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return 13133 // if there is no input available. The decoding of variable length codes uses 13134 // PULLBYTE() directly in order to pull just enough bytes to decode the next 13135 // code, and no more. 13136 // 13137 // Some states loop until they get enough input, making sure that enough 13138 // state information is maintained to continue the loop where it left off 13139 // if NEEDBITS() returns in the loop. For example, want, need, and keep 13140 // would all have to actually be part of the saved state in case NEEDBITS() 13141 // returns: 13142 // 13143 // case STATEw: 13144 // while (want < need) { 13145 // NEEDBITS(n); 13146 // keep[want++] = BITS(n); 13147 // DROPBITS(n); 13148 // } 13149 // state = STATEx; 13150 // case STATEx: 13151 // 13152 // As shown above, if the next state is also the next case, then the break 13153 // is omitted. 13154 // 13155 // A state may also return if there is not enough output space available to 13156 // complete that state. Those states are copying stored data, writing a 13157 // literal byte, and copying a matching string. 13158 // 13159 // When returning, a "goto inf_leave" is used to update the total counters, 13160 // update the check value, and determine whether any progress has been made 13161 // during that inflate() call in order to return the proper return code. 13162 // Progress is defined as a change in either strm->avail_in or strm->avail_out. 13163 // When there is a window, goto inf_leave will update the window with the last 13164 // output written. If a goto inf_leave occurs in the middle of decompression 13165 // and there is no window currently, goto inf_leave will create one and copy 13166 // output to the window for the next call of inflate(). 13167 // 13168 // In this implementation, the flush parameter of inflate() only affects the 13169 // return code (per zlib.h). inflate() always writes as much as possible to 13170 // strm->next_out, given the space available and the provided input--the effect 13171 // documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers 13172 // the allocation of and copying into a sliding window until necessary, which 13173 // provides the effect documented in zlib.h for Z_FINISH when the entire input 13174 // stream available. So the only thing the flush parameter actually does is: 13175 // when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it 13176 // will return Z_BUF_ERROR if it has not reached the end of the stream. 13177 // 13178 13179 func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */ 13180 bp := tls.Alloc(4) 13181 defer tls.Free(4) 13182 13183 var state uintptr 13184 var next uintptr // next input 13185 var put uintptr // next output 13186 var have uint32 13187 var left uint32 // available input and output 13188 var hold uint64 // bit buffer 13189 var bits uint32 // bits in bit buffer 13190 var in uint32 13191 var out uint32 // save starting available input and output 13192 var copy uint32 // number of stored or match bytes to copy 13193 var from uintptr // where to copy match bytes from 13194 var here Code // current decoding table entry 13195 var last Code // parent table entry 13196 var len uint32 // length to copy for repeats, bits to drop 13197 var ret int32 // return code 13198 // var hbuf [4]uint8 at bp, 4 13199 13200 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)))) { 13201 goto __1 13202 } 13203 return -2 13204 __1: 13205 ; 13206 13207 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13208 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 13209 goto __2 13210 } 13211 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 13212 __2: 13213 ; // skip check 13214 __3: 13215 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 13216 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 13217 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 13218 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 13219 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 13220 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 13221 goto __4 13222 __4: 13223 if 0 != 0 { 13224 goto __3 13225 } 13226 goto __5 13227 __5: 13228 ; 13229 in = have 13230 out = left 13231 ret = Z_OK 13232 __6: 13233 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 13234 case HEAD: 13235 goto __10 13236 case FLAGS: 13237 goto __11 13238 case TIME: 13239 goto __12 13240 case OS: 13241 goto __13 13242 case EXLEN: 13243 goto __14 13244 case EXTRA: 13245 goto __15 13246 case NAME: 13247 goto __16 13248 case COMMENT: 13249 goto __17 13250 case HCRC: 13251 goto __18 13252 case DICTID: 13253 goto __19 13254 case DICT: 13255 goto __20 13256 case TYPE: 13257 goto __21 13258 case TYPEDO: 13259 goto __22 13260 case STORED: 13261 goto __23 13262 case COPY_: 13263 goto __24 13264 case COPY: 13265 goto __25 13266 case TABLE: 13267 goto __26 13268 case LENLENS: 13269 goto __27 13270 case CODELENS: 13271 goto __28 13272 case LEN_: 13273 goto __29 13274 case LEN: 13275 goto __30 13276 case LENEXT: 13277 goto __31 13278 case DIST: 13279 goto __32 13280 case DISTEXT: 13281 goto __33 13282 case MATCH: 13283 goto __34 13284 case LIT: 13285 goto __35 13286 case CHECK: 13287 goto __36 13288 case LENGTH: 13289 goto __37 13290 case DONE: 13291 goto __38 13292 case BAD: 13293 goto __39 13294 case MEM: 13295 goto __40 13296 case SYNC: 13297 goto __41 13298 default: 13299 goto __42 13300 } 13301 goto __9 13302 __10: 13303 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) { 13304 goto __43 13305 } 13306 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 13307 goto __9 13308 __43: 13309 ; 13310 __44: 13311 __47: 13312 if !(bits < (uint32(16))) { 13313 goto __48 13314 } 13315 __49: 13316 if !(have == uint32(0)) { 13317 goto __52 13318 } 13319 goto inf_leave 13320 __52: 13321 ; 13322 have-- 13323 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13324 bits = bits + (uint32(8)) 13325 goto __50 13326 __50: 13327 if 0 != 0 { 13328 goto __49 13329 } 13330 goto __51 13331 __51: 13332 ; 13333 goto __47 13334 __48: 13335 ; 13336 goto __45 13337 __45: 13338 if 0 != 0 { 13339 goto __44 13340 } 13341 goto __46 13342 __46: 13343 ; 13344 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) != 0) && (hold == uint64(0x8b1f))) { 13345 goto __53 13346 } // gzip header 13347 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 13348 goto __54 13349 } 13350 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) 13351 __54: 13352 ; 13353 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 13354 __55: 13355 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13356 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13357 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13358 goto __56 13359 __56: 13360 if 0 != 0 { 13361 goto __55 13362 } 13363 goto __57 13364 __57: 13365 ; 13366 __58: 13367 hold = uint64(0) 13368 bits = uint32(0) 13369 goto __59 13370 __59: 13371 if 0 != 0 { 13372 goto __58 13373 } 13374 goto __60 13375 __60: 13376 ; 13377 (*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS 13378 goto __9 13379 __53: 13380 ; 13381 (*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header 13382 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13383 goto __61 13384 } 13385 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1 13386 __61: 13387 ; 13388 if !(!(((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) != 0) || ((((uint64((uint32(hold) & ((uint32(1) << (8)) - uint32(1))) << 8)) + (hold >> 8)) % uint64(31)) != 0)) { 13389 goto __62 13390 } 13391 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */ 13392 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13393 goto __9 13394 __62: 13395 ; 13396 if !((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) != uint32(Z_DEFLATED)) { 13397 goto __63 13398 } 13399 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 13400 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13401 goto __9 13402 __63: 13403 ; 13404 __64: 13405 hold >>= 4 13406 bits = bits - (uint32(4)) 13407 goto __65 13408 __65: 13409 if 0 != 0 { 13410 goto __64 13411 } 13412 goto __66 13413 __66: 13414 ; 13415 len = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(8)) 13416 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 13417 goto __67 13418 } 13419 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = len 13420 __67: 13421 ; 13422 if !((len > uint32(15)) || (len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits)) { 13423 goto __68 13424 } 13425 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */ 13426 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13427 goto __9 13428 __68: 13429 ; 13430 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = (uint32(1) << len) 13431 13432 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 13433 (*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 { 13434 if (hold & uint64(0x200)) != 0 { 13435 return DICTID 13436 } 13437 return TYPE 13438 }() 13439 __69: 13440 hold = uint64(0) 13441 bits = uint32(0) 13442 goto __70 13443 __70: 13444 if 0 != 0 { 13445 goto __69 13446 } 13447 goto __71 13448 __71: 13449 ; 13450 goto __9 13451 __11: 13452 __72: 13453 __75: 13454 if !(bits < (uint32(16))) { 13455 goto __76 13456 } 13457 __77: 13458 if !(have == uint32(0)) { 13459 goto __80 13460 } 13461 goto inf_leave 13462 __80: 13463 ; 13464 have-- 13465 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13466 bits = bits + (uint32(8)) 13467 goto __78 13468 __78: 13469 if 0 != 0 { 13470 goto __77 13471 } 13472 goto __79 13473 __79: 13474 ; 13475 goto __75 13476 __76: 13477 ; 13478 goto __73 13479 __73: 13480 if 0 != 0 { 13481 goto __72 13482 } 13483 goto __74 13484 __74: 13485 ; 13486 (*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold) 13487 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xff) != Z_DEFLATED) { 13488 goto __81 13489 } 13490 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 13491 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13492 goto __9 13493 __81: 13494 ; 13495 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xe000) != 0) { 13496 goto __82 13497 } 13498 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */ 13499 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13500 goto __9 13501 __82: 13502 ; 13503 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13504 goto __83 13505 } 13506 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = (int32((hold >> 8) & uint64(1))) 13507 __83: 13508 ; 13509 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13510 goto __84 13511 } 13512 __85: 13513 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13514 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13515 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13516 goto __86 13517 __86: 13518 if 0 != 0 { 13519 goto __85 13520 } 13521 goto __87 13522 __87: 13523 ; 13524 __84: 13525 ; 13526 __88: 13527 hold = uint64(0) 13528 bits = uint32(0) 13529 goto __89 13530 __89: 13531 if 0 != 0 { 13532 goto __88 13533 } 13534 goto __90 13535 __90: 13536 ; 13537 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME 13538 __12: 13539 __91: 13540 __94: 13541 if !(bits < (uint32(32))) { 13542 goto __95 13543 } 13544 __96: 13545 if !(have == uint32(0)) { 13546 goto __99 13547 } 13548 goto inf_leave 13549 __99: 13550 ; 13551 have-- 13552 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13553 bits = bits + (uint32(8)) 13554 goto __97 13555 __97: 13556 if 0 != 0 { 13557 goto __96 13558 } 13559 goto __98 13560 __98: 13561 ; 13562 goto __94 13563 __95: 13564 ; 13565 goto __92 13566 __92: 13567 if 0 != 0 { 13568 goto __91 13569 } 13570 goto __93 13571 __93: 13572 ; 13573 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13574 goto __100 13575 } 13576 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold 13577 __100: 13578 ; 13579 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13580 goto __101 13581 } 13582 __102: 13583 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13584 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13585 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 2)) = (uint8((hold) >> 16)) 13586 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 3)) = (uint8((hold) >> 24)) 13587 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(4)) 13588 goto __103 13589 __103: 13590 if 0 != 0 { 13591 goto __102 13592 } 13593 goto __104 13594 __104: 13595 ; 13596 __101: 13597 ; 13598 __105: 13599 hold = uint64(0) 13600 bits = uint32(0) 13601 goto __106 13602 __106: 13603 if 0 != 0 { 13604 goto __105 13605 } 13606 goto __107 13607 __107: 13608 ; 13609 (*Inflate_state)(unsafe.Pointer(state)).Fmode = OS 13610 __13: 13611 __108: 13612 __111: 13613 if !(bits < (uint32(16))) { 13614 goto __112 13615 } 13616 __113: 13617 if !(have == uint32(0)) { 13618 goto __116 13619 } 13620 goto inf_leave 13621 __116: 13622 ; 13623 have-- 13624 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13625 bits = bits + (uint32(8)) 13626 goto __114 13627 __114: 13628 if 0 != 0 { 13629 goto __113 13630 } 13631 goto __115 13632 __115: 13633 ; 13634 goto __111 13635 __112: 13636 ; 13637 goto __109 13638 __109: 13639 if 0 != 0 { 13640 goto __108 13641 } 13642 goto __110 13643 __110: 13644 ; 13645 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13646 goto __117 13647 } 13648 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = (int32(hold & uint64(0xff))) 13649 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = (int32(hold >> 8)) 13650 __117: 13651 ; 13652 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13653 goto __118 13654 } 13655 __119: 13656 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13657 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13658 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13659 goto __120 13660 __120: 13661 if 0 != 0 { 13662 goto __119 13663 } 13664 goto __121 13665 __121: 13666 ; 13667 __118: 13668 ; 13669 __122: 13670 hold = uint64(0) 13671 bits = uint32(0) 13672 goto __123 13673 __123: 13674 if 0 != 0 { 13675 goto __122 13676 } 13677 goto __124 13678 __124: 13679 ; 13680 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN 13681 __14: 13682 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 13683 goto __125 13684 } 13685 __127: 13686 __130: 13687 if !(bits < (uint32(16))) { 13688 goto __131 13689 } 13690 __132: 13691 if !(have == uint32(0)) { 13692 goto __135 13693 } 13694 goto inf_leave 13695 __135: 13696 ; 13697 have-- 13698 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13699 bits = bits + (uint32(8)) 13700 goto __133 13701 __133: 13702 if 0 != 0 { 13703 goto __132 13704 } 13705 goto __134 13706 __134: 13707 ; 13708 goto __130 13709 __131: 13710 ; 13711 goto __128 13712 __128: 13713 if 0 != 0 { 13714 goto __127 13715 } 13716 goto __129 13717 __129: 13718 ; 13719 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) 13720 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13721 goto __136 13722 } 13723 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) 13724 __136: 13725 ; 13726 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13727 goto __137 13728 } 13729 __138: 13730 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 13731 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 13732 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 13733 goto __139 13734 __139: 13735 if 0 != 0 { 13736 goto __138 13737 } 13738 goto __140 13739 __140: 13740 ; 13741 __137: 13742 ; 13743 __141: 13744 hold = uint64(0) 13745 bits = uint32(0) 13746 goto __142 13747 __142: 13748 if 0 != 0 { 13749 goto __141 13750 } 13751 goto __143 13752 __143: 13753 ; 13754 goto __126 13755 __125: 13756 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13757 goto __144 13758 } 13759 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL) 13760 __144: 13761 ; 13762 __126: 13763 ; 13764 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA 13765 __15: 13766 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 13767 goto __145 13768 } 13769 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13770 if !(copy > have) { 13771 goto __146 13772 } 13773 copy = have 13774 __146: 13775 ; 13776 if !(copy != 0) { 13777 goto __147 13778 } 13779 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) && ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL))) { 13780 goto __148 13781 } 13782 len = ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength) 13783 libc.Xmemcpy(tls, ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra + uintptr(len)), next, 13784 func() uint64 { 13785 if (len + copy) > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { 13786 return (uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len)) 13787 } 13788 return uint64(copy) 13789 }()) 13790 __148: 13791 ; 13792 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13793 goto __149 13794 } 13795 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13796 __149: 13797 ; 13798 have = have - (copy) 13799 next += uintptr(copy) 13800 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 13801 __147: 13802 ; 13803 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) { 13804 goto __150 13805 } 13806 goto inf_leave 13807 __150: 13808 ; 13809 __145: 13810 ; 13811 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 13812 (*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME 13813 __16: 13814 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0800) != 0) { 13815 goto __151 13816 } 13817 if !(have == uint32(0)) { 13818 goto __153 13819 } 13820 goto inf_leave 13821 __153: 13822 ; 13823 copy = uint32(0) 13824 __154: 13825 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 13826 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)) { 13827 goto __157 13828 } 13829 *(*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) 13830 __157: 13831 ; 13832 goto __155 13833 __155: 13834 if (len != 0) && (copy < have) { 13835 goto __154 13836 } 13837 goto __156 13838 __156: 13839 ; 13840 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13841 goto __158 13842 } 13843 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13844 __158: 13845 ; 13846 have = have - (copy) 13847 next += uintptr(copy) 13848 if !(len != 0) { 13849 goto __159 13850 } 13851 goto inf_leave 13852 __159: 13853 ; 13854 goto __152 13855 __151: 13856 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13857 goto __160 13858 } 13859 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL) 13860 __160: 13861 ; 13862 __152: 13863 ; 13864 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 13865 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT 13866 __17: 13867 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x1000) != 0) { 13868 goto __161 13869 } 13870 if !(have == uint32(0)) { 13871 goto __163 13872 } 13873 goto inf_leave 13874 __163: 13875 ; 13876 copy = uint32(0) 13877 __164: 13878 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 13879 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)) { 13880 goto __167 13881 } 13882 *(*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) 13883 __167: 13884 ; 13885 goto __165 13886 __165: 13887 if (len != 0) && (copy < have) { 13888 goto __164 13889 } 13890 goto __166 13891 __166: 13892 ; 13893 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 13894 goto __168 13895 } 13896 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 13897 __168: 13898 ; 13899 have = have - (copy) 13900 next += uintptr(copy) 13901 if !(len != 0) { 13902 goto __169 13903 } 13904 goto inf_leave 13905 __169: 13906 ; 13907 goto __162 13908 __161: 13909 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13910 goto __170 13911 } 13912 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL) 13913 __170: 13914 ; 13915 __162: 13916 ; 13917 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC 13918 __18: 13919 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) { 13920 goto __171 13921 } 13922 __172: 13923 __175: 13924 if !(bits < (uint32(16))) { 13925 goto __176 13926 } 13927 __177: 13928 if !(have == uint32(0)) { 13929 goto __180 13930 } 13931 goto inf_leave 13932 __180: 13933 ; 13934 have-- 13935 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13936 bits = bits + (uint32(8)) 13937 goto __178 13938 __178: 13939 if 0 != 0 { 13940 goto __177 13941 } 13942 goto __179 13943 __179: 13944 ; 13945 goto __175 13946 __176: 13947 ; 13948 goto __173 13949 __173: 13950 if 0 != 0 { 13951 goto __172 13952 } 13953 goto __174 13954 __174: 13955 ; 13956 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (hold != ((*Inflate_state)(unsafe.Pointer(state)).Fcheck & uint64(0xffff)))) { 13957 goto __181 13958 } 13959 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */ 13960 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13961 goto __9 13962 __181: 13963 ; 13964 __182: 13965 hold = uint64(0) 13966 bits = uint32(0) 13967 goto __183 13968 __183: 13969 if 0 != 0 { 13970 goto __182 13971 } 13972 goto __184 13973 __184: 13974 ; 13975 __171: 13976 ; 13977 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 13978 goto __185 13979 } 13980 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (((*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9) & 1) 13981 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1 13982 __185: 13983 ; 13984 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 13985 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 13986 goto __9 13987 __19: 13988 __186: 13989 __189: 13990 if !(bits < (uint32(32))) { 13991 goto __190 13992 } 13993 __191: 13994 if !(have == uint32(0)) { 13995 goto __194 13996 } 13997 goto inf_leave 13998 __194: 13999 ; 14000 have-- 14001 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14002 bits = bits + (uint32(8)) 14003 goto __192 14004 __192: 14005 if 0 != 0 { 14006 goto __191 14007 } 14008 goto __193 14009 __193: 14010 ; 14011 goto __189 14012 __190: 14013 ; 14014 goto __187 14015 __187: 14016 if 0 != 0 { 14017 goto __186 14018 } 14019 goto __188 14020 __188: 14021 ; 14022 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24))) 14023 __195: 14024 hold = uint64(0) 14025 bits = uint32(0) 14026 goto __196 14027 __196: 14028 if 0 != 0 { 14029 goto __195 14030 } 14031 goto __197 14032 __197: 14033 ; 14034 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT 14035 __20: 14036 if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) { 14037 goto __198 14038 } 14039 __199: 14040 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 14041 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 14042 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 14043 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 14044 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 14045 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 14046 goto __200 14047 __200: 14048 if 0 != 0 { 14049 goto __199 14050 } 14051 goto __201 14052 __201: 14053 ; 14054 return Z_NEED_DICT 14055 __198: 14056 ; 14057 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 14058 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14059 __21: 14060 if !((flush == Z_BLOCK) || (flush == Z_TREES)) { 14061 goto __202 14062 } 14063 goto inf_leave 14064 __202: 14065 ; 14066 __22: 14067 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 14068 goto __203 14069 } 14070 __204: 14071 hold >>= (bits & uint32(7)) 14072 bits = bits - (bits & uint32(7)) 14073 goto __205 14074 __205: 14075 if 0 != 0 { 14076 goto __204 14077 } 14078 goto __206 14079 __206: 14080 ; 14081 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK 14082 goto __9 14083 __203: 14084 ; 14085 __207: 14086 __210: 14087 if !(bits < (uint32(3))) { 14088 goto __211 14089 } 14090 __212: 14091 if !(have == uint32(0)) { 14092 goto __215 14093 } 14094 goto inf_leave 14095 __215: 14096 ; 14097 have-- 14098 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14099 bits = bits + (uint32(8)) 14100 goto __213 14101 __213: 14102 if 0 != 0 { 14103 goto __212 14104 } 14105 goto __214 14106 __214: 14107 ; 14108 goto __210 14109 __211: 14110 ; 14111 goto __208 14112 __208: 14113 if 0 != 0 { 14114 goto __207 14115 } 14116 goto __209 14117 __209: 14118 ; 14119 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 14120 __216: 14121 hold >>= 1 14122 bits = bits - (uint32(1)) 14123 goto __217 14124 __217: 14125 if 0 != 0 { 14126 goto __216 14127 } 14128 goto __218 14129 __218: 14130 ; 14131 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 14132 case uint32(0): 14133 goto __220 14134 case uint32(1): 14135 goto __221 14136 case uint32(2): 14137 goto __222 14138 case uint32(3): 14139 goto __223 14140 } 14141 goto __219 14142 __220: // stored block 14143 ; 14144 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 14145 goto __219 14146 __221: // fixed block 14147 fixedtables1(tls, state) 14148 14149 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes 14150 if !(flush == Z_TREES) { 14151 goto __224 14152 } 14153 __225: 14154 hold >>= 2 14155 bits = bits - (uint32(2)) 14156 goto __226 14157 __226: 14158 if 0 != 0 { 14159 goto __225 14160 } 14161 goto __227 14162 __227: 14163 ; 14164 goto inf_leave 14165 __224: 14166 ; 14167 goto __219 14168 __222: // dynamic block 14169 ; 14170 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 14171 goto __219 14172 __223: 14173 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 14174 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14175 __219: 14176 ; 14177 __228: 14178 hold >>= 2 14179 bits = bits - (uint32(2)) 14180 goto __229 14181 __229: 14182 if 0 != 0 { 14183 goto __228 14184 } 14185 goto __230 14186 __230: 14187 ; 14188 goto __9 14189 __23: 14190 __231: 14191 hold >>= (bits & uint32(7)) 14192 bits = bits - (bits & uint32(7)) 14193 goto __232 14194 __232: 14195 if 0 != 0 { 14196 goto __231 14197 } 14198 goto __233 14199 __233: 14200 ; // go to byte boundary 14201 __234: 14202 __237: 14203 if !(bits < (uint32(32))) { 14204 goto __238 14205 } 14206 __239: 14207 if !(have == uint32(0)) { 14208 goto __242 14209 } 14210 goto inf_leave 14211 __242: 14212 ; 14213 have-- 14214 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14215 bits = bits + (uint32(8)) 14216 goto __240 14217 __240: 14218 if 0 != 0 { 14219 goto __239 14220 } 14221 goto __241 14222 __241: 14223 ; 14224 goto __237 14225 __238: 14226 ; 14227 goto __235 14228 __235: 14229 if 0 != 0 { 14230 goto __234 14231 } 14232 goto __236 14233 __236: 14234 ; 14235 if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) { 14236 goto __243 14237 } 14238 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 14239 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14240 goto __9 14241 __243: 14242 ; 14243 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 14244 14245 __244: 14246 hold = uint64(0) 14247 bits = uint32(0) 14248 goto __245 14249 __245: 14250 if 0 != 0 { 14251 goto __244 14252 } 14253 goto __246 14254 __246: 14255 ; 14256 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_ 14257 if !(flush == Z_TREES) { 14258 goto __247 14259 } 14260 goto inf_leave 14261 __247: 14262 ; 14263 __24: 14264 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY 14265 __25: 14266 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 14267 if !(copy != 0) { 14268 goto __248 14269 } 14270 if !(copy > have) { 14271 goto __249 14272 } 14273 copy = have 14274 __249: 14275 ; 14276 if !(copy > left) { 14277 goto __250 14278 } 14279 copy = left 14280 __250: 14281 ; 14282 if !(copy == uint32(0)) { 14283 goto __251 14284 } 14285 goto inf_leave 14286 __251: 14287 ; 14288 libc.Xmemcpy(tls, put, next, uint64(copy)) 14289 have = have - (copy) 14290 next += uintptr(copy) 14291 left = left - (copy) 14292 put += uintptr(copy) 14293 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 14294 goto __9 14295 __248: 14296 ; 14297 14298 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14299 goto __9 14300 __26: 14301 __252: 14302 __255: 14303 if !(bits < (uint32(14))) { 14304 goto __256 14305 } 14306 __257: 14307 if !(have == uint32(0)) { 14308 goto __260 14309 } 14310 goto inf_leave 14311 __260: 14312 ; 14313 have-- 14314 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14315 bits = bits + (uint32(8)) 14316 goto __258 14317 __258: 14318 if 0 != 0 { 14319 goto __257 14320 } 14321 goto __259 14322 __259: 14323 ; 14324 goto __255 14325 __256: 14326 ; 14327 goto __253 14328 __253: 14329 if 0 != 0 { 14330 goto __252 14331 } 14332 goto __254 14333 __254: 14334 ; 14335 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 14336 __261: 14337 hold >>= 5 14338 bits = bits - (uint32(5)) 14339 goto __262 14340 __262: 14341 if 0 != 0 { 14342 goto __261 14343 } 14344 goto __263 14345 __263: 14346 ; 14347 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 14348 __264: 14349 hold >>= 5 14350 bits = bits - (uint32(5)) 14351 goto __265 14352 __265: 14353 if 0 != 0 { 14354 goto __264 14355 } 14356 goto __266 14357 __266: 14358 ; 14359 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 14360 __267: 14361 hold >>= 4 14362 bits = bits - (uint32(4)) 14363 goto __268 14364 __268: 14365 if 0 != 0 { 14366 goto __267 14367 } 14368 goto __269 14369 __269: 14370 ; 14371 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 14372 goto __270 14373 } 14374 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 14375 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14376 goto __9 14377 __270: 14378 ; 14379 14380 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14381 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS 14382 __27: 14383 __271: 14384 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 14385 goto __272 14386 } 14387 __273: 14388 __276: 14389 if !(bits < (uint32(3))) { 14390 goto __277 14391 } 14392 __278: 14393 if !(have == uint32(0)) { 14394 goto __281 14395 } 14396 goto inf_leave 14397 __281: 14398 ; 14399 have-- 14400 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14401 bits = bits + (uint32(8)) 14402 goto __279 14403 __279: 14404 if 0 != 0 { 14405 goto __278 14406 } 14407 goto __280 14408 __280: 14409 ; 14410 goto __276 14411 __277: 14412 ; 14413 goto __274 14414 __274: 14415 if 0 != 0 { 14416 goto __273 14417 } 14418 goto __275 14419 __275: 14420 ; 14421 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 14422 __282: 14423 hold >>= 3 14424 bits = bits - (uint32(3)) 14425 goto __283 14426 __283: 14427 if 0 != 0 { 14428 goto __282 14429 } 14430 goto __284 14431 __284: 14432 ; 14433 goto __271 14434 __272: 14435 ; 14436 __285: 14437 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 14438 goto __286 14439 } 14440 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 14441 goto __285 14442 __286: 14443 ; 14444 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 14445 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14446 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 14447 ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */), 14448 (state + 120 /* &.lenbits */), state+792 /* &.work */) 14449 if !(ret != 0) { 14450 goto __287 14451 } 14452 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 14453 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14454 goto __9 14455 __287: 14456 ; 14457 14458 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14459 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS 14460 __28: 14461 __288: 14462 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 14463 goto __289 14464 } 14465 __290: 14466 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 14467 if !((uint32(here.Fbits)) <= bits) { 14468 goto __293 14469 } 14470 goto __292 14471 __293: 14472 ; 14473 __294: 14474 if !(have == uint32(0)) { 14475 goto __297 14476 } 14477 goto inf_leave 14478 __297: 14479 ; 14480 have-- 14481 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14482 bits = bits + (uint32(8)) 14483 goto __295 14484 __295: 14485 if 0 != 0 { 14486 goto __294 14487 } 14488 goto __296 14489 __296: 14490 ; 14491 goto __291 14492 __291: 14493 goto __290 14494 goto __292 14495 __292: 14496 ; 14497 if !(int32(here.Fval) < 16) { 14498 goto __298 14499 } 14500 __300: 14501 hold >>= int32(here.Fbits) 14502 bits = bits - (uint32(here.Fbits)) 14503 goto __301 14504 __301: 14505 if 0 != 0 { 14506 goto __300 14507 } 14508 goto __302 14509 __302: 14510 ; 14511 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 14512 goto __299 14513 __298: 14514 if !(int32(here.Fval) == 16) { 14515 goto __303 14516 } 14517 __305: 14518 __308: 14519 if !(bits < (uint32(int32(here.Fbits) + 2))) { 14520 goto __309 14521 } 14522 __310: 14523 if !(have == uint32(0)) { 14524 goto __313 14525 } 14526 goto inf_leave 14527 __313: 14528 ; 14529 have-- 14530 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14531 bits = bits + (uint32(8)) 14532 goto __311 14533 __311: 14534 if 0 != 0 { 14535 goto __310 14536 } 14537 goto __312 14538 __312: 14539 ; 14540 goto __308 14541 __309: 14542 ; 14543 goto __306 14544 __306: 14545 if 0 != 0 { 14546 goto __305 14547 } 14548 goto __307 14549 __307: 14550 ; 14551 __314: 14552 hold >>= int32(here.Fbits) 14553 bits = bits - (uint32(here.Fbits)) 14554 goto __315 14555 __315: 14556 if 0 != 0 { 14557 goto __314 14558 } 14559 goto __316 14560 __316: 14561 ; 14562 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 14563 goto __317 14564 } 14565 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 14566 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14567 goto __289 14568 __317: 14569 ; 14570 len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 14571 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 14572 __318: 14573 hold >>= 2 14574 bits = bits - (uint32(2)) 14575 goto __319 14576 __319: 14577 if 0 != 0 { 14578 goto __318 14579 } 14580 goto __320 14581 __320: 14582 ; 14583 goto __304 14584 __303: 14585 if !(int32(here.Fval) == 17) { 14586 goto __321 14587 } 14588 __323: 14589 __326: 14590 if !(bits < (uint32(int32(here.Fbits) + 3))) { 14591 goto __327 14592 } 14593 __328: 14594 if !(have == uint32(0)) { 14595 goto __331 14596 } 14597 goto inf_leave 14598 __331: 14599 ; 14600 have-- 14601 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14602 bits = bits + (uint32(8)) 14603 goto __329 14604 __329: 14605 if 0 != 0 { 14606 goto __328 14607 } 14608 goto __330 14609 __330: 14610 ; 14611 goto __326 14612 __327: 14613 ; 14614 goto __324 14615 __324: 14616 if 0 != 0 { 14617 goto __323 14618 } 14619 goto __325 14620 __325: 14621 ; 14622 __332: 14623 hold >>= int32(here.Fbits) 14624 bits = bits - (uint32(here.Fbits)) 14625 goto __333 14626 __333: 14627 if 0 != 0 { 14628 goto __332 14629 } 14630 goto __334 14631 __334: 14632 ; 14633 len = uint32(0) 14634 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 14635 __335: 14636 hold >>= 3 14637 bits = bits - (uint32(3)) 14638 goto __336 14639 __336: 14640 if 0 != 0 { 14641 goto __335 14642 } 14643 goto __337 14644 __337: 14645 ; 14646 goto __322 14647 __321: 14648 __338: 14649 __341: 14650 if !(bits < (uint32(int32(here.Fbits) + 7))) { 14651 goto __342 14652 } 14653 __343: 14654 if !(have == uint32(0)) { 14655 goto __346 14656 } 14657 goto inf_leave 14658 __346: 14659 ; 14660 have-- 14661 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14662 bits = bits + (uint32(8)) 14663 goto __344 14664 __344: 14665 if 0 != 0 { 14666 goto __343 14667 } 14668 goto __345 14669 __345: 14670 ; 14671 goto __341 14672 __342: 14673 ; 14674 goto __339 14675 __339: 14676 if 0 != 0 { 14677 goto __338 14678 } 14679 goto __340 14680 __340: 14681 ; 14682 __347: 14683 hold >>= int32(here.Fbits) 14684 bits = bits - (uint32(here.Fbits)) 14685 goto __348 14686 __348: 14687 if 0 != 0 { 14688 goto __347 14689 } 14690 goto __349 14691 __349: 14692 ; 14693 len = uint32(0) 14694 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 14695 __350: 14696 hold >>= 7 14697 bits = bits - (uint32(7)) 14698 goto __351 14699 __351: 14700 if 0 != 0 { 14701 goto __350 14702 } 14703 goto __352 14704 __352: 14705 ; 14706 __322: 14707 ; 14708 __304: 14709 ; 14710 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 14711 goto __353 14712 } 14713 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 14714 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14715 goto __289 14716 __353: 14717 ; 14718 __354: 14719 if !(libc.PostDecUint32(©, 1) != 0) { 14720 goto __355 14721 } 14722 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 14723 goto __354 14724 __355: 14725 ; 14726 __299: 14727 ; 14728 goto __288 14729 __289: 14730 ; 14731 14732 // handle error breaks in while 14733 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 14734 goto __356 14735 } 14736 goto __9 14737 __356: 14738 ; 14739 14740 // check for end-of-block code (better have one) 14741 if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) { 14742 goto __357 14743 } 14744 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 14745 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14746 goto __9 14747 __357: 14748 ; 14749 14750 // build code tables -- note: do not change the lenbits or distbits 14751 // values here (9 and 6) without reading the comments in inftrees.h 14752 // concerning the ENOUGH constants, which depend on those values 14753 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 14754 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14755 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 14756 ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */), 14757 (state + 120 /* &.lenbits */), state+792 /* &.work */) 14758 if !(ret != 0) { 14759 goto __358 14760 } 14761 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 14762 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14763 goto __9 14764 __358: 14765 ; 14766 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 14767 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 14768 ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 14769 (state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */) 14770 if !(ret != 0) { 14771 goto __359 14772 } 14773 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 14774 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14775 goto __9 14776 __359: 14777 ; 14778 14779 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ 14780 if !(flush == Z_TREES) { 14781 goto __360 14782 } 14783 goto inf_leave 14784 __360: 14785 ; 14786 __29: 14787 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 14788 __30: 14789 if !((have >= uint32(6)) && (left >= uint32(258))) { 14790 goto __361 14791 } 14792 __362: 14793 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 14794 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 14795 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 14796 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 14797 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 14798 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 14799 goto __363 14800 __363: 14801 if 0 != 0 { 14802 goto __362 14803 } 14804 goto __364 14805 __364: 14806 ; 14807 Xinflate_fast(tls, strm, out) 14808 __365: 14809 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 14810 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 14811 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 14812 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 14813 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 14814 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 14815 goto __366 14816 __366: 14817 if 0 != 0 { 14818 goto __365 14819 } 14820 goto __367 14821 __367: 14822 ; 14823 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 14824 goto __368 14825 } 14826 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 14827 __368: 14828 ; 14829 goto __9 14830 __361: 14831 ; 14832 (*Inflate_state)(unsafe.Pointer(state)).Fback = 0 14833 __369: 14834 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 14835 if !((uint32(here.Fbits)) <= bits) { 14836 goto __372 14837 } 14838 goto __371 14839 __372: 14840 ; 14841 __373: 14842 if !(have == uint32(0)) { 14843 goto __376 14844 } 14845 goto inf_leave 14846 __376: 14847 ; 14848 have-- 14849 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14850 bits = bits + (uint32(8)) 14851 goto __374 14852 __374: 14853 if 0 != 0 { 14854 goto __373 14855 } 14856 goto __375 14857 __375: 14858 ; 14859 goto __370 14860 __370: 14861 goto __369 14862 goto __371 14863 __371: 14864 ; 14865 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 14866 goto __377 14867 } 14868 last = here 14869 __378: 14870 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)) 14871 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 14872 goto __381 14873 } 14874 goto __380 14875 __381: 14876 ; 14877 __382: 14878 if !(have == uint32(0)) { 14879 goto __385 14880 } 14881 goto inf_leave 14882 __385: 14883 ; 14884 have-- 14885 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14886 bits = bits + (uint32(8)) 14887 goto __383 14888 __383: 14889 if 0 != 0 { 14890 goto __382 14891 } 14892 goto __384 14893 __384: 14894 ; 14895 goto __379 14896 __379: 14897 goto __378 14898 goto __380 14899 __380: 14900 ; 14901 __386: 14902 hold >>= int32(last.Fbits) 14903 bits = bits - (uint32(last.Fbits)) 14904 goto __387 14905 __387: 14906 if 0 != 0 { 14907 goto __386 14908 } 14909 goto __388 14910 __388: 14911 ; 14912 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits)) 14913 __377: 14914 ; 14915 __389: 14916 hold >>= int32(here.Fbits) 14917 bits = bits - (uint32(here.Fbits)) 14918 goto __390 14919 __390: 14920 if 0 != 0 { 14921 goto __389 14922 } 14923 goto __391 14924 __391: 14925 ; 14926 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits)) 14927 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 14928 if !((int32(here.Fop)) == 0) { 14929 goto __392 14930 } 14931 14932 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT 14933 goto __9 14934 __392: 14935 ; 14936 if !((int32(here.Fop) & 32) != 0) { 14937 goto __393 14938 } 14939 14940 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 14941 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14942 goto __9 14943 __393: 14944 ; 14945 if !((int32(here.Fop) & 64) != 0) { 14946 goto __394 14947 } 14948 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 14949 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14950 goto __9 14951 __394: 14952 ; 14953 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 14954 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT 14955 __31: 14956 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 14957 goto __395 14958 } 14959 __396: 14960 __399: 14961 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 14962 goto __400 14963 } 14964 __401: 14965 if !(have == uint32(0)) { 14966 goto __404 14967 } 14968 goto inf_leave 14969 __404: 14970 ; 14971 have-- 14972 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 14973 bits = bits + (uint32(8)) 14974 goto __402 14975 __402: 14976 if 0 != 0 { 14977 goto __401 14978 } 14979 goto __403 14980 __403: 14981 ; 14982 goto __399 14983 __400: 14984 ; 14985 goto __397 14986 __397: 14987 if 0 != 0 { 14988 goto __396 14989 } 14990 goto __398 14991 __398: 14992 ; 14993 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 14994 __405: 14995 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 14996 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 14997 goto __406 14998 __406: 14999 if 0 != 0 { 15000 goto __405 15001 } 15002 goto __407 15003 __407: 15004 ; 15005 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 15006 __395: 15007 ; 15008 15009 (*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength 15010 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST 15011 __32: 15012 __408: 15013 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 15014 if !((uint32(here.Fbits)) <= bits) { 15015 goto __411 15016 } 15017 goto __410 15018 __411: 15019 ; 15020 __412: 15021 if !(have == uint32(0)) { 15022 goto __415 15023 } 15024 goto inf_leave 15025 __415: 15026 ; 15027 have-- 15028 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15029 bits = bits + (uint32(8)) 15030 goto __413 15031 __413: 15032 if 0 != 0 { 15033 goto __412 15034 } 15035 goto __414 15036 __414: 15037 ; 15038 goto __409 15039 __409: 15040 goto __408 15041 goto __410 15042 __410: 15043 ; 15044 if !((int32(here.Fop) & 0xf0) == 0) { 15045 goto __416 15046 } 15047 last = here 15048 __417: 15049 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)) 15050 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 15051 goto __420 15052 } 15053 goto __419 15054 __420: 15055 ; 15056 __421: 15057 if !(have == uint32(0)) { 15058 goto __424 15059 } 15060 goto inf_leave 15061 __424: 15062 ; 15063 have-- 15064 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15065 bits = bits + (uint32(8)) 15066 goto __422 15067 __422: 15068 if 0 != 0 { 15069 goto __421 15070 } 15071 goto __423 15072 __423: 15073 ; 15074 goto __418 15075 __418: 15076 goto __417 15077 goto __419 15078 __419: 15079 ; 15080 __425: 15081 hold >>= int32(last.Fbits) 15082 bits = bits - (uint32(last.Fbits)) 15083 goto __426 15084 __426: 15085 if 0 != 0 { 15086 goto __425 15087 } 15088 goto __427 15089 __427: 15090 ; 15091 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits)) 15092 __416: 15093 ; 15094 __428: 15095 hold >>= int32(here.Fbits) 15096 bits = bits - (uint32(here.Fbits)) 15097 goto __429 15098 __429: 15099 if 0 != 0 { 15100 goto __428 15101 } 15102 goto __430 15103 __430: 15104 ; 15105 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits)) 15106 if !((int32(here.Fop) & 64) != 0) { 15107 goto __431 15108 } 15109 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 15110 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15111 goto __9 15112 __431: 15113 ; 15114 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 15115 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 15116 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT 15117 __33: 15118 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 15119 goto __432 15120 } 15121 __433: 15122 __436: 15123 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 15124 goto __437 15125 } 15126 __438: 15127 if !(have == uint32(0)) { 15128 goto __441 15129 } 15130 goto inf_leave 15131 __441: 15132 ; 15133 have-- 15134 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15135 bits = bits + (uint32(8)) 15136 goto __439 15137 __439: 15138 if 0 != 0 { 15139 goto __438 15140 } 15141 goto __440 15142 __440: 15143 ; 15144 goto __436 15145 __437: 15146 ; 15147 goto __434 15148 __434: 15149 if 0 != 0 { 15150 goto __433 15151 } 15152 goto __435 15153 __435: 15154 ; 15155 *(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 15156 __442: 15157 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 15158 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 15159 goto __443 15160 __443: 15161 if 0 != 0 { 15162 goto __442 15163 } 15164 goto __444 15165 __444: 15166 ; 15167 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 15168 __432: 15169 ; 15170 15171 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH 15172 __34: 15173 if !(left == uint32(0)) { 15174 goto __445 15175 } 15176 goto inf_leave 15177 __445: 15178 ; 15179 copy = (out - left) 15180 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) { 15181 goto __446 15182 } // copy from window 15183 copy = ((*Inflate_state)(unsafe.Pointer(state)).Foffset - copy) 15184 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) { 15185 goto __448 15186 } 15187 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 15188 goto __449 15189 } 15190 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 15191 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15192 goto __9 15193 __449: 15194 ; 15195 __448: 15196 ; 15197 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) { 15198 goto __450 15199 } 15200 copy = copy - ((*Inflate_state)(unsafe.Pointer(state)).Fwnext) 15201 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwsize - copy))) 15202 goto __451 15203 __450: 15204 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwnext - copy))) 15205 __451: 15206 ; 15207 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 15208 goto __452 15209 } 15210 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 15211 __452: 15212 ; 15213 goto __447 15214 __446: // copy from output 15215 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 15216 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 15217 __447: 15218 ; 15219 if !(copy > left) { 15220 goto __453 15221 } 15222 copy = left 15223 __453: 15224 ; 15225 left = left - (copy) 15226 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 15227 __454: 15228 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 15229 goto __455 15230 __455: 15231 if libc.PreDecUint32(©, 1) != 0 { 15232 goto __454 15233 } 15234 goto __456 15235 __456: 15236 ; 15237 if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) { 15238 goto __457 15239 } 15240 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 15241 __457: 15242 ; 15243 goto __9 15244 __35: 15245 if !(left == uint32(0)) { 15246 goto __458 15247 } 15248 goto inf_leave 15249 __458: 15250 ; 15251 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 15252 left-- 15253 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 15254 goto __9 15255 __36: 15256 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) { 15257 goto __459 15258 } 15259 __460: 15260 __463: 15261 if !(bits < (uint32(32))) { 15262 goto __464 15263 } 15264 __465: 15265 if !(have == uint32(0)) { 15266 goto __468 15267 } 15268 goto inf_leave 15269 __468: 15270 ; 15271 have-- 15272 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15273 bits = bits + (uint32(8)) 15274 goto __466 15275 __466: 15276 if 0 != 0 { 15277 goto __465 15278 } 15279 goto __467 15280 __467: 15281 ; 15282 goto __463 15283 __464: 15284 ; 15285 goto __461 15286 __461: 15287 if 0 != 0 { 15288 goto __460 15289 } 15290 goto __462 15291 __462: 15292 ; 15293 out = out - (left) 15294 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out)) 15295 *(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out)) 15296 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 15297 goto __469 15298 } 15299 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 { 15300 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15301 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 15302 } 15303 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 15304 }()) 15305 __469: 15306 ; 15307 out = left 15308 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && ((func() uint64 { 15309 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15310 return hold 15311 } 15312 return ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24)) 15313 }()) != (*Inflate_state)(unsafe.Pointer(state)).Fcheck)) { 15314 goto __470 15315 } 15316 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */ 15317 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15318 goto __9 15319 __470: 15320 ; 15321 __471: 15322 hold = uint64(0) 15323 bits = uint32(0) 15324 goto __472 15325 __472: 15326 if 0 != 0 { 15327 goto __471 15328 } 15329 goto __473 15330 __473: 15331 ; 15332 15333 __459: 15334 ; 15335 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH 15336 __37: 15337 if !(((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fflags != 0)) { 15338 goto __474 15339 } 15340 __475: 15341 __478: 15342 if !(bits < (uint32(32))) { 15343 goto __479 15344 } 15345 __480: 15346 if !(have == uint32(0)) { 15347 goto __483 15348 } 15349 goto inf_leave 15350 __483: 15351 ; 15352 have-- 15353 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 15354 bits = bits + (uint32(8)) 15355 goto __481 15356 __481: 15357 if 0 != 0 { 15358 goto __480 15359 } 15360 goto __482 15361 __482: 15362 ; 15363 goto __478 15364 __479: 15365 ; 15366 goto __476 15367 __476: 15368 if 0 != 0 { 15369 goto __475 15370 } 15371 goto __477 15372 __477: 15373 ; 15374 if !(hold != ((*Inflate_state)(unsafe.Pointer(state)).Ftotal & 0xffffffff)) { 15375 goto __484 15376 } 15377 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */ 15378 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 15379 goto __9 15380 __484: 15381 ; 15382 __485: 15383 hold = uint64(0) 15384 bits = uint32(0) 15385 goto __486 15386 __486: 15387 if 0 != 0 { 15388 goto __485 15389 } 15390 goto __487 15391 __487: 15392 ; 15393 15394 __474: 15395 ; 15396 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 15397 __38: 15398 ret = Z_STREAM_END 15399 goto inf_leave 15400 __39: 15401 ret = -3 15402 goto inf_leave 15403 __40: 15404 return -4 15405 __41: 15406 __42: 15407 return -2 15408 __9: 15409 ; 15410 goto __7 15411 __7: 15412 goto __6 15413 goto __8 15414 __8: 15415 ; 15416 15417 // 15418 // Return from inflate(), updating the total counts and the check value. 15419 // If there was no progress during the inflate() call, return a buffer 15420 // error. Call updatewindow() to create and/or update the window state. 15421 // Note: a memory error from inflate() is non-recoverable. 15422 // 15423 inf_leave: 15424 __488: 15425 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 15426 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 15427 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 15428 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 15429 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 15430 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 15431 goto __489 15432 __489: 15433 if 0 != 0 { 15434 goto __488 15435 } 15436 goto __490 15437 __490: 15438 ; 15439 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)))) { 15440 goto __491 15441 } 15442 if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)) != 0) { 15443 goto __492 15444 } 15445 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 15446 return -4 15447 __492: 15448 ; 15449 __491: 15450 ; 15451 in = in - ((*Z_stream)(unsafe.Pointer(strm)).Favail_in) 15452 out = out - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 15453 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(in)) 15454 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out)) 15455 *(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out)) 15456 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 15457 goto __493 15458 } 15459 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 { 15460 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 15461 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 15462 } 15463 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 15464 }()) 15465 __493: 15466 ; 15467 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = (((int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + (func() int32 { 15468 if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 { 15469 return 64 15470 } 15471 return 0 15472 }())) + (func() int32 { 15473 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE { 15474 return 128 15475 } 15476 return 0 15477 }())) + (func() int32 { 15478 if ((*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_) || ((*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_) { 15479 return 256 15480 } 15481 return 0 15482 }())) 15483 if !((((in == uint32(0)) && (out == uint32(0))) || (flush == Z_FINISH)) && (ret == Z_OK)) { 15484 goto __494 15485 } 15486 ret = -5 15487 __494: 15488 ; 15489 return ret 15490 } 15491 15492 var order1 = // permutation of code lengths 15493 [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 */ 15494 15495 func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */ 15496 var state uintptr 15497 if inflateStateCheck(tls, strm) != 0 { 15498 return -2 15499 } 15500 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15501 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 15502 (*struct { 15503 f func(*libc.TLS, Voidpf, Voidpf) 15504 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 15505 } 15506 (*struct { 15507 f func(*libc.TLS, Voidpf, Voidpf) 15508 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 15509 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 15510 15511 return Z_OK 15512 } 15513 15514 func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */ 15515 var state uintptr 15516 15517 // check state 15518 if inflateStateCheck(tls, strm) != 0 { 15519 return -2 15520 } 15521 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15522 15523 // copy dictionary 15524 if ((*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0) && (dictionary != uintptr(Z_NULL)) { 15525 libc.Xmemcpy(tls, dictionary, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 15526 (uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave - (*Inflate_state)(unsafe.Pointer(state)).Fwnext))) 15527 libc.Xmemcpy(tls, ((dictionary + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)) - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 15528 (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 15529 } 15530 if dictLength != uintptr(Z_NULL) { 15531 *(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 15532 } 15533 return Z_OK 15534 } 15535 15536 func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */ 15537 var state uintptr 15538 var dictid uint64 15539 var ret int32 15540 15541 // check state 15542 if inflateStateCheck(tls, strm) != 0 { 15543 return -2 15544 } 15545 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15546 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT) { 15547 return -2 15548 } 15549 15550 // check for correct dictionary identifier 15551 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT { 15552 dictid = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 15553 dictid = Xadler32(tls, dictid, dictionary, dictLength) 15554 if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck { 15555 return -3 15556 } 15557 } 15558 15559 // copy dictionary to window using updatewindow(), which will amend the 15560 // existing dictionary if appropriate 15561 ret = updatewindow(tls, strm, (dictionary + uintptr(dictLength)), dictLength) 15562 if ret != 0 { 15563 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 15564 return -4 15565 } 15566 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1 15567 15568 return Z_OK 15569 } 15570 15571 func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */ 15572 var state uintptr 15573 15574 // check state 15575 if inflateStateCheck(tls, strm) != 0 { 15576 return -2 15577 } 15578 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15579 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) == 0 { 15580 return -2 15581 } 15582 15583 // save header structure 15584 (*Inflate_state)(unsafe.Pointer(state)).Fhead = head 15585 (*Gz_header)(unsafe.Pointer(head)).Fdone = 0 15586 return Z_OK 15587 } 15588 15589 // 15590 // Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found 15591 // or when out of input. When called, *have is the number of pattern bytes 15592 // found in order so far, in 0..3. On return *have is updated to the new 15593 // state. If on return *have equals four, then the pattern was found and the 15594 // return value is how many bytes were read including the last byte of the 15595 // pattern. If *have is less than four, then the pattern has not been found 15596 // yet and the return value is len. In the latter case, syncsearch() can be 15597 // called again with more data and the *have state. *have is initialized to 15598 // zero for the first call. 15599 // 15600 func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */ 15601 var got uint32 15602 var next uint32 15603 15604 got = *(*uint32)(unsafe.Pointer(have)) 15605 next = uint32(0) 15606 for (next < len) && (got < uint32(4)) { 15607 if (int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next))))) == (func() int32 { 15608 if got < uint32(2) { 15609 return 0 15610 } 15611 return 0xff 15612 }()) { 15613 got++ 15614 } else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 { 15615 got = uint32(0) 15616 } else { 15617 got = (uint32(4) - got) 15618 } 15619 next++ 15620 } 15621 *(*uint32)(unsafe.Pointer(have)) = got 15622 return next 15623 } 15624 15625 func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */ 15626 bp := tls.Alloc(4) 15627 defer tls.Free(4) 15628 15629 var len uint32 // number of bytes to look at or looked at 15630 var in uint64 15631 var out uint64 // temporary to save total_in and total_out 15632 // var buf [4]uint8 at bp, 4 15633 // to restore bit buffer to byte string 15634 var state uintptr 15635 15636 // check parameters 15637 if inflateStateCheck(tls, strm) != 0 { 15638 return -2 15639 } 15640 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15641 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8)) { 15642 return -5 15643 } 15644 15645 // if first time, start search in bit buffer 15646 if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC { 15647 (*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC 15648 libc.AssignShlPtrUint64(state+80 /* &.hold */, int(((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)))) 15649 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= ((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)) 15650 len = uint32(0) 15651 for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { 15652 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold) 15653 libc.AssignShrPtrUint64(state+80 /* &.hold */, int(8)) 15654 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= (uint32(8)) 15655 } 15656 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 15657 syncsearch(tls, (state + 140 /* &.have */), bp /* &buf[0] */, len) 15658 } 15659 15660 // search available input 15661 len = syncsearch(tls, (state + 140 /* &.have */), (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 15662 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len) 15663 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 15664 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len)) 15665 15666 // return no joy or set up to restart inflate() on a new block 15667 if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { 15668 return -3 15669 } 15670 in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in 15671 out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out 15672 XinflateReset(tls, strm) 15673 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in 15674 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out 15675 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 15676 return Z_OK 15677 } 15678 15679 // 15680 // Returns true if inflate is currently at the end of a block generated by 15681 // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP 15682 // implementation to provide an additional safety check. PPP uses 15683 // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored 15684 // block. When decompressing, PPP checks that at the end of input packet, 15685 // inflate is waiting for these length bytes. 15686 // 15687 func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */ 15688 var state uintptr 15689 15690 if inflateStateCheck(tls, strm) != 0 { 15691 return -2 15692 } 15693 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15694 return (libc.Bool32(((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)))) 15695 } 15696 15697 func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */ 15698 var state uintptr 15699 var copy uintptr 15700 var window uintptr 15701 var wsize uint32 15702 15703 // check input 15704 if (inflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 15705 return -2 15706 } 15707 state = (*Z_stream)(unsafe.Pointer(source)).Fstate 15708 15709 // allocate space 15710 copy = (*struct { 15711 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 15712 })(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{}))) 15713 if copy == uintptr(Z_NULL) { 15714 return -4 15715 } 15716 window = uintptr(Z_NULL) 15717 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 15718 window = (*struct { 15719 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 15720 })(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)))) 15721 if window == uintptr(Z_NULL) { 15722 (*struct { 15723 f func(*libc.TLS, Voidpf, Voidpf) 15724 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((source))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy) 15725 return -4 15726 } 15727 } 15728 15729 // copy state 15730 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 15731 libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{}))) 15732 (*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest 15733 if ((*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1368 /* &.codes */) && ((*Inflate_state)(unsafe.Pointer(state)).Flencode <= (((state + 1368 /* &.codes */) + uintptr((ENOUGH_LENS+ENOUGH_DISTS))*4) - uintptr(1)*4)) { 15734 (*Inflate_state)(unsafe.Pointer(copy)).Flencode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1368 /* &.codes */))/4)))*4) 15735 (*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1368 /* &.codes */))/4)))*4) 15736 } 15737 (*Inflate_state)(unsafe.Pointer(copy)).Fnext = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1368 /* &.codes */))/4)))*4) 15738 if window != uintptr(Z_NULL) { 15739 wsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 15740 libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize)) 15741 } 15742 (*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window 15743 (*Z_stream)(unsafe.Pointer(dest)).Fstate = copy 15744 return Z_OK 15745 } 15746 15747 func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */ 15748 var state uintptr 15749 15750 if inflateStateCheck(tls, strm) != 0 { 15751 return -2 15752 } 15753 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15754 _ = subvert 15755 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 15756 return -3 15757 } 15758 15759 func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */ 15760 var state uintptr 15761 15762 if inflateStateCheck(tls, strm) != 0 { 15763 return -2 15764 } 15765 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15766 if check != 0 { 15767 *(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) |= (4) 15768 } else { 15769 *(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) &= (libc.CplInt32(4)) 15770 } 15771 return Z_OK 15772 } 15773 15774 func XinflateMark(tls *libc.TLS, strm Z_streamp) int64 { /* inflate.c:1541:14: */ 15775 var state uintptr 15776 15777 if inflateStateCheck(tls, strm) != 0 { 15778 return -(int64(1) << 16) 15779 } 15780 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15781 return ((int64((uint64(int64((*Inflate_state)(unsafe.Pointer(state)).Fback))) << 16)) + (func() int64 { 15782 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY { 15783 return int64((*Inflate_state)(unsafe.Pointer(state)).Flength) 15784 } 15785 return func() int64 { 15786 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH { 15787 return (int64((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)) 15788 } 15789 return int64(0) 15790 }() 15791 }())) 15792 } 15793 15794 func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint64 { /* inflate.c:1554:23: */ 15795 var state uintptr 15796 if inflateStateCheck(tls, strm) != 0 { 15797 return libc.Uint64(libc.Uint64FromInt32(-1)) 15798 } 15799 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 15800 return (uint64(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1368 /* &.codes */)) / 4))) 15801 } 15802 15803 var Xinflate_copyright = *(*[48]uint8)(unsafe.Pointer(ts + 828 /* " inflate 1.2.11 ..." */)) /* inftrees.c:11:12 */ 15804 15805 // 15806 // If you use the zlib library in a product, an acknowledgment is welcome 15807 // in the documentation of your product. If for some reason you cannot 15808 // include such an acknowledgment, I would appreciate that you keep this 15809 // copyright string in the executable of your product. 15810 // 15811 15812 // 15813 // Build a set of tables to decode the provided canonical Huffman code. 15814 // The code lengths are lens[0..codes-1]. The result starts at *table, 15815 // whose indices are 0..2^bits-1. work is a writable array of at least 15816 // lens shorts, which is used as a work area. type is the type of code 15817 // to be generated, CODES, LENS, or DISTS. On return, zero is success, 15818 // -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 15819 // on return points to the next available entry's address. bits is the 15820 // requested root table index bits, and on return it is the actual root 15821 // table index bits. It will differ if the request is greater than the 15822 // longest code or if it is less than the shortest code. 15823 // 15824 func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */ 15825 bp := tls.Alloc(64) 15826 defer tls.Free(64) 15827 15828 var len uint32 // a code's length in bits 15829 var sym uint32 // index of code symbols 15830 var min uint32 15831 var max uint32 // minimum and maximum code lengths 15832 var root uint32 // number of index bits for root table 15833 var curr uint32 // number of index bits for current table 15834 var drop uint32 // code bits to drop for sub-table 15835 var left int32 // number of prefix codes available 15836 var used uint32 // code entries in table used 15837 var huff uint32 // Huffman code 15838 var incr uint32 // for incrementing code, index 15839 var fill uint32 // index for replicating entries 15840 var low uint32 // low bits for current root entry 15841 var mask uint32 // mask for low root bits 15842 var here Code // table entry for duplication 15843 var next uintptr // next available space in table 15844 var base uintptr // base value table to use 15845 var extra uintptr // extra bits table to use 15846 var match uint32 // use base and extra for symbol >= match 15847 // var count [16]uint16 at bp, 32 15848 // number of codes of each length 15849 // var offs [16]uint16 at bp+32, 32 15850 15851 // 15852 // Process a set of code lengths to create a canonical Huffman code. The 15853 // code lengths are lens[0..codes-1]. Each length corresponds to the 15854 // symbols 0..codes-1. The Huffman code is generated by first sorting the 15855 // symbols by length from short to long, and retaining the symbol order 15856 // for codes with equal lengths. Then the code starts with all zero bits 15857 // for the first code of the shortest length, and the codes are integer 15858 // increments for the same length, and zeros are appended as the length 15859 // increases. For the deflate format, these bits are stored backwards 15860 // from their more natural integer increment ordering, and so when the 15861 // decoding tables are built in the large loop below, the integer codes 15862 // are incremented backwards. 15863 // 15864 // This routine assumes, but does not check, that all of the entries in 15865 // lens[] are in the range 0..MAXBITS. The caller must assure this. 15866 // 1..MAXBITS is interpreted as that code length. zero means that that 15867 // symbol does not occur in this code. 15868 // 15869 // The codes are sorted by computing a count of codes for each length, 15870 // creating from that a table of starting indices for each length in the 15871 // sorted table, and then entering the symbols in order in the sorted 15872 // table. The sorted table is work[], with that space being provided by 15873 // the caller. 15874 // 15875 // The length counts are used for other purposes as well, i.e. finding 15876 // the minimum and maximum length codes, determining if there are any 15877 // codes at all, checking for a valid set of lengths, and looking ahead 15878 // at length counts to determine sub-table sizes when building the 15879 // decoding tables. 15880 // 15881 15882 // accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) 15883 for len = uint32(0); len <= uint32(MAXBITS); len++ { 15884 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)) = uint16(0) 15885 } 15886 for sym = uint32(0); sym < codes; sym++ { 15887 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++ 15888 } 15889 15890 // bound code lengths, force root to be within code lengths 15891 root = *(*uint32)(unsafe.Pointer(bits)) 15892 for max = uint32(MAXBITS); max >= uint32(1); max-- { 15893 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(max)*2))) != 0 { 15894 break 15895 } 15896 } 15897 if root > max { 15898 root = max 15899 } 15900 if max == uint32(0) { // no symbols to code at all 15901 here.Fop = uint8(64) // invalid code marker 15902 here.Fbits = uint8(1) 15903 here.Fval = uint16(0) 15904 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here // make a table to force an error 15905 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here 15906 *(*uint32)(unsafe.Pointer(bits)) = uint32(1) 15907 return 0 // no symbols, but wait for decoding to report error 15908 } 15909 for min = uint32(1); min < max; min++ { 15910 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(min)*2))) != 0 { 15911 break 15912 } 15913 } 15914 if root < min { 15915 root = min 15916 } 15917 15918 // check for an over-subscribed or incomplete set of lengths 15919 left = 1 15920 for len = uint32(1); len <= uint32(MAXBITS); len++ { 15921 left <<= 1 15922 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)))) 15923 if left < 0 { 15924 return -1 15925 } // over-subscribed 15926 } 15927 if (left > 0) && ((type1 == CODES) || (max != uint32(1))) { 15928 return -1 15929 } // incomplete set 15930 15931 // generate offsets into symbol table for each length for sorting 15932 *(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + 1*2)) = uint16(0) 15933 for len = uint32(1); len < uint32(MAXBITS); len++ { 15934 *(*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))))) 15935 } 15936 15937 // sort symbols by length, by symbol order within each length 15938 for sym = uint32(0); sym < codes; sym++ { 15939 if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { 15940 *(*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) 15941 } 15942 } 15943 15944 // 15945 // Create and fill in decoding tables. In this loop, the table being 15946 // filled is at next and has curr index bits. The code being used is huff 15947 // with length len. That code is converted to an index by dropping drop 15948 // bits off of the bottom. For codes where len is less than drop + curr, 15949 // those top drop + curr - len bits are incremented through all values to 15950 // fill the table with replicated entries. 15951 // 15952 // root is the number of index bits for the root table. When len exceeds 15953 // root, sub-tables are created pointed to by the root entry with an index 15954 // of the low root bits of huff. This is saved in low to check for when a 15955 // new sub-table should be started. drop is zero when the root table is 15956 // being filled, and drop is root when sub-tables are being filled. 15957 // 15958 // When a new sub-table is needed, it is necessary to look ahead in the 15959 // code lengths to determine what size sub-table is needed. The length 15960 // counts are used for this, and so count[] is decremented as codes are 15961 // entered in the tables. 15962 // 15963 // used keeps track of how many table entries have been allocated from the 15964 // provided *table space. It is checked for LENS and DIST tables against 15965 // the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in 15966 // the initial root table size constants. See the comments in inftrees.h 15967 // for more information. 15968 // 15969 // sym increments through all symbols, and the loop terminates when 15970 // all codes of length max, i.e. all codes, have been processed. This 15971 // routine permits incomplete codes, so another loop after this one fills 15972 // in the rest of the decoding tables with invalid code markers. 15973 // 15974 15975 // set up for code type 15976 switch type1 { 15977 case CODES: 15978 base = libc.AssignUintptr(&extra, work) // dummy value--not used 15979 match = uint32(20) 15980 break 15981 case LENS: 15982 base = uintptr(unsafe.Pointer(&lbase)) 15983 extra = uintptr(unsafe.Pointer(&lext)) 15984 match = uint32(257) 15985 break 15986 default: // DISTS 15987 base = uintptr(unsafe.Pointer(&dbase)) 15988 extra = uintptr(unsafe.Pointer(&dext)) 15989 match = uint32(0) 15990 } 15991 15992 // initialize state for loop 15993 huff = uint32(0) // starting code 15994 sym = uint32(0) // starting code symbol 15995 len = min // starting code length 15996 next = *(*uintptr)(unsafe.Pointer(table)) // current table to fill in 15997 curr = root // current table index bits 15998 drop = uint32(0) // current bits to drop from code for index 15999 low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root 16000 used = (uint32(1) << root) // use root table entries 16001 mask = (used - uint32(1)) // mask for comparing low 16002 16003 // check available table space 16004 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 16005 return 1 16006 } 16007 16008 // process all codes and make table entries 16009 for { 16010 // create table entry 16011 here.Fbits = (uint8(len - drop)) 16012 if (uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) + 1) < match { 16013 here.Fop = uint8(0) 16014 here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) 16015 } else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { 16016 here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2))) 16017 here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2)) 16018 } else { 16019 here.Fop = (uint8(32 + 64)) // end of block 16020 here.Fval = uint16(0) 16021 } 16022 16023 // replicate for those indices with low len bits equal to huff 16024 incr = (uint32(1) << (len - drop)) 16025 fill = (uint32(1) << curr) 16026 min = fill // save offset to next table 16027 for ok := true; ok; ok = (fill != uint32(0)) { 16028 fill = fill - (incr) 16029 *(*Code)(unsafe.Pointer(next + uintptr(((huff>>drop)+fill))*4)) = here 16030 } 16031 16032 // backwards increment the len-bit code huff 16033 incr = (uint32(1) << (len - uint32(1))) 16034 for (huff & incr) != 0 { 16035 incr >>= 1 16036 } 16037 if incr != uint32(0) { 16038 huff = huff & (incr - uint32(1)) 16039 huff = huff + (incr) 16040 } else { 16041 huff = uint32(0) 16042 } 16043 16044 // go to next symbol, update count, len 16045 sym++ 16046 if int32(libc.PreDecUint16(&(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))), 1)) == 0 { 16047 if len == max { 16048 break 16049 } 16050 len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) 16051 } 16052 16053 // create new sub-table if needed 16054 if (len > root) && ((huff & mask) != low) { 16055 // if first time, transition to sub-tables 16056 if drop == uint32(0) { 16057 drop = root 16058 } 16059 16060 // increment past last table 16061 next += 4 * (uintptr(min)) // here min is 1 << curr 16062 16063 // determine length of next table 16064 curr = (len - drop) 16065 left = (int32(1) << curr) 16066 for (curr + drop) < max { 16067 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr((curr+drop))*2)))) 16068 if left <= 0 { 16069 break 16070 } 16071 curr++ 16072 left <<= 1 16073 } 16074 16075 // check for enough space 16076 used = used + (uint32(1) << curr) 16077 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 16078 return 1 16079 } 16080 16081 // point entry in root table to sub-table 16082 low = (huff & mask) 16083 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fop = uint8(curr) 16084 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fbits = uint8(root) 16085 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fval = (uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4)) 16086 } 16087 } 16088 16089 // fill in remaining table entry if code is incomplete (guaranteed to have 16090 // at most one remaining entry, since if the code is incomplete, the 16091 // maximum code length that was allowed to get this far is one bit) 16092 if huff != uint32(0) { 16093 here.Fop = uint8(64) // invalid code marker 16094 here.Fbits = (uint8(len - drop)) 16095 here.Fval = uint16(0) 16096 *(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here 16097 } 16098 16099 // set return parameters 16100 *(*uintptr)(unsafe.Pointer(table)) += (uintptr(used)) * 4 16101 *(*uint32)(unsafe.Pointer(bits)) = root 16102 return 0 16103 } 16104 16105 var lbase = [31]uint16{ // Length codes 257..285 base 16106 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), 16107 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 */ 16108 var lext = [31]uint16{ // Length codes 257..285 extra 16109 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), 16110 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 */ 16111 var dbase = [32]uint16{ // Distance codes 0..29 base 16112 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), 16113 uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145), 16114 uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */ 16115 var dext = [32]uint16{ // Distance codes 0..29 extra 16116 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), 16117 uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27), 16118 uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */ 16119 16120 type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */ 16121 16122 // =========================================================================== 16123 // Constants 16124 16125 // Bit length codes must not exceed MAX_BL_BITS bits 16126 16127 // end of block literal code 16128 16129 // repeat previous bit length 3-6 times (2 bits of repeat count) 16130 16131 // repeat a zero length 3-10 times (3 bits of repeat count) 16132 16133 // repeat a zero length 11-138 times (7 bits of repeat count) 16134 16135 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 */ 16136 16137 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 */ 16138 16139 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 */ 16140 16141 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 */ 16142 // The lengths of the bit length codes are sent in order of decreasing 16143 // probability, to avoid transmitting the lengths for unused bit length codes. 16144 16145 // =========================================================================== 16146 // Local data. These are initialized only once. 16147 16148 // header created automatically with -DGEN_TREES_H 16149 16150 var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) { 16151 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 16152 return r 16153 }(), Fdl: func() (r struct{ Fdad Ush }) { 16154 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16155 return r 16156 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16157 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140) 16158 return r 16159 }(), Fdl: func() (r struct{ Fdad Ush }) { 16160 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16161 return r 16162 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16163 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76) 16164 return r 16165 }(), Fdl: func() (r struct{ Fdad Ush }) { 16166 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16167 return r 16168 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16169 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204) 16170 return r 16171 }(), Fdl: func() (r struct{ Fdad Ush }) { 16172 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16173 return r 16174 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16175 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44) 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 }()}, 16181 {Ffc: func() (r struct{ Ffreq Ush }) { 16182 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172) 16183 return r 16184 }(), Fdl: func() (r struct{ Fdad Ush }) { 16185 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16186 return r 16187 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16188 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108) 16189 return r 16190 }(), Fdl: func() (r struct{ Fdad Ush }) { 16191 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16192 return r 16193 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16194 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236) 16195 return r 16196 }(), Fdl: func() (r struct{ Fdad Ush }) { 16197 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16198 return r 16199 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16200 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 16201 return r 16202 }(), Fdl: func() (r struct{ Fdad Ush }) { 16203 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16204 return r 16205 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16206 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156) 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 }()}, 16212 {Ffc: func() (r struct{ Ffreq Ush }) { 16213 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92) 16214 return r 16215 }(), Fdl: func() (r struct{ Fdad Ush }) { 16216 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16217 return r 16218 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16219 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220) 16220 return r 16221 }(), Fdl: func() (r struct{ Fdad Ush }) { 16222 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16223 return r 16224 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16225 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60) 16226 return r 16227 }(), Fdl: func() (r struct{ Fdad Ush }) { 16228 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16229 return r 16230 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16231 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188) 16232 return r 16233 }(), Fdl: func() (r struct{ Fdad Ush }) { 16234 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16235 return r 16236 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16237 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124) 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 }()}, 16243 {Ffc: func() (r struct{ Ffreq Ush }) { 16244 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252) 16245 return r 16246 }(), Fdl: func() (r struct{ Fdad Ush }) { 16247 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16248 return r 16249 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16250 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 16251 return r 16252 }(), Fdl: func() (r struct{ Fdad Ush }) { 16253 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16254 return r 16255 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16256 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130) 16257 return r 16258 }(), Fdl: func() (r struct{ Fdad Ush }) { 16259 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16260 return r 16261 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16262 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66) 16263 return r 16264 }(), Fdl: func() (r struct{ Fdad Ush }) { 16265 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16266 return r 16267 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16268 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194) 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 }()}, 16274 {Ffc: func() (r struct{ Ffreq Ush }) { 16275 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34) 16276 return r 16277 }(), Fdl: func() (r struct{ Fdad Ush }) { 16278 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16279 return r 16280 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16281 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162) 16282 return r 16283 }(), Fdl: func() (r struct{ Fdad Ush }) { 16284 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16285 return r 16286 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16287 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98) 16288 return r 16289 }(), Fdl: func() (r struct{ Fdad Ush }) { 16290 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16291 return r 16292 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16293 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226) 16294 return r 16295 }(), Fdl: func() (r struct{ Fdad Ush }) { 16296 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16297 return r 16298 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16299 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 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 }()}, 16305 {Ffc: func() (r struct{ Ffreq Ush }) { 16306 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146) 16307 return r 16308 }(), Fdl: func() (r struct{ Fdad Ush }) { 16309 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16310 return r 16311 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16312 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82) 16313 return r 16314 }(), Fdl: func() (r struct{ Fdad Ush }) { 16315 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16316 return r 16317 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16318 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210) 16319 return r 16320 }(), Fdl: func() (r struct{ Fdad Ush }) { 16321 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16322 return r 16323 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16324 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50) 16325 return r 16326 }(), Fdl: func() (r struct{ Fdad Ush }) { 16327 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16328 return r 16329 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16330 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178) 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 }()}, 16336 {Ffc: func() (r struct{ Ffreq Ush }) { 16337 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114) 16338 return r 16339 }(), Fdl: func() (r struct{ Fdad Ush }) { 16340 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16341 return r 16342 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16343 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242) 16344 return r 16345 }(), Fdl: func() (r struct{ Fdad Ush }) { 16346 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16347 return r 16348 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16349 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 16350 return r 16351 }(), Fdl: func() (r struct{ Fdad Ush }) { 16352 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16353 return r 16354 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16355 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138) 16356 return r 16357 }(), Fdl: func() (r struct{ Fdad Ush }) { 16358 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16359 return r 16360 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16361 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74) 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 }()}, 16367 {Ffc: func() (r struct{ Ffreq Ush }) { 16368 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202) 16369 return r 16370 }(), Fdl: func() (r struct{ Fdad Ush }) { 16371 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16372 return r 16373 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16374 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42) 16375 return r 16376 }(), Fdl: func() (r struct{ Fdad Ush }) { 16377 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16378 return r 16379 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16380 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170) 16381 return r 16382 }(), Fdl: func() (r struct{ Fdad Ush }) { 16383 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16384 return r 16385 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16386 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106) 16387 return r 16388 }(), Fdl: func() (r struct{ Fdad Ush }) { 16389 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16390 return r 16391 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16392 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234) 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 }()}, 16398 {Ffc: func() (r struct{ Ffreq Ush }) { 16399 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 16400 return r 16401 }(), Fdl: func() (r struct{ Fdad Ush }) { 16402 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16403 return r 16404 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16405 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154) 16406 return r 16407 }(), Fdl: func() (r struct{ Fdad Ush }) { 16408 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16409 return r 16410 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16411 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90) 16412 return r 16413 }(), Fdl: func() (r struct{ Fdad Ush }) { 16414 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16415 return r 16416 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16417 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218) 16418 return r 16419 }(), Fdl: func() (r struct{ Fdad Ush }) { 16420 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16421 return r 16422 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16423 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58) 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 }()}, 16429 {Ffc: func() (r struct{ Ffreq Ush }) { 16430 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186) 16431 return r 16432 }(), Fdl: func() (r struct{ Fdad Ush }) { 16433 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16434 return r 16435 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16436 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122) 16437 return r 16438 }(), Fdl: func() (r struct{ Fdad Ush }) { 16439 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16440 return r 16441 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16442 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250) 16443 return r 16444 }(), Fdl: func() (r struct{ Fdad Ush }) { 16445 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16446 return r 16447 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16448 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 16449 return r 16450 }(), Fdl: func() (r struct{ Fdad Ush }) { 16451 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16452 return r 16453 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16454 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134) 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 }()}, 16460 {Ffc: func() (r struct{ Ffreq Ush }) { 16461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70) 16462 return r 16463 }(), Fdl: func() (r struct{ Fdad Ush }) { 16464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16465 return r 16466 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198) 16468 return r 16469 }(), Fdl: func() (r struct{ Fdad Ush }) { 16470 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16471 return r 16472 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16473 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38) 16474 return r 16475 }(), Fdl: func() (r struct{ Fdad Ush }) { 16476 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16477 return r 16478 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16479 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166) 16480 return r 16481 }(), Fdl: func() (r struct{ Fdad Ush }) { 16482 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16483 return r 16484 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16485 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102) 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 }()}, 16491 {Ffc: func() (r struct{ Ffreq Ush }) { 16492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230) 16493 return r 16494 }(), Fdl: func() (r struct{ Fdad Ush }) { 16495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16496 return r 16497 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 16499 return r 16500 }(), Fdl: func() (r struct{ Fdad Ush }) { 16501 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16502 return r 16503 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16504 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150) 16505 return r 16506 }(), Fdl: func() (r struct{ Fdad Ush }) { 16507 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16508 return r 16509 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16510 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86) 16511 return r 16512 }(), Fdl: func() (r struct{ Fdad Ush }) { 16513 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16514 return r 16515 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16516 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214) 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 }()}, 16522 {Ffc: func() (r struct{ Ffreq Ush }) { 16523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54) 16524 return r 16525 }(), Fdl: func() (r struct{ Fdad Ush }) { 16526 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16527 return r 16528 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16529 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182) 16530 return r 16531 }(), Fdl: func() (r struct{ Fdad Ush }) { 16532 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16533 return r 16534 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16535 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118) 16536 return r 16537 }(), Fdl: func() (r struct{ Fdad Ush }) { 16538 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16539 return r 16540 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16541 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246) 16542 return r 16543 }(), Fdl: func() (r struct{ Fdad Ush }) { 16544 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16545 return r 16546 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16547 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 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 }()}, 16553 {Ffc: func() (r struct{ Ffreq Ush }) { 16554 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142) 16555 return r 16556 }(), Fdl: func() (r struct{ Fdad Ush }) { 16557 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16558 return r 16559 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16560 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78) 16561 return r 16562 }(), Fdl: func() (r struct{ Fdad Ush }) { 16563 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16564 return r 16565 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16566 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206) 16567 return r 16568 }(), Fdl: func() (r struct{ Fdad Ush }) { 16569 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16570 return r 16571 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16572 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46) 16573 return r 16574 }(), Fdl: func() (r struct{ Fdad Ush }) { 16575 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16576 return r 16577 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16578 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174) 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 }()}, 16584 {Ffc: func() (r struct{ Ffreq Ush }) { 16585 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110) 16586 return r 16587 }(), Fdl: func() (r struct{ Fdad Ush }) { 16588 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16589 return r 16590 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16591 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238) 16592 return r 16593 }(), Fdl: func() (r struct{ Fdad Ush }) { 16594 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16595 return r 16596 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16597 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 16598 return r 16599 }(), Fdl: func() (r struct{ Fdad Ush }) { 16600 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16601 return r 16602 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16603 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158) 16604 return r 16605 }(), Fdl: func() (r struct{ Fdad Ush }) { 16606 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16607 return r 16608 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16609 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94) 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 }()}, 16615 {Ffc: func() (r struct{ Ffreq Ush }) { 16616 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222) 16617 return r 16618 }(), Fdl: func() (r struct{ Fdad Ush }) { 16619 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16620 return r 16621 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16622 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62) 16623 return r 16624 }(), Fdl: func() (r struct{ Fdad Ush }) { 16625 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16626 return r 16627 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16628 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190) 16629 return r 16630 }(), Fdl: func() (r struct{ Fdad Ush }) { 16631 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16632 return r 16633 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16634 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126) 16635 return r 16636 }(), Fdl: func() (r struct{ Fdad Ush }) { 16637 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16638 return r 16639 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16640 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254) 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 }()}, 16646 {Ffc: func() (r struct{ Ffreq Ush }) { 16647 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 16648 return r 16649 }(), Fdl: func() (r struct{ Fdad Ush }) { 16650 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16651 return r 16652 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16653 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129) 16654 return r 16655 }(), Fdl: func() (r struct{ Fdad Ush }) { 16656 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16657 return r 16658 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16659 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65) 16660 return r 16661 }(), Fdl: func() (r struct{ Fdad Ush }) { 16662 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16663 return r 16664 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16665 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193) 16666 return r 16667 }(), Fdl: func() (r struct{ Fdad Ush }) { 16668 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16669 return r 16670 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16671 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33) 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 }()}, 16677 {Ffc: func() (r struct{ Ffreq Ush }) { 16678 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161) 16679 return r 16680 }(), Fdl: func() (r struct{ Fdad Ush }) { 16681 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16682 return r 16683 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16684 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97) 16685 return r 16686 }(), Fdl: func() (r struct{ Fdad Ush }) { 16687 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16688 return r 16689 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16690 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225) 16691 return r 16692 }(), Fdl: func() (r struct{ Fdad Ush }) { 16693 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16694 return r 16695 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16696 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 16697 return r 16698 }(), Fdl: func() (r struct{ Fdad Ush }) { 16699 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16700 return r 16701 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16702 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145) 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 }()}, 16708 {Ffc: func() (r struct{ Ffreq Ush }) { 16709 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81) 16710 return r 16711 }(), Fdl: func() (r struct{ Fdad Ush }) { 16712 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16713 return r 16714 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16715 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209) 16716 return r 16717 }(), Fdl: func() (r struct{ Fdad Ush }) { 16718 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16719 return r 16720 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16721 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49) 16722 return r 16723 }(), Fdl: func() (r struct{ Fdad Ush }) { 16724 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16725 return r 16726 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16727 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177) 16728 return r 16729 }(), Fdl: func() (r struct{ Fdad Ush }) { 16730 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16731 return r 16732 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16733 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113) 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 }()}, 16739 {Ffc: func() (r struct{ Ffreq Ush }) { 16740 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241) 16741 return r 16742 }(), Fdl: func() (r struct{ Fdad Ush }) { 16743 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16744 return r 16745 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16746 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16747 return r 16748 }(), Fdl: func() (r struct{ Fdad Ush }) { 16749 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16750 return r 16751 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16752 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137) 16753 return r 16754 }(), Fdl: func() (r struct{ Fdad Ush }) { 16755 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16756 return r 16757 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16758 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73) 16759 return r 16760 }(), Fdl: func() (r struct{ Fdad Ush }) { 16761 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16762 return r 16763 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16764 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201) 16765 return r 16766 }(), Fdl: func() (r struct{ Fdad Ush }) { 16767 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16768 return r 16769 }()}, 16770 {Ffc: func() (r struct{ Ffreq Ush }) { 16771 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41) 16772 return r 16773 }(), Fdl: func() (r struct{ Fdad Ush }) { 16774 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16775 return r 16776 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16777 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169) 16778 return r 16779 }(), Fdl: func() (r struct{ Fdad Ush }) { 16780 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16781 return r 16782 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16783 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105) 16784 return r 16785 }(), Fdl: func() (r struct{ Fdad Ush }) { 16786 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16787 return r 16788 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16789 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233) 16790 return r 16791 }(), Fdl: func() (r struct{ Fdad Ush }) { 16792 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16793 return r 16794 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16795 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 16796 return r 16797 }(), Fdl: func() (r struct{ Fdad Ush }) { 16798 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16799 return r 16800 }()}, 16801 {Ffc: func() (r struct{ Ffreq Ush }) { 16802 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153) 16803 return r 16804 }(), Fdl: func() (r struct{ Fdad Ush }) { 16805 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16806 return r 16807 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16808 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89) 16809 return r 16810 }(), Fdl: func() (r struct{ Fdad Ush }) { 16811 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16812 return r 16813 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16814 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217) 16815 return r 16816 }(), Fdl: func() (r struct{ Fdad Ush }) { 16817 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16818 return r 16819 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16820 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57) 16821 return r 16822 }(), Fdl: func() (r struct{ Fdad Ush }) { 16823 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16824 return r 16825 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16826 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185) 16827 return r 16828 }(), Fdl: func() (r struct{ Fdad Ush }) { 16829 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16830 return r 16831 }()}, 16832 {Ffc: func() (r struct{ Ffreq Ush }) { 16833 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121) 16834 return r 16835 }(), Fdl: func() (r struct{ Fdad Ush }) { 16836 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16837 return r 16838 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16839 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249) 16840 return r 16841 }(), Fdl: func() (r struct{ Fdad Ush }) { 16842 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16843 return r 16844 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16845 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16846 return r 16847 }(), Fdl: func() (r struct{ Fdad Ush }) { 16848 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16849 return r 16850 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16851 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133) 16852 return r 16853 }(), Fdl: func() (r struct{ Fdad Ush }) { 16854 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16855 return r 16856 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16857 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69) 16858 return r 16859 }(), Fdl: func() (r struct{ Fdad Ush }) { 16860 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16861 return r 16862 }()}, 16863 {Ffc: func() (r struct{ Ffreq Ush }) { 16864 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197) 16865 return r 16866 }(), Fdl: func() (r struct{ Fdad Ush }) { 16867 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16868 return r 16869 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16870 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37) 16871 return r 16872 }(), Fdl: func() (r struct{ Fdad Ush }) { 16873 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16874 return r 16875 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16876 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165) 16877 return r 16878 }(), Fdl: func() (r struct{ Fdad Ush }) { 16879 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16880 return r 16881 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16882 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101) 16883 return r 16884 }(), Fdl: func() (r struct{ Fdad Ush }) { 16885 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16886 return r 16887 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16888 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229) 16889 return r 16890 }(), Fdl: func() (r struct{ Fdad Ush }) { 16891 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16892 return r 16893 }()}, 16894 {Ffc: func() (r struct{ Ffreq Ush }) { 16895 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 16896 return r 16897 }(), Fdl: func() (r struct{ Fdad Ush }) { 16898 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16899 return r 16900 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16901 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149) 16902 return r 16903 }(), Fdl: func() (r struct{ Fdad Ush }) { 16904 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16905 return r 16906 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16907 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85) 16908 return r 16909 }(), Fdl: func() (r struct{ Fdad Ush }) { 16910 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16911 return r 16912 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16913 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213) 16914 return r 16915 }(), Fdl: func() (r struct{ Fdad Ush }) { 16916 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16917 return r 16918 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16919 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53) 16920 return r 16921 }(), Fdl: func() (r struct{ Fdad Ush }) { 16922 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16923 return r 16924 }()}, 16925 {Ffc: func() (r struct{ Ffreq Ush }) { 16926 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181) 16927 return r 16928 }(), Fdl: func() (r struct{ Fdad Ush }) { 16929 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16930 return r 16931 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16932 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117) 16933 return r 16934 }(), Fdl: func() (r struct{ Fdad Ush }) { 16935 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16936 return r 16937 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16938 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245) 16939 return r 16940 }(), Fdl: func() (r struct{ Fdad Ush }) { 16941 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16942 return r 16943 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16944 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 16945 return r 16946 }(), Fdl: func() (r struct{ Fdad Ush }) { 16947 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16948 return r 16949 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16950 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141) 16951 return r 16952 }(), Fdl: func() (r struct{ Fdad Ush }) { 16953 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16954 return r 16955 }()}, 16956 {Ffc: func() (r struct{ Ffreq Ush }) { 16957 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77) 16958 return r 16959 }(), Fdl: func() (r struct{ Fdad Ush }) { 16960 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16961 return r 16962 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16963 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205) 16964 return r 16965 }(), Fdl: func() (r struct{ Fdad Ush }) { 16966 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16967 return r 16968 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16969 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45) 16970 return r 16971 }(), Fdl: func() (r struct{ Fdad Ush }) { 16972 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16973 return r 16974 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16975 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173) 16976 return r 16977 }(), Fdl: func() (r struct{ Fdad Ush }) { 16978 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16979 return r 16980 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16981 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109) 16982 return r 16983 }(), Fdl: func() (r struct{ Fdad Ush }) { 16984 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16985 return r 16986 }()}, 16987 {Ffc: func() (r struct{ Ffreq Ush }) { 16988 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237) 16989 return r 16990 }(), Fdl: func() (r struct{ Fdad Ush }) { 16991 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16992 return r 16993 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16994 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 16995 return r 16996 }(), Fdl: func() (r struct{ Fdad Ush }) { 16997 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16998 return r 16999 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17000 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157) 17001 return r 17002 }(), Fdl: func() (r struct{ Fdad Ush }) { 17003 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17004 return r 17005 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17006 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93) 17007 return r 17008 }(), Fdl: func() (r struct{ Fdad Ush }) { 17009 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17010 return r 17011 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17012 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221) 17013 return r 17014 }(), Fdl: func() (r struct{ Fdad Ush }) { 17015 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17016 return r 17017 }()}, 17018 {Ffc: func() (r struct{ Ffreq Ush }) { 17019 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61) 17020 return r 17021 }(), Fdl: func() (r struct{ Fdad Ush }) { 17022 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17023 return r 17024 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17025 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189) 17026 return r 17027 }(), Fdl: func() (r struct{ Fdad Ush }) { 17028 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17029 return r 17030 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17031 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125) 17032 return r 17033 }(), Fdl: func() (r struct{ Fdad Ush }) { 17034 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17035 return r 17036 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17037 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253) 17038 return r 17039 }(), Fdl: func() (r struct{ Fdad Ush }) { 17040 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17041 return r 17042 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17043 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 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 }()}, 17049 {Ffc: func() (r struct{ Ffreq Ush }) { 17050 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275) 17051 return r 17052 }(), Fdl: func() (r struct{ Fdad Ush }) { 17053 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17054 return r 17055 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17056 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147) 17057 return r 17058 }(), Fdl: func() (r struct{ Fdad Ush }) { 17059 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17060 return r 17061 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17062 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403) 17063 return r 17064 }(), Fdl: func() (r struct{ Fdad Ush }) { 17065 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17066 return r 17067 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17068 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83) 17069 return r 17070 }(), Fdl: func() (r struct{ Fdad Ush }) { 17071 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17072 return r 17073 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17074 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339) 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 }()}, 17080 {Ffc: func() (r struct{ Ffreq Ush }) { 17081 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211) 17082 return r 17083 }(), Fdl: func() (r struct{ Fdad Ush }) { 17084 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17085 return r 17086 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17087 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467) 17088 return r 17089 }(), Fdl: func() (r struct{ Fdad Ush }) { 17090 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17091 return r 17092 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17093 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51) 17094 return r 17095 }(), Fdl: func() (r struct{ Fdad Ush }) { 17096 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17097 return r 17098 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17099 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307) 17100 return r 17101 }(), Fdl: func() (r struct{ Fdad Ush }) { 17102 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17103 return r 17104 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17105 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179) 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 }()}, 17111 {Ffc: func() (r struct{ Ffreq Ush }) { 17112 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435) 17113 return r 17114 }(), Fdl: func() (r struct{ Fdad Ush }) { 17115 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17116 return r 17117 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17118 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115) 17119 return r 17120 }(), Fdl: func() (r struct{ Fdad Ush }) { 17121 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17122 return r 17123 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17124 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371) 17125 return r 17126 }(), Fdl: func() (r struct{ Fdad Ush }) { 17127 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17128 return r 17129 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17130 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243) 17131 return r 17132 }(), Fdl: func() (r struct{ Fdad Ush }) { 17133 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17134 return r 17135 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17136 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499) 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 }()}, 17142 {Ffc: func() (r struct{ Ffreq Ush }) { 17143 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 17144 return r 17145 }(), Fdl: func() (r struct{ Fdad Ush }) { 17146 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17147 return r 17148 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17149 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267) 17150 return r 17151 }(), Fdl: func() (r struct{ Fdad Ush }) { 17152 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17153 return r 17154 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17155 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139) 17156 return r 17157 }(), Fdl: func() (r struct{ Fdad Ush }) { 17158 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17159 return r 17160 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17161 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395) 17162 return r 17163 }(), Fdl: func() (r struct{ Fdad Ush }) { 17164 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17165 return r 17166 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17167 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75) 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 }()}, 17173 {Ffc: func() (r struct{ Ffreq Ush }) { 17174 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331) 17175 return r 17176 }(), Fdl: func() (r struct{ Fdad Ush }) { 17177 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17178 return r 17179 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17180 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203) 17181 return r 17182 }(), Fdl: func() (r struct{ Fdad Ush }) { 17183 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17184 return r 17185 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17186 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459) 17187 return r 17188 }(), Fdl: func() (r struct{ Fdad Ush }) { 17189 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17190 return r 17191 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17192 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43) 17193 return r 17194 }(), Fdl: func() (r struct{ Fdad Ush }) { 17195 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17196 return r 17197 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17198 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299) 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 }()}, 17204 {Ffc: func() (r struct{ Ffreq Ush }) { 17205 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171) 17206 return r 17207 }(), Fdl: func() (r struct{ Fdad Ush }) { 17208 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17209 return r 17210 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17211 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427) 17212 return r 17213 }(), Fdl: func() (r struct{ Fdad Ush }) { 17214 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17215 return r 17216 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17217 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107) 17218 return r 17219 }(), Fdl: func() (r struct{ Fdad Ush }) { 17220 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17221 return r 17222 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17223 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363) 17224 return r 17225 }(), Fdl: func() (r struct{ Fdad Ush }) { 17226 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17227 return r 17228 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17229 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235) 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 }()}, 17235 {Ffc: func() (r struct{ Ffreq Ush }) { 17236 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491) 17237 return r 17238 }(), Fdl: func() (r struct{ Fdad Ush }) { 17239 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17240 return r 17241 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17242 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 17243 return r 17244 }(), Fdl: func() (r struct{ Fdad Ush }) { 17245 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17246 return r 17247 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17248 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283) 17249 return r 17250 }(), Fdl: func() (r struct{ Fdad Ush }) { 17251 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17252 return r 17253 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17254 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155) 17255 return r 17256 }(), Fdl: func() (r struct{ Fdad Ush }) { 17257 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17258 return r 17259 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17260 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411) 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 }()}, 17266 {Ffc: func() (r struct{ Ffreq Ush }) { 17267 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91) 17268 return r 17269 }(), Fdl: func() (r struct{ Fdad Ush }) { 17270 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17271 return r 17272 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17273 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347) 17274 return r 17275 }(), Fdl: func() (r struct{ Fdad Ush }) { 17276 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17277 return r 17278 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17279 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219) 17280 return r 17281 }(), Fdl: func() (r struct{ Fdad Ush }) { 17282 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17283 return r 17284 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17285 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475) 17286 return r 17287 }(), Fdl: func() (r struct{ Fdad Ush }) { 17288 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17289 return r 17290 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17291 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59) 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 }()}, 17297 {Ffc: func() (r struct{ Ffreq Ush }) { 17298 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315) 17299 return r 17300 }(), Fdl: func() (r struct{ Fdad Ush }) { 17301 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17302 return r 17303 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17304 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187) 17305 return r 17306 }(), Fdl: func() (r struct{ Fdad Ush }) { 17307 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17308 return r 17309 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17310 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443) 17311 return r 17312 }(), Fdl: func() (r struct{ Fdad Ush }) { 17313 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17314 return r 17315 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17316 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123) 17317 return r 17318 }(), Fdl: func() (r struct{ Fdad Ush }) { 17319 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17320 return r 17321 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17322 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379) 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 }()}, 17328 {Ffc: func() (r struct{ Ffreq Ush }) { 17329 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251) 17330 return r 17331 }(), Fdl: func() (r struct{ Fdad Ush }) { 17332 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17333 return r 17334 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17335 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507) 17336 return r 17337 }(), Fdl: func() (r struct{ Fdad Ush }) { 17338 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17339 return r 17340 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17341 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17342 return r 17343 }(), Fdl: func() (r struct{ Fdad Ush }) { 17344 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17345 return r 17346 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17347 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263) 17348 return r 17349 }(), Fdl: func() (r struct{ Fdad Ush }) { 17350 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17351 return r 17352 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17353 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135) 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 }()}, 17359 {Ffc: func() (r struct{ Ffreq Ush }) { 17360 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391) 17361 return r 17362 }(), Fdl: func() (r struct{ Fdad Ush }) { 17363 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17364 return r 17365 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17366 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71) 17367 return r 17368 }(), Fdl: func() (r struct{ Fdad Ush }) { 17369 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17370 return r 17371 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17372 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327) 17373 return r 17374 }(), Fdl: func() (r struct{ Fdad Ush }) { 17375 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17376 return r 17377 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17378 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199) 17379 return r 17380 }(), Fdl: func() (r struct{ Fdad Ush }) { 17381 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17382 return r 17383 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17384 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455) 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 }()}, 17390 {Ffc: func() (r struct{ Ffreq Ush }) { 17391 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39) 17392 return r 17393 }(), Fdl: func() (r struct{ Fdad Ush }) { 17394 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17395 return r 17396 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17397 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295) 17398 return r 17399 }(), Fdl: func() (r struct{ Fdad Ush }) { 17400 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17401 return r 17402 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17403 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167) 17404 return r 17405 }(), Fdl: func() (r struct{ Fdad Ush }) { 17406 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17407 return r 17408 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17409 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423) 17410 return r 17411 }(), Fdl: func() (r struct{ Fdad Ush }) { 17412 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17413 return r 17414 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17415 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103) 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 }()}, 17421 {Ffc: func() (r struct{ Ffreq Ush }) { 17422 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359) 17423 return r 17424 }(), Fdl: func() (r struct{ Fdad Ush }) { 17425 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17426 return r 17427 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17428 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231) 17429 return r 17430 }(), Fdl: func() (r struct{ Fdad Ush }) { 17431 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17432 return r 17433 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17434 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487) 17435 return r 17436 }(), Fdl: func() (r struct{ Fdad Ush }) { 17437 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17438 return r 17439 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17440 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 17441 return r 17442 }(), Fdl: func() (r struct{ Fdad Ush }) { 17443 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17444 return r 17445 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17446 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279) 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 }()}, 17452 {Ffc: func() (r struct{ Ffreq Ush }) { 17453 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151) 17454 return r 17455 }(), Fdl: func() (r struct{ Fdad Ush }) { 17456 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17457 return r 17458 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17459 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407) 17460 return r 17461 }(), Fdl: func() (r struct{ Fdad Ush }) { 17462 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17463 return r 17464 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17465 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87) 17466 return r 17467 }(), Fdl: func() (r struct{ Fdad Ush }) { 17468 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17469 return r 17470 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17471 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343) 17472 return r 17473 }(), Fdl: func() (r struct{ Fdad Ush }) { 17474 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17475 return r 17476 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17477 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215) 17478 return r 17479 }(), Fdl: func() (r struct{ Fdad Ush }) { 17480 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17481 return r 17482 }()}, 17483 {Ffc: func() (r struct{ Ffreq Ush }) { 17484 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471) 17485 return r 17486 }(), Fdl: func() (r struct{ Fdad Ush }) { 17487 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17488 return r 17489 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17490 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55) 17491 return r 17492 }(), Fdl: func() (r struct{ Fdad Ush }) { 17493 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17494 return r 17495 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17496 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311) 17497 return r 17498 }(), Fdl: func() (r struct{ Fdad Ush }) { 17499 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17500 return r 17501 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17502 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183) 17503 return r 17504 }(), Fdl: func() (r struct{ Fdad Ush }) { 17505 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17506 return r 17507 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17508 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439) 17509 return r 17510 }(), Fdl: func() (r struct{ Fdad Ush }) { 17511 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17512 return r 17513 }()}, 17514 {Ffc: func() (r struct{ Ffreq Ush }) { 17515 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119) 17516 return r 17517 }(), Fdl: func() (r struct{ Fdad Ush }) { 17518 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17519 return r 17520 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17521 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375) 17522 return r 17523 }(), Fdl: func() (r struct{ Fdad Ush }) { 17524 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17525 return r 17526 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17527 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247) 17528 return r 17529 }(), Fdl: func() (r struct{ Fdad Ush }) { 17530 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17531 return r 17532 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17533 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503) 17534 return r 17535 }(), Fdl: func() (r struct{ Fdad Ush }) { 17536 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17537 return r 17538 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17539 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15) 17540 return r 17541 }(), Fdl: func() (r struct{ Fdad Ush }) { 17542 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17543 return r 17544 }()}, 17545 {Ffc: func() (r struct{ Ffreq Ush }) { 17546 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271) 17547 return r 17548 }(), Fdl: func() (r struct{ Fdad Ush }) { 17549 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17550 return r 17551 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17552 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143) 17553 return r 17554 }(), Fdl: func() (r struct{ Fdad Ush }) { 17555 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17556 return r 17557 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17558 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399) 17559 return r 17560 }(), Fdl: func() (r struct{ Fdad Ush }) { 17561 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17562 return r 17563 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17564 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79) 17565 return r 17566 }(), Fdl: func() (r struct{ Fdad Ush }) { 17567 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17568 return r 17569 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17570 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335) 17571 return r 17572 }(), Fdl: func() (r struct{ Fdad Ush }) { 17573 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17574 return r 17575 }()}, 17576 {Ffc: func() (r struct{ Ffreq Ush }) { 17577 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207) 17578 return r 17579 }(), Fdl: func() (r struct{ Fdad Ush }) { 17580 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17581 return r 17582 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17583 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463) 17584 return r 17585 }(), Fdl: func() (r struct{ Fdad Ush }) { 17586 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17587 return r 17588 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17589 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47) 17590 return r 17591 }(), Fdl: func() (r struct{ Fdad Ush }) { 17592 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17593 return r 17594 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17595 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303) 17596 return r 17597 }(), Fdl: func() (r struct{ Fdad Ush }) { 17598 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17599 return r 17600 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17601 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175) 17602 return r 17603 }(), Fdl: func() (r struct{ Fdad Ush }) { 17604 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17605 return r 17606 }()}, 17607 {Ffc: func() (r struct{ Ffreq Ush }) { 17608 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431) 17609 return r 17610 }(), Fdl: func() (r struct{ Fdad Ush }) { 17611 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17612 return r 17613 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17614 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111) 17615 return r 17616 }(), Fdl: func() (r struct{ Fdad Ush }) { 17617 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17618 return r 17619 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17620 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367) 17621 return r 17622 }(), Fdl: func() (r struct{ Fdad Ush }) { 17623 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17624 return r 17625 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17626 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239) 17627 return r 17628 }(), Fdl: func() (r struct{ Fdad Ush }) { 17629 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17630 return r 17631 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17632 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495) 17633 return r 17634 }(), Fdl: func() (r struct{ Fdad Ush }) { 17635 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17636 return r 17637 }()}, 17638 {Ffc: func() (r struct{ Ffreq Ush }) { 17639 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31) 17640 return r 17641 }(), Fdl: func() (r struct{ Fdad Ush }) { 17642 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17643 return r 17644 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17645 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287) 17646 return r 17647 }(), Fdl: func() (r struct{ Fdad Ush }) { 17648 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17649 return r 17650 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17651 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159) 17652 return r 17653 }(), Fdl: func() (r struct{ Fdad Ush }) { 17654 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17655 return r 17656 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17657 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415) 17658 return r 17659 }(), Fdl: func() (r struct{ Fdad Ush }) { 17660 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17661 return r 17662 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17663 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95) 17664 return r 17665 }(), Fdl: func() (r struct{ Fdad Ush }) { 17666 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17667 return r 17668 }()}, 17669 {Ffc: func() (r struct{ Ffreq Ush }) { 17670 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351) 17671 return r 17672 }(), Fdl: func() (r struct{ Fdad Ush }) { 17673 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17674 return r 17675 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17676 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223) 17677 return r 17678 }(), Fdl: func() (r struct{ Fdad Ush }) { 17679 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17680 return r 17681 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17682 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479) 17683 return r 17684 }(), Fdl: func() (r struct{ Fdad Ush }) { 17685 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17686 return r 17687 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17688 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63) 17689 return r 17690 }(), Fdl: func() (r struct{ Fdad Ush }) { 17691 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17692 return r 17693 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17694 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319) 17695 return r 17696 }(), Fdl: func() (r struct{ Fdad Ush }) { 17697 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17698 return r 17699 }()}, 17700 {Ffc: func() (r struct{ Ffreq Ush }) { 17701 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191) 17702 return r 17703 }(), Fdl: func() (r struct{ Fdad Ush }) { 17704 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17705 return r 17706 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17707 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447) 17708 return r 17709 }(), Fdl: func() (r struct{ Fdad Ush }) { 17710 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17711 return r 17712 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17713 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127) 17714 return r 17715 }(), Fdl: func() (r struct{ Fdad Ush }) { 17716 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17717 return r 17718 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17719 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383) 17720 return r 17721 }(), Fdl: func() (r struct{ Fdad Ush }) { 17722 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17723 return r 17724 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17725 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255) 17726 return r 17727 }(), Fdl: func() (r struct{ Fdad Ush }) { 17728 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17729 return r 17730 }()}, 17731 {Ffc: func() (r struct{ Ffreq Ush }) { 17732 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511) 17733 return r 17734 }(), Fdl: func() (r struct{ Fdad Ush }) { 17735 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 17736 return r 17737 }()}, {Fdl: func() (r struct{ Fdad Ush }) { 17738 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17739 return r 17740 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17741 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64) 17742 return r 17743 }(), Fdl: func() (r struct{ Fdad Ush }) { 17744 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17745 return r 17746 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17747 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32) 17748 return r 17749 }(), Fdl: func() (r struct{ Fdad Ush }) { 17750 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17751 return r 17752 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17753 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96) 17754 return r 17755 }(), Fdl: func() (r struct{ Fdad Ush }) { 17756 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17757 return r 17758 }()}, 17759 {Ffc: func() (r struct{ Ffreq Ush }) { 17760 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 17761 return r 17762 }(), Fdl: func() (r struct{ Fdad Ush }) { 17763 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17764 return r 17765 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17766 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80) 17767 return r 17768 }(), Fdl: func() (r struct{ Fdad Ush }) { 17769 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17770 return r 17771 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17772 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48) 17773 return r 17774 }(), Fdl: func() (r struct{ Fdad Ush }) { 17775 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17776 return r 17777 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17778 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112) 17779 return r 17780 }(), Fdl: func() (r struct{ Fdad Ush }) { 17781 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17782 return r 17783 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17784 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17785 return r 17786 }(), Fdl: func() (r struct{ Fdad Ush }) { 17787 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17788 return r 17789 }()}, 17790 {Ffc: func() (r struct{ Ffreq Ush }) { 17791 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72) 17792 return r 17793 }(), Fdl: func() (r struct{ Fdad Ush }) { 17794 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17795 return r 17796 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17797 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40) 17798 return r 17799 }(), Fdl: func() (r struct{ Fdad Ush }) { 17800 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17801 return r 17802 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17803 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104) 17804 return r 17805 }(), Fdl: func() (r struct{ Fdad Ush }) { 17806 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17807 return r 17808 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17809 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 17810 return r 17811 }(), Fdl: func() (r struct{ Fdad Ush }) { 17812 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17813 return r 17814 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17815 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88) 17816 return r 17817 }(), Fdl: func() (r struct{ Fdad Ush }) { 17818 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17819 return r 17820 }()}, 17821 {Ffc: func() (r struct{ Ffreq Ush }) { 17822 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56) 17823 return r 17824 }(), Fdl: func() (r struct{ Fdad Ush }) { 17825 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17826 return r 17827 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17828 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120) 17829 return r 17830 }(), Fdl: func() (r struct{ Fdad Ush }) { 17831 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17832 return r 17833 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17834 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 17835 return r 17836 }(), Fdl: func() (r struct{ Fdad Ush }) { 17837 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17838 return r 17839 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17840 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68) 17841 return r 17842 }(), Fdl: func() (r struct{ Fdad Ush }) { 17843 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17844 return r 17845 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17846 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36) 17847 return r 17848 }(), Fdl: func() (r struct{ Fdad Ush }) { 17849 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17850 return r 17851 }()}, 17852 {Ffc: func() (r struct{ Ffreq Ush }) { 17853 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100) 17854 return r 17855 }(), Fdl: func() (r struct{ Fdad Ush }) { 17856 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17857 return r 17858 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17859 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 17860 return r 17861 }(), Fdl: func() (r struct{ Fdad Ush }) { 17862 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17863 return r 17864 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17865 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84) 17866 return r 17867 }(), Fdl: func() (r struct{ Fdad Ush }) { 17868 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17869 return r 17870 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17871 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52) 17872 return r 17873 }(), Fdl: func() (r struct{ Fdad Ush }) { 17874 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17875 return r 17876 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17877 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116) 17878 return r 17879 }(), Fdl: func() (r struct{ Fdad Ush }) { 17880 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 17881 return r 17882 }()}, 17883 {Ffc: func() (r struct{ Ffreq Ush }) { 17884 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 17885 return r 17886 }(), Fdl: func() (r struct{ Fdad Ush }) { 17887 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17888 return r 17889 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17890 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131) 17891 return r 17892 }(), Fdl: func() (r struct{ Fdad Ush }) { 17893 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17894 return r 17895 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17896 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67) 17897 return r 17898 }(), Fdl: func() (r struct{ Fdad Ush }) { 17899 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17900 return r 17901 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17902 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195) 17903 return r 17904 }(), Fdl: func() (r struct{ Fdad Ush }) { 17905 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17906 return r 17907 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17908 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35) 17909 return r 17910 }(), Fdl: func() (r struct{ Fdad Ush }) { 17911 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17912 return r 17913 }()}, 17914 {Ffc: func() (r struct{ Ffreq Ush }) { 17915 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163) 17916 return r 17917 }(), Fdl: func() (r struct{ Fdad Ush }) { 17918 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17919 return r 17920 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17921 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99) 17922 return r 17923 }(), Fdl: func() (r struct{ Fdad Ush }) { 17924 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17925 return r 17926 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17927 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227) 17928 return r 17929 }(), Fdl: func() (r struct{ Fdad Ush }) { 17930 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17931 return r 17932 }()}} /* trees.h:3:21 */ 17933 17934 var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) { 17935 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17936 return r 17937 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17938 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 17939 return r 17940 }(), Fdl: func() (r struct{ Fdad Ush }) { 17941 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17942 return r 17943 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17944 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 17945 return r 17946 }(), Fdl: func() (r struct{ Fdad Ush }) { 17947 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17948 return r 17949 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17950 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 17951 return r 17952 }(), Fdl: func() (r struct{ Fdad Ush }) { 17953 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17954 return r 17955 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17956 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 17957 return r 17958 }(), Fdl: func() (r struct{ Fdad Ush }) { 17959 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17960 return r 17961 }()}, 17962 {Ffc: func() (r struct{ Ffreq Ush }) { 17963 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 17964 return r 17965 }(), Fdl: func() (r struct{ Fdad Ush }) { 17966 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17967 return r 17968 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17969 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 17970 return r 17971 }(), Fdl: func() (r struct{ Fdad Ush }) { 17972 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17973 return r 17974 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17975 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 17976 return r 17977 }(), Fdl: func() (r struct{ Fdad Ush }) { 17978 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17979 return r 17980 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17981 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 17982 return r 17983 }(), Fdl: func() (r struct{ Fdad Ush }) { 17984 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17985 return r 17986 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 17987 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 17988 return r 17989 }(), Fdl: func() (r struct{ Fdad Ush }) { 17990 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17991 return r 17992 }()}, 17993 {Ffc: func() (r struct{ Ffreq Ush }) { 17994 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 17995 return r 17996 }(), Fdl: func() (r struct{ Fdad Ush }) { 17997 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 17998 return r 17999 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18000 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 18001 return r 18002 }(), Fdl: func() (r struct{ Fdad Ush }) { 18003 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18004 return r 18005 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18006 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 18007 return r 18008 }(), Fdl: func() (r struct{ Fdad Ush }) { 18009 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18010 return r 18011 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18012 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 18013 return r 18014 }(), Fdl: func() (r struct{ Fdad Ush }) { 18015 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18016 return r 18017 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18018 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 18019 return r 18020 }(), Fdl: func() (r struct{ Fdad Ush }) { 18021 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18022 return r 18023 }()}, 18024 {Ffc: func() (r struct{ Ffreq Ush }) { 18025 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 18026 return r 18027 }(), Fdl: func() (r struct{ Fdad Ush }) { 18028 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18029 return r 18030 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18031 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 18032 return r 18033 }(), Fdl: func() (r struct{ Fdad Ush }) { 18034 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18035 return r 18036 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18037 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 18038 return r 18039 }(), Fdl: func() (r struct{ Fdad Ush }) { 18040 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18041 return r 18042 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18043 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 18044 return r 18045 }(), Fdl: func() (r struct{ Fdad Ush }) { 18046 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18047 return r 18048 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18049 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 18050 return r 18051 }(), Fdl: func() (r struct{ Fdad Ush }) { 18052 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18053 return r 18054 }()}, 18055 {Ffc: func() (r struct{ Ffreq Ush }) { 18056 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18057 return r 18058 }(), Fdl: func() (r struct{ Fdad Ush }) { 18059 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18060 return r 18061 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18062 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 18063 return r 18064 }(), Fdl: func() (r struct{ Fdad Ush }) { 18065 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18066 return r 18067 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18068 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 18069 return r 18070 }(), Fdl: func() (r struct{ Fdad Ush }) { 18071 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18072 return r 18073 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18074 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 18075 return r 18076 }(), Fdl: func() (r struct{ Fdad Ush }) { 18077 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18078 return r 18079 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18080 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 18081 return r 18082 }(), Fdl: func() (r struct{ Fdad Ush }) { 18083 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18084 return r 18085 }()}, 18086 {Ffc: func() (r struct{ Ffreq Ush }) { 18087 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 18088 return r 18089 }(), Fdl: func() (r struct{ Fdad Ush }) { 18090 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18091 return r 18092 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18093 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 18094 return r 18095 }(), Fdl: func() (r struct{ Fdad Ush }) { 18096 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18097 return r 18098 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18099 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 18100 return r 18101 }(), Fdl: func() (r struct{ Fdad Ush }) { 18102 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18103 return r 18104 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18105 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 18106 return r 18107 }(), Fdl: func() (r struct{ Fdad Ush }) { 18108 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18109 return r 18110 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 18111 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 18112 return r 18113 }(), Fdl: func() (r struct{ Fdad Ush }) { 18114 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 18115 return r 18116 }()}} /* trees.h:64:21 */ 18117 18118 var X_dist_code = [512]Uch{ 18119 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), 18120 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), 18121 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), 18122 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), 18123 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), 18124 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), 18125 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), 18126 Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), 18127 Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), 18128 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), 18129 Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), 18130 Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), 18131 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), 18132 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), 18133 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), 18134 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), 18135 Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), 18136 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), 18137 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), 18138 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), 18139 Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), 18140 Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), 18141 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), 18142 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 18143 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 18144 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 18145 } /* trees.h:73:25 */ 18146 18147 var X_length_code = [256]Uch{ 18148 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), 18149 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), 18150 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), 18151 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), 18152 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), 18153 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), 18154 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), 18155 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), 18156 Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), 18157 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), 18158 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), 18159 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), 18160 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), 18161 } /* trees.h:102:25 */ 18162 18163 var base_length = [29]int32{ 18164 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 18165 64, 80, 96, 112, 128, 160, 192, 224, 0, 18166 } /* trees.h:118:17 */ 18167 18168 var base_dist = [30]int32{ 18169 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 18170 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 18171 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 18172 } /* trees.h:123:17 */ 18173 18174 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 */ 18175 18176 var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */ 18177 18178 var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */ 18179 18180 // Send a code of the given tree. c and tree must not have side effects 18181 18182 // =========================================================================== 18183 // Output a short LSB first on the stream. 18184 // IN assertion: there is enough room in pendingBuf. 18185 18186 // =========================================================================== 18187 // Send a value on a given number of bits. 18188 // IN assertion: length <= 16 and value fits in length bits. 18189 18190 // the arguments must not have side effects 18191 18192 // =========================================================================== 18193 // Initialize the various 'constant' tables. 18194 func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */ 18195 } 18196 18197 // =========================================================================== 18198 // Genererate the file trees.h describing the static trees. 18199 18200 // =========================================================================== 18201 // Initialize the tree data structures for a new zlib stream. 18202 func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */ 18203 tr_static_init(tls) 18204 18205 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 212 /* &.dyn_ltree */ 18206 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc)) 18207 18208 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2504 /* &.dyn_dtree */ 18209 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc)) 18210 18211 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2748 /* &.bl_tree */ 18212 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc)) 18213 18214 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 18215 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 18216 18217 // Initialize the first block of the first file: 18218 init_block(tls, s) 18219 } 18220 18221 // =========================================================================== 18222 // Initialize a new block. 18223 func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */ 18224 var n int32 // iterates over tree elements 18225 18226 // Initialize the trees. 18227 for n = 0; n < ((LITERALS + 1) + LENGTH_CODES); n++ { 18228 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 18229 } 18230 for n = 0; n < D_CODES; n++ { 18231 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 18232 } 18233 for n = 0; n < BL_CODES; n++ { 18234 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 18235 } 18236 18237 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 256*4 /* &.fc */)) = Ush(1) 18238 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint64(s+5920 /* &.static_len */, uint64(0)) 18239 (*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5928 /* &.matches */, UInt(0)) 18240 } 18241 18242 // Index within the heap array of least frequent node in the Huffman tree 18243 18244 // =========================================================================== 18245 // Remove the smallest element from the heap and recreate the heap with 18246 // one less element. Updates heap and heap_len. 18247 18248 // =========================================================================== 18249 // Compares to subtrees, using the tree depth as tie breaker when 18250 // the subtrees have equal frequency. This minimizes the worst case length. 18251 18252 // =========================================================================== 18253 // Restore the heap property by moving down the tree starting at node k, 18254 // exchanging a node with the smallest of its two sons if necessary, stopping 18255 // when the heap property is re-established (each father smaller than its 18256 // two sons). 18257 func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */ 18258 var v int32 = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) 18259 var j int32 = (k << 1) // left son of k 18260 for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len { 18261 // Set j to the smallest of the two sons: 18262 if (j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len) && ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))))) <= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4))))))))) { 18263 j++ 18264 } 18265 // Exit if v is smaller than both sons 18266 if (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))))))) { 18267 break 18268 } 18269 18270 // Exchange v with the smallest son 18271 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)) 18272 k = j 18273 18274 // And continue down the tree, setting j to the left son of k 18275 j <<= 1 18276 } 18277 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = v 18278 } 18279 18280 // =========================================================================== 18281 // Compute the optimal bit lengths for a tree and update the total bit length 18282 // for the current block. 18283 // IN assertion: the fields freq and dad are set, heap[heap_max] and 18284 // above are the tree nodes sorted by increasing frequency. 18285 // OUT assertions: the field len is set to the optimal bit length, the 18286 // array bl_count contains the frequencies for each bit length. 18287 // The length opt_len is updated; static_len is also updated if stree is 18288 // not null. 18289 func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */ 18290 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 18291 var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code 18292 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 18293 var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits 18294 var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base 18295 var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length 18296 var h int32 // heap index 18297 var n int32 18298 var m int32 // iterate over the tree elements 18299 var bits int32 // bit length 18300 var xbits int32 // extra bits 18301 var f Ush // frequency 18302 var overflow int32 = 0 // number of elements with bit length too large 18303 18304 for bits = 0; bits <= MAX_BITS; bits++ { 18305 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2)) = Ush(0) 18306 } 18307 18308 // In a first pass, compute the optimal bit lengths (which may 18309 // overflow in the case of the bit length tree). 18310 *(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2 /* &.dl */)) = Ush(0) // root of the heap 18311 18312 for h = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1); h < ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1); h++ { 18313 n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(h)*4)) 18314 bits = (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)))*4 + 2 /* &.dl */))) + 1) 18315 if bits > max_length { 18316 bits = max_length 18317 overflow++ 18318 } 18319 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(bits) 18320 // We overwrite tree[n].Dad which is no longer needed 18321 18322 if n > max_code { 18323 continue 18324 } // not a leaf node 18325 18326 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))++ 18327 xbits = 0 18328 if n >= base { 18329 xbits = *(*Intf)(unsafe.Pointer(extra + uintptr((n-base))*4)) 18330 } 18331 f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */)) 18332 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += (Ulg(f) * Ulg((uint32(bits + xbits)))) 18333 if stree != 0 { 18334 *(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) += (Ulg(f) * Ulg((uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2 /* &.dl */))) + xbits)))) 18335 } 18336 } 18337 if overflow == 0 { 18338 return 18339 } 18340 18341 // This happens for example on obj2 and pic of the Calgary corpus 18342 18343 // Find the first bit length which could increase: 18344 for ok := true; ok; ok = (overflow > 0) { 18345 bits = (max_length - 1) 18346 for int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) == 0 { 18347 bits-- 18348 } 18349 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))-- // move one leaf down the tree 18350 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr((bits+1))*2)) += Ush((2)) // move one overflow item as its brother 18351 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(max_length)*2))-- 18352 // The brother of the overflow item also moves one step up, 18353 // but this does not affect bl_count[max_length] 18354 overflow = overflow - (2) 18355 } 18356 18357 // Now recompute all bit lengths, scanning in increasing frequency. 18358 // h is still equal to HEAP_SIZE. (It is simpler to reconstruct all 18359 // lengths instead of fixing only the wrong ones. This idea is taken 18360 // from 'ar' written by Haruhiko Okumura.) 18361 for bits = max_length; bits != 0; bits-- { 18362 n = int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) 18363 for n != 0 { 18364 m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&h, 1))*4)) 18365 if m > max_code { 18366 continue 18367 } 18368 if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */))) != uint32(bits) { 18369 18370 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 /* &.fc */)))) 18371 *(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)) = Ush(bits) 18372 } 18373 n-- 18374 } 18375 } 18376 } 18377 18378 // =========================================================================== 18379 // Generate the codes for a given tree and bit counts (which need not be 18380 // optimal). 18381 // IN assertion: the array bl_count contains the bit length statistics for 18382 // the given tree and the field len is set for all tree elements. 18383 // OUT assertion: the field code is set for all tree elements of non 18384 // zero code length. 18385 func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */ 18386 bp := tls.Alloc(32) 18387 defer tls.Free(32) 18388 18389 // var next_code [16]Ush at bp, 32 18390 // next code value for each bit length 18391 var code uint32 = uint32(0) // running code value 18392 var bits int32 // bit index 18393 var n int32 // code index 18394 18395 // The distribution counts are first used to generate the code values 18396 // without bit reversal. 18397 for bits = 1; bits <= MAX_BITS; bits++ { 18398 code = ((code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr((bits-1))*2)))) << 1) 18399 *(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(bits)*2)) = Ush(code) 18400 } 18401 // Check that the bit counts in bl_count are consistent. The last code 18402 // must be all ones. 18403 18404 for n = 0; n <= max_code; n++ { 18405 var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */))) 18406 if len == 0 { 18407 continue 18408 } 18409 // Now reverse the bits 18410 *(*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)) 18411 18412 } 18413 } 18414 18415 // =========================================================================== 18416 // Construct one Huffman tree and assigns the code bit strings and lengths. 18417 // Update the total bit length for the current block. 18418 // IN assertion: the field freq is set for all tree elements. 18419 // OUT assertions: the fields len and code are set to the optimal bit length 18420 // and corresponding code. The length opt_len is updated; static_len is 18421 // also updated if stree is not null. The field max_code is set. 18422 func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */ 18423 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 18424 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 18425 var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems 18426 var n int32 18427 var m int32 // iterate over heap elements 18428 var max_code int32 = -1 // largest code with non zero frequency 18429 var node int32 // new node being created 18430 18431 // Construct the initial heap, with least frequent element in 18432 // heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. 18433 // heap[0] is not used. 18434 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0 18435 (*Deflate_state)(unsafe.Pointer(s)).Fheap_max = ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1) 18436 18437 for n = 0; n < elems; n++ { 18438 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) != 0 { 18439 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4)) = libc.AssignInt32(&max_code, n) 18440 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n))) = Uch(0) 18441 } else { 18442 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(0) 18443 } 18444 } 18445 18446 // The pkzip format requires that at least one distance code exists, 18447 // and that at least one bit should be sent even if there is only one 18448 // possible code. So to avoid special checks later on we force at least 18449 // two codes of non zero frequency. 18450 for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 { 18451 node = libc.AssignPtrInt32((s+3008 /* &.heap */)+uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4, func() int32 { 18452 if max_code < 2 { 18453 return libc.PreIncInt32(&max_code, 1) 18454 } 18455 return 0 18456 }()) 18457 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = Ush(1) 18458 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = Uch(0) 18459 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len-- 18460 if stree != 0 { 18461 *(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) -= (Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2 /* &.dl */)))) 18462 } 18463 // node is 0 or 1 so it does not have extra bits 18464 } 18465 (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code 18466 18467 // The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, 18468 // establish sub-heaps of increasing lengths: 18469 for n = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2); n >= 1; n-- { 18470 pqdownheap(tls, s, tree, n) 18471 } 18472 18473 // Construct the Huffman tree by repeatedly combining the least two 18474 // frequent nodes. 18475 node = elems // next internal node of the tree 18476 for ok := true; ok; ok = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2) { 18477 { 18478 n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) 18479 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) 18480 pqdownheap(tls, s, tree, SMALLEST) 18481 } 18482 // n = node of least frequency 18483 m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) // m = node of next least frequency 18484 18485 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = n // keep the nodes sorted by frequency 18486 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = m 18487 18488 // Create a new node father of n and m 18489 *(*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 */))))) 18490 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = (Uch((func() int32 { 18491 if int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) { 18492 return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) 18493 } 18494 return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) 18495 }()) + 1)) 18496 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2 /* &.dl */ /* &.dad */, Ush(node)) 18497 // and insert the new node in the heap 18498 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = libc.PostIncInt32(&node, 1) 18499 pqdownheap(tls, s, tree, SMALLEST) 18500 18501 } 18502 18503 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) 18504 18505 // At this point, the fields freq and dad are set. We can now 18506 // generate the bit lengths. 18507 gen_bitlen(tls, s, desc) 18508 18509 // The field len is now set, we can generate the bit codes 18510 gen_codes(tls, tree, max_code, s+2976 /* &.bl_count */) 18511 } 18512 18513 // =========================================================================== 18514 // Scan a literal or distance tree to determine the frequencies of the codes 18515 // in the bit length tree. 18516 func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */ 18517 var n int32 // iterates over all tree elements 18518 var prevlen int32 = -1 // last emitted length 18519 var curlen int32 // length of current code 18520 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 18521 var count int32 = 0 // repeat count of the current code 18522 var max_count int32 = 7 // max repeat count 18523 var min_count int32 = 4 // min repeat count 18524 18525 if nextlen == 0 { 18526 max_count = 138 18527 min_count = 3 18528 } 18529 *(*Ush)(unsafe.Pointer(tree + uintptr((max_code+1))*4 + 2 /* &.dl */)) = Ush(0xffff) // guard 18530 18531 for n = 0; n <= max_code; n++ { 18532 curlen = nextlen 18533 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 18534 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 18535 continue 18536 } else if count < min_count { 18537 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */ /* &.freq */)) += Ush((count)) 18538 } else if curlen != 0 { 18539 if curlen != prevlen { 18540 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))++ 18541 } 18542 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))++ 18543 } else if count <= 10 { 18544 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))++ 18545 } else { 18546 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))++ 18547 } 18548 count = 0 18549 prevlen = curlen 18550 if nextlen == 0 { 18551 max_count = 138 18552 min_count = 3 18553 } else if curlen == nextlen { 18554 max_count = 6 18555 min_count = 3 18556 } else { 18557 max_count = 7 18558 min_count = 4 18559 } 18560 } 18561 } 18562 18563 // =========================================================================== 18564 // Send a literal or distance tree in compressed form, using the codes in 18565 // bl_tree. 18566 func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */ 18567 var n int32 // iterates over all tree elements 18568 var prevlen int32 = -1 // last emitted length 18569 var curlen int32 // length of current code 18570 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 18571 var count int32 = 0 // repeat count of the current code 18572 var max_count int32 = 7 // max repeat count 18573 var min_count int32 = 4 // min repeat count 18574 18575 /* tree[max_code+1].Len = -1; */ // guard already set 18576 if nextlen == 0 { 18577 max_count = 138 18578 min_count = 3 18579 } 18580 18581 for n = 0; n <= max_code; n++ { 18582 curlen = nextlen 18583 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 18584 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 18585 continue 18586 } else if count < min_count { 18587 for ok := true; ok; ok = (libc.PreDecInt32(&count, 1) != 0) { 18588 { 18589 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 18590 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18591 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 18592 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18593 { 18594 { 18595 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18596 } 18597 { 18598 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18599 } 18600 18601 } 18602 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18603 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18604 } else { 18605 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18606 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18607 } 18608 } 18609 } 18610 18611 } else if curlen != 0 { 18612 if curlen != prevlen { 18613 { 18614 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 18615 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18616 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 18617 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18618 { 18619 { 18620 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18621 } 18622 { 18623 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18624 } 18625 18626 } 18627 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18628 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18629 } else { 18630 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18631 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18632 } 18633 } 18634 count-- 18635 } 18636 18637 { 18638 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 + 2 /* &.dl */))) 18639 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18640 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))) 18641 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18642 { 18643 { 18644 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18645 } 18646 { 18647 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18648 } 18649 18650 } 18651 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18652 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18653 } else { 18654 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18655 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18656 } 18657 } 18658 { 18659 var len int32 = 2 18660 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18661 var val int32 = (count - 3) 18662 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18663 { 18664 { 18665 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18666 } 18667 { 18668 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18669 } 18670 18671 } 18672 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18673 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18674 } else { 18675 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18676 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18677 } 18678 } 18679 18680 } else if count <= 10 { 18681 { 18682 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 + 2 /* &.dl */))) 18683 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18684 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))) 18685 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18686 { 18687 { 18688 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18689 } 18690 { 18691 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18692 } 18693 18694 } 18695 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18696 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18697 } else { 18698 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18699 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18700 } 18701 } 18702 { 18703 var len int32 = 3 18704 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18705 var val int32 = (count - 3) 18706 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18707 { 18708 { 18709 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18710 } 18711 { 18712 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18713 } 18714 18715 } 18716 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18717 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18718 } else { 18719 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18720 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18721 } 18722 } 18723 18724 } else { 18725 { 18726 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 + 2 /* &.dl */))) 18727 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18728 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))) 18729 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18730 { 18731 { 18732 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18733 } 18734 { 18735 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18736 } 18737 18738 } 18739 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18740 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18741 } else { 18742 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18743 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18744 } 18745 } 18746 { 18747 var len int32 = 7 18748 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18749 var val int32 = (count - 11) 18750 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18751 { 18752 { 18753 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18754 } 18755 { 18756 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18757 } 18758 18759 } 18760 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18761 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18762 } else { 18763 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 11))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18764 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18765 } 18766 } 18767 18768 } 18769 count = 0 18770 prevlen = curlen 18771 if nextlen == 0 { 18772 max_count = 138 18773 min_count = 3 18774 } else if curlen == nextlen { 18775 max_count = 6 18776 min_count = 3 18777 } else { 18778 max_count = 7 18779 min_count = 4 18780 } 18781 } 18782 } 18783 18784 // =========================================================================== 18785 // Construct the Huffman tree for the bit lengths and return the index in 18786 // bl_order of the last bit length code to send. 18787 func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */ 18788 var max_blindex int32 // index of last bit length code of non zero freq 18789 18790 // Determine the bit length frequencies for literal and distance trees 18791 scan_tree(tls, s, s+212 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) 18792 scan_tree(tls, s, s+2504 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) 18793 18794 // Build the bit length tree: 18795 build_tree(tls, s, (s + 2952 /* &.bl_desc */)) 18796 // opt_len now includes the length of the tree representations, except 18797 // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. 18798 18799 // Determine the number of bit length codes to send. The pkzip format 18800 // requires that at least 4 bit length codes be sent. (appnote.txt says 18801 // 3 but the actual value used is 4.) 18802 for max_blindex = (BL_CODES - 1); max_blindex >= 3; max_blindex-- { 18803 if int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[max_blindex])*4 + 2 /* &.dl */))) != 0 { 18804 break 18805 } 18806 } 18807 // Update opt_len to include the bit length tree and counts 18808 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((((uint64(3) * (Ulg(max_blindex) + uint64(1))) + uint64(5)) + uint64(5)) + uint64(4)) 18809 18810 return max_blindex 18811 } 18812 18813 // =========================================================================== 18814 // Send the header for a block using dynamic Huffman trees: the counts, the 18815 // lengths of the bit length codes, the literal tree and the distance tree. 18816 // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. 18817 func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */ 18818 var rank int32 // index in bl_order 18819 18820 { 18821 var len int32 = 5 18822 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18823 var val int32 = (lcodes - 257) 18824 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18825 { 18826 { 18827 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18828 } 18829 { 18830 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18831 } 18832 18833 } 18834 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18835 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18836 } else { 18837 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lcodes - 257))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18838 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18839 } 18840 } 18841 /* not +255 as stated in appnote.txt */ 18842 { 18843 var len int32 = 5 18844 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18845 var val int32 = (dcodes - 1) 18846 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18847 { 18848 { 18849 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18850 } 18851 { 18852 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18853 } 18854 18855 } 18856 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18857 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18858 } else { 18859 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dcodes - 1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18860 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18861 } 18862 } 18863 18864 { 18865 var len int32 = 4 18866 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18867 var val int32 = (blcodes - 4) 18868 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18869 { 18870 { 18871 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18872 } 18873 { 18874 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18875 } 18876 18877 } 18878 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18879 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18880 } else { 18881 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(blcodes - 4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18882 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18883 } 18884 } 18885 // not -3 as stated in appnote.txt 18886 for rank = 0; rank < blcodes; rank++ { 18887 18888 { 18889 var len int32 = 3 18890 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18891 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */))) 18892 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18893 { 18894 { 18895 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18896 } 18897 { 18898 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18899 } 18900 18901 } 18902 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18903 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18904 } else { 18905 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18906 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18907 } 18908 } 18909 18910 } 18911 18912 send_tree(tls, s, s+212 /* &.dyn_ltree */, (lcodes - 1)) // literal tree 18913 18914 send_tree(tls, s, s+2504 /* &.dyn_dtree */, (dcodes - 1)) // distance tree 18915 18916 } 18917 18918 // =========================================================================== 18919 // Send a stored block 18920 func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */ 18921 { 18922 var len int32 = 3 18923 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18924 var val int32 = ((int32(STORED_BLOCK) << 1) + last) 18925 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18926 { 18927 { 18928 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 18929 } 18930 { 18931 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 18932 } 18933 18934 } 18935 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 18936 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 18937 } else { 18938 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STORED_BLOCK) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18939 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18940 } 18941 } 18942 // send block type 18943 bi_windup(tls, s) /* align on byte boundary */ 18944 { 18945 { 18946 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(stored_len))) & 0xff)) 18947 } 18948 { 18949 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(stored_len))) >> 8)) 18950 } 18951 18952 } 18953 18954 { 18955 { 18956 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(^stored_len))) & 0xff)) 18957 } 18958 { 18959 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(^stored_len))) >> 8)) 18960 } 18961 18962 } 18963 18964 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), buf, stored_len) 18965 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (stored_len) 18966 } 18967 18968 // =========================================================================== 18969 // Flush the bits in the bit buffer to pending output (leaves at most 7 bits) 18970 func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */ 18971 bi_flush(tls, s) 18972 } 18973 18974 // =========================================================================== 18975 // Send one empty static block to give enough lookahead for inflate. 18976 // This takes 10 bits, of which 7 may remain in the bit buffer. 18977 func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */ 18978 { 18979 var len int32 = 3 18980 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 18981 var val int32 = (int32(STATIC_TREES) << 1) 18982 *(*Ush)(unsafe.Pointer(s + 5936 /* &.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.PostIncUint64(&(*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.PostIncUint64(&(*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 + 5940 /* &.bi_valid */)) += (len - Buf_size) 18994 } else { 18995 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(int32((Ush(int32(STATIC_TREES) << 1)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 18996 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 18997 } 18998 } 18999 19000 { 19001 var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2 /* &.dl */))) 19002 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19003 var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */))) 19004 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19005 { 19006 { 19007 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19008 } 19009 { 19010 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19011 } 19012 19013 } 19014 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19015 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19016 } else { 19017 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19018 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19019 } 19020 } 19021 19022 bi_flush(tls, s) 19023 } 19024 19025 // =========================================================================== 19026 // Determine the best encoding for the current block: dynamic trees, static 19027 // trees or store, and write out the encoded block. 19028 func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */ 19029 var opt_lenb Ulg 19030 var static_lenb Ulg // opt_len and static_len in bytes 19031 var max_blindex int32 = 0 // index of last bit length code of non zero freq 19032 19033 // Build the Huffman trees unless a stored block is forced 19034 if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 { 19035 19036 // Check if the file is binary or text 19037 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN { 19038 (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s) 19039 } 19040 19041 // Construct the literal and distance trees 19042 build_tree(tls, s, (s + 2904 /* &.l_desc */)) 19043 19044 build_tree(tls, s, (s + 2928 /* &.d_desc */)) 19045 19046 // At this point, opt_len and static_len are the total bit lengths of 19047 // the compressed block data, excluding the tree representations. 19048 19049 // Build the bit length tree for the above two trees, and get the index 19050 // in bl_order of the last bit length code to send. 19051 max_blindex = build_bl_tree(tls, s) 19052 19053 // Determine the best encoding. Compute the block lengths in bytes. 19054 opt_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + uint64(3)) + uint64(7)) >> 3) 19055 static_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + uint64(3)) + uint64(7)) >> 3) 19056 19057 if static_lenb <= opt_lenb { 19058 opt_lenb = static_lenb 19059 } 19060 19061 } else { 19062 19063 opt_lenb = libc.AssignUint64(&static_lenb, (stored_len + uint64(5))) // force a stored block 19064 } 19065 19066 if ((stored_len + uint64(4)) <= opt_lenb) && (buf != uintptr(0)) { 19067 // 4: two words for the lengths 19068 // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. 19069 // Otherwise we can't have processed more than WSIZE input bytes since 19070 // the last block flush, because compression would have been 19071 // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 19072 // transform a block into a stored block. 19073 X_tr_stored_block(tls, s, buf, stored_len, last) 19074 19075 } else if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED) || (static_lenb == opt_lenb) { 19076 { 19077 var len int32 = 3 19078 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19079 var val int32 = ((int32(STATIC_TREES) << 1) + last) 19080 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19081 { 19082 { 19083 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19084 } 19085 { 19086 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19087 } 19088 19089 } 19090 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19091 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19092 } else { 19093 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STATIC_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19094 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19095 } 19096 } 19097 19098 compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))), 19099 uintptr(uintptr(unsafe.Pointer(&static_dtree)))) 19100 } else { 19101 { 19102 var len int32 = 3 19103 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19104 var val int32 = ((int32(DYN_TREES) << 1) + last) 19105 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19106 { 19107 { 19108 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19109 } 19110 { 19111 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19112 } 19113 19114 } 19115 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19116 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19117 } else { 19118 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(DYN_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19119 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19120 } 19121 } 19122 19123 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), 19124 (max_blindex + 1)) 19125 compress_block(tls, s, s+212, /* &.dyn_ltree */ 19126 s+2504 /* &.dyn_dtree */) 19127 } 19128 19129 // The above check is made mod 2^32, for files larger than 512 MB 19130 // and uLong implemented on 32 bits. 19131 init_block(tls, s) 19132 19133 if last != 0 { 19134 bi_windup(tls, s) 19135 } 19136 19137 } 19138 19139 // =========================================================================== 19140 // Save the match info and tally the frequency counts. Return true if 19141 // the current block must be flushed. 19142 func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */ 19143 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist) 19144 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc) 19145 if dist == uint32(0) { 19146 // lc is the unmatched char 19147 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(lc)*4 /* &.fc */))++ 19148 } else { 19149 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 19150 // Here, lc is the match length - MIN_MATCH 19151 dist-- // dist = match distance - 1 19152 19153 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[lc])+LITERALS)+1))*4 /* &.fc */))++ 19154 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 19155 if (dist) < uint32(256) { 19156 return int32(X_dist_code[dist]) 19157 } 19158 return int32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 19159 }()))*4 /* &.fc */))++ 19160 } 19161 19162 return (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 19163 // We avoid equality with lit_bufsize because of wraparound at 64K 19164 // on 16 bit machines and because stored blocks are restricted to 19165 // 64K-1 bytes. 19166 } 19167 19168 // =========================================================================== 19169 // Send the block data compressed using the given Huffman trees 19170 func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */ 19171 var dist uint32 // distance of matched string 19172 var lc int32 // match length or unmatched char (if dist == 0) 19173 var lx uint32 = uint32(0) // running index in l_buf 19174 var code uint32 // the code to send 19175 var extra int32 // number of extra bits to send 19176 19177 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) { 19178 for ok := true; ok; ok = (lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit) { 19179 dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2))) 19180 lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1))))) 19181 if dist == uint32(0) { 19182 { 19183 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2 /* &.dl */))) 19184 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19185 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */))) 19186 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19187 { 19188 { 19189 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19190 } 19191 { 19192 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19193 } 19194 19195 } 19196 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19197 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19198 } else { 19199 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19200 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19201 } 19202 } 19203 // send a literal byte 19204 19205 } else { 19206 // Here, lc is the match length - MIN_MATCH 19207 code = uint32(X_length_code[lc]) 19208 { 19209 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 + 2 /* &.dl */))) 19210 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19211 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */))) 19212 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19213 { 19214 { 19215 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19216 } 19217 { 19218 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19219 } 19220 19221 } 19222 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19223 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19224 } else { 19225 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19226 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19227 } 19228 } 19229 // send the length code 19230 extra = extra_lbits[code] 19231 if extra != 0 { 19232 lc = lc - (base_length[code]) 19233 { 19234 var len int32 = extra 19235 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19236 var val int32 = lc 19237 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19238 { 19239 { 19240 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19241 } 19242 { 19243 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19244 } 19245 19246 } 19247 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19248 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19249 } else { 19250 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lc))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19251 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19252 } 19253 } 19254 // send the extra length bits 19255 } 19256 dist-- // dist is now the match distance - 1 19257 code = func() uint32 { 19258 if (dist) < uint32(256) { 19259 return uint32(X_dist_code[dist]) 19260 } 19261 return uint32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 19262 }() 19263 19264 { 19265 var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2 /* &.dl */))) 19266 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19267 var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */))) 19268 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19269 { 19270 { 19271 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19272 } 19273 { 19274 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19275 } 19276 19277 } 19278 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19279 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19280 } else { 19281 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19282 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19283 } 19284 } 19285 // send the distance code 19286 extra = extra_dbits[code] 19287 if extra != 0 { 19288 dist = dist - (uint32(base_dist[code])) 19289 { 19290 var len int32 = extra 19291 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19292 var val int32 = int32(dist) 19293 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19294 { 19295 { 19296 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19297 } 19298 { 19299 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19300 } 19301 19302 } 19303 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19304 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19305 } else { 19306 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dist))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19307 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19308 } 19309 } 19310 // send the extra distance bits 19311 } 19312 } // literal or match pair ? 19313 19314 // Check that the overlay between pending_buf and d_buf+l_buf is ok: 19315 19316 } 19317 } 19318 19319 { 19320 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2 /* &.dl */))) 19321 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 19322 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */))) 19323 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19324 { 19325 { 19326 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19327 } 19328 { 19329 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19330 } 19331 19332 } 19333 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 19334 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 19335 } else { 19336 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 19337 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 19338 } 19339 } 19340 19341 } 19342 19343 // =========================================================================== 19344 // Check if the data type is TEXT or BINARY, using the following algorithm: 19345 // - TEXT if the two conditions below are satisfied: 19346 // a) There are no non-portable control characters belonging to the 19347 // "black list" (0..6, 14..25, 28..31). 19348 // b) There is at least one printable character belonging to the 19349 // "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). 19350 // - BINARY otherwise. 19351 // - The following partially-portable control characters form a 19352 // "gray list" that is ignored in this detection algorithm: 19353 // (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). 19354 // IN assertion: the fields Freq of dyn_ltree are set. 19355 func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */ 19356 // black_mask is the bit mask of black-listed bytes 19357 // set bits 0..6, 14..25, and 28..31 19358 // 0xf3ffc07f = binary 11110011111111111100000001111111 19359 var black_mask uint64 = 0xf3ffc07f 19360 var n int32 19361 19362 // Check for non-textual ("black-listed") bytes. 19363 n = 0 19364 __1: 19365 if !(n <= 31) { 19366 goto __3 19367 } 19368 if ((black_mask & uint64(1)) != 0) && (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0) { 19369 return Z_BINARY 19370 } 19371 goto __2 19372 __2: 19373 n++ 19374 black_mask >>= 1 19375 goto __1 19376 goto __3 19377 __3: 19378 ; 19379 19380 // Check for textual ("white-listed") bytes. 19381 if ((int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 9*4 /* &.fc */))) != 0) || (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 10*4 /* &.fc */))) != 0)) || 19382 (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 13*4 /* &.fc */))) != 0) { 19383 return Z_TEXT 19384 } 19385 for n = 32; n < LITERALS; n++ { 19386 if int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0 { 19387 return Z_TEXT 19388 } 19389 } 19390 19391 // There are no "black-listed" or "white-listed" bytes: 19392 // this stream either is empty or has tolerated ("gray-listed") bytes only. 19393 return Z_BINARY 19394 } 19395 19396 // =========================================================================== 19397 // Reverse the first len bits of a code, using straightforward code (a faster 19398 // method would use a table) 19399 // IN assertion: 1 <= len <= 15 19400 func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */ 19401 var res uint32 = uint32(0) 19402 for ok := true; ok; ok = (libc.PreDecInt32(&len, 1) > 0) { 19403 res = res | (code & uint32(1)) 19404 code >>= 1 19405 res <<= 1 19406 } 19407 return (res >> 1) 19408 } 19409 19410 // =========================================================================== 19411 // Flush the bit buffer, keeping at most 7 bits in it. 19412 func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */ 19413 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 { 19414 { 19415 { 19416 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19417 } 19418 { 19419 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19420 } 19421 19422 } 19423 19424 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 19425 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 19426 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 { 19427 { 19428 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 19429 } 19430 19431 libc.AssignShrPtrUint16(s+5936 /* &.bi_buf */, int(8)) 19432 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) -= (8) 19433 } 19434 } 19435 19436 // =========================================================================== 19437 // Flush the bit buffer and align the output on a byte boundary 19438 func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */ 19439 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 { 19440 { 19441 { 19442 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff)) 19443 } 19444 { 19445 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8)) 19446 } 19447 19448 } 19449 19450 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { 19451 { 19452 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) 19453 } 19454 19455 } 19456 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 19457 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 19458 } 19459 19460 // =========================================================================== 19461 // Decompresses the source buffer into the destination buffer. *sourceLen is 19462 // the byte length of the source buffer. Upon entry, *destLen is the total size 19463 // of the destination buffer, which must be large enough to hold the entire 19464 // uncompressed data. (The size of the uncompressed data must have been saved 19465 // previously by the compressor and transmitted to the decompressor by some 19466 // mechanism outside the scope of this compression library.) Upon exit, 19467 // *destLen is the size of the decompressed data and *sourceLen is the number 19468 // of source bytes consumed. Upon return, source + *sourceLen points to the 19469 // first unused input byte. 19470 // 19471 // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough 19472 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or 19473 // Z_DATA_ERROR if the input data was corrupted, including if the input data is 19474 // an incomplete zlib stream. 19475 func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */ 19476 bp := tls.Alloc(120) 19477 defer tls.Free(120) 19478 19479 // var stream Z_stream at bp+8, 112 19480 19481 var err int32 19482 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 19483 var len ULong 19484 var left ULong 19485 // var buf [1]Byte at bp, 1 19486 // for detection of incomplete stream when *destLen == 0 19487 19488 len = *(*ULong)(unsafe.Pointer(sourceLen)) 19489 if *(*ULongf)(unsafe.Pointer(destLen)) != 0 { 19490 left = *(*ULongf)(unsafe.Pointer(destLen)) 19491 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 19492 } else { 19493 left = uint64(1) 19494 dest = bp /* &buf[0] */ 19495 } 19496 19497 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source 19498 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0) 19499 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0) 19500 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0) 19501 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0) 19502 19503 err = XinflateInit_(tls, bp+8 /* &stream */, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 19504 if err != Z_OK { 19505 return err 19506 } 19507 19508 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest 19509 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0) 19510 19511 for ok := true; ok; ok = (err == Z_OK) { 19512 if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out == UInt(0) { 19513 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 { 19514 if left > ULong(max) { 19515 return max 19516 } 19517 return UInt(left) 19518 }() 19519 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out)) 19520 } 19521 if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in == UInt(0) { 19522 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 { 19523 if len > ULong(max) { 19524 return max 19525 } 19526 return UInt(len) 19527 }() 19528 len = len - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in)) 19529 } 19530 err = Xinflate(tls, bp+8 /* &stream */, Z_NO_FLUSH) 19531 } 19532 19533 *(*ULong)(unsafe.Pointer(sourceLen)) -= (len + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in)) 19534 if dest != bp /* buf */ { 19535 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out 19536 } else if ((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Ftotal_out != 0) && (err == (-5)) { 19537 left = uint64(1) 19538 } 19539 19540 XinflateEnd(tls, bp+8 /* &stream */) 19541 if err == Z_STREAM_END { 19542 return Z_OK 19543 } 19544 if err == Z_NEED_DICT { 19545 return -3 19546 } 19547 if (err == (-5)) && ((left + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out)) != 0) { 19548 return -3 19549 } 19550 return err 19551 } 19552 19553 func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */ 19554 bp := tls.Alloc(8) 19555 defer tls.Free(8) 19556 *(*ULong)(unsafe.Pointer(bp)) = sourceLen 19557 19558 return Xuncompress2(tls, dest, destLen, source, bp /* &sourceLen */) 19559 } 19560 19561 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 19562 // value -- needed when comparing unsigned to z_off64_t, which is signed 19563 // (possible z_off64_t types off_t, off64_t, and long are all signed) 19564 19565 var Xz_errmsg = [10]uintptr{ 19566 uintptr(ts + 876 /* "need dictionary" */), // Z_NEED_DICT 2 19567 uintptr(ts + 892 /* "stream end" */), // Z_STREAM_END 1 19568 uintptr(ts + 101 /* "" */), // Z_OK 0 19569 uintptr(ts + 903 /* "file error" */), // Z_ERRNO (-1) 19570 uintptr(ts + 914 /* "stream error" */), // Z_STREAM_ERROR (-2) 19571 uintptr(ts + 927 /* "data error" */), // Z_DATA_ERROR (-3) 19572 uintptr(ts + 938 /* "insufficient mem..." */), // Z_MEM_ERROR (-4) 19573 uintptr(ts + 958 /* "buffer error" */), // Z_BUF_ERROR (-5) 19574 uintptr(ts + 971 /* "incompatible ver..." */), // Z_VERSION_ERROR (-6) 19575 uintptr(ts + 101 /* "" */), 19576 } /* zutil.c:13:14 */ 19577 19578 func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */ 19579 return ts /* "1.2.11" */ 19580 } 19581 19582 func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */ 19583 var flags ULong 19584 19585 flags = uint64(0) 19586 switch int32(unsafe.Sizeof(UInt(0))) { 19587 case 2: 19588 break 19589 case 4: 19590 flags = flags + (uint64(1)) 19591 break 19592 case 8: 19593 flags = flags + (uint64(2)) 19594 break 19595 default: 19596 flags = flags + (uint64(3)) 19597 } 19598 switch int32(unsafe.Sizeof(ULong(0))) { 19599 case 2: 19600 break 19601 case 4: 19602 flags = flags + (uint64(int32(1) << 2)) 19603 break 19604 case 8: 19605 flags = flags + (uint64(int32(2) << 2)) 19606 break 19607 default: 19608 flags = flags + (uint64(int32(3) << 2)) 19609 } 19610 switch int32(unsafe.Sizeof(Voidpf(0))) { 19611 case 2: 19612 break 19613 case 4: 19614 flags = flags + (uint64(int32(1) << 4)) 19615 break 19616 case 8: 19617 flags = flags + (uint64(int32(2) << 4)) 19618 break 19619 default: 19620 flags = flags + (uint64(int32(3) << 4)) 19621 } 19622 switch int32(unsafe.Sizeof(Off_t(0))) { 19623 case 2: 19624 break 19625 case 4: 19626 flags = flags + (uint64(int32(1) << 6)) 19627 break 19628 case 8: 19629 flags = flags + (uint64(int32(2) << 6)) 19630 break 19631 default: 19632 flags = flags + (uint64(int32(3) << 6)) 19633 } 19634 return flags 19635 } 19636 19637 // exported to allow conversion of error code to string for compress() and 19638 // uncompress() 19639 func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */ 19640 return Xz_errmsg[(Z_NEED_DICT - (err))] 19641 } 19642 19643 func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */ 19644 _ = opaque 19645 if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) { 19646 return libc.Xmalloc(tls, (uint64(items * size))) 19647 } 19648 return libc.Xcalloc(tls, uint64(items), uint64(size)) 19649 } 19650 19651 func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */ 19652 _ = opaque 19653 libc.Xfree(tls, ptr) 19654 } 19655 19656 func init() { 19657 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8 /* .func */)) = deflate_stored // deflate.c:136:29: 19658 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24 /* .func */)) = deflate_fast // deflate.c:137:29: 19659 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40 /* .func */)) = deflate_fast // deflate.c:138:29: 19660 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56 /* .func */)) = deflate_fast // deflate.c:139:29: 19661 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72 /* .func */)) = deflate_slow // deflate.c:141:29: 19662 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88 /* .func */)) = deflate_slow // deflate.c:142:29: 19663 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104 /* .func */)) = deflate_slow // deflate.c:143:29: 19664 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120 /* .func */)) = deflate_slow // deflate.c:144:29: 19665 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136 /* .func */)) = deflate_slow // deflate.c:145:30: 19666 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152 /* .func */)) = deflate_slow // deflate.c:146:30: 19667 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22: 19668 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2: 19669 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits)) // trees.c:129:16: 19670 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2: 19671 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits)) // trees.c:126:16: 19672 } 19673 19674 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" 19675 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data