modernc.org/z@v1.7.4/lib/z_netbsd_amd64.go (about) 1 // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/z_netbsd_amd64.go -pkgname z -trace-translation-units /tmp/go-generate-2662545308/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 ARG_MAX = 262144 23 BASE = 65521 24 BC_BASE_MAX = 2147483647 25 BC_DIM_MAX = 65535 26 BC_SCALE_MAX = 2147483647 27 BC_STRING_MAX = 2147483647 28 BIG_ENDIAN = 4321 29 BYTE_ORDER = 1234 30 CHARCLASS_NAME_MAX = 14 31 CHAR_BIT = 8 32 CHAR_MAX = 127 33 CHAR_MIN = -128 34 CHILD_MAX = 160 35 COLL_WEIGHTS_MAX = 2 36 DBL_DIG = 15 37 DEF_MEM_LEVEL = 8 38 DEF_WBITS = 15 39 DYN_TREES = 2 40 EXIT_FAILURE = 1 41 EXIT_SUCCESS = 0 42 EXPR_NEST_MAX = 32 43 FAR = 0 44 FDATASYNC = 0x0010 45 FDISKSYNC = 0x0040 46 FD_SETSIZE = 256 47 FFILESYNC = 0x0020 48 FLT_DIG = 6 49 FLT_MAX = 0 50 FLT_MIN = 0 51 F_LOCK = 1 52 F_OK = 0 53 F_TEST = 3 54 F_TLOCK = 2 55 F_ULOCK = 0 56 GETPASS_7BIT = 0x080 57 GETPASS_BUF_LIMIT = 0x004 58 GETPASS_ECHO = 0x020 59 GETPASS_ECHO_NL = 0x400 60 GETPASS_ECHO_STAR = 0x040 61 GETPASS_FAIL_EOF = 0x002 62 GETPASS_FORCE_LOWER = 0x100 63 GETPASS_FORCE_UPPER = 0x200 64 GETPASS_NEED_TTY = 0x001 65 GETPASS_NO_BEEP = 0x010 66 GETPASS_NO_SIGNAL = 0x008 67 GID_MAX = 2147483647 68 HAVE_HIDDEN = 1 69 HAVE_MEMCPY = 0 70 HN_AUTOSCALE = 0x20 71 HN_B = 0x04 72 HN_DECIMAL = 0x01 73 HN_DIVISOR_1000 = 0x08 74 HN_GETSCALE = 0x10 75 HN_NOSPACE = 0x02 76 INT16_MAX = 32767 77 INT16_MIN = -32768 78 INT32_MAX = 2147483647 79 INT32_MIN = -2147483648 80 INT64_MAX = 9223372036854775807 81 INT64_MIN = -9223372036854775808 82 INT8_MAX = 127 83 INT8_MIN = -128 84 INTMAX_MAX = 9223372036854775807 85 INTMAX_MIN = -9223372036854775808 86 INTPTR_MAX = 9223372036854775807 87 INTPTR_MIN = -9223372036854775808 88 INT_FAST16_MAX = 2147483647 89 INT_FAST16_MIN = -2147483648 90 INT_FAST32_MAX = 2147483647 91 INT_FAST32_MIN = -2147483648 92 INT_FAST64_MAX = 9223372036854775807 93 INT_FAST64_MIN = -9223372036854775808 94 INT_FAST8_MAX = 2147483647 95 INT_FAST8_MIN = -2147483648 96 INT_LEAST16_MAX = 32767 97 INT_LEAST16_MIN = -32768 98 INT_LEAST32_MAX = 2147483647 99 INT_LEAST32_MIN = -2147483648 100 INT_LEAST64_MAX = 9223372036854775807 101 INT_LEAST64_MIN = -9223372036854775808 102 INT_LEAST8_MAX = 127 103 INT_LEAST8_MIN = -128 104 INT_MAX = 0x7fffffff 105 INT_MIN = -2147483648 106 IOV_MAX = 1024 107 LINE_MAX = 2048 108 LINK_MAX = 32767 109 LITTLE_ENDIAN = 1234 110 LLONG_MAX = 0x7fffffffffffffff 111 LLONG_MIN = -9223372036854775808 112 LOGIN_NAME_MAX = 17 113 LONG_BIT = 64 114 LONG_MAX = 0x7fffffffffffffff 115 LONG_MIN = -9223372036854775808 116 L_INCR = 1 117 L_SET = 0 118 L_XTND = 2 119 MAX_CANON = 255 120 MAX_INPUT = 255 121 MAX_MATCH = 258 122 MAX_MEM_LEVEL = 9 123 MAX_WBITS = 15 124 MB_LEN_MAX = 32 125 MIN_MATCH = 3 126 NAME_MAX = 511 127 NBBY = 8 128 NFDBITS = 32 129 NGROUPS_MAX = 16 130 NL_ARGMAX = 9 131 NL_LANGMAX = 14 132 NL_MSGMAX = 32767 133 NL_NMAX = 1 134 NL_SETMAX = 255 135 NL_TEXTMAX = 2048 136 NMAX = 5552 137 NODEVMAJOR = -1 138 NZERO = 20 139 OPEN_MAX = 128 140 OS_CODE = 3 141 PASS_MAX = 128 142 PATH_MAX = 1024 143 PDP_ENDIAN = 3412 144 PIPE_BUF = 512 145 PRESET_DICT = 0x20 146 PTHREAD_DESTRUCTOR_ITERATIONS = 4 147 PTHREAD_KEYS_MAX = 256 148 PTHREAD_THREADS_MAX = 64 149 PTRDIFF_MAX = 9223372036854775807 150 PTRDIFF_MIN = -9223372036854775808 151 QUAD_MAX = 0x7fffffffffffffff 152 QUAD_MIN = -9223372036854775808 153 RANDOM_MAX = 0x7fffffff 154 RAND_MAX = 0x7fffffff 155 RE_DUP_MAX = 255 156 R_OK = 0x04 157 SCHAR_MAX = 0x7f 158 SCHAR_MIN = -128 159 SEEK_CUR = 1 160 SEEK_END = 2 161 SEEK_SET = 0 162 SHRT_MAX = 0x7fff 163 SHRT_MIN = -32768 164 SIG_ATOMIC_MAX = 2147483647 165 SIG_ATOMIC_MIN = -2147483648 166 SIZE_MAX = 18446744073709551615 167 SIZE_T_MAX = 18446744073709551615 168 SSIZE_MAX = 9223372036854775807 169 SSIZE_MIN = -9223372036854775808 170 STATIC_TREES = 1 171 STDC = 0 172 STDC99 = 0 173 STDERR_FILENO = 2 174 STDIN_FILENO = 0 175 STDOUT_FILENO = 1 176 STORED_BLOCK = 0 177 TMP_MAX = 308915776 178 UCHAR_MAX = 0xff 179 UID_MAX = 2147483647 180 UINT16_MAX = 65535 181 UINT32_MAX = 4294967295 182 UINT64_MAX = 18446744073709551615 183 UINT8_MAX = 255 184 UINTMAX_MAX = 18446744073709551615 185 UINTPTR_MAX = 18446744073709551615 186 UINT_FAST16_MAX = 4294967295 187 UINT_FAST32_MAX = 4294967295 188 UINT_FAST64_MAX = 18446744073709551615 189 UINT_FAST8_MAX = 4294967295 190 UINT_LEAST16_MAX = 65535 191 UINT_LEAST32_MAX = 4294967295 192 UINT_LEAST64_MAX = 18446744073709551615 193 UINT_LEAST8_MAX = 255 194 UINT_MAX = 0xffffffff 195 ULLONG_MAX = 0xffffffffffffffff 196 ULONG_MAX = 0xffffffffffffffff 197 UQUAD_MAX = 0xffffffffffffffff 198 USHRT_MAX = 0xffff 199 WCHAR_MAX = 0x7fffffff 200 WCHAR_MIN = -2147483648 201 WINT_MAX = 0x7fffffff 202 WINT_MIN = -2147483648 203 WORD_BIT = 32 204 W_OK = 0x02 205 X_OK = 0x01 206 ZCONF_H = 0 207 ZEXPORT = 0 208 ZEXPORTVA = 0 209 ZLIB_H = 0 210 ZLIB_VERNUM = 0x12b0 211 ZLIB_VERSION = "1.2.11" 212 ZLIB_VER_MAJOR = 1 213 ZLIB_VER_MINOR = 2 214 ZLIB_VER_REVISION = 11 215 ZLIB_VER_SUBREVISION = 0 216 ZUTIL_H = 0 217 Z_ASCII = 1 218 Z_BEST_COMPRESSION = 9 219 Z_BEST_SPEED = 1 220 Z_BINARY = 0 221 Z_BLOCK = 5 222 Z_BUF_ERROR = -5 223 Z_DATA_ERROR = -3 224 Z_DEFAULT_COMPRESSION = -1 225 Z_DEFAULT_STRATEGY = 0 226 Z_DEFLATED = 8 227 Z_ERRNO = -1 228 Z_FILTERED = 1 229 Z_FINISH = 4 230 Z_FIXED = 4 231 Z_FULL_FLUSH = 3 232 Z_HAVE_STDARG_H = 0 233 Z_HAVE_UNISTD_H = 0 234 Z_HUFFMAN_ONLY = 2 235 Z_MEM_ERROR = -4 236 Z_NEED_DICT = 2 237 Z_NO_COMPRESSION = 0 238 Z_NO_FLUSH = 0 239 Z_NULL = 0 240 Z_OK = 0 241 Z_PARTIAL_FLUSH = 1 242 Z_RLE = 3 243 Z_STREAM_END = 1 244 Z_STREAM_ERROR = -2 245 Z_SYNC_FLUSH = 2 246 Z_TEXT = 1 247 Z_TREES = 6 248 Z_UNKNOWN = 2 249 Z_VERSION_ERROR = -6 250 X_AMD64_BYTE_SWAP_H_ = 0 251 X_AMD64_INT_CONST_H_ = 0 252 X_AMD64_INT_LIMITS_H_ = 0 253 X_AMD64_INT_MWGWTYPES_H_ = 0 254 X_AMD64_INT_TYPES_H_ = 0 255 X_AMD64_WCHAR_LIMITS_H_ = 0 256 X_BIG_ENDIAN = 4321 257 X_BSD_INT16_T_ = 0 258 X_BSD_INT32_T_ = 0 259 X_BSD_INT64_T_ = 0 260 X_BSD_INT8_T_ = 0 261 X_BSD_INTPTR_T_ = 0 262 X_BSD_UINT16_T_ = 0 263 X_BSD_UINT32_T_ = 0 264 X_BSD_UINT64_T_ = 0 265 X_BSD_UINT8_T_ = 0 266 X_BSD_UINTPTR_T_ = 0 267 X_BYTE_ORDER = 1234 268 X_CS_PATH = 1 269 X_FILE_OFFSET_BITS = 64 270 X_GETGR_R_SIZE_MAX = 1024 271 X_GETPW_R_SIZE_MAX = 1024 272 X_LIB_PTHREAD_TYPES_H = 0 273 X_LIMITS_H_ = 0 274 X_LITTLE_ENDIAN = 1234 275 X_LP64 = 1 276 X_NETBSD_SOURCE = 1 277 X_O_SC_CLK_TCK = 3 278 X_PC_2_SYMLINKS = 13 279 X_PC_ACL_EXTENDED = 14 280 X_PC_CHOWN_RESTRICTED = 7 281 X_PC_FILESIZEBITS = 11 282 X_PC_LINK_MAX = 1 283 X_PC_MAX_CANON = 2 284 X_PC_MAX_INPUT = 3 285 X_PC_MIN_HOLE_SIZE = 15 286 X_PC_NAME_MAX = 4 287 X_PC_NO_TRUNC = 8 288 X_PC_PATH_MAX = 5 289 X_PC_PIPE_BUF = 6 290 X_PC_SYMLINK_MAX = 12 291 X_PC_SYNC_IO = 10 292 X_PC_VDISABLE = 9 293 X_PDP_ENDIAN = 3412 294 X_POSIX2_BC_BASE_MAX = 99 295 X_POSIX2_BC_DIM_MAX = 2048 296 X_POSIX2_BC_SCALE_MAX = 99 297 X_POSIX2_BC_STRING_MAX = 1000 298 X_POSIX2_CHARCLASS_NAME_MAX = 14 299 X_POSIX2_COLL_WEIGHTS_MAX = 2 300 X_POSIX2_C_BIND = 200112 301 X_POSIX2_EXPR_NEST_MAX = 32 302 X_POSIX2_LINE_MAX = 2048 303 X_POSIX2_RE_DUP_MAX = 255 304 X_POSIX2_VERSION = 200112 305 X_POSIX_AIO_LISTIO_MAX = 2 306 X_POSIX_AIO_MAX = 1 307 X_POSIX_ARG_MAX = 4096 308 X_POSIX_ASYNCHRONOUS_IO = 200112 309 X_POSIX_BARRIERS = 200112 310 X_POSIX_CHILD_MAX = 25 311 X_POSIX_CHOWN_RESTRICTED = 1 312 X_POSIX_CLOCK_SELECTION = -1 313 X_POSIX_CPUTIME = 200112 314 X_POSIX_DELAYTIMER_MAX = 32 315 X_POSIX_FSYNC = 1 316 X_POSIX_HOST_NAME_MAX = 255 317 X_POSIX_IPV6 = 0 318 X_POSIX_JOB_CONTROL = 1 319 X_POSIX_LINK_MAX = 8 320 X_POSIX_LOGIN_NAME_MAX = 9 321 X_POSIX_MAPPED_FILES = 1 322 X_POSIX_MAX_CANON = 255 323 X_POSIX_MAX_INPUT = 255 324 X_POSIX_MEMLOCK = 1 325 X_POSIX_MEMLOCK_RANGE = 1 326 X_POSIX_MEMORY_PROTECTION = 1 327 X_POSIX_MESSAGE_PASSING = 200112 328 X_POSIX_MONOTONIC_CLOCK = 200112 329 X_POSIX_MQ_OPEN_MAX = 8 330 X_POSIX_MQ_PRIO_MAX = 32 331 X_POSIX_NAME_MAX = 14 332 X_POSIX_NGROUPS_MAX = 8 333 X_POSIX_NO_TRUNC = 1 334 X_POSIX_OPEN_MAX = 20 335 X_POSIX_PATH_MAX = 256 336 X_POSIX_PIPE_BUF = 512 337 X_POSIX_PRIORITIZED_IO = -1 338 X_POSIX_PRIORITY_SCHEDULING = 200112 339 X_POSIX_RAW_SOCKETS = 200112 340 X_POSIX_READER_WRITER_LOCKS = 200112 341 X_POSIX_REGEXP = 1 342 X_POSIX_RE_DUP_MAX = 255 343 X_POSIX_SEMAPHORES = 0 344 X_POSIX_SEM_NSEMS_MAX = 256 345 X_POSIX_SHARED_MEMORY_OBJECTS = 0 346 X_POSIX_SHELL = 1 347 X_POSIX_SIGQUEUE_MAX = 32 348 X_POSIX_SPAWN = 200809 349 X_POSIX_SPIN_LOCKS = 200112 350 X_POSIX_SSIZE_MAX = 32767 351 X_POSIX_STREAM_MAX = 8 352 X_POSIX_SYMLINK_MAX = 255 353 X_POSIX_SYMLOOP_MAX = 8 354 X_POSIX_SYNCHRONIZED_IO = 1 355 X_POSIX_THREADS = 200112 356 X_POSIX_THREAD_ATTR_STACKADDR = 200112 357 X_POSIX_THREAD_ATTR_STACKSIZE = 200112 358 X_POSIX_THREAD_CPUTIME = 200112 359 X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 360 X_POSIX_THREAD_KEYS_MAX = 128 361 X_POSIX_THREAD_PRIO_PROTECT = 200112 362 X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 363 X_POSIX_THREAD_THREADS_MAX = 64 364 X_POSIX_TIMERS = 200112 365 X_POSIX_TIMER_MAX = 32 366 X_POSIX_TTY_NAME_MAX = 9 367 X_POSIX_TZNAME_MAX = 6 368 X_POSIX_VERSION = 200112 369 X_PT_BARRIERATTR_DEAD = 0xDEAD0808 370 X_PT_BARRIERATTR_MAGIC = 0x88880808 371 X_PT_BARRIER_DEAD = 0xDEAD0008 372 X_PT_BARRIER_MAGIC = 0x88880008 373 X_PT_CONDATTR_DEAD = 0xDEAD0006 374 X_PT_CONDATTR_MAGIC = 0x66660006 375 X_PT_COND_DEAD = 0xDEAD0005 376 X_PT_COND_MAGIC = 0x55550005 377 X_PT_MUTEXATTR_DEAD = 0xDEAD0004 378 X_PT_MUTEXATTR_MAGIC = 0x44440004 379 X_PT_MUTEX_DEAD = 0xDEAD0003 380 X_PT_MUTEX_MAGIC = 0x33330003 381 X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 382 X_PT_RWLOCKATTR_MAGIC = 0x99990909 383 X_PT_RWLOCK_DEAD = 0xDEAD0009 384 X_PT_RWLOCK_MAGIC = 0x99990009 385 X_PT_SPINLOCK_DEAD = 0xDEAD0007 386 X_PT_SPINLOCK_MAGIC = 0x77770007 387 X_PT_SPINLOCK_PSHARED = 0x00000001 388 X_QUAD_HIGHWORD = 1 389 X_QUAD_LOWWORD = 0 390 X_SC_2_CHAR_TERM = 20 391 X_SC_2_C_BIND = 18 392 X_SC_2_C_DEV = 19 393 X_SC_2_FORT_DEV = 21 394 X_SC_2_FORT_RUN = 22 395 X_SC_2_LOCALEDEF = 23 396 X_SC_2_PBS = 80 397 X_SC_2_PBS_ACCOUNTING = 81 398 X_SC_2_PBS_CHECKPOINT = 82 399 X_SC_2_PBS_LOCATE = 83 400 X_SC_2_PBS_MESSAGE = 84 401 X_SC_2_PBS_TRACK = 85 402 X_SC_2_SW_DEV = 24 403 X_SC_2_UPE = 25 404 X_SC_2_VERSION = 17 405 X_SC_AIO_LISTIO_MAX = 51 406 X_SC_AIO_MAX = 52 407 X_SC_ARG_MAX = 1 408 X_SC_ASYNCHRONOUS_IO = 50 409 X_SC_ATEXIT_MAX = 40 410 X_SC_BARRIERS = 43 411 X_SC_BC_BASE_MAX = 9 412 X_SC_BC_DIM_MAX = 10 413 X_SC_BC_SCALE_MAX = 11 414 X_SC_BC_STRING_MAX = 12 415 X_SC_CHILD_MAX = 2 416 X_SC_CLK_TCK = 39 417 X_SC_CLOCK_SELECTION = 49 418 X_SC_COLL_WEIGHTS_MAX = 13 419 X_SC_CPUTIME = 90 420 X_SC_DELAYTIMER_MAX = 92 421 X_SC_EXPR_NEST_MAX = 14 422 X_SC_FSYNC = 29 423 X_SC_GETGR_R_SIZE_MAX = 47 424 X_SC_GETPW_R_SIZE_MAX = 48 425 X_SC_HOST_NAME_MAX = 69 426 X_SC_IOV_MAX = 32 427 X_SC_JOB_CONTROL = 6 428 X_SC_LINE_MAX = 15 429 X_SC_LOGIN_NAME_MAX = 37 430 X_SC_MAPPED_FILES = 33 431 X_SC_MEMLOCK = 34 432 X_SC_MEMLOCK_RANGE = 35 433 X_SC_MEMORY_PROTECTION = 36 434 X_SC_MESSAGE_PASSING = 53 435 X_SC_MONOTONIC_CLOCK = 38 436 X_SC_MQ_OPEN_MAX = 54 437 X_SC_MQ_PRIO_MAX = 55 438 X_SC_NGROUPS_MAX = 4 439 X_SC_NPROCESSORS_CONF = 1001 440 X_SC_NPROCESSORS_ONLN = 1002 441 X_SC_OPEN_MAX = 5 442 X_SC_PAGESIZE = 28 443 X_SC_PAGE_SIZE = 28 444 X_SC_PASS_MAX = 70 445 X_SC_PHYS_PAGES = 121 446 X_SC_PRIORITY_SCHEDULING = 56 447 X_SC_READER_WRITER_LOCKS = 46 448 X_SC_REALTIME_SIGNALS = 94 449 X_SC_REGEXP = 71 450 X_SC_RE_DUP_MAX = 16 451 X_SC_SAVED_IDS = 7 452 X_SC_SCHED_PRI_MAX = 2003 453 X_SC_SCHED_PRI_MIN = 2002 454 X_SC_SCHED_RT_TS = 2001 455 X_SC_SEMAPHORES = 42 456 X_SC_SEM_NSEMS_MAX = 89 457 X_SC_SHARED_MEMORY_OBJECTS = 87 458 X_SC_SHELL = 72 459 X_SC_SIGQUEUE_MAX = 93 460 X_SC_SPAWN = 86 461 X_SC_SPIN_LOCKS = 45 462 X_SC_STREAM_MAX = 26 463 X_SC_SYMLOOP_MAX = 73 464 X_SC_SYNCHRONIZED_IO = 31 465 X_SC_THREADS = 41 466 X_SC_THREAD_ATTR_STACKADDR = 61 467 X_SC_THREAD_ATTR_STACKSIZE = 62 468 X_SC_THREAD_CPUTIME = 91 469 X_SC_THREAD_DESTRUCTOR_ITERATIONS = 57 470 X_SC_THREAD_KEYS_MAX = 58 471 X_SC_THREAD_PRIORITY_SCHEDULING = 63 472 X_SC_THREAD_PRIO_INHERIT = 64 473 X_SC_THREAD_PRIO_PROTECT = 65 474 X_SC_THREAD_PROCESS_SHARED = 66 475 X_SC_THREAD_SAFE_FUNCTIONS = 67 476 X_SC_THREAD_STACK_MIN = 59 477 X_SC_THREAD_THREADS_MAX = 60 478 X_SC_TIMERS = 44 479 X_SC_TIMER_MAX = 88 480 X_SC_TTY_NAME_MAX = 68 481 X_SC_TZNAME_MAX = 27 482 X_SC_V6_ILP32_OFF32 = 74 483 X_SC_V6_ILP32_OFFBIG = 75 484 X_SC_V6_LP64_OFF64 = 76 485 X_SC_V6_LPBIG_OFFBIG = 77 486 X_SC_VERSION = 8 487 X_SC_XOPEN_SHM = 30 488 X_STDDEF_H_ = 0 489 X_STDLIB_H_ = 0 490 X_STRINGS_H_ = 0 491 X_STRING_H_ = 0 492 X_SYS_ANSI_H_ = 0 493 X_SYS_BSWAP_H_ = 0 494 X_SYS_CDEFS_ELF_H_ = 0 495 X_SYS_CDEFS_H_ = 0 496 X_SYS_COMMON_ANSI_H_ = 0 497 X_SYS_COMMON_INT_LIMITS_H_ = 0 498 X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 499 X_SYS_COMMON_INT_TYPES_H_ = 0 500 X_SYS_ENDIAN_H_ = 0 501 X_SYS_FD_SET_H_ = 0 502 X_SYS_NULL_H_ = 0 503 X_SYS_STDARG_H_ = 0 504 X_SYS_STDINT_H_ = 0 505 X_SYS_SYSLIMITS_H_ = 0 506 X_SYS_TYPES_H_ = 0 507 X_SYS_UNISTD_H_ = 0 508 X_UNISTD_H_ = 0 509 X_X86_64_BSWAP_H_ = 0 510 X_X86_64_CDEFS_H_ = 0 511 X_X86_64_LIMITS_H_ = 0 512 X_X86_64_TYPES_H_ = 0 513 X_XOPEN_IOV_MAX = 16 514 X_XOPEN_NAME_MAX = 256 515 X_XOPEN_PATH_MAX = 1024 516 X_XOPEN_SHM = 0 517 Z_const = 0 518 BYFOUR = 0 519 GF2_DIM = 32 520 TBLS = 8 521 BL_CODES = 19 522 BUSY_STATE = 113 523 Buf_size = 16 524 COMMENT_STATE = 91 525 DEFLATE_H = 0 526 D_CODES = 30 527 EXTRA_STATE = 69 528 FINISH_STATE = 666 529 GZIP = 0 530 GZIP_STATE = 57 531 HCRC_STATE = 103 532 HEAP_SIZE = 573 533 INIT_STATE = 42 534 LENGTH_CODES = 29 535 LITERALS = 256 536 L_CODES = 286 537 MAX_BITS = 15 538 MAX_STORED = 65535 539 MIN_LOOKAHEAD = 262 540 NAME_STATE = 73 541 NIL = 0 542 TOO_FAR = 4096 543 WIN_INIT = 258 544 AT_EACCESS = 0x100 545 AT_FDCWD = -100 546 AT_REMOVEDIR = 0x800 547 AT_SYMLINK_FOLLOW = 0x400 548 AT_SYMLINK_NOFOLLOW = 0x200 549 BUFSIZ = 1024 550 COPY1 = 1 551 E2BIG = 7 552 EACCES = 13 553 EADDRINUSE = 48 554 EADDRNOTAVAIL = 49 555 EAFNOSUPPORT = 47 556 EAGAIN = 35 557 EALREADY = 37 558 EAUTH = 80 559 EBADF = 9 560 EBADMSG = 88 561 EBADRPC = 72 562 EBUSY = 16 563 ECANCELED = 87 564 ECHILD = 10 565 ECONNABORTED = 53 566 ECONNREFUSED = 61 567 ECONNRESET = 54 568 EDEADLK = 11 569 EDESTADDRREQ = 39 570 EDOM = 33 571 EDQUOT = 69 572 EEXIST = 17 573 EFAULT = 14 574 EFBIG = 27 575 EFTYPE = 79 576 EHOSTDOWN = 64 577 EHOSTUNREACH = 65 578 EIDRM = 82 579 EILSEQ = 85 580 EINPROGRESS = 36 581 EINTR = 4 582 EINVAL = 22 583 EIO = 5 584 EISCONN = 56 585 EISDIR = 21 586 ELAST = 96 587 ELOOP = 62 588 EMFILE = 24 589 EMLINK = 31 590 EMSGSIZE = 40 591 EMULTIHOP = 94 592 ENAMETOOLONG = 63 593 ENEEDAUTH = 81 594 ENETDOWN = 50 595 ENETRESET = 52 596 ENETUNREACH = 51 597 ENFILE = 23 598 ENOATTR = 93 599 ENOBUFS = 55 600 ENODATA = 89 601 ENODEV = 19 602 ENOENT = 2 603 ENOEXEC = 8 604 ENOLCK = 77 605 ENOLINK = 95 606 ENOMEM = 12 607 ENOMSG = 83 608 ENOPROTOOPT = 42 609 ENOSPC = 28 610 ENOSR = 90 611 ENOSTR = 91 612 ENOSYS = 78 613 ENOTBLK = 15 614 ENOTCONN = 57 615 ENOTDIR = 20 616 ENOTEMPTY = 66 617 ENOTSOCK = 38 618 ENOTSUP = 86 619 ENOTTY = 25 620 ENXIO = 6 621 EOF = -1 622 EOPNOTSUPP = 45 623 EOVERFLOW = 84 624 EPERM = 1 625 EPFNOSUPPORT = 46 626 EPIPE = 32 627 EPROCLIM = 67 628 EPROCUNAVAIL = 76 629 EPROGMISMATCH = 75 630 EPROGUNAVAIL = 74 631 EPROTO = 96 632 EPROTONOSUPPORT = 43 633 EPROTOTYPE = 41 634 ERANGE = 34 635 EREMOTE = 71 636 EROFS = 30 637 ERPCMISMATCH = 73 638 ESHUTDOWN = 58 639 ESOCKTNOSUPPORT = 44 640 ESPIPE = 29 641 ESRCH = 3 642 ESTALE = 70 643 ETIME = 92 644 ETIMEDOUT = 60 645 ETOOMANYREFS = 59 646 ETXTBSY = 26 647 EUSERS = 68 648 EWOULDBLOCK = 35 649 EXDEV = 18 650 FAPPEND = 8 651 FASYNC = 64 652 FD_CLOEXEC = 1 653 FILENAME_MAX = 1024 654 FNDELAY = 4 655 FOPEN_MAX = 20 656 FPARSELN_UNESCALL = 0x0f 657 FPARSELN_UNESCCOMM = 0x04 658 FPARSELN_UNESCCONT = 0x02 659 FPARSELN_UNESCESC = 0x01 660 FPARSELN_UNESCREST = 0x08 661 FREAD = 0x00000001 662 FWRITE = 0x00000002 663 F_CLOSEM = 10 664 F_DUPFD = 0 665 F_DUPFD_CLOEXEC = 12 666 F_GETFD = 1 667 F_GETFL = 3 668 F_GETLK = 7 669 F_GETNOSIGPIPE = 13 670 F_GETOWN = 5 671 F_MAXFD = 11 672 F_PARAM_MASK = 0xfff 673 F_PARAM_MAX = 4095 674 F_RDLCK = 1 675 F_SETFD = 2 676 F_SETFL = 4 677 F_SETLK = 8 678 F_SETLKW = 9 679 F_SETNOSIGPIPE = 14 680 F_SETOWN = 6 681 F_UNLCK = 2 682 F_WRLCK = 3 683 GZBUFSIZE = 8192 684 GZ_APPEND = 1 685 GZ_NONE = 0 686 GZ_READ = 7247 687 GZ_WRITE = 31153 688 HAVE_VSNPRINTF = 0 689 LOCK_EX = 0x02 690 LOCK_NB = 0x04 691 LOCK_SH = 0x01 692 LOCK_UN = 0x08 693 LOOK = 0 694 L_ctermid = 1024 695 L_cuserid = 9 696 L_tmpnam = 1024 697 O_ACCMODE = 0x00000003 698 O_ALT_IO = 0x00040000 699 O_APPEND = 0x00000008 700 O_ASYNC = 0x00000040 701 O_CLOEXEC = 0x00400000 702 O_CREAT = 0x00000200 703 O_DIRECT = 0x00080000 704 O_DIRECTORY = 0x00200000 705 O_DSYNC = 0x00010000 706 O_EXCL = 0x00000800 707 O_EXLOCK = 0x00000020 708 O_FSYNC = 128 709 O_NDELAY = 4 710 O_NOCTTY = 0x00008000 711 O_NOFOLLOW = 0x00000100 712 O_NONBLOCK = 0x00000004 713 O_NOSIGPIPE = 0x01000000 714 O_RDONLY = 0x00000000 715 O_RDWR = 0x00000002 716 O_REGULAR = 0x02000000 717 O_RSYNC = 0x00020000 718 O_SEARCH = 0x00800000 719 O_SHLOCK = 0x00000010 720 O_SYNC = 0x00000080 721 O_TRUNC = 0x00000400 722 O_WRONLY = 0x00000001 723 POSIX_FADV_DONTNEED = 4 724 POSIX_FADV_NOREUSE = 5 725 POSIX_FADV_NORMAL = 0 726 POSIX_FADV_RANDOM = 1 727 POSIX_FADV_SEQUENTIAL = 2 728 POSIX_FADV_WILLNEED = 3 729 P_tmpdir = "/tmp/" 730 X_ERRNO_H_ = 0 731 X_FSTDIO = 0 732 X_IOFBF = 0 733 X_IOLBF = 1 734 X_IONBF = 2 735 X_POSIX_C_SOURCE = 1 736 X_POSIX_SOURCE = 0 737 X_STDIO_H_ = 0 738 X_SYS_ERRNO_H_ = 0 739 X_SYS_FCNTL_H_ = 0 740 ENOUGH = 1444 741 ENOUGH_DISTS = 592 742 ENOUGH_LENS = 852 743 GUNZIP = 0 744 MAXBITS = 15 745 DIST_CODE_LEN = 512 746 END_BLOCK = 256 747 MAX_BL_BITS = 7 748 REPZ_11_138 = 18 749 REPZ_3_10 = 17 750 REP_3_6 = 16 751 SMALLEST = 1 752 ) 753 754 // 755 // If you use the zlib library in a product, an acknowledgment is welcome 756 // in the documentation of your product. If for some reason you cannot 757 // include such an acknowledgment, I would appreciate that you keep this 758 // copyright string in the executable of your product. 759 // 760 761 // =========================================================================== 762 // Function prototypes. 763 const ( /* deflate.c:66:1: */ 764 Need_more = 0 // block not completed, need more input or more output 765 Block_done = 1 // block flush performed 766 Finish_started = 2 // finish started, need only more output at next deflate 767 Finish_done = 3 768 ) 769 770 // inflate.h -- internal inflate state definition 771 // Copyright (C) 1995-2016 Mark Adler 772 // For conditions of distribution and use, see copyright notice in zlib.h 773 774 // WARNING: this file should *not* be used by applications. It is 775 // part of the implementation of the compression library and is 776 // subject to change. Applications should only use zlib.h. 777 // 778 779 // define NO_GZIP when compiling if you want to disable gzip header and 780 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 781 // the crc code when it is not needed. For shared libraries, gzip decoding 782 // should be left enabled. 783 784 // Possible inflate modes between inflate() calls 785 const ( /* inflate.h:20:1: */ 786 HEAD = 16180 // i: waiting for magic header 787 FLAGS = 16181 // i: waiting for method and flags (gzip) 788 TIME = 16182 // i: waiting for modification time (gzip) 789 OS = 16183 // i: waiting for extra flags and operating system (gzip) 790 EXLEN = 16184 // i: waiting for extra length (gzip) 791 EXTRA = 16185 // i: waiting for extra bytes (gzip) 792 NAME = 16186 // i: waiting for end of file name (gzip) 793 COMMENT = 16187 // i: waiting for end of comment (gzip) 794 HCRC = 16188 // i: waiting for header crc (gzip) 795 DICTID = 16189 // i: waiting for dictionary check value 796 DICT = 16190 // waiting for inflateSetDictionary() call 797 TYPE = 16191 // i: waiting for type bits, including last-flag bit 798 TYPEDO = 16192 // i: same, but skip check to exit inflate on new block 799 STORED = 16193 // i: waiting for stored size (length and complement) 800 COPY_ = 16194 // i/o: same as COPY below, but only first time in 801 COPY = 16195 // i/o: waiting for input or output to copy stored block 802 TABLE = 16196 // i: waiting for dynamic block table lengths 803 LENLENS = 16197 // i: waiting for code length code lengths 804 CODELENS = 16198 // i: waiting for length/lit and distance code lengths 805 LEN_ = 16199 // i: same as LEN below, but only first time in 806 LEN = 16200 // i: waiting for length/lit/eob code 807 LENEXT = 16201 // i: waiting for length extra bits 808 DIST = 16202 // i: waiting for distance code 809 DISTEXT = 16203 // i: waiting for distance extra bits 810 MATCH = 16204 // o: waiting for output space to copy string 811 LIT = 16205 // o: waiting for output space to write literal 812 CHECK = 16206 // i: waiting for 32-bit check value 813 LENGTH = 16207 // i: waiting for 32-bit length (gzip) 814 DONE = 16208 // finished check, done -- remain here until reset 815 BAD = 16209 // got a data error -- remain here until reset 816 MEM = 16210 // got an inflate() memory error -- remain here until reset 817 SYNC = 16211 818 ) 819 820 // op values as set by inflate_table(): 821 // 00000000 - literal 822 // 0000tttt - table link, tttt != 0 is the number of table index bits 823 // 0001eeee - length or distance, eeee is the number of extra bits 824 // 01100000 - end of block 825 // 01000000 - invalid code 826 // 827 828 // Maximum size of the dynamic table. The maximum number of code structures is 829 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 830 // codes. These values were found by exhaustive searches using the program 831 // examples/enough.c found in the zlib distribtution. The arguments to that 832 // program are the number of symbols, the initial root table size, and the 833 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 834 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 835 // The initial root table size (9 or 6) is found in the fifth argument of the 836 // inflate_table() calls in inflate.c and infback.c. If the root table size is 837 // changed, then these maximum sizes would be need to be recalculated and 838 // updated. 839 840 // Type of code to build for inflate_table() 841 const ( /* inftrees.h:54:1: */ 842 CODES = 0 843 LENS = 1 844 DISTS = 2 845 ) 846 847 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 848 849 type Size_t = uint64 /* <builtin>:9:23 */ 850 851 type Wchar_t = int32 /* <builtin>:15:24 */ 852 853 type X__int128_t = struct { 854 Flo int64 855 Fhi int64 856 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 857 type X__uint128_t = struct { 858 Flo uint64 859 Fhi uint64 860 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 861 862 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 863 type X__float128 = float64 /* <builtin>:47:21 */ 864 865 // return true if value 'a' fits in type 't' 866 867 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 868 869 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 870 // Public domain. 871 // 872 // NOTE: Do not protect this header against multiple inclusion. Doing 873 // so can have subtle side-effects due to header file inclusion order 874 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 875 // protect each CPP macro that we want to supply. 876 877 // Feature-test macros are defined by several standards, and allow an 878 // application to specify what symbols they want the system headers to 879 // expose, and hence what standard they want them to conform to. 880 // There are two classes of feature-test macros. The first class 881 // specify complete standards, and if one of these is defined, header 882 // files will try to conform to the relevant standard. They are: 883 // 884 // ANSI macros: 885 // _ANSI_SOURCE ANSI C89 886 // 887 // POSIX macros: 888 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 889 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 890 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 891 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 892 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 893 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 894 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 895 // 896 // X/Open macros: 897 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 898 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 899 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 900 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 901 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 902 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 903 // 904 // NetBSD macros: 905 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 906 // 907 // If more than one of these "major" feature-test macros is defined, 908 // then the set of facilities provided (and namespace used) is the 909 // union of that specified by the relevant standards, and in case of 910 // conflict, the earlier standard in the above list has precedence (so 911 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 912 // of rename() that's used is the POSIX one). If none of the "major" 913 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 914 // 915 // There are also "minor" feature-test macros, which enable extra 916 // functionality in addition to some base standard. They should be 917 // defined along with one of the "major" macros. The "minor" macros 918 // are: 919 // 920 // _REENTRANT 921 // _ISOC99_SOURCE 922 // _ISOC11_SOURCE 923 // _LARGEFILE_SOURCE Large File Support 924 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 925 926 // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ 927 928 // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ 929 930 // - 931 // Copyright (c) 2014 The NetBSD Foundation, Inc. 932 // All rights reserved. 933 // 934 // This code is derived from software contributed to The NetBSD Foundation 935 // by Matt Thomas of 3am Software Foundry. 936 // 937 // Redistribution and use in source and binary forms, with or without 938 // modification, are permitted provided that the following conditions 939 // are met: 940 // 1. Redistributions of source code must retain the above copyright 941 // notice, this list of conditions and the following disclaimer. 942 // 2. Redistributions in binary form must reproduce the above copyright 943 // notice, this list of conditions and the following disclaimer in the 944 // documentation and/or other materials provided with the distribution. 945 // 946 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 947 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 948 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 949 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 950 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 951 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 952 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 953 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 954 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 955 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 956 // POSSIBILITY OF SUCH DAMAGE. 957 958 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 959 960 // * Copyright (c) 1991, 1993 961 // The Regents of the University of California. All rights reserved. 962 // 963 // This code is derived from software contributed to Berkeley by 964 // Berkeley Software Design, Inc. 965 // 966 // Redistribution and use in source and binary forms, with or without 967 // modification, are permitted provided that the following conditions 968 // are met: 969 // 1. Redistributions of source code must retain the above copyright 970 // notice, this list of conditions and the following disclaimer. 971 // 2. Redistributions in binary form must reproduce the above copyright 972 // notice, this list of conditions and the following disclaimer in the 973 // documentation and/or other materials provided with the distribution. 974 // 3. Neither the name of the University nor the names of its contributors 975 // may be used to endorse or promote products derived from this software 976 // without specific prior written permission. 977 // 978 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 979 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 980 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 981 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 982 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 983 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 984 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 985 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 986 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 987 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 988 // SUCH DAMAGE. 989 // 990 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 991 992 // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ 993 994 // - 995 // Copyright (c) 1990 The Regents of the University of California. 996 // All rights reserved. 997 // 998 // Redistribution and use in source and binary forms, with or without 999 // modification, are permitted provided that the following conditions 1000 // are met: 1001 // 1. Redistributions of source code must retain the above copyright 1002 // notice, this list of conditions and the following disclaimer. 1003 // 2. Redistributions in binary form must reproduce the above copyright 1004 // notice, this list of conditions and the following disclaimer in the 1005 // documentation and/or other materials provided with the distribution. 1006 // 3. Neither the name of the University nor the names of its contributors 1007 // may be used to endorse or promote products derived from this software 1008 // without specific prior written permission. 1009 // 1010 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1011 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1012 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1013 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1014 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1015 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1016 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1017 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1018 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1019 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1020 // SUCH DAMAGE. 1021 // 1022 // from: @(#)types.h 7.5 (Berkeley) 3/9/91 1023 1024 // $NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ 1025 1026 // - 1027 // Copyright (c) 2014 The NetBSD Foundation, Inc. 1028 // All rights reserved. 1029 // 1030 // This code is derived from software contributed to The NetBSD Foundation 1031 // by Joerg Sonnenberger. 1032 // 1033 // Redistribution and use in source and binary forms, with or without 1034 // modification, are permitted provided that the following conditions 1035 // are met: 1036 // 1. Redistributions of source code must retain the above copyright 1037 // notice, this list of conditions and the following disclaimer. 1038 // 2. Redistributions in binary form must reproduce the above copyright 1039 // notice, this list of conditions and the following disclaimer in the 1040 // documentation and/or other materials provided with the distribution. 1041 // 1042 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1043 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1044 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1045 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 1046 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1047 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1048 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1049 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1050 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1051 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1052 // POSSIBILITY OF SUCH DAMAGE. 1053 1054 // 7.18.1 Integer types 1055 1056 // 7.18.1.1 Exact-width integer types 1057 1058 type X__int8_t = int8 /* common_int_types.h:45:27 */ 1059 type X__uint8_t = uint8 /* common_int_types.h:46:27 */ 1060 type X__int16_t = int16 /* common_int_types.h:47:27 */ 1061 type X__uint16_t = uint16 /* common_int_types.h:48:27 */ 1062 type X__int32_t = int32 /* common_int_types.h:49:27 */ 1063 type X__uint32_t = uint32 /* common_int_types.h:50:27 */ 1064 type X__int64_t = int64 /* common_int_types.h:51:27 */ 1065 type X__uint64_t = uint64 /* common_int_types.h:52:27 */ 1066 1067 // 7.18.1.4 Integer types capable of holding object pointers 1068 1069 type X__intptr_t = int64 /* common_int_types.h:58:27 */ 1070 type X__uintptr_t = uint64 /* common_int_types.h:59:26 */ 1071 1072 // $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ 1073 1074 // Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. 1075 // Public domain. 1076 1077 type Max_align_t = struct{ F_v uintptr } /* stddef.h:75:3 */ 1078 1079 type Z_size_t = Size_t /* zconf.h:248:21 */ 1080 1081 // Maximum value for memLevel in deflateInit2 1082 1083 // Maximum value for windowBits in deflateInit2 and inflateInit2. 1084 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 1085 // created by gzip. (Files created by minigzip can still be extracted by 1086 // gzip.) 1087 1088 // The memory requirements for deflate are (in bytes): 1089 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 1090 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 1091 // plus a few kilobytes for small objects. For example, if you want to reduce 1092 // the default memory requirements from 256K to 128K, compile with 1093 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 1094 // Of course this will generally degrade compression (there's no free lunch). 1095 // 1096 // The memory requirements for inflate are (in bytes) 1 << windowBits 1097 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 1098 // for small objects. 1099 1100 // Type declarations 1101 1102 // The following definitions for FAR are needed only for MSDOS mixed 1103 // model programming (small or medium model with some far allocations). 1104 // This was tested only with MSC; for other MSDOS compilers you may have 1105 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 1106 // just define FAR to be empty. 1107 1108 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 1109 type UInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 1110 type ULong = uint64 /* zconf.h:394:24 */ // 32 bits or more 1111 1112 type Bytef = Byte /* zconf.h:400:22 */ 1113 type Charf = int8 /* zconf.h:402:19 */ 1114 type Intf = int32 /* zconf.h:403:19 */ 1115 type UIntf = UInt /* zconf.h:404:19 */ 1116 type ULongf = ULong /* zconf.h:405:19 */ 1117 1118 type Voidpc = uintptr /* zconf.h:408:23 */ 1119 type Voidpf = uintptr /* zconf.h:409:23 */ 1120 type Voidp = uintptr /* zconf.h:410:23 */ 1121 1122 // $NetBSD: limits.h,v 1.40 2016/08/04 06:43:43 christos Exp $ 1123 1124 // Copyright (c) 1988, 1993 1125 // The Regents of the University of California. All rights reserved. 1126 // 1127 // Redistribution and use in source and binary forms, with or without 1128 // modification, are permitted provided that the following conditions 1129 // are met: 1130 // 1. Redistributions of source code must retain the above copyright 1131 // notice, this list of conditions and the following disclaimer. 1132 // 2. Redistributions in binary form must reproduce the above copyright 1133 // notice, this list of conditions and the following disclaimer in the 1134 // documentation and/or other materials provided with the distribution. 1135 // 3. Neither the name of the University nor the names of its contributors 1136 // may be used to endorse or promote products derived from this software 1137 // without specific prior written permission. 1138 // 1139 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1140 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1141 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1142 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1143 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1144 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1145 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1146 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1147 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1148 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1149 // SUCH DAMAGE. 1150 // 1151 // @(#)limits.h 8.2 (Berkeley) 1/4/94 1152 1153 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 1154 1155 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 1156 // Public domain. 1157 // 1158 // NOTE: Do not protect this header against multiple inclusion. Doing 1159 // so can have subtle side-effects due to header file inclusion order 1160 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 1161 // protect each CPP macro that we want to supply. 1162 1163 // Feature-test macros are defined by several standards, and allow an 1164 // application to specify what symbols they want the system headers to 1165 // expose, and hence what standard they want them to conform to. 1166 // There are two classes of feature-test macros. The first class 1167 // specify complete standards, and if one of these is defined, header 1168 // files will try to conform to the relevant standard. They are: 1169 // 1170 // ANSI macros: 1171 // _ANSI_SOURCE ANSI C89 1172 // 1173 // POSIX macros: 1174 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 1175 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 1176 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 1177 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 1178 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 1179 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 1180 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 1181 // 1182 // X/Open macros: 1183 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 1184 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 1185 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 1186 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 1187 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 1188 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 1189 // 1190 // NetBSD macros: 1191 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 1192 // 1193 // If more than one of these "major" feature-test macros is defined, 1194 // then the set of facilities provided (and namespace used) is the 1195 // union of that specified by the relevant standards, and in case of 1196 // conflict, the earlier standard in the above list has precedence (so 1197 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 1198 // of rename() that's used is the POSIX one). If none of the "major" 1199 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 1200 // 1201 // There are also "minor" feature-test macros, which enable extra 1202 // functionality in addition to some base standard. They should be 1203 // defined along with one of the "major" macros. The "minor" macros 1204 // are: 1205 // 1206 // _REENTRANT 1207 // _ISOC99_SOURCE 1208 // _ISOC11_SOURCE 1209 // _LARGEFILE_SOURCE Large File Support 1210 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 1211 1212 // We have not implemented these yet 1213 // 1214 // _POSIX_THREAD_ATTR_STACKADDR 1215 // _POSIX_THREAD_ATTR_STACKSIZE 1216 // _POSIX_THREAD_CPUTIME 1217 // _POSIX_THREAD_PRIORITY_SCHEDULING 1218 // _POSIX_THREAD_PRIO_INHERIT 1219 // _POSIX_THREAD_PRIO_PROTECT 1220 // _POSIX_THREAD_PROCESS_SHARED 1221 // _POSIX_THREAD_SAFE_FUNCTIONS 1222 // _POSIX_THREAD_SPORADIC_SERVER 1223 1224 // The following 3 are defined in 1225 // Open Group Base Specifications Issue 7 1226 1227 // These are the correct names, defined in terms of the above 1228 // except for PTHREAD_KEYS_MAX which is bigger than standard 1229 // mandated minimum value _POSIX_THREAD_KEYS_MAX. 1230 // Not yet: PTHREAD_STACK_MIN 1231 1232 // X/Open CAE Specifications, 1233 // adopted in IEEE Std 1003.1-2001 XSI. 1234 1235 // IEEE Std 1003.1-2001 TSF 1236 1237 // Always ensure that this is consistent with <stdio.h> 1238 1239 // X/Open Extended API set 2 (a.k.a. C063) 1240 // This hides unimplemented functions from GNU configure until 1241 // we are done implementing them. 1242 1243 // $NetBSD: limits.h,v 1.15 2019/01/21 20:22:48 dholland Exp $ 1244 1245 // Copyright (c) 1988 The Regents of the University of California. 1246 // All rights reserved. 1247 // 1248 // Redistribution and use in source and binary forms, with or without 1249 // modification, are permitted provided that the following conditions 1250 // are met: 1251 // 1. Redistributions of source code must retain the above copyright 1252 // notice, this list of conditions and the following disclaimer. 1253 // 2. Redistributions in binary form must reproduce the above copyright 1254 // notice, this list of conditions and the following disclaimer in the 1255 // documentation and/or other materials provided with the distribution. 1256 // 3. Neither the name of the University nor the names of its contributors 1257 // may be used to endorse or promote products derived from this software 1258 // without specific prior written permission. 1259 // 1260 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1261 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1262 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1263 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1264 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1265 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1266 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1267 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1268 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1269 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1270 // SUCH DAMAGE. 1271 // 1272 // @(#)limits.h 7.2 (Berkeley) 6/28/90 1273 1274 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 1275 1276 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 1277 // Public domain. 1278 // 1279 // NOTE: Do not protect this header against multiple inclusion. Doing 1280 // so can have subtle side-effects due to header file inclusion order 1281 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 1282 // protect each CPP macro that we want to supply. 1283 1284 // Feature-test macros are defined by several standards, and allow an 1285 // application to specify what symbols they want the system headers to 1286 // expose, and hence what standard they want them to conform to. 1287 // There are two classes of feature-test macros. The first class 1288 // specify complete standards, and if one of these is defined, header 1289 // files will try to conform to the relevant standard. They are: 1290 // 1291 // ANSI macros: 1292 // _ANSI_SOURCE ANSI C89 1293 // 1294 // POSIX macros: 1295 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 1296 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 1297 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 1298 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 1299 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 1300 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 1301 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 1302 // 1303 // X/Open macros: 1304 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 1305 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 1306 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 1307 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 1308 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 1309 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 1310 // 1311 // NetBSD macros: 1312 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 1313 // 1314 // If more than one of these "major" feature-test macros is defined, 1315 // then the set of facilities provided (and namespace used) is the 1316 // union of that specified by the relevant standards, and in case of 1317 // conflict, the earlier standard in the above list has precedence (so 1318 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 1319 // of rename() that's used is the POSIX one). If none of the "major" 1320 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 1321 // 1322 // There are also "minor" feature-test macros, which enable extra 1323 // functionality in addition to some base standard. They should be 1324 // defined along with one of the "major" macros. The "minor" macros 1325 // are: 1326 // 1327 // _REENTRANT 1328 // _ISOC99_SOURCE 1329 // _ISOC11_SOURCE 1330 // _LARGEFILE_SOURCE Large File Support 1331 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 1332 1333 // $NetBSD: syslimits.h,v 1.28 2015/08/21 07:19:39 uebayasi Exp $ 1334 1335 // Copyright (c) 1988, 1993 1336 // The Regents of the University of California. All rights reserved. 1337 // 1338 // Redistribution and use in source and binary forms, with or without 1339 // modification, are permitted provided that the following conditions 1340 // are met: 1341 // 1. Redistributions of source code must retain the above copyright 1342 // notice, this list of conditions and the following disclaimer. 1343 // 2. Redistributions in binary form must reproduce the above copyright 1344 // notice, this list of conditions and the following disclaimer in the 1345 // documentation and/or other materials provided with the distribution. 1346 // 3. Neither the name of the University nor the names of its contributors 1347 // may be used to endorse or promote products derived from this software 1348 // without specific prior written permission. 1349 // 1350 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1351 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1352 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1353 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1354 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1355 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1356 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1357 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1358 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1359 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1360 // SUCH DAMAGE. 1361 // 1362 // @(#)syslimits.h 8.1 (Berkeley) 6/2/93 1363 1364 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 1365 1366 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 1367 // Public domain. 1368 // 1369 // NOTE: Do not protect this header against multiple inclusion. Doing 1370 // so can have subtle side-effects due to header file inclusion order 1371 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 1372 // protect each CPP macro that we want to supply. 1373 1374 // Feature-test macros are defined by several standards, and allow an 1375 // application to specify what symbols they want the system headers to 1376 // expose, and hence what standard they want them to conform to. 1377 // There are two classes of feature-test macros. The first class 1378 // specify complete standards, and if one of these is defined, header 1379 // files will try to conform to the relevant standard. They are: 1380 // 1381 // ANSI macros: 1382 // _ANSI_SOURCE ANSI C89 1383 // 1384 // POSIX macros: 1385 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 1386 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 1387 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 1388 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 1389 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 1390 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 1391 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 1392 // 1393 // X/Open macros: 1394 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 1395 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 1396 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 1397 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 1398 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 1399 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 1400 // 1401 // NetBSD macros: 1402 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 1403 // 1404 // If more than one of these "major" feature-test macros is defined, 1405 // then the set of facilities provided (and namespace used) is the 1406 // union of that specified by the relevant standards, and in case of 1407 // conflict, the earlier standard in the above list has precedence (so 1408 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 1409 // of rename() that's used is the POSIX one). If none of the "major" 1410 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 1411 // 1412 // There are also "minor" feature-test macros, which enable extra 1413 // functionality in addition to some base standard. They should be 1414 // defined along with one of the "major" macros. The "minor" macros 1415 // are: 1416 // 1417 // _REENTRANT 1418 // _ISOC99_SOURCE 1419 // _ISOC11_SOURCE 1420 // _LARGEFILE_SOURCE Large File Support 1421 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 1422 1423 // kept in sync with MAXNAMLEN 1424 1425 // IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2 1426 1427 // X/Open CAE Specification Issue 5 Version 2 1428 1429 type Z_crc_t = uint32 /* zconf.h:429:17 */ 1430 1431 // $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $ 1432 1433 // - 1434 // Copyright (c) 1982, 1986, 1991, 1993, 1994 1435 // The Regents of the University of California. All rights reserved. 1436 // (c) UNIX System Laboratories, Inc. 1437 // All or some portions of this file are derived from material licensed 1438 // to the University of California by American Telephone and Telegraph 1439 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 1440 // the permission of UNIX System Laboratories, Inc. 1441 // 1442 // Redistribution and use in source and binary forms, with or without 1443 // modification, are permitted provided that the following conditions 1444 // are met: 1445 // 1. Redistributions of source code must retain the above copyright 1446 // notice, this list of conditions and the following disclaimer. 1447 // 2. Redistributions in binary form must reproduce the above copyright 1448 // notice, this list of conditions and the following disclaimer in the 1449 // documentation and/or other materials provided with the distribution. 1450 // 3. Neither the name of the University nor the names of its contributors 1451 // may be used to endorse or promote products derived from this software 1452 // without specific prior written permission. 1453 // 1454 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1455 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1456 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1457 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1458 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1459 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1460 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1461 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1462 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1463 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1464 // SUCH DAMAGE. 1465 // 1466 // @(#)types.h 8.4 (Berkeley) 1/21/94 1467 1468 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 1469 1470 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 1471 // Public domain. 1472 // 1473 // NOTE: Do not protect this header against multiple inclusion. Doing 1474 // so can have subtle side-effects due to header file inclusion order 1475 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 1476 // protect each CPP macro that we want to supply. 1477 1478 // Feature-test macros are defined by several standards, and allow an 1479 // application to specify what symbols they want the system headers to 1480 // expose, and hence what standard they want them to conform to. 1481 // There are two classes of feature-test macros. The first class 1482 // specify complete standards, and if one of these is defined, header 1483 // files will try to conform to the relevant standard. They are: 1484 // 1485 // ANSI macros: 1486 // _ANSI_SOURCE ANSI C89 1487 // 1488 // POSIX macros: 1489 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 1490 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 1491 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 1492 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 1493 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 1494 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 1495 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 1496 // 1497 // X/Open macros: 1498 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 1499 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 1500 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 1501 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 1502 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 1503 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 1504 // 1505 // NetBSD macros: 1506 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 1507 // 1508 // If more than one of these "major" feature-test macros is defined, 1509 // then the set of facilities provided (and namespace used) is the 1510 // union of that specified by the relevant standards, and in case of 1511 // conflict, the earlier standard in the above list has precedence (so 1512 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 1513 // of rename() that's used is the POSIX one). If none of the "major" 1514 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 1515 // 1516 // There are also "minor" feature-test macros, which enable extra 1517 // functionality in addition to some base standard. They should be 1518 // defined along with one of the "major" macros. The "minor" macros 1519 // are: 1520 // 1521 // _REENTRANT 1522 // _ISOC99_SOURCE 1523 // _ISOC11_SOURCE 1524 // _LARGEFILE_SOURCE Large File Support 1525 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 1526 1527 // Machine type dependent parameters. 1528 // $NetBSD: types.h,v 1.60 2019/04/06 03:06:24 thorpej Exp $ 1529 1530 // - 1531 // Copyright (c) 1990 The Regents of the University of California. 1532 // All rights reserved. 1533 // 1534 // Redistribution and use in source and binary forms, with or without 1535 // modification, are permitted provided that the following conditions 1536 // are met: 1537 // 1. Redistributions of source code must retain the above copyright 1538 // notice, this list of conditions and the following disclaimer. 1539 // 2. Redistributions in binary form must reproduce the above copyright 1540 // notice, this list of conditions and the following disclaimer in the 1541 // documentation and/or other materials provided with the distribution. 1542 // 3. Neither the name of the University nor the names of its contributors 1543 // may be used to endorse or promote products derived from this software 1544 // without specific prior written permission. 1545 // 1546 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1547 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1548 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1549 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1550 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1551 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1552 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1553 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1554 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1555 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1556 // SUCH DAMAGE. 1557 // 1558 // @(#)types.h 7.5 (Berkeley) 3/9/91 1559 1560 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 1561 1562 // * Copyright (c) 1991, 1993 1563 // The Regents of the University of California. All rights reserved. 1564 // 1565 // This code is derived from software contributed to Berkeley by 1566 // Berkeley Software Design, Inc. 1567 // 1568 // Redistribution and use in source and binary forms, with or without 1569 // modification, are permitted provided that the following conditions 1570 // are met: 1571 // 1. Redistributions of source code must retain the above copyright 1572 // notice, this list of conditions and the following disclaimer. 1573 // 2. Redistributions in binary form must reproduce the above copyright 1574 // notice, this list of conditions and the following disclaimer in the 1575 // documentation and/or other materials provided with the distribution. 1576 // 3. Neither the name of the University nor the names of its contributors 1577 // may be used to endorse or promote products derived from this software 1578 // without specific prior written permission. 1579 // 1580 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1581 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1582 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1583 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1584 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1585 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1586 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1587 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1588 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1589 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1590 // SUCH DAMAGE. 1591 // 1592 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 1593 1594 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 1595 1596 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 1597 // Public domain. 1598 // 1599 // NOTE: Do not protect this header against multiple inclusion. Doing 1600 // so can have subtle side-effects due to header file inclusion order 1601 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 1602 // protect each CPP macro that we want to supply. 1603 1604 // Feature-test macros are defined by several standards, and allow an 1605 // application to specify what symbols they want the system headers to 1606 // expose, and hence what standard they want them to conform to. 1607 // There are two classes of feature-test macros. The first class 1608 // specify complete standards, and if one of these is defined, header 1609 // files will try to conform to the relevant standard. They are: 1610 // 1611 // ANSI macros: 1612 // _ANSI_SOURCE ANSI C89 1613 // 1614 // POSIX macros: 1615 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 1616 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 1617 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 1618 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 1619 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 1620 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 1621 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 1622 // 1623 // X/Open macros: 1624 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 1625 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 1626 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 1627 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 1628 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 1629 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 1630 // 1631 // NetBSD macros: 1632 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 1633 // 1634 // If more than one of these "major" feature-test macros is defined, 1635 // then the set of facilities provided (and namespace used) is the 1636 // union of that specified by the relevant standards, and in case of 1637 // conflict, the earlier standard in the above list has precedence (so 1638 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 1639 // of rename() that's used is the POSIX one). If none of the "major" 1640 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 1641 // 1642 // There are also "minor" feature-test macros, which enable extra 1643 // functionality in addition to some base standard. They should be 1644 // defined along with one of the "major" macros. The "minor" macros 1645 // are: 1646 // 1647 // _REENTRANT 1648 // _ISOC99_SOURCE 1649 // _ISOC11_SOURCE 1650 // _LARGEFILE_SOURCE Large File Support 1651 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 1652 1653 // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ 1654 1655 // - 1656 // Copyright (c) 1990 The Regents of the University of California. 1657 // All rights reserved. 1658 // 1659 // Redistribution and use in source and binary forms, with or without 1660 // modification, are permitted provided that the following conditions 1661 // are met: 1662 // 1. Redistributions of source code must retain the above copyright 1663 // notice, this list of conditions and the following disclaimer. 1664 // 2. Redistributions in binary form must reproduce the above copyright 1665 // notice, this list of conditions and the following disclaimer in the 1666 // documentation and/or other materials provided with the distribution. 1667 // 3. Neither the name of the University nor the names of its contributors 1668 // may be used to endorse or promote products derived from this software 1669 // without specific prior written permission. 1670 // 1671 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1672 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1673 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1674 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1675 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1676 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1677 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1678 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1679 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1680 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1681 // SUCH DAMAGE. 1682 // 1683 // from: @(#)types.h 7.5 (Berkeley) 3/9/91 1684 1685 type X__register_t = int64 /* types.h:68:19 */ 1686 type X__cpu_simple_lock_nv_t = uint8 /* types.h:69:24 */ 1687 1688 // __cpu_simple_lock_t used to be a full word. 1689 1690 // The amd64 does not have strict alignment requirements. 1691 1692 // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ 1693 1694 // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ 1695 1696 // - 1697 // Copyright (c) 2014 The NetBSD Foundation, Inc. 1698 // All rights reserved. 1699 // 1700 // This code is derived from software contributed to The NetBSD Foundation 1701 // by Matt Thomas of 3am Software Foundry. 1702 // 1703 // Redistribution and use in source and binary forms, with or without 1704 // modification, are permitted provided that the following conditions 1705 // are met: 1706 // 1. Redistributions of source code must retain the above copyright 1707 // notice, this list of conditions and the following disclaimer. 1708 // 2. Redistributions in binary form must reproduce the above copyright 1709 // notice, this list of conditions and the following disclaimer in the 1710 // documentation and/or other materials provided with the distribution. 1711 // 1712 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1713 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1714 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1715 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 1716 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1717 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1718 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1719 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1720 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1721 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1722 // POSSIBILITY OF SUCH DAMAGE. 1723 1724 // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ 1725 1726 // - 1727 // Copyright (c) 1990 The Regents of the University of California. 1728 // All rights reserved. 1729 // 1730 // Redistribution and use in source and binary forms, with or without 1731 // modification, are permitted provided that the following conditions 1732 // are met: 1733 // 1. Redistributions of source code must retain the above copyright 1734 // notice, this list of conditions and the following disclaimer. 1735 // 2. Redistributions in binary form must reproduce the above copyright 1736 // notice, this list of conditions and the following disclaimer in the 1737 // documentation and/or other materials provided with the distribution. 1738 // 3. Neither the name of the University nor the names of its contributors 1739 // may be used to endorse or promote products derived from this software 1740 // without specific prior written permission. 1741 // 1742 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1743 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1744 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1745 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1746 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1747 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1748 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1749 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1750 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1751 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1752 // SUCH DAMAGE. 1753 // 1754 // from: @(#)types.h 7.5 (Berkeley) 3/9/91 1755 1756 // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ 1757 1758 // - 1759 // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. 1760 // All rights reserved. 1761 // 1762 // This code is derived from software contributed to The NetBSD Foundation 1763 // by Jun-ichiro itojun Hagino and by Klaus Klein. 1764 // 1765 // Redistribution and use in source and binary forms, with or without 1766 // modification, are permitted provided that the following conditions 1767 // are met: 1768 // 1. Redistributions of source code must retain the above copyright 1769 // notice, this list of conditions and the following disclaimer. 1770 // 2. Redistributions in binary form must reproduce the above copyright 1771 // notice, this list of conditions and the following disclaimer in the 1772 // documentation and/or other materials provided with the distribution. 1773 // 1774 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1775 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1776 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1777 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 1778 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1779 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1780 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1781 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1782 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1783 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1784 // POSSIBILITY OF SUCH DAMAGE. 1785 1786 // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ 1787 1788 // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ 1789 1790 // - 1791 // Copyright (c) 2014 The NetBSD Foundation, Inc. 1792 // All rights reserved. 1793 // 1794 // This code is derived from software contributed to The NetBSD Foundation 1795 // by Matt Thomas of 3am Software Foundry. 1796 // 1797 // Redistribution and use in source and binary forms, with or without 1798 // modification, are permitted provided that the following conditions 1799 // are met: 1800 // 1. Redistributions of source code must retain the above copyright 1801 // notice, this list of conditions and the following disclaimer. 1802 // 2. Redistributions in binary form must reproduce the above copyright 1803 // notice, this list of conditions and the following disclaimer in the 1804 // documentation and/or other materials provided with the distribution. 1805 // 1806 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1807 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1808 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1809 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 1810 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1811 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1812 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1813 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1814 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1815 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1816 // POSSIBILITY OF SUCH DAMAGE. 1817 1818 type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address 1819 type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id 1820 type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address 1821 type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number 1822 type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions 1823 type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset 1824 type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id 1825 type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family 1826 type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length 1827 type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id 1828 type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) 1829 type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ 1830 type X__wctrans_t = uintptr /* ansi.h:51:32 */ 1831 type X__wctype_t = uintptr /* ansi.h:54:31 */ 1832 1833 // mbstate_t is an opaque object to keep conversion state, during multibyte 1834 // stream conversions. The content must not be referenced by user programs. 1835 type X__mbstate_t = struct { 1836 F__mbstateL X__int64_t 1837 F__ccgo_pad1 [120]byte 1838 } /* ansi.h:63:3 */ 1839 1840 type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ 1841 1842 type Int8_t = X__int8_t /* types.h:54:18 */ 1843 1844 type Uint8_t = X__uint8_t /* types.h:59:19 */ 1845 1846 type Int16_t = X__int16_t /* types.h:64:19 */ 1847 1848 type Uint16_t = X__uint16_t /* types.h:69:20 */ 1849 1850 type Int32_t = X__int32_t /* types.h:74:19 */ 1851 1852 type Uint32_t = X__uint32_t /* types.h:79:20 */ 1853 1854 type Int64_t = X__int64_t /* types.h:84:19 */ 1855 1856 type Uint64_t = X__uint64_t /* types.h:89:20 */ 1857 1858 type U_int8_t = Uint8_t /* types.h:93:18 */ 1859 type U_int16_t = Uint16_t /* types.h:94:18 */ 1860 type U_int32_t = Uint32_t /* types.h:95:18 */ 1861 type U_int64_t = Uint64_t /* types.h:96:18 */ 1862 1863 // $NetBSD: endian.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ 1864 1865 // $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $ 1866 1867 // Copyright (c) 1987, 1991, 1993 1868 // The Regents of the University of California. All rights reserved. 1869 // 1870 // Redistribution and use in source and binary forms, with or without 1871 // modification, are permitted provided that the following conditions 1872 // are met: 1873 // 1. Redistributions of source code must retain the above copyright 1874 // notice, this list of conditions and the following disclaimer. 1875 // 2. Redistributions in binary form must reproduce the above copyright 1876 // notice, this list of conditions and the following disclaimer in the 1877 // documentation and/or other materials provided with the distribution. 1878 // 3. Neither the name of the University nor the names of its contributors 1879 // may be used to endorse or promote products derived from this software 1880 // without specific prior written permission. 1881 // 1882 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1883 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1884 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1885 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1886 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1887 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1888 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1889 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1890 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1891 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1892 // SUCH DAMAGE. 1893 // 1894 // @(#)endian.h 8.1 (Berkeley) 6/11/93 1895 1896 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 1897 1898 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 1899 // Public domain. 1900 // 1901 // NOTE: Do not protect this header against multiple inclusion. Doing 1902 // so can have subtle side-effects due to header file inclusion order 1903 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 1904 // protect each CPP macro that we want to supply. 1905 1906 // Feature-test macros are defined by several standards, and allow an 1907 // application to specify what symbols they want the system headers to 1908 // expose, and hence what standard they want them to conform to. 1909 // There are two classes of feature-test macros. The first class 1910 // specify complete standards, and if one of these is defined, header 1911 // files will try to conform to the relevant standard. They are: 1912 // 1913 // ANSI macros: 1914 // _ANSI_SOURCE ANSI C89 1915 // 1916 // POSIX macros: 1917 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 1918 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 1919 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 1920 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 1921 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 1922 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 1923 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 1924 // 1925 // X/Open macros: 1926 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 1927 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 1928 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 1929 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 1930 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 1931 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 1932 // 1933 // NetBSD macros: 1934 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 1935 // 1936 // If more than one of these "major" feature-test macros is defined, 1937 // then the set of facilities provided (and namespace used) is the 1938 // union of that specified by the relevant standards, and in case of 1939 // conflict, the earlier standard in the above list has precedence (so 1940 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 1941 // of rename() that's used is the POSIX one). If none of the "major" 1942 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 1943 // 1944 // There are also "minor" feature-test macros, which enable extra 1945 // functionality in addition to some base standard. They should be 1946 // defined along with one of the "major" macros. The "minor" macros 1947 // are: 1948 // 1949 // _REENTRANT 1950 // _ISOC99_SOURCE 1951 // _ISOC11_SOURCE 1952 // _LARGEFILE_SOURCE Large File Support 1953 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 1954 1955 // Definitions for byte order, according to byte significance from low 1956 // address to high. 1957 1958 // C-family endian-ness definitions 1959 1960 // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ 1961 1962 // - 1963 // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. 1964 // All rights reserved. 1965 // 1966 // This code is derived from software contributed to The NetBSD Foundation 1967 // by Jun-ichiro itojun Hagino and by Klaus Klein. 1968 // 1969 // Redistribution and use in source and binary forms, with or without 1970 // modification, are permitted provided that the following conditions 1971 // are met: 1972 // 1. Redistributions of source code must retain the above copyright 1973 // notice, this list of conditions and the following disclaimer. 1974 // 2. Redistributions in binary form must reproduce the above copyright 1975 // notice, this list of conditions and the following disclaimer in the 1976 // documentation and/or other materials provided with the distribution. 1977 // 1978 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1979 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1980 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1981 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 1982 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1983 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1984 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1985 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1986 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1987 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1988 // POSSIBILITY OF SUCH DAMAGE. 1989 1990 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 1991 1992 // * Copyright (c) 1991, 1993 1993 // The Regents of the University of California. All rights reserved. 1994 // 1995 // This code is derived from software contributed to Berkeley by 1996 // Berkeley Software Design, Inc. 1997 // 1998 // Redistribution and use in source and binary forms, with or without 1999 // modification, are permitted provided that the following conditions 2000 // are met: 2001 // 1. Redistributions of source code must retain the above copyright 2002 // notice, this list of conditions and the following disclaimer. 2003 // 2. Redistributions in binary form must reproduce the above copyright 2004 // notice, this list of conditions and the following disclaimer in the 2005 // documentation and/or other materials provided with the distribution. 2006 // 3. Neither the name of the University nor the names of its contributors 2007 // may be used to endorse or promote products derived from this software 2008 // without specific prior written permission. 2009 // 2010 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2011 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2012 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2013 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2014 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2015 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2016 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2017 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2018 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2019 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2020 // SUCH DAMAGE. 2021 // 2022 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 2023 2024 // $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $ 2025 2026 // - 2027 // Copyright (c) 1982, 1986, 1991, 1993, 1994 2028 // The Regents of the University of California. All rights reserved. 2029 // (c) UNIX System Laboratories, Inc. 2030 // All or some portions of this file are derived from material licensed 2031 // to the University of California by American Telephone and Telegraph 2032 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 2033 // the permission of UNIX System Laboratories, Inc. 2034 // 2035 // Redistribution and use in source and binary forms, with or without 2036 // modification, are permitted provided that the following conditions 2037 // are met: 2038 // 1. Redistributions of source code must retain the above copyright 2039 // notice, this list of conditions and the following disclaimer. 2040 // 2. Redistributions in binary form must reproduce the above copyright 2041 // notice, this list of conditions and the following disclaimer in the 2042 // documentation and/or other materials provided with the distribution. 2043 // 3. Neither the name of the University nor the names of its contributors 2044 // may be used to endorse or promote products derived from this software 2045 // without specific prior written permission. 2046 // 2047 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2048 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2049 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2050 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2051 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2052 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2053 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2054 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2055 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2056 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2057 // SUCH DAMAGE. 2058 // 2059 // @(#)types.h 8.4 (Berkeley) 1/21/94 2060 2061 type In_addr_t = X__in_addr_t /* endian.h:58:21 */ 2062 2063 type In_port_t = X__in_port_t /* endian.h:63:21 */ 2064 2065 func __byte_swap_u64_variable(tls *libc.TLS, x Uint64_t) Uint64_t { /* byte_swap.h:48:1: */ 2066 panic(`/usr/include/machine/byte_swap.h:50:2: assembler statements not supported`) 2067 return x 2068 } 2069 2070 func __byte_swap_u32_variable(tls *libc.TLS, x Uint32_t) Uint32_t { /* byte_swap.h:57:1: */ 2071 panic(`/usr/include/machine/byte_swap.h:59:2: assembler statements not supported`) 2072 return x 2073 } 2074 2075 func __byte_swap_u16_variable(tls *libc.TLS, x Uint16_t) Uint16_t { /* byte_swap.h:66:1: */ 2076 panic(`/usr/include/machine/byte_swap.h:68:2: assembler statements not supported`) 2077 return x 2078 } 2079 2080 // $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ 2081 2082 // Written by Manuel Bouyer. Public domain 2083 2084 // $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $ 2085 2086 // - 2087 // Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. 2088 // All rights reserved. 2089 // 2090 // This code is derived from software contributed to The NetBSD Foundation 2091 // by Klaus Klein. 2092 // 2093 // Redistribution and use in source and binary forms, with or without 2094 // modification, are permitted provided that the following conditions 2095 // are met: 2096 // 1. Redistributions of source code must retain the above copyright 2097 // notice, this list of conditions and the following disclaimer. 2098 // 2. Redistributions in binary form must reproduce the above copyright 2099 // notice, this list of conditions and the following disclaimer in the 2100 // documentation and/or other materials provided with the distribution. 2101 // 2102 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2103 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2104 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2105 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2106 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2107 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2108 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2109 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2110 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2111 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2112 // POSSIBILITY OF SUCH DAMAGE. 2113 2114 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 2115 2116 // * Copyright (c) 1991, 1993 2117 // The Regents of the University of California. All rights reserved. 2118 // 2119 // This code is derived from software contributed to Berkeley by 2120 // Berkeley Software Design, Inc. 2121 // 2122 // Redistribution and use in source and binary forms, with or without 2123 // modification, are permitted provided that the following conditions 2124 // are met: 2125 // 1. Redistributions of source code must retain the above copyright 2126 // notice, this list of conditions and the following disclaimer. 2127 // 2. Redistributions in binary form must reproduce the above copyright 2128 // notice, this list of conditions and the following disclaimer in the 2129 // documentation and/or other materials provided with the distribution. 2130 // 3. Neither the name of the University nor the names of its contributors 2131 // may be used to endorse or promote products derived from this software 2132 // without specific prior written permission. 2133 // 2134 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2135 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2136 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2137 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2138 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2139 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2140 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2141 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2142 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2143 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2144 // SUCH DAMAGE. 2145 // 2146 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 2147 2148 // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ 2149 2150 // - 2151 // Copyright (c) 1990 The Regents of the University of California. 2152 // All rights reserved. 2153 // 2154 // Redistribution and use in source and binary forms, with or without 2155 // modification, are permitted provided that the following conditions 2156 // are met: 2157 // 1. Redistributions of source code must retain the above copyright 2158 // notice, this list of conditions and the following disclaimer. 2159 // 2. Redistributions in binary form must reproduce the above copyright 2160 // notice, this list of conditions and the following disclaimer in the 2161 // documentation and/or other materials provided with the distribution. 2162 // 3. Neither the name of the University nor the names of its contributors 2163 // may be used to endorse or promote products derived from this software 2164 // without specific prior written permission. 2165 // 2166 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2167 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2168 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2169 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2170 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2171 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2172 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2173 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2174 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2175 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2176 // SUCH DAMAGE. 2177 // 2178 // from: @(#)types.h 7.5 (Berkeley) 3/9/91 2179 2180 type Intptr_t = X__intptr_t /* stdint.h:79:20 */ 2181 2182 type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ 2183 2184 // $NetBSD: int_mwgwtypes.h,v 1.8 2014/07/25 21:43:13 joerg Exp $ 2185 2186 // - 2187 // Copyright (c) 2001 The NetBSD Foundation, Inc. 2188 // All rights reserved. 2189 // 2190 // This code is derived from software contributed to The NetBSD Foundation 2191 // by Klaus Klein. 2192 // 2193 // Redistribution and use in source and binary forms, with or without 2194 // modification, are permitted provided that the following conditions 2195 // are met: 2196 // 1. Redistributions of source code must retain the above copyright 2197 // notice, this list of conditions and the following disclaimer. 2198 // 2. Redistributions in binary form must reproduce the above copyright 2199 // notice, this list of conditions and the following disclaimer in the 2200 // documentation and/or other materials provided with the distribution. 2201 // 2202 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2203 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2204 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2205 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2206 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2207 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2208 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2209 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2210 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2211 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2212 // POSSIBILITY OF SUCH DAMAGE. 2213 2214 // $NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ 2215 2216 // - 2217 // Copyright (c) 2014 The NetBSD Foundation, Inc. 2218 // All rights reserved. 2219 // 2220 // This code is derived from software contributed to The NetBSD Foundation 2221 // by Joerg Sonnenberger. 2222 // 2223 // Redistribution and use in source and binary forms, with or without 2224 // modification, are permitted provided that the following conditions 2225 // are met: 2226 // 1. Redistributions of source code must retain the above copyright 2227 // notice, this list of conditions and the following disclaimer. 2228 // 2. Redistributions in binary form must reproduce the above copyright 2229 // notice, this list of conditions and the following disclaimer in the 2230 // documentation and/or other materials provided with the distribution. 2231 // 2232 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2233 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2234 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2235 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2236 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2237 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2238 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2239 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2240 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2241 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2242 // POSSIBILITY OF SUCH DAMAGE. 2243 2244 // 7.18.1 Integer types 2245 2246 // 7.18.1.2 Minimum-width integer types 2247 2248 type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ 2249 type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ 2250 type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ 2251 type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ 2252 type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ 2253 type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ 2254 type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ 2255 type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ 2256 2257 // 7.18.1.3 Fastest minimum-width integer types 2258 type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ 2259 type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ 2260 type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ 2261 type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ 2262 type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ 2263 type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ 2264 type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ 2265 type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ 2266 2267 // 7.18.1.5 Greatest-width integer types 2268 2269 type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ 2270 type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ 2271 2272 type U_char = uint8 /* types.h:101:23 */ 2273 type U_short = uint16 /* types.h:102:24 */ 2274 type U_int = uint32 /* types.h:103:22 */ 2275 type U_long = uint64 /* types.h:104:23 */ 2276 2277 type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility 2278 type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility 2279 type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility 2280 type Ulong = uint64 /* types.h:109:23 */ // Sys V compatibility 2281 2282 type U_quad_t = Uint64_t /* types.h:112:18 */ // quads 2283 type Quad_t = Int64_t /* types.h:113:18 */ 2284 type Qaddr_t = uintptr /* types.h:114:16 */ 2285 2286 // The types longlong_t and u_longlong_t exist for use with the 2287 // Sun-derived XDR routines involving these types, and their usage 2288 // in other contexts is discouraged. Further note that these types 2289 // may not be equivalent to "long long" and "unsigned long long", 2290 // they are only guaranteed to be signed and unsigned 64-bit types 2291 // respectively. Portable programs that need 64-bit types should use 2292 // the C99 types int64_t and uint64_t instead. 2293 2294 type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR 2295 type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR 2296 2297 type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count 2298 type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size 2299 2300 type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) 2301 2302 type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count 2303 2304 // We don't and shouldn't use caddr_t in the kernel anymore 2305 type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address 2306 2307 type Daddr_t = Int64_t /* types.h:154:18 */ // disk address 2308 2309 type Dev_t = Uint64_t /* types.h:157:18 */ // device number 2310 type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number 2311 2312 type Gid_t = X__gid_t /* types.h:161:18 */ // group id 2313 2314 type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id 2315 type Ino_t = Uint64_t /* types.h:166:18 */ // inode number 2316 type Key_t = int64 /* types.h:167:15 */ // IPC key (for Sys V IPC) 2317 2318 type Mode_t = X__mode_t /* types.h:170:18 */ // permissions 2319 2320 type Nlink_t = Uint32_t /* types.h:174:18 */ // link count 2321 2322 type Off_t = X__off_t /* types.h:177:18 */ // file offset 2323 2324 type Pid_t = X__pid_t /* types.h:182:18 */ // process id 2325 type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id 2326 type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit 2327 type Segsz_t = Int32_t /* types.h:187:18 */ // segment size 2328 type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset 2329 2330 type Uid_t = X__uid_t /* types.h:191:18 */ // user id 2331 2332 type Mqd_t = int32 /* types.h:195:14 */ 2333 2334 type Cpuid_t = uint64 /* types.h:197:23 */ 2335 2336 type Psetid_t = int32 /* types.h:199:14 */ 2337 2338 type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ 2339 2340 // Major, minor numbers, dev_t's. 2341 type X__devmajor_t = Int32_t /* types.h:255:17 */ 2342 type X__devminor_t = Int32_t /* types.h:255:31 */ 2343 2344 type Clock_t = uint32 /* types.h:268:24 */ 2345 2346 type Ssize_t = int64 /* types.h:284:24 */ 2347 2348 type Time_t = X__int64_t /* types.h:289:23 */ 2349 2350 type Clockid_t = int32 /* types.h:294:26 */ 2351 2352 type Timer_t = int32 /* types.h:299:24 */ 2353 2354 type Suseconds_t = int32 /* types.h:304:27 */ 2355 2356 type Useconds_t = uint32 /* types.h:309:26 */ 2357 2358 // $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $ 2359 2360 // - 2361 // Copyright (c) 1992, 1993 2362 // The Regents of the University of California. All rights reserved. 2363 // 2364 // Redistribution and use in source and binary forms, with or without 2365 // modification, are permitted provided that the following conditions 2366 // are met: 2367 // 1. Redistributions of source code must retain the above copyright 2368 // notice, this list of conditions and the following disclaimer. 2369 // 2. Redistributions in binary form must reproduce the above copyright 2370 // notice, this list of conditions and the following disclaimer in the 2371 // documentation and/or other materials provided with the distribution. 2372 // 3. Neither the name of the University nor the names of its contributors 2373 // may be used to endorse or promote products derived from this software 2374 // without specific prior written permission. 2375 // 2376 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2377 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2378 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2379 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2380 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2381 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2382 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2383 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2384 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2385 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2386 // SUCH DAMAGE. 2387 // 2388 // from: @(#)types.h 8.4 (Berkeley) 1/21/94 2389 2390 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 2391 2392 // * Copyright (c) 1991, 1993 2393 // The Regents of the University of California. All rights reserved. 2394 // 2395 // This code is derived from software contributed to Berkeley by 2396 // Berkeley Software Design, Inc. 2397 // 2398 // Redistribution and use in source and binary forms, with or without 2399 // modification, are permitted provided that the following conditions 2400 // are met: 2401 // 1. Redistributions of source code must retain the above copyright 2402 // notice, this list of conditions and the following disclaimer. 2403 // 2. Redistributions in binary form must reproduce the above copyright 2404 // notice, this list of conditions and the following disclaimer in the 2405 // documentation and/or other materials provided with the distribution. 2406 // 3. Neither the name of the University nor the names of its contributors 2407 // may be used to endorse or promote products derived from this software 2408 // without specific prior written permission. 2409 // 2410 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2411 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2412 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2413 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2414 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2415 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2416 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2417 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2418 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2419 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2420 // SUCH DAMAGE. 2421 // 2422 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 2423 2424 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 2425 2426 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 2427 // Public domain. 2428 // 2429 // NOTE: Do not protect this header against multiple inclusion. Doing 2430 // so can have subtle side-effects due to header file inclusion order 2431 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 2432 // protect each CPP macro that we want to supply. 2433 2434 // Feature-test macros are defined by several standards, and allow an 2435 // application to specify what symbols they want the system headers to 2436 // expose, and hence what standard they want them to conform to. 2437 // There are two classes of feature-test macros. The first class 2438 // specify complete standards, and if one of these is defined, header 2439 // files will try to conform to the relevant standard. They are: 2440 // 2441 // ANSI macros: 2442 // _ANSI_SOURCE ANSI C89 2443 // 2444 // POSIX macros: 2445 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 2446 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 2447 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 2448 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 2449 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 2450 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 2451 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 2452 // 2453 // X/Open macros: 2454 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 2455 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 2456 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 2457 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 2458 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 2459 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 2460 // 2461 // NetBSD macros: 2462 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 2463 // 2464 // If more than one of these "major" feature-test macros is defined, 2465 // then the set of facilities provided (and namespace used) is the 2466 // union of that specified by the relevant standards, and in case of 2467 // conflict, the earlier standard in the above list has precedence (so 2468 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 2469 // of rename() that's used is the POSIX one). If none of the "major" 2470 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 2471 // 2472 // There are also "minor" feature-test macros, which enable extra 2473 // functionality in addition to some base standard. They should be 2474 // defined along with one of the "major" macros. The "minor" macros 2475 // are: 2476 // 2477 // _REENTRANT 2478 // _ISOC99_SOURCE 2479 // _ISOC11_SOURCE 2480 // _LARGEFILE_SOURCE Large File Support 2481 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 2482 2483 // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ 2484 2485 // - 2486 // Copyright (c) 1990 The Regents of the University of California. 2487 // All rights reserved. 2488 // 2489 // Redistribution and use in source and binary forms, with or without 2490 // modification, are permitted provided that the following conditions 2491 // are met: 2492 // 1. Redistributions of source code must retain the above copyright 2493 // notice, this list of conditions and the following disclaimer. 2494 // 2. Redistributions in binary form must reproduce the above copyright 2495 // notice, this list of conditions and the following disclaimer in the 2496 // documentation and/or other materials provided with the distribution. 2497 // 3. Neither the name of the University nor the names of its contributors 2498 // may be used to endorse or promote products derived from this software 2499 // without specific prior written permission. 2500 // 2501 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2502 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2503 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2504 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2505 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2506 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2507 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2508 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2509 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2510 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2511 // SUCH DAMAGE. 2512 // 2513 // from: @(#)types.h 7.5 (Berkeley) 3/9/91 2514 2515 // Implementation dependent defines, hidden from user space. 2516 // POSIX does not specify them. 2517 2518 type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ 2519 2520 // 32 = 2 ^ 5 2521 2522 // Select uses bit fields of file descriptors. These macros manipulate 2523 // such bit fields. Note: FD_SETSIZE may be defined by the user. 2524 2525 type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ 2526 2527 // 32 = 2 ^ 5 2528 2529 // Select uses bit fields of file descriptors. These macros manipulate 2530 // such bit fields. Note: FD_SETSIZE may be defined by the user. 2531 2532 type Fd_set = Fd_set1 /* fd_set.h:68:3 */ 2533 2534 // Expose our internals if we are not required to hide them. 2535 2536 type Kauth_cred_t = uintptr /* types.h:318:27 */ 2537 2538 type Pri_t = int32 /* types.h:320:13 */ 2539 2540 // $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil Exp $ 2541 2542 // - 2543 // Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. 2544 // All rights reserved. 2545 // 2546 // This code is derived from software contributed to The NetBSD Foundation 2547 // by Nathan J. Williams. 2548 // 2549 // Redistribution and use in source and binary forms, with or without 2550 // modification, are permitted provided that the following conditions 2551 // are met: 2552 // 1. Redistributions of source code must retain the above copyright 2553 // notice, this list of conditions and the following disclaimer. 2554 // 2. Redistributions in binary form must reproduce the above copyright 2555 // notice, this list of conditions and the following disclaimer in the 2556 // documentation and/or other materials provided with the distribution. 2557 // 2558 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2559 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2560 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2561 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2562 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2563 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2564 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2565 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2566 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2567 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2568 // POSSIBILITY OF SUCH DAMAGE. 2569 2570 // We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the 2571 // POSIX spinlock object. 2572 // 2573 // C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer. 2574 // This does not work for volatile types. Since C++ does not touch the guts 2575 // of those types, we do not include volatile in the C++ definitions. 2576 type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ 2577 type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ 2578 2579 // Copied from PTQ_HEAD in pthread_queue.h 2580 2581 type Pthread_queue_struct_t = struct { 2582 Fptqh_first uintptr 2583 Fptqh_last uintptr 2584 } /* pthread_types.h:61:1 */ 2585 2586 type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ 2587 type X__pthread_attr_st = struct { 2588 Fpta_magic uint32 2589 Fpta_flags int32 2590 Fpta_private uintptr 2591 } /* pthread_types.h:65:1 */ 2592 2593 type X__pthread_mutex_st = struct { 2594 Fptm_magic uint32 2595 Fptm_errorcheck X__pthread_spin_t 2596 Fptm_pad1 [3]Uint8_t 2597 F__8 struct{ Fptm_ceiling uint8 } 2598 Fptm_pad2 [3]Uint8_t 2599 F__ccgo_pad1 [4]byte 2600 Fptm_owner Pthread_t 2601 Fptm_waiters uintptr 2602 Fptm_recursed uint32 2603 F__ccgo_pad2 [4]byte 2604 Fptm_spare2 uintptr 2605 } /* pthread_types.h:66:1 */ 2606 2607 type X__pthread_mutexattr_st = struct { 2608 Fptma_magic uint32 2609 F__ccgo_pad1 [4]byte 2610 Fptma_private uintptr 2611 } /* pthread_types.h:67:1 */ 2612 2613 type X__pthread_cond_st = struct { 2614 Fptc_magic uint32 2615 Fptc_lock X__pthread_spin_t 2616 F__ccgo_pad1 [3]byte 2617 Fptc_waiters Pthread_queue_t 2618 Fptc_mutex uintptr 2619 Fptc_private uintptr 2620 } /* pthread_types.h:68:1 */ 2621 2622 type X__pthread_condattr_st = struct { 2623 Fptca_magic uint32 2624 F__ccgo_pad1 [4]byte 2625 Fptca_private uintptr 2626 } /* pthread_types.h:69:1 */ 2627 2628 type X__pthread_rwlock_st = struct { 2629 Fptr_magic uint32 2630 Fptr_interlock X__pthread_spin_t 2631 F__ccgo_pad1 [3]byte 2632 Fptr_rblocked Pthread_queue_t 2633 Fptr_wblocked Pthread_queue_t 2634 Fptr_nreaders uint32 2635 F__ccgo_pad2 [4]byte 2636 Fptr_owner Pthread_t 2637 Fptr_private uintptr 2638 } /* pthread_types.h:71:1 */ 2639 2640 type X__pthread_rwlockattr_st = struct { 2641 Fptra_magic uint32 2642 F__ccgo_pad1 [4]byte 2643 Fptra_private uintptr 2644 } /* pthread_types.h:72:1 */ 2645 2646 type X__pthread_barrier_st = struct { 2647 Fptb_magic uint32 2648 Fptb_lock Pthread_spin_t 2649 F__ccgo_pad1 [3]byte 2650 Fptb_waiters Pthread_queue_t 2651 Fptb_initcount uint32 2652 Fptb_curcount uint32 2653 Fptb_generation uint32 2654 F__ccgo_pad2 [4]byte 2655 Fptb_private uintptr 2656 } /* pthread_types.h:73:1 */ 2657 2658 type X__pthread_barrierattr_st = struct { 2659 Fptba_magic uint32 2660 F__ccgo_pad1 [4]byte 2661 Fptba_private uintptr 2662 } /* pthread_types.h:74:1 */ 2663 2664 type Pthread_t = uintptr /* pthread_types.h:76:29 */ 2665 type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ 2666 type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ 2667 type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ 2668 type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ 2669 type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ 2670 type X__pthread_once_st = struct { 2671 Fpto_mutex Pthread_mutex_t 2672 Fpto_done int32 2673 F__ccgo_pad1 [4]byte 2674 } /* pthread_types.h:82:9 */ 2675 2676 type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ 2677 type X__pthread_spinlock_st = struct { 2678 Fpts_magic uint32 2679 Fpts_spin X__pthread_spin_t 2680 F__ccgo_pad1 [3]byte 2681 Fpts_flags int32 2682 } /* pthread_types.h:83:9 */ 2683 2684 type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ 2685 type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ 2686 type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ 2687 type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ 2688 type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ 2689 type Pthread_key_t = int32 /* pthread_types.h:88:13 */ 2690 2691 // $NetBSD: stdarg.h,v 1.4.24.1 2020/04/02 19:17:04 martin Exp $ 2692 2693 // - 2694 // Copyright (c) 1991, 1993 2695 // The Regents of the University of California. All rights reserved. 2696 // 2697 // Redistribution and use in source and binary forms, with or without 2698 // modification, are permitted provided that the following conditions 2699 // are met: 2700 // 1. Redistributions of source code must retain the above copyright 2701 // notice, this list of conditions and the following disclaimer. 2702 // 2. Redistributions in binary form must reproduce the above copyright 2703 // notice, this list of conditions and the following disclaimer in the 2704 // documentation and/or other materials provided with the distribution. 2705 // 3. Neither the name of the University nor the names of its contributors 2706 // may be used to endorse or promote products derived from this software 2707 // without specific prior written permission. 2708 // 2709 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2710 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2711 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2712 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2713 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2714 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2715 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2716 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2717 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2718 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2719 // SUCH DAMAGE. 2720 // 2721 // @(#)stdarg.h 8.1 (Berkeley) 6/10/93 2722 2723 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 2724 2725 // * Copyright (c) 1991, 1993 2726 // The Regents of the University of California. All rights reserved. 2727 // 2728 // This code is derived from software contributed to Berkeley by 2729 // Berkeley Software Design, Inc. 2730 // 2731 // Redistribution and use in source and binary forms, with or without 2732 // modification, are permitted provided that the following conditions 2733 // are met: 2734 // 1. Redistributions of source code must retain the above copyright 2735 // notice, this list of conditions and the following disclaimer. 2736 // 2. Redistributions in binary form must reproduce the above copyright 2737 // notice, this list of conditions and the following disclaimer in the 2738 // documentation and/or other materials provided with the distribution. 2739 // 3. Neither the name of the University nor the names of its contributors 2740 // may be used to endorse or promote products derived from this software 2741 // without specific prior written permission. 2742 // 2743 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2744 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2745 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2746 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2747 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2748 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2749 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2750 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2751 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2752 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2753 // SUCH DAMAGE. 2754 // 2755 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 2756 2757 // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ 2758 2759 // - 2760 // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. 2761 // All rights reserved. 2762 // 2763 // This code is derived from software contributed to The NetBSD Foundation 2764 // by Jun-ichiro itojun Hagino and by Klaus Klein. 2765 // 2766 // Redistribution and use in source and binary forms, with or without 2767 // modification, are permitted provided that the following conditions 2768 // are met: 2769 // 1. Redistributions of source code must retain the above copyright 2770 // notice, this list of conditions and the following disclaimer. 2771 // 2. Redistributions in binary form must reproduce the above copyright 2772 // notice, this list of conditions and the following disclaimer in the 2773 // documentation and/or other materials provided with the distribution. 2774 // 2775 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2776 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2777 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2778 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2779 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2780 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2781 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2782 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2783 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2784 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2785 // POSSIBILITY OF SUCH DAMAGE. 2786 2787 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 2788 2789 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 2790 // Public domain. 2791 // 2792 // NOTE: Do not protect this header against multiple inclusion. Doing 2793 // so can have subtle side-effects due to header file inclusion order 2794 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 2795 // protect each CPP macro that we want to supply. 2796 2797 // Feature-test macros are defined by several standards, and allow an 2798 // application to specify what symbols they want the system headers to 2799 // expose, and hence what standard they want them to conform to. 2800 // There are two classes of feature-test macros. The first class 2801 // specify complete standards, and if one of these is defined, header 2802 // files will try to conform to the relevant standard. They are: 2803 // 2804 // ANSI macros: 2805 // _ANSI_SOURCE ANSI C89 2806 // 2807 // POSIX macros: 2808 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 2809 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 2810 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 2811 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 2812 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 2813 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 2814 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 2815 // 2816 // X/Open macros: 2817 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 2818 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 2819 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 2820 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 2821 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 2822 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 2823 // 2824 // NetBSD macros: 2825 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 2826 // 2827 // If more than one of these "major" feature-test macros is defined, 2828 // then the set of facilities provided (and namespace used) is the 2829 // union of that specified by the relevant standards, and in case of 2830 // conflict, the earlier standard in the above list has precedence (so 2831 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 2832 // of rename() that's used is the POSIX one). If none of the "major" 2833 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 2834 // 2835 // There are also "minor" feature-test macros, which enable extra 2836 // functionality in addition to some base standard. They should be 2837 // defined along with one of the "major" macros. The "minor" macros 2838 // are: 2839 // 2840 // _REENTRANT 2841 // _ISOC99_SOURCE 2842 // _ISOC11_SOURCE 2843 // _LARGEFILE_SOURCE Large File Support 2844 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 2845 2846 type Va_list = X__va_list /* stdarg.h:53:19 */ // getsubopt(3) external variable 2847 2848 // MVS linker does not support external names larger than 8 bytes 2849 2850 // 2851 // The 'zlib' compression library provides in-memory compression and 2852 // decompression functions, including integrity checks of the uncompressed data. 2853 // This version of the library supports only one compression method (deflation) 2854 // but other algorithms will be added later and will have the same stream 2855 // interface. 2856 // 2857 // Compression can be done in a single step if the buffers are large enough, 2858 // or can be done by repeated calls of the compression function. In the latter 2859 // case, the application must provide more input and/or consume the output 2860 // (providing more output space) before each call. 2861 // 2862 // The compressed data format used by default by the in-memory functions is 2863 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 2864 // around a deflate stream, which is itself documented in RFC 1951. 2865 // 2866 // The library also supports reading and writing files in gzip (.gz) format 2867 // with an interface similar to that of stdio using the functions that start 2868 // with "gz". The gzip format is different from the zlib format. gzip is a 2869 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 2870 // 2871 // This library can optionally read and write gzip and raw deflate streams in 2872 // memory as well. 2873 // 2874 // The zlib format was designed to be compact and fast for use in memory 2875 // and on communications channels. The gzip format was designed for single- 2876 // file compression on file systems, has a larger header than zlib to maintain 2877 // directory information, and uses a different, slower check method than zlib. 2878 // 2879 // The library does not install any signal handler. The decoder checks 2880 // the consistency of the compressed data, so the library should never crash 2881 // even in the case of corrupted input. 2882 2883 type Alloc_func = uintptr /* zlib.h:81:16 */ 2884 type Free_func = uintptr /* zlib.h:82:16 */ 2885 2886 type Internal_state = struct { 2887 Fstrm Z_streamp 2888 Fstatus int32 2889 F__ccgo_pad1 [4]byte 2890 Fpending_buf uintptr 2891 Fpending_buf_size Ulg 2892 Fpending_out uintptr 2893 Fpending Ulg 2894 Fwrap int32 2895 F__ccgo_pad2 [4]byte 2896 Fgzhead Gz_headerp 2897 Fgzindex Ulg 2898 Fmethod Byte 2899 F__ccgo_pad3 [3]byte 2900 Flast_flush int32 2901 Fw_size UInt 2902 Fw_bits UInt 2903 Fw_mask UInt 2904 F__ccgo_pad4 [4]byte 2905 Fwindow uintptr 2906 Fwindow_size Ulg 2907 Fprev uintptr 2908 Fhead uintptr 2909 Fins_h UInt 2910 Fhash_size UInt 2911 Fhash_bits UInt 2912 Fhash_mask UInt 2913 Fhash_shift UInt 2914 F__ccgo_pad5 [4]byte 2915 Fblock_start int64 2916 Fmatch_length UInt 2917 Fprev_match IPos 2918 Fmatch_available int32 2919 Fstrstart UInt 2920 Fmatch_start UInt 2921 Flookahead UInt 2922 Fprev_length UInt 2923 Fmax_chain_length UInt 2924 Fmax_lazy_match UInt 2925 Flevel int32 2926 Fstrategy int32 2927 Fgood_match UInt 2928 Fnice_match int32 2929 Fdyn_ltree [573]struct { 2930 Ffc struct{ Ffreq Ush } 2931 Fdl struct{ Fdad Ush } 2932 } 2933 Fdyn_dtree [61]struct { 2934 Ffc struct{ Ffreq Ush } 2935 Fdl struct{ Fdad Ush } 2936 } 2937 Fbl_tree [39]struct { 2938 Ffc struct{ Ffreq Ush } 2939 Fdl struct{ Fdad Ush } 2940 } 2941 Fl_desc struct { 2942 Fdyn_tree uintptr 2943 Fmax_code int32 2944 F__ccgo_pad1 [4]byte 2945 Fstat_desc uintptr 2946 } 2947 Fd_desc struct { 2948 Fdyn_tree uintptr 2949 Fmax_code int32 2950 F__ccgo_pad1 [4]byte 2951 Fstat_desc uintptr 2952 } 2953 Fbl_desc struct { 2954 Fdyn_tree uintptr 2955 Fmax_code int32 2956 F__ccgo_pad1 [4]byte 2957 Fstat_desc uintptr 2958 } 2959 Fbl_count [16]Ush 2960 Fheap [573]int32 2961 Fheap_len int32 2962 Fheap_max int32 2963 Fdepth [573]Uch 2964 F__ccgo_pad6 [7]byte 2965 Fl_buf uintptr 2966 Flit_bufsize UInt 2967 Flast_lit UInt 2968 Fd_buf uintptr 2969 Fopt_len Ulg 2970 Fstatic_len Ulg 2971 Fmatches UInt 2972 Finsert UInt 2973 Fbi_buf Ush 2974 F__ccgo_pad7 [2]byte 2975 Fbi_valid int32 2976 Fhigh_water Ulg 2977 } /* zlib.h:84:1 */ 2978 2979 type Z_stream_s = struct { 2980 Fnext_in uintptr 2981 Favail_in UInt 2982 F__ccgo_pad1 [4]byte 2983 Ftotal_in ULong 2984 Fnext_out uintptr 2985 Favail_out UInt 2986 F__ccgo_pad2 [4]byte 2987 Ftotal_out ULong 2988 Fmsg uintptr 2989 Fstate uintptr 2990 Fzalloc Alloc_func 2991 Fzfree Free_func 2992 Fopaque Voidpf 2993 Fdata_type int32 2994 F__ccgo_pad3 [4]byte 2995 Fadler ULong 2996 Freserved ULong 2997 } /* zlib.h:86:9 */ 2998 2999 type Z_stream = Z_stream_s /* zlib.h:106:3 */ 3000 3001 type Z_streamp = uintptr /* zlib.h:108:22 */ 3002 3003 // 3004 // gzip header information passed to and from zlib routines. See RFC 1952 3005 // for more details on the meanings of these fields. 3006 type Gz_header_s = struct { 3007 Ftext int32 3008 F__ccgo_pad1 [4]byte 3009 Ftime ULong 3010 Fxflags int32 3011 Fos int32 3012 Fextra uintptr 3013 Fextra_len UInt 3014 Fextra_max UInt 3015 Fname uintptr 3016 Fname_max UInt 3017 F__ccgo_pad2 [4]byte 3018 Fcomment uintptr 3019 Fcomm_max UInt 3020 Fhcrc int32 3021 Fdone int32 3022 F__ccgo_pad3 [4]byte 3023 } /* zlib.h:114:9 */ 3024 3025 // 3026 // gzip header information passed to and from zlib routines. See RFC 1952 3027 // for more details on the meanings of these fields. 3028 type Gz_header = Gz_header_s /* zlib.h:129:3 */ 3029 3030 type Gz_headerp = uintptr /* zlib.h:131:23 */ 3031 // 3032 // inflateGetHeader() requests that gzip header information be stored in the 3033 // provided gz_header structure. inflateGetHeader() may be called after 3034 // inflateInit2() or inflateReset(), and before the first call of inflate(). 3035 // As inflate() processes the gzip stream, head->done is zero until the header 3036 // is completed, at which time head->done is set to one. If a zlib stream is 3037 // being decoded, then head->done is set to -1 to indicate that there will be 3038 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 3039 // used to force inflate() to return immediately after header processing is 3040 // complete and before any actual data is decompressed. 3041 // 3042 // The text, time, xflags, and os fields are filled in with the gzip header 3043 // contents. hcrc is set to true if there is a header CRC. (The header CRC 3044 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 3045 // contains the maximum number of bytes to write to extra. Once done is true, 3046 // extra_len contains the actual extra field length, and extra contains the 3047 // extra field, or that field truncated if extra_max is less than extra_len. 3048 // If name is not Z_NULL, then up to name_max characters are written there, 3049 // terminated with a zero unless the length is greater than name_max. If 3050 // comment is not Z_NULL, then up to comm_max characters are written there, 3051 // terminated with a zero unless the length is greater than comm_max. When any 3052 // of extra, name, or comment are not Z_NULL and the respective field is not 3053 // present in the header, then that field is set to Z_NULL to signal its 3054 // absence. This allows the use of deflateSetHeader() with the returned 3055 // structure to duplicate the header. However if those fields are set to 3056 // allocated memory, then the application will need to save those pointers 3057 // elsewhere so that they can be eventually freed. 3058 // 3059 // If inflateGetHeader is not used, then the header information is simply 3060 // discarded. The header is always checked for validity, including the header 3061 // CRC if present. inflateReset() will reset the process to discard the header 3062 // information. The application would need to call inflateGetHeader() again to 3063 // retrieve the header from the next gzip stream. 3064 // 3065 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 3066 // stream state was inconsistent. 3067 3068 // 3069 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 3070 // unsigned char FAR *window)); 3071 // 3072 // Initialize the internal stream state for decompression using inflateBack() 3073 // calls. The fields zalloc, zfree and opaque in strm must be initialized 3074 // before the call. If zalloc and zfree are Z_NULL, then the default library- 3075 // derived memory allocation routines are used. windowBits is the base two 3076 // logarithm of the window size, in the range 8..15. window is a caller 3077 // supplied buffer of that size. Except for special applications where it is 3078 // assured that deflate was used with small window sizes, windowBits must be 15 3079 // and a 32K byte window must be supplied to be able to decompress general 3080 // deflate streams. 3081 // 3082 // See inflateBack() for the usage of these routines. 3083 // 3084 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 3085 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 3086 // allocated, or Z_VERSION_ERROR if the version of the library does not match 3087 // the version of the header file. 3088 3089 type In_func = uintptr /* zlib.h:1092:18 */ 3090 type Out_func = uintptr /* zlib.h:1094:13 */ 3091 // 3092 // Same as uncompress, except that sourceLen is a pointer, where the 3093 // length of the source is *sourceLen. On return, *sourceLen is the number of 3094 // source bytes consumed. 3095 3096 // gzip file access functions 3097 3098 // 3099 // This library supports reading and writing files in gzip (.gz) format with 3100 // an interface similar to that of stdio, using the functions that start with 3101 // "gz". The gzip format is different from the zlib format. gzip is a gzip 3102 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 3103 3104 type GzFile_s = struct { 3105 Fhave uint32 3106 F__ccgo_pad1 [4]byte 3107 Fnext uintptr 3108 Fpos X__off_t 3109 } /* zlib.h:1300:9 */ 3110 3111 // 3112 // Same as uncompress, except that sourceLen is a pointer, where the 3113 // length of the source is *sourceLen. On return, *sourceLen is the number of 3114 // source bytes consumed. 3115 3116 // gzip file access functions 3117 3118 // 3119 // This library supports reading and writing files in gzip (.gz) format with 3120 // an interface similar to that of stdio, using the functions that start with 3121 // "gz". The gzip format is different from the zlib format. gzip is a gzip 3122 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 3123 3124 type GzFile = uintptr /* zlib.h:1300:25 */ 3125 3126 type Locale_t = uintptr /* string.h:116:25 */ 3127 3128 // $NetBSD: stdlib.h,v 1.121 2019/01/05 09:16:46 maya Exp $ 3129 3130 // - 3131 // Copyright (c) 1990, 1993 3132 // The Regents of the University of California. All rights reserved. 3133 // 3134 // Redistribution and use in source and binary forms, with or without 3135 // modification, are permitted provided that the following conditions 3136 // are met: 3137 // 1. Redistributions of source code must retain the above copyright 3138 // notice, this list of conditions and the following disclaimer. 3139 // 2. Redistributions in binary form must reproduce the above copyright 3140 // notice, this list of conditions and the following disclaimer in the 3141 // documentation and/or other materials provided with the distribution. 3142 // 3. Neither the name of the University nor the names of its contributors 3143 // may be used to endorse or promote products derived from this software 3144 // without specific prior written permission. 3145 // 3146 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 3147 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 3148 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 3149 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3150 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3151 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3152 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3153 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3154 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3155 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3156 // SUCH DAMAGE. 3157 // 3158 // @(#)stdlib.h 8.5 (Berkeley) 5/19/95 3159 3160 // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ 3161 3162 // * Copyright (c) 1991, 1993 3163 // The Regents of the University of California. All rights reserved. 3164 // 3165 // This code is derived from software contributed to Berkeley by 3166 // Berkeley Software Design, Inc. 3167 // 3168 // Redistribution and use in source and binary forms, with or without 3169 // modification, are permitted provided that the following conditions 3170 // are met: 3171 // 1. Redistributions of source code must retain the above copyright 3172 // notice, this list of conditions and the following disclaimer. 3173 // 2. Redistributions in binary form must reproduce the above copyright 3174 // notice, this list of conditions and the following disclaimer in the 3175 // documentation and/or other materials provided with the distribution. 3176 // 3. Neither the name of the University nor the names of its contributors 3177 // may be used to endorse or promote products derived from this software 3178 // without specific prior written permission. 3179 // 3180 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 3181 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 3182 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 3183 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3184 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3185 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3186 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3187 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3188 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3189 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3190 // SUCH DAMAGE. 3191 // 3192 // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 3193 3194 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 3195 3196 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 3197 // Public domain. 3198 // 3199 // NOTE: Do not protect this header against multiple inclusion. Doing 3200 // so can have subtle side-effects due to header file inclusion order 3201 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 3202 // protect each CPP macro that we want to supply. 3203 3204 // Feature-test macros are defined by several standards, and allow an 3205 // application to specify what symbols they want the system headers to 3206 // expose, and hence what standard they want them to conform to. 3207 // There are two classes of feature-test macros. The first class 3208 // specify complete standards, and if one of these is defined, header 3209 // files will try to conform to the relevant standard. They are: 3210 // 3211 // ANSI macros: 3212 // _ANSI_SOURCE ANSI C89 3213 // 3214 // POSIX macros: 3215 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 3216 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 3217 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 3218 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 3219 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 3220 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 3221 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 3222 // 3223 // X/Open macros: 3224 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 3225 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 3226 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 3227 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 3228 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 3229 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 3230 // 3231 // NetBSD macros: 3232 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 3233 // 3234 // If more than one of these "major" feature-test macros is defined, 3235 // then the set of facilities provided (and namespace used) is the 3236 // union of that specified by the relevant standards, and in case of 3237 // conflict, the earlier standard in the above list has precedence (so 3238 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 3239 // of rename() that's used is the POSIX one). If none of the "major" 3240 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 3241 // 3242 // There are also "minor" feature-test macros, which enable extra 3243 // functionality in addition to some base standard. They should be 3244 // defined along with one of the "major" macros. The "minor" macros 3245 // are: 3246 // 3247 // _REENTRANT 3248 // _ISOC99_SOURCE 3249 // _ISOC11_SOURCE 3250 // _LARGEFILE_SOURCE Large File Support 3251 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 3252 3253 // $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $ 3254 3255 // - 3256 // Copyright (c) 1982, 1986, 1991, 1993, 1994 3257 // The Regents of the University of California. All rights reserved. 3258 // (c) UNIX System Laboratories, Inc. 3259 // All or some portions of this file are derived from material licensed 3260 // to the University of California by American Telephone and Telegraph 3261 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 3262 // the permission of UNIX System Laboratories, Inc. 3263 // 3264 // Redistribution and use in source and binary forms, with or without 3265 // modification, are permitted provided that the following conditions 3266 // are met: 3267 // 1. Redistributions of source code must retain the above copyright 3268 // notice, this list of conditions and the following disclaimer. 3269 // 2. Redistributions in binary form must reproduce the above copyright 3270 // notice, this list of conditions and the following disclaimer in the 3271 // documentation and/or other materials provided with the distribution. 3272 // 3. Neither the name of the University nor the names of its contributors 3273 // may be used to endorse or promote products derived from this software 3274 // without specific prior written permission. 3275 // 3276 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 3277 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 3278 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 3279 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3280 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3281 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3282 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3283 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3284 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3285 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3286 // SUCH DAMAGE. 3287 // 3288 // @(#)types.h 8.4 (Berkeley) 1/21/94 3289 3290 // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ 3291 3292 // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ 3293 3294 // - 3295 // Copyright (c) 2014 The NetBSD Foundation, Inc. 3296 // All rights reserved. 3297 // 3298 // This code is derived from software contributed to The NetBSD Foundation 3299 // by Matt Thomas of 3am Software Foundry. 3300 // 3301 // Redistribution and use in source and binary forms, with or without 3302 // modification, are permitted provided that the following conditions 3303 // are met: 3304 // 1. Redistributions of source code must retain the above copyright 3305 // notice, this list of conditions and the following disclaimer. 3306 // 2. Redistributions in binary form must reproduce the above copyright 3307 // notice, this list of conditions and the following disclaimer in the 3308 // documentation and/or other materials provided with the distribution. 3309 // 3310 // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 3311 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 3312 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 3313 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 3314 // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 3315 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3316 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3317 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3318 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3319 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3320 // POSSIBILITY OF SUCH DAMAGE. 3321 3322 type Div_t = struct { 3323 Fquot int32 3324 Frem int32 3325 } /* stdlib.h:59:3 */ 3326 3327 type Ldiv_t = struct { 3328 Fquot int64 3329 Frem int64 3330 } /* stdlib.h:64:3 */ 3331 3332 type Lldiv_t = struct { 3333 Fquot int64 3334 Frem int64 3335 } /* stdlib.h:74:3 */ 3336 3337 type Qdiv_t = struct { 3338 Fquot Quad_t 3339 Frem Quad_t 3340 } /* stdlib.h:81:3 */ 3341 3342 // since "static" is used to mean two completely different things in C, we 3343 // define "local" for the non-static meaning of "static", for readability 3344 // (compile with -Dlocal if your debugger can't find static symbols) 3345 3346 type Uch = uint8 /* zutil.h:43:24 */ 3347 type Uchf = Uch /* zutil.h:44:17 */ 3348 type Ush = uint16 /* zutil.h:45:24 */ 3349 type Ushf = Ush /* zutil.h:46:17 */ 3350 type Ulg = uint64 /* zutil.h:47:24 */ 3351 3352 // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 3353 3354 // use NO_DIVIDE if your processor does not do division in hardware -- 3355 // try it both ways to see which is faster 3356 3357 // ========================================================================= 3358 func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */ 3359 var sum2 uint64 3360 var n uint32 3361 3362 // split Adler-32 into component sums 3363 sum2 = ((adler >> 16) & uint64(0xffff)) 3364 adler = adler & (uint64(0xffff)) 3365 3366 // in case user likes doing a byte at a time, keep it fast 3367 if len == uint64(1) { 3368 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(buf)))) 3369 if adler >= uint64(BASE) { 3370 adler = adler - (uint64(BASE)) 3371 } 3372 sum2 = sum2 + (adler) 3373 if sum2 >= uint64(BASE) { 3374 sum2 = sum2 - (uint64(BASE)) 3375 } 3376 return (adler | (sum2 << 16)) 3377 } 3378 3379 // initial Adler-32 value (deferred check for len == 1 speed) 3380 if buf == uintptr(Z_NULL) { 3381 return uint64(1) 3382 } 3383 3384 // in case short lengths are provided, keep it somewhat fast 3385 if len < uint64(16) { 3386 for libc.PostDecUint64(&len, 1) != 0 { 3387 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 3388 sum2 = sum2 + (adler) 3389 } 3390 if adler >= uint64(BASE) { 3391 adler = adler - (uint64(BASE)) 3392 } 3393 sum2 = sum2 % (uint64(BASE)) // only added so many BASE's 3394 return (adler | (sum2 << 16)) 3395 } 3396 3397 // do length NMAX blocks -- requires just one modulo operation 3398 for len >= uint64(NMAX) { 3399 len = len - (uint64(NMAX)) 3400 n = (uint32(NMAX / 16)) // NMAX is divisible by 16 3401 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 3402 { 3403 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 3404 sum2 = sum2 + (adler) 3405 } 3406 { 3407 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 3408 sum2 = sum2 + (adler) 3409 } 3410 3411 { 3412 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 3413 sum2 = sum2 + (adler) 3414 } 3415 { 3416 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 3417 sum2 = sum2 + (adler) 3418 } 3419 3420 { 3421 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 3422 sum2 = sum2 + (adler) 3423 } 3424 { 3425 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 3426 sum2 = sum2 + (adler) 3427 } 3428 3429 { 3430 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 3431 sum2 = sum2 + (adler) 3432 } 3433 { 3434 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 3435 sum2 = sum2 + (adler) 3436 } 3437 3438 { 3439 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 3440 sum2 = sum2 + (adler) 3441 } 3442 { 3443 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 3444 sum2 = sum2 + (adler) 3445 } 3446 3447 { 3448 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 3449 sum2 = sum2 + (adler) 3450 } 3451 { 3452 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 3453 sum2 = sum2 + (adler) 3454 } 3455 3456 { 3457 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 3458 sum2 = sum2 + (adler) 3459 } 3460 { 3461 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 3462 sum2 = sum2 + (adler) 3463 } 3464 3465 { 3466 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 3467 sum2 = sum2 + (adler) 3468 } 3469 { 3470 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 3471 sum2 = sum2 + (adler) 3472 } 3473 3474 // 16 sums unrolled 3475 buf += uintptr(16) 3476 } 3477 adler = adler % (uint64(BASE)) 3478 sum2 = sum2 % (uint64(BASE)) 3479 } 3480 3481 // do remaining bytes (less than NMAX, still just one modulo) 3482 if len != 0 { // avoid modulos if none remaining 3483 for len >= uint64(16) { 3484 len = len - (uint64(16)) 3485 { 3486 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf))))) 3487 sum2 = sum2 + (adler) 3488 } 3489 { 3490 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1)))) 3491 sum2 = sum2 + (adler) 3492 } 3493 3494 { 3495 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2)))) 3496 sum2 = sum2 + (adler) 3497 } 3498 { 3499 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3)))) 3500 sum2 = sum2 + (adler) 3501 } 3502 3503 { 3504 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4)))) 3505 sum2 = sum2 + (adler) 3506 } 3507 { 3508 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5)))) 3509 sum2 = sum2 + (adler) 3510 } 3511 3512 { 3513 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6)))) 3514 sum2 = sum2 + (adler) 3515 } 3516 { 3517 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7)))) 3518 sum2 = sum2 + (adler) 3519 } 3520 3521 { 3522 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8)))) 3523 sum2 = sum2 + (adler) 3524 } 3525 { 3526 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9)))) 3527 sum2 = sum2 + (adler) 3528 } 3529 3530 { 3531 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10)))) 3532 sum2 = sum2 + (adler) 3533 } 3534 { 3535 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11)))) 3536 sum2 = sum2 + (adler) 3537 } 3538 3539 { 3540 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12)))) 3541 sum2 = sum2 + (adler) 3542 } 3543 { 3544 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13)))) 3545 sum2 = sum2 + (adler) 3546 } 3547 3548 { 3549 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14)))) 3550 sum2 = sum2 + (adler) 3551 } 3552 { 3553 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15)))) 3554 sum2 = sum2 + (adler) 3555 } 3556 3557 buf += uintptr(16) 3558 } 3559 for libc.PostDecUint64(&len, 1) != 0 { 3560 adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))) 3561 sum2 = sum2 + (adler) 3562 } 3563 adler = adler % (uint64(BASE)) 3564 sum2 = sum2 % (uint64(BASE)) 3565 } 3566 3567 // return recombined sums 3568 return (adler | (sum2 << 16)) 3569 } 3570 3571 // ========================================================================= 3572 func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */ 3573 return Xadler32_z(tls, adler, buf, uint64(len)) 3574 } 3575 3576 // ========================================================================= 3577 func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 X__off_t) ULong { /* adler32.c:143:13: */ 3578 var sum1 uint64 3579 var sum2 uint64 3580 var rem uint32 3581 3582 // for negative len, return invalid adler32 as a clue for debugging 3583 if len2 < int64(0) { 3584 return 0xffffffff 3585 } 3586 3587 // the derivation of this formula is left as an exercise for the reader 3588 len2 = len2 % (int64(BASE)) // assumes len2 >= 0 3589 rem = uint32(len2) 3590 sum1 = (adler1 & uint64(0xffff)) 3591 sum2 = (uint64(rem) * sum1) 3592 sum2 = sum2 % (uint64(BASE)) 3593 sum1 = sum1 + (((adler2 & uint64(0xffff)) + uint64(BASE)) - uint64(1)) 3594 sum2 = sum2 + (((((adler1 >> 16) & uint64(0xffff)) + ((adler2 >> 16) & uint64(0xffff))) + uint64(BASE)) - ULong(rem)) 3595 if sum1 >= uint64(BASE) { 3596 sum1 = sum1 - (uint64(BASE)) 3597 } 3598 if sum1 >= uint64(BASE) { 3599 sum1 = sum1 - (uint64(BASE)) 3600 } 3601 if sum2 >= (uint64(uint64(BASE)) << 1) { 3602 sum2 = sum2 - (uint64(uint64(BASE)) << 1) 3603 } 3604 if sum2 >= uint64(BASE) { 3605 sum2 = sum2 - (uint64(BASE)) 3606 } 3607 return (sum1 | (sum2 << 16)) 3608 } 3609 3610 // ========================================================================= 3611 func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 X__off_t) ULong { /* adler32.c:172:15: */ 3612 return adler32_combine_(tls, adler1, adler2, len2) 3613 } 3614 3615 func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 X__off_t) ULong { /* adler32.c:180:15: */ 3616 return adler32_combine_(tls, adler1, adler2, len2) 3617 } 3618 3619 // =========================================================================== 3620 // Compresses the source buffer into the destination buffer. The level 3621 // parameter has the same meaning as in deflateInit. sourceLen is the byte 3622 // length of the source buffer. Upon entry, destLen is the total size of the 3623 // destination buffer, which must be at least 0.1% larger than sourceLen plus 3624 // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 3625 // 3626 // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 3627 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, 3628 // Z_STREAM_ERROR if the level parameter is invalid. 3629 func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */ 3630 bp := tls.Alloc(112) 3631 defer tls.Free(112) 3632 3633 // var stream Z_stream at bp, 112 3634 3635 var err int32 3636 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 3637 var left ULong 3638 3639 left = *(*ULongf)(unsafe.Pointer(destLen)) 3640 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 3641 3642 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0) 3643 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0) 3644 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0) 3645 3646 err = XdeflateInit_(tls, bp /* &stream */, level, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 3647 if err != Z_OK { 3648 return err 3649 } 3650 3651 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest 3652 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0) 3653 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source 3654 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0) 3655 3656 for ok := true; ok; ok = (err == Z_OK) { 3657 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out == UInt(0) { 3658 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 { 3659 if left > ULong(max) { 3660 return max 3661 } 3662 return UInt(left) 3663 }() 3664 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out)) 3665 } 3666 if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in == UInt(0) { 3667 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 { 3668 if sourceLen > ULong(max) { 3669 return max 3670 } 3671 return UInt(sourceLen) 3672 }() 3673 sourceLen = sourceLen - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in)) 3674 } 3675 err = Xdeflate(tls, bp /* &stream */, func() int32 { 3676 if sourceLen != 0 { 3677 return Z_NO_FLUSH 3678 } 3679 return Z_FINISH 3680 }()) 3681 } 3682 3683 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out 3684 XdeflateEnd(tls, bp /* &stream */) 3685 if err == Z_STREAM_END { 3686 return Z_OK 3687 } 3688 return err 3689 } 3690 3691 // =========================================================================== 3692 func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */ 3693 return Xcompress2(tls, dest, destLen, source, sourceLen, -1) 3694 } 3695 3696 // =========================================================================== 3697 // If the default memLevel or windowBits for deflateInit() is changed, then 3698 // this function needs to be updated. 3699 // 3700 func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */ 3701 return ((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) 3702 } 3703 3704 // ======================================================================== 3705 // Tables of CRC-32s of all single-byte values, made by make_crc_table(). 3706 // crc32.h -- tables for rapid CRC calculation 3707 // Generated automatically by crc32.c 3708 3709 var crc_table = [8][256]Z_crc_t{ 3710 { 3711 uint32(0x00000000), uint32(0x77073096), uint32(0xee0e612c), uint32(0x990951ba), uint32(0x076dc419), 3712 uint32(0x706af48f), uint32(0xe963a535), uint32(0x9e6495a3), uint32(0x0edb8832), uint32(0x79dcb8a4), 3713 uint32(0xe0d5e91e), uint32(0x97d2d988), uint32(0x09b64c2b), uint32(0x7eb17cbd), uint32(0xe7b82d07), 3714 uint32(0x90bf1d91), uint32(0x1db71064), uint32(0x6ab020f2), uint32(0xf3b97148), uint32(0x84be41de), 3715 uint32(0x1adad47d), uint32(0x6ddde4eb), uint32(0xf4d4b551), uint32(0x83d385c7), uint32(0x136c9856), 3716 uint32(0x646ba8c0), uint32(0xfd62f97a), uint32(0x8a65c9ec), uint32(0x14015c4f), uint32(0x63066cd9), 3717 uint32(0xfa0f3d63), uint32(0x8d080df5), uint32(0x3b6e20c8), uint32(0x4c69105e), uint32(0xd56041e4), 3718 uint32(0xa2677172), uint32(0x3c03e4d1), uint32(0x4b04d447), uint32(0xd20d85fd), uint32(0xa50ab56b), 3719 uint32(0x35b5a8fa), uint32(0x42b2986c), uint32(0xdbbbc9d6), uint32(0xacbcf940), uint32(0x32d86ce3), 3720 uint32(0x45df5c75), uint32(0xdcd60dcf), uint32(0xabd13d59), uint32(0x26d930ac), uint32(0x51de003a), 3721 uint32(0xc8d75180), uint32(0xbfd06116), uint32(0x21b4f4b5), uint32(0x56b3c423), uint32(0xcfba9599), 3722 uint32(0xb8bda50f), uint32(0x2802b89e), uint32(0x5f058808), uint32(0xc60cd9b2), uint32(0xb10be924), 3723 uint32(0x2f6f7c87), uint32(0x58684c11), uint32(0xc1611dab), uint32(0xb6662d3d), uint32(0x76dc4190), 3724 uint32(0x01db7106), uint32(0x98d220bc), uint32(0xefd5102a), uint32(0x71b18589), uint32(0x06b6b51f), 3725 uint32(0x9fbfe4a5), uint32(0xe8b8d433), uint32(0x7807c9a2), uint32(0x0f00f934), uint32(0x9609a88e), 3726 uint32(0xe10e9818), uint32(0x7f6a0dbb), uint32(0x086d3d2d), uint32(0x91646c97), uint32(0xe6635c01), 3727 uint32(0x6b6b51f4), uint32(0x1c6c6162), uint32(0x856530d8), uint32(0xf262004e), uint32(0x6c0695ed), 3728 uint32(0x1b01a57b), uint32(0x8208f4c1), uint32(0xf50fc457), uint32(0x65b0d9c6), uint32(0x12b7e950), 3729 uint32(0x8bbeb8ea), uint32(0xfcb9887c), uint32(0x62dd1ddf), uint32(0x15da2d49), uint32(0x8cd37cf3), 3730 uint32(0xfbd44c65), uint32(0x4db26158), uint32(0x3ab551ce), uint32(0xa3bc0074), uint32(0xd4bb30e2), 3731 uint32(0x4adfa541), uint32(0x3dd895d7), uint32(0xa4d1c46d), uint32(0xd3d6f4fb), uint32(0x4369e96a), 3732 uint32(0x346ed9fc), uint32(0xad678846), uint32(0xda60b8d0), uint32(0x44042d73), uint32(0x33031de5), 3733 uint32(0xaa0a4c5f), uint32(0xdd0d7cc9), uint32(0x5005713c), uint32(0x270241aa), uint32(0xbe0b1010), 3734 uint32(0xc90c2086), uint32(0x5768b525), uint32(0x206f85b3), uint32(0xb966d409), uint32(0xce61e49f), 3735 uint32(0x5edef90e), uint32(0x29d9c998), uint32(0xb0d09822), uint32(0xc7d7a8b4), uint32(0x59b33d17), 3736 uint32(0x2eb40d81), uint32(0xb7bd5c3b), uint32(0xc0ba6cad), uint32(0xedb88320), uint32(0x9abfb3b6), 3737 uint32(0x03b6e20c), uint32(0x74b1d29a), uint32(0xead54739), uint32(0x9dd277af), uint32(0x04db2615), 3738 uint32(0x73dc1683), uint32(0xe3630b12), uint32(0x94643b84), uint32(0x0d6d6a3e), uint32(0x7a6a5aa8), 3739 uint32(0xe40ecf0b), uint32(0x9309ff9d), uint32(0x0a00ae27), uint32(0x7d079eb1), uint32(0xf00f9344), 3740 uint32(0x8708a3d2), uint32(0x1e01f268), uint32(0x6906c2fe), uint32(0xf762575d), uint32(0x806567cb), 3741 uint32(0x196c3671), uint32(0x6e6b06e7), uint32(0xfed41b76), uint32(0x89d32be0), uint32(0x10da7a5a), 3742 uint32(0x67dd4acc), uint32(0xf9b9df6f), uint32(0x8ebeeff9), uint32(0x17b7be43), uint32(0x60b08ed5), 3743 uint32(0xd6d6a3e8), uint32(0xa1d1937e), uint32(0x38d8c2c4), uint32(0x4fdff252), uint32(0xd1bb67f1), 3744 uint32(0xa6bc5767), uint32(0x3fb506dd), uint32(0x48b2364b), uint32(0xd80d2bda), uint32(0xaf0a1b4c), 3745 uint32(0x36034af6), uint32(0x41047a60), uint32(0xdf60efc3), uint32(0xa867df55), uint32(0x316e8eef), 3746 uint32(0x4669be79), uint32(0xcb61b38c), uint32(0xbc66831a), uint32(0x256fd2a0), uint32(0x5268e236), 3747 uint32(0xcc0c7795), uint32(0xbb0b4703), uint32(0x220216b9), uint32(0x5505262f), uint32(0xc5ba3bbe), 3748 uint32(0xb2bd0b28), uint32(0x2bb45a92), uint32(0x5cb36a04), uint32(0xc2d7ffa7), uint32(0xb5d0cf31), 3749 uint32(0x2cd99e8b), uint32(0x5bdeae1d), uint32(0x9b64c2b0), uint32(0xec63f226), uint32(0x756aa39c), 3750 uint32(0x026d930a), uint32(0x9c0906a9), uint32(0xeb0e363f), uint32(0x72076785), uint32(0x05005713), 3751 uint32(0x95bf4a82), uint32(0xe2b87a14), uint32(0x7bb12bae), uint32(0x0cb61b38), uint32(0x92d28e9b), 3752 uint32(0xe5d5be0d), uint32(0x7cdcefb7), uint32(0x0bdbdf21), uint32(0x86d3d2d4), uint32(0xf1d4e242), 3753 uint32(0x68ddb3f8), uint32(0x1fda836e), uint32(0x81be16cd), uint32(0xf6b9265b), uint32(0x6fb077e1), 3754 uint32(0x18b74777), uint32(0x88085ae6), uint32(0xff0f6a70), uint32(0x66063bca), uint32(0x11010b5c), 3755 uint32(0x8f659eff), uint32(0xf862ae69), uint32(0x616bffd3), uint32(0x166ccf45), uint32(0xa00ae278), 3756 uint32(0xd70dd2ee), uint32(0x4e048354), uint32(0x3903b3c2), uint32(0xa7672661), uint32(0xd06016f7), 3757 uint32(0x4969474d), uint32(0x3e6e77db), uint32(0xaed16a4a), uint32(0xd9d65adc), uint32(0x40df0b66), 3758 uint32(0x37d83bf0), uint32(0xa9bcae53), uint32(0xdebb9ec5), uint32(0x47b2cf7f), uint32(0x30b5ffe9), 3759 uint32(0xbdbdf21c), uint32(0xcabac28a), uint32(0x53b39330), uint32(0x24b4a3a6), uint32(0xbad03605), 3760 uint32(0xcdd70693), uint32(0x54de5729), uint32(0x23d967bf), uint32(0xb3667a2e), uint32(0xc4614ab8), 3761 uint32(0x5d681b02), uint32(0x2a6f2b94), uint32(0xb40bbe37), uint32(0xc30c8ea1), uint32(0x5a05df1b), 3762 uint32(0x2d02ef8d), 3763 }, 3764 { 3765 uint32(0x00000000), uint32(0x191b3141), uint32(0x32366282), uint32(0x2b2d53c3), uint32(0x646cc504), 3766 uint32(0x7d77f445), uint32(0x565aa786), uint32(0x4f4196c7), uint32(0xc8d98a08), uint32(0xd1c2bb49), 3767 uint32(0xfaefe88a), uint32(0xe3f4d9cb), uint32(0xacb54f0c), uint32(0xb5ae7e4d), uint32(0x9e832d8e), 3768 uint32(0x87981ccf), uint32(0x4ac21251), uint32(0x53d92310), uint32(0x78f470d3), uint32(0x61ef4192), 3769 uint32(0x2eaed755), uint32(0x37b5e614), uint32(0x1c98b5d7), uint32(0x05838496), uint32(0x821b9859), 3770 uint32(0x9b00a918), uint32(0xb02dfadb), uint32(0xa936cb9a), uint32(0xe6775d5d), uint32(0xff6c6c1c), 3771 uint32(0xd4413fdf), uint32(0xcd5a0e9e), uint32(0x958424a2), uint32(0x8c9f15e3), uint32(0xa7b24620), 3772 uint32(0xbea97761), uint32(0xf1e8e1a6), uint32(0xe8f3d0e7), uint32(0xc3de8324), uint32(0xdac5b265), 3773 uint32(0x5d5daeaa), uint32(0x44469feb), uint32(0x6f6bcc28), uint32(0x7670fd69), uint32(0x39316bae), 3774 uint32(0x202a5aef), uint32(0x0b07092c), uint32(0x121c386d), uint32(0xdf4636f3), uint32(0xc65d07b2), 3775 uint32(0xed705471), uint32(0xf46b6530), uint32(0xbb2af3f7), uint32(0xa231c2b6), uint32(0x891c9175), 3776 uint32(0x9007a034), uint32(0x179fbcfb), uint32(0x0e848dba), uint32(0x25a9de79), uint32(0x3cb2ef38), 3777 uint32(0x73f379ff), uint32(0x6ae848be), uint32(0x41c51b7d), uint32(0x58de2a3c), uint32(0xf0794f05), 3778 uint32(0xe9627e44), uint32(0xc24f2d87), uint32(0xdb541cc6), uint32(0x94158a01), uint32(0x8d0ebb40), 3779 uint32(0xa623e883), uint32(0xbf38d9c2), uint32(0x38a0c50d), uint32(0x21bbf44c), uint32(0x0a96a78f), 3780 uint32(0x138d96ce), uint32(0x5ccc0009), uint32(0x45d73148), uint32(0x6efa628b), uint32(0x77e153ca), 3781 uint32(0xbabb5d54), uint32(0xa3a06c15), uint32(0x888d3fd6), uint32(0x91960e97), uint32(0xded79850), 3782 uint32(0xc7cca911), uint32(0xece1fad2), uint32(0xf5facb93), uint32(0x7262d75c), uint32(0x6b79e61d), 3783 uint32(0x4054b5de), uint32(0x594f849f), uint32(0x160e1258), uint32(0x0f152319), uint32(0x243870da), 3784 uint32(0x3d23419b), uint32(0x65fd6ba7), uint32(0x7ce65ae6), uint32(0x57cb0925), uint32(0x4ed03864), 3785 uint32(0x0191aea3), uint32(0x188a9fe2), uint32(0x33a7cc21), uint32(0x2abcfd60), uint32(0xad24e1af), 3786 uint32(0xb43fd0ee), uint32(0x9f12832d), uint32(0x8609b26c), uint32(0xc94824ab), uint32(0xd05315ea), 3787 uint32(0xfb7e4629), uint32(0xe2657768), uint32(0x2f3f79f6), uint32(0x362448b7), uint32(0x1d091b74), 3788 uint32(0x04122a35), uint32(0x4b53bcf2), uint32(0x52488db3), uint32(0x7965de70), uint32(0x607eef31), 3789 uint32(0xe7e6f3fe), uint32(0xfefdc2bf), uint32(0xd5d0917c), uint32(0xcccba03d), uint32(0x838a36fa), 3790 uint32(0x9a9107bb), uint32(0xb1bc5478), uint32(0xa8a76539), uint32(0x3b83984b), uint32(0x2298a90a), 3791 uint32(0x09b5fac9), uint32(0x10aecb88), uint32(0x5fef5d4f), uint32(0x46f46c0e), uint32(0x6dd93fcd), 3792 uint32(0x74c20e8c), uint32(0xf35a1243), uint32(0xea412302), uint32(0xc16c70c1), uint32(0xd8774180), 3793 uint32(0x9736d747), uint32(0x8e2de606), uint32(0xa500b5c5), uint32(0xbc1b8484), uint32(0x71418a1a), 3794 uint32(0x685abb5b), uint32(0x4377e898), uint32(0x5a6cd9d9), uint32(0x152d4f1e), uint32(0x0c367e5f), 3795 uint32(0x271b2d9c), uint32(0x3e001cdd), uint32(0xb9980012), uint32(0xa0833153), uint32(0x8bae6290), 3796 uint32(0x92b553d1), uint32(0xddf4c516), uint32(0xc4eff457), uint32(0xefc2a794), uint32(0xf6d996d5), 3797 uint32(0xae07bce9), uint32(0xb71c8da8), uint32(0x9c31de6b), uint32(0x852aef2a), uint32(0xca6b79ed), 3798 uint32(0xd37048ac), uint32(0xf85d1b6f), uint32(0xe1462a2e), uint32(0x66de36e1), uint32(0x7fc507a0), 3799 uint32(0x54e85463), uint32(0x4df36522), uint32(0x02b2f3e5), uint32(0x1ba9c2a4), uint32(0x30849167), 3800 uint32(0x299fa026), uint32(0xe4c5aeb8), uint32(0xfdde9ff9), uint32(0xd6f3cc3a), uint32(0xcfe8fd7b), 3801 uint32(0x80a96bbc), uint32(0x99b25afd), uint32(0xb29f093e), uint32(0xab84387f), uint32(0x2c1c24b0), 3802 uint32(0x350715f1), uint32(0x1e2a4632), uint32(0x07317773), uint32(0x4870e1b4), uint32(0x516bd0f5), 3803 uint32(0x7a468336), uint32(0x635db277), uint32(0xcbfad74e), uint32(0xd2e1e60f), uint32(0xf9ccb5cc), 3804 uint32(0xe0d7848d), uint32(0xaf96124a), uint32(0xb68d230b), uint32(0x9da070c8), uint32(0x84bb4189), 3805 uint32(0x03235d46), uint32(0x1a386c07), uint32(0x31153fc4), uint32(0x280e0e85), uint32(0x674f9842), 3806 uint32(0x7e54a903), uint32(0x5579fac0), uint32(0x4c62cb81), uint32(0x8138c51f), uint32(0x9823f45e), 3807 uint32(0xb30ea79d), uint32(0xaa1596dc), uint32(0xe554001b), uint32(0xfc4f315a), uint32(0xd7626299), 3808 uint32(0xce7953d8), uint32(0x49e14f17), uint32(0x50fa7e56), uint32(0x7bd72d95), uint32(0x62cc1cd4), 3809 uint32(0x2d8d8a13), uint32(0x3496bb52), uint32(0x1fbbe891), uint32(0x06a0d9d0), uint32(0x5e7ef3ec), 3810 uint32(0x4765c2ad), uint32(0x6c48916e), uint32(0x7553a02f), uint32(0x3a1236e8), uint32(0x230907a9), 3811 uint32(0x0824546a), uint32(0x113f652b), uint32(0x96a779e4), uint32(0x8fbc48a5), uint32(0xa4911b66), 3812 uint32(0xbd8a2a27), uint32(0xf2cbbce0), uint32(0xebd08da1), uint32(0xc0fdde62), uint32(0xd9e6ef23), 3813 uint32(0x14bce1bd), uint32(0x0da7d0fc), uint32(0x268a833f), uint32(0x3f91b27e), uint32(0x70d024b9), 3814 uint32(0x69cb15f8), uint32(0x42e6463b), uint32(0x5bfd777a), uint32(0xdc656bb5), uint32(0xc57e5af4), 3815 uint32(0xee530937), uint32(0xf7483876), uint32(0xb809aeb1), uint32(0xa1129ff0), uint32(0x8a3fcc33), 3816 uint32(0x9324fd72), 3817 }, 3818 { 3819 uint32(0x00000000), uint32(0x01c26a37), uint32(0x0384d46e), uint32(0x0246be59), uint32(0x0709a8dc), 3820 uint32(0x06cbc2eb), uint32(0x048d7cb2), uint32(0x054f1685), uint32(0x0e1351b8), uint32(0x0fd13b8f), 3821 uint32(0x0d9785d6), uint32(0x0c55efe1), uint32(0x091af964), uint32(0x08d89353), uint32(0x0a9e2d0a), 3822 uint32(0x0b5c473d), uint32(0x1c26a370), uint32(0x1de4c947), uint32(0x1fa2771e), uint32(0x1e601d29), 3823 uint32(0x1b2f0bac), uint32(0x1aed619b), uint32(0x18abdfc2), uint32(0x1969b5f5), uint32(0x1235f2c8), 3824 uint32(0x13f798ff), uint32(0x11b126a6), uint32(0x10734c91), uint32(0x153c5a14), uint32(0x14fe3023), 3825 uint32(0x16b88e7a), uint32(0x177ae44d), uint32(0x384d46e0), uint32(0x398f2cd7), uint32(0x3bc9928e), 3826 uint32(0x3a0bf8b9), uint32(0x3f44ee3c), uint32(0x3e86840b), uint32(0x3cc03a52), uint32(0x3d025065), 3827 uint32(0x365e1758), uint32(0x379c7d6f), uint32(0x35dac336), uint32(0x3418a901), uint32(0x3157bf84), 3828 uint32(0x3095d5b3), uint32(0x32d36bea), uint32(0x331101dd), uint32(0x246be590), uint32(0x25a98fa7), 3829 uint32(0x27ef31fe), uint32(0x262d5bc9), uint32(0x23624d4c), uint32(0x22a0277b), uint32(0x20e69922), 3830 uint32(0x2124f315), uint32(0x2a78b428), uint32(0x2bbade1f), uint32(0x29fc6046), uint32(0x283e0a71), 3831 uint32(0x2d711cf4), uint32(0x2cb376c3), uint32(0x2ef5c89a), uint32(0x2f37a2ad), uint32(0x709a8dc0), 3832 uint32(0x7158e7f7), uint32(0x731e59ae), uint32(0x72dc3399), uint32(0x7793251c), uint32(0x76514f2b), 3833 uint32(0x7417f172), uint32(0x75d59b45), uint32(0x7e89dc78), uint32(0x7f4bb64f), uint32(0x7d0d0816), 3834 uint32(0x7ccf6221), uint32(0x798074a4), uint32(0x78421e93), uint32(0x7a04a0ca), uint32(0x7bc6cafd), 3835 uint32(0x6cbc2eb0), uint32(0x6d7e4487), uint32(0x6f38fade), uint32(0x6efa90e9), uint32(0x6bb5866c), 3836 uint32(0x6a77ec5b), uint32(0x68315202), uint32(0x69f33835), uint32(0x62af7f08), uint32(0x636d153f), 3837 uint32(0x612bab66), uint32(0x60e9c151), uint32(0x65a6d7d4), uint32(0x6464bde3), uint32(0x662203ba), 3838 uint32(0x67e0698d), uint32(0x48d7cb20), uint32(0x4915a117), uint32(0x4b531f4e), uint32(0x4a917579), 3839 uint32(0x4fde63fc), uint32(0x4e1c09cb), uint32(0x4c5ab792), uint32(0x4d98dda5), uint32(0x46c49a98), 3840 uint32(0x4706f0af), uint32(0x45404ef6), uint32(0x448224c1), uint32(0x41cd3244), uint32(0x400f5873), 3841 uint32(0x4249e62a), uint32(0x438b8c1d), uint32(0x54f16850), uint32(0x55330267), uint32(0x5775bc3e), 3842 uint32(0x56b7d609), uint32(0x53f8c08c), uint32(0x523aaabb), uint32(0x507c14e2), uint32(0x51be7ed5), 3843 uint32(0x5ae239e8), uint32(0x5b2053df), uint32(0x5966ed86), uint32(0x58a487b1), uint32(0x5deb9134), 3844 uint32(0x5c29fb03), uint32(0x5e6f455a), uint32(0x5fad2f6d), uint32(0xe1351b80), uint32(0xe0f771b7), 3845 uint32(0xe2b1cfee), uint32(0xe373a5d9), uint32(0xe63cb35c), uint32(0xe7fed96b), uint32(0xe5b86732), 3846 uint32(0xe47a0d05), uint32(0xef264a38), uint32(0xeee4200f), uint32(0xeca29e56), uint32(0xed60f461), 3847 uint32(0xe82fe2e4), uint32(0xe9ed88d3), uint32(0xebab368a), uint32(0xea695cbd), uint32(0xfd13b8f0), 3848 uint32(0xfcd1d2c7), uint32(0xfe976c9e), uint32(0xff5506a9), uint32(0xfa1a102c), uint32(0xfbd87a1b), 3849 uint32(0xf99ec442), uint32(0xf85cae75), uint32(0xf300e948), uint32(0xf2c2837f), uint32(0xf0843d26), 3850 uint32(0xf1465711), uint32(0xf4094194), uint32(0xf5cb2ba3), uint32(0xf78d95fa), uint32(0xf64fffcd), 3851 uint32(0xd9785d60), uint32(0xd8ba3757), uint32(0xdafc890e), uint32(0xdb3ee339), uint32(0xde71f5bc), 3852 uint32(0xdfb39f8b), uint32(0xddf521d2), uint32(0xdc374be5), uint32(0xd76b0cd8), uint32(0xd6a966ef), 3853 uint32(0xd4efd8b6), uint32(0xd52db281), uint32(0xd062a404), uint32(0xd1a0ce33), uint32(0xd3e6706a), 3854 uint32(0xd2241a5d), uint32(0xc55efe10), uint32(0xc49c9427), uint32(0xc6da2a7e), uint32(0xc7184049), 3855 uint32(0xc25756cc), uint32(0xc3953cfb), uint32(0xc1d382a2), uint32(0xc011e895), uint32(0xcb4dafa8), 3856 uint32(0xca8fc59f), uint32(0xc8c97bc6), uint32(0xc90b11f1), uint32(0xcc440774), uint32(0xcd866d43), 3857 uint32(0xcfc0d31a), uint32(0xce02b92d), uint32(0x91af9640), uint32(0x906dfc77), uint32(0x922b422e), 3858 uint32(0x93e92819), uint32(0x96a63e9c), uint32(0x976454ab), uint32(0x9522eaf2), uint32(0x94e080c5), 3859 uint32(0x9fbcc7f8), uint32(0x9e7eadcf), uint32(0x9c381396), uint32(0x9dfa79a1), uint32(0x98b56f24), 3860 uint32(0x99770513), uint32(0x9b31bb4a), uint32(0x9af3d17d), uint32(0x8d893530), uint32(0x8c4b5f07), 3861 uint32(0x8e0de15e), uint32(0x8fcf8b69), uint32(0x8a809dec), uint32(0x8b42f7db), uint32(0x89044982), 3862 uint32(0x88c623b5), uint32(0x839a6488), uint32(0x82580ebf), uint32(0x801eb0e6), uint32(0x81dcdad1), 3863 uint32(0x8493cc54), uint32(0x8551a663), uint32(0x8717183a), uint32(0x86d5720d), uint32(0xa9e2d0a0), 3864 uint32(0xa820ba97), uint32(0xaa6604ce), uint32(0xaba46ef9), uint32(0xaeeb787c), uint32(0xaf29124b), 3865 uint32(0xad6fac12), uint32(0xacadc625), uint32(0xa7f18118), uint32(0xa633eb2f), uint32(0xa4755576), 3866 uint32(0xa5b73f41), uint32(0xa0f829c4), uint32(0xa13a43f3), uint32(0xa37cfdaa), uint32(0xa2be979d), 3867 uint32(0xb5c473d0), uint32(0xb40619e7), uint32(0xb640a7be), uint32(0xb782cd89), uint32(0xb2cddb0c), 3868 uint32(0xb30fb13b), uint32(0xb1490f62), uint32(0xb08b6555), uint32(0xbbd72268), uint32(0xba15485f), 3869 uint32(0xb853f606), uint32(0xb9919c31), uint32(0xbcde8ab4), uint32(0xbd1ce083), uint32(0xbf5a5eda), 3870 uint32(0xbe9834ed), 3871 }, 3872 { 3873 uint32(0x00000000), uint32(0xb8bc6765), uint32(0xaa09c88b), uint32(0x12b5afee), uint32(0x8f629757), 3874 uint32(0x37def032), uint32(0x256b5fdc), uint32(0x9dd738b9), uint32(0xc5b428ef), uint32(0x7d084f8a), 3875 uint32(0x6fbde064), uint32(0xd7018701), uint32(0x4ad6bfb8), uint32(0xf26ad8dd), uint32(0xe0df7733), 3876 uint32(0x58631056), uint32(0x5019579f), uint32(0xe8a530fa), uint32(0xfa109f14), uint32(0x42acf871), 3877 uint32(0xdf7bc0c8), uint32(0x67c7a7ad), uint32(0x75720843), uint32(0xcdce6f26), uint32(0x95ad7f70), 3878 uint32(0x2d111815), uint32(0x3fa4b7fb), uint32(0x8718d09e), uint32(0x1acfe827), uint32(0xa2738f42), 3879 uint32(0xb0c620ac), uint32(0x087a47c9), uint32(0xa032af3e), uint32(0x188ec85b), uint32(0x0a3b67b5), 3880 uint32(0xb28700d0), uint32(0x2f503869), uint32(0x97ec5f0c), uint32(0x8559f0e2), uint32(0x3de59787), 3881 uint32(0x658687d1), uint32(0xdd3ae0b4), uint32(0xcf8f4f5a), uint32(0x7733283f), uint32(0xeae41086), 3882 uint32(0x525877e3), uint32(0x40edd80d), uint32(0xf851bf68), uint32(0xf02bf8a1), uint32(0x48979fc4), 3883 uint32(0x5a22302a), uint32(0xe29e574f), uint32(0x7f496ff6), uint32(0xc7f50893), uint32(0xd540a77d), 3884 uint32(0x6dfcc018), uint32(0x359fd04e), uint32(0x8d23b72b), uint32(0x9f9618c5), uint32(0x272a7fa0), 3885 uint32(0xbafd4719), uint32(0x0241207c), uint32(0x10f48f92), uint32(0xa848e8f7), uint32(0x9b14583d), 3886 uint32(0x23a83f58), uint32(0x311d90b6), uint32(0x89a1f7d3), uint32(0x1476cf6a), uint32(0xaccaa80f), 3887 uint32(0xbe7f07e1), uint32(0x06c36084), uint32(0x5ea070d2), uint32(0xe61c17b7), uint32(0xf4a9b859), 3888 uint32(0x4c15df3c), uint32(0xd1c2e785), uint32(0x697e80e0), uint32(0x7bcb2f0e), uint32(0xc377486b), 3889 uint32(0xcb0d0fa2), uint32(0x73b168c7), uint32(0x6104c729), uint32(0xd9b8a04c), uint32(0x446f98f5), 3890 uint32(0xfcd3ff90), uint32(0xee66507e), uint32(0x56da371b), uint32(0x0eb9274d), uint32(0xb6054028), 3891 uint32(0xa4b0efc6), uint32(0x1c0c88a3), uint32(0x81dbb01a), uint32(0x3967d77f), uint32(0x2bd27891), 3892 uint32(0x936e1ff4), uint32(0x3b26f703), uint32(0x839a9066), uint32(0x912f3f88), uint32(0x299358ed), 3893 uint32(0xb4446054), uint32(0x0cf80731), uint32(0x1e4da8df), uint32(0xa6f1cfba), uint32(0xfe92dfec), 3894 uint32(0x462eb889), uint32(0x549b1767), uint32(0xec277002), uint32(0x71f048bb), uint32(0xc94c2fde), 3895 uint32(0xdbf98030), uint32(0x6345e755), uint32(0x6b3fa09c), uint32(0xd383c7f9), uint32(0xc1366817), 3896 uint32(0x798a0f72), uint32(0xe45d37cb), uint32(0x5ce150ae), uint32(0x4e54ff40), uint32(0xf6e89825), 3897 uint32(0xae8b8873), uint32(0x1637ef16), uint32(0x048240f8), uint32(0xbc3e279d), uint32(0x21e91f24), 3898 uint32(0x99557841), uint32(0x8be0d7af), uint32(0x335cb0ca), uint32(0xed59b63b), uint32(0x55e5d15e), 3899 uint32(0x47507eb0), uint32(0xffec19d5), uint32(0x623b216c), uint32(0xda874609), uint32(0xc832e9e7), 3900 uint32(0x708e8e82), uint32(0x28ed9ed4), uint32(0x9051f9b1), uint32(0x82e4565f), uint32(0x3a58313a), 3901 uint32(0xa78f0983), uint32(0x1f336ee6), uint32(0x0d86c108), uint32(0xb53aa66d), uint32(0xbd40e1a4), 3902 uint32(0x05fc86c1), uint32(0x1749292f), uint32(0xaff54e4a), uint32(0x322276f3), uint32(0x8a9e1196), 3903 uint32(0x982bbe78), uint32(0x2097d91d), uint32(0x78f4c94b), uint32(0xc048ae2e), uint32(0xd2fd01c0), 3904 uint32(0x6a4166a5), uint32(0xf7965e1c), uint32(0x4f2a3979), uint32(0x5d9f9697), uint32(0xe523f1f2), 3905 uint32(0x4d6b1905), uint32(0xf5d77e60), uint32(0xe762d18e), uint32(0x5fdeb6eb), uint32(0xc2098e52), 3906 uint32(0x7ab5e937), uint32(0x680046d9), uint32(0xd0bc21bc), uint32(0x88df31ea), uint32(0x3063568f), 3907 uint32(0x22d6f961), uint32(0x9a6a9e04), uint32(0x07bda6bd), uint32(0xbf01c1d8), uint32(0xadb46e36), 3908 uint32(0x15080953), uint32(0x1d724e9a), uint32(0xa5ce29ff), uint32(0xb77b8611), uint32(0x0fc7e174), 3909 uint32(0x9210d9cd), uint32(0x2aacbea8), uint32(0x38191146), uint32(0x80a57623), uint32(0xd8c66675), 3910 uint32(0x607a0110), uint32(0x72cfaefe), uint32(0xca73c99b), uint32(0x57a4f122), uint32(0xef189647), 3911 uint32(0xfdad39a9), uint32(0x45115ecc), uint32(0x764dee06), uint32(0xcef18963), uint32(0xdc44268d), 3912 uint32(0x64f841e8), uint32(0xf92f7951), uint32(0x41931e34), uint32(0x5326b1da), uint32(0xeb9ad6bf), 3913 uint32(0xb3f9c6e9), uint32(0x0b45a18c), uint32(0x19f00e62), uint32(0xa14c6907), uint32(0x3c9b51be), 3914 uint32(0x842736db), uint32(0x96929935), uint32(0x2e2efe50), uint32(0x2654b999), uint32(0x9ee8defc), 3915 uint32(0x8c5d7112), uint32(0x34e11677), uint32(0xa9362ece), uint32(0x118a49ab), uint32(0x033fe645), 3916 uint32(0xbb838120), uint32(0xe3e09176), uint32(0x5b5cf613), uint32(0x49e959fd), uint32(0xf1553e98), 3917 uint32(0x6c820621), uint32(0xd43e6144), uint32(0xc68bceaa), uint32(0x7e37a9cf), uint32(0xd67f4138), 3918 uint32(0x6ec3265d), uint32(0x7c7689b3), uint32(0xc4caeed6), uint32(0x591dd66f), uint32(0xe1a1b10a), 3919 uint32(0xf3141ee4), uint32(0x4ba87981), uint32(0x13cb69d7), uint32(0xab770eb2), uint32(0xb9c2a15c), 3920 uint32(0x017ec639), uint32(0x9ca9fe80), uint32(0x241599e5), uint32(0x36a0360b), uint32(0x8e1c516e), 3921 uint32(0x866616a7), uint32(0x3eda71c2), uint32(0x2c6fde2c), uint32(0x94d3b949), uint32(0x090481f0), 3922 uint32(0xb1b8e695), uint32(0xa30d497b), uint32(0x1bb12e1e), uint32(0x43d23e48), uint32(0xfb6e592d), 3923 uint32(0xe9dbf6c3), uint32(0x516791a6), uint32(0xccb0a91f), uint32(0x740cce7a), uint32(0x66b96194), 3924 uint32(0xde0506f1), 3925 }, 3926 { 3927 uint32(0x00000000), uint32(0x96300777), uint32(0x2c610eee), uint32(0xba510999), uint32(0x19c46d07), 3928 uint32(0x8ff46a70), uint32(0x35a563e9), uint32(0xa395649e), uint32(0x3288db0e), uint32(0xa4b8dc79), 3929 uint32(0x1ee9d5e0), uint32(0x88d9d297), uint32(0x2b4cb609), uint32(0xbd7cb17e), uint32(0x072db8e7), 3930 uint32(0x911dbf90), uint32(0x6410b71d), uint32(0xf220b06a), uint32(0x4871b9f3), uint32(0xde41be84), 3931 uint32(0x7dd4da1a), uint32(0xebe4dd6d), uint32(0x51b5d4f4), uint32(0xc785d383), uint32(0x56986c13), 3932 uint32(0xc0a86b64), uint32(0x7af962fd), uint32(0xecc9658a), uint32(0x4f5c0114), uint32(0xd96c0663), 3933 uint32(0x633d0ffa), uint32(0xf50d088d), uint32(0xc8206e3b), uint32(0x5e10694c), uint32(0xe44160d5), 3934 uint32(0x727167a2), uint32(0xd1e4033c), uint32(0x47d4044b), uint32(0xfd850dd2), uint32(0x6bb50aa5), 3935 uint32(0xfaa8b535), uint32(0x6c98b242), uint32(0xd6c9bbdb), uint32(0x40f9bcac), uint32(0xe36cd832), 3936 uint32(0x755cdf45), uint32(0xcf0dd6dc), uint32(0x593dd1ab), uint32(0xac30d926), uint32(0x3a00de51), 3937 uint32(0x8051d7c8), uint32(0x1661d0bf), uint32(0xb5f4b421), uint32(0x23c4b356), uint32(0x9995bacf), 3938 uint32(0x0fa5bdb8), uint32(0x9eb80228), uint32(0x0888055f), uint32(0xb2d90cc6), uint32(0x24e90bb1), 3939 uint32(0x877c6f2f), uint32(0x114c6858), uint32(0xab1d61c1), uint32(0x3d2d66b6), uint32(0x9041dc76), 3940 uint32(0x0671db01), uint32(0xbc20d298), uint32(0x2a10d5ef), uint32(0x8985b171), uint32(0x1fb5b606), 3941 uint32(0xa5e4bf9f), uint32(0x33d4b8e8), uint32(0xa2c90778), uint32(0x34f9000f), uint32(0x8ea80996), 3942 uint32(0x18980ee1), uint32(0xbb0d6a7f), uint32(0x2d3d6d08), uint32(0x976c6491), uint32(0x015c63e6), 3943 uint32(0xf4516b6b), uint32(0x62616c1c), uint32(0xd8306585), uint32(0x4e0062f2), uint32(0xed95066c), 3944 uint32(0x7ba5011b), uint32(0xc1f40882), uint32(0x57c40ff5), uint32(0xc6d9b065), uint32(0x50e9b712), 3945 uint32(0xeab8be8b), uint32(0x7c88b9fc), uint32(0xdf1ddd62), uint32(0x492dda15), uint32(0xf37cd38c), 3946 uint32(0x654cd4fb), uint32(0x5861b24d), uint32(0xce51b53a), uint32(0x7400bca3), uint32(0xe230bbd4), 3947 uint32(0x41a5df4a), uint32(0xd795d83d), uint32(0x6dc4d1a4), uint32(0xfbf4d6d3), uint32(0x6ae96943), 3948 uint32(0xfcd96e34), uint32(0x468867ad), uint32(0xd0b860da), uint32(0x732d0444), uint32(0xe51d0333), 3949 uint32(0x5f4c0aaa), uint32(0xc97c0ddd), uint32(0x3c710550), uint32(0xaa410227), uint32(0x10100bbe), 3950 uint32(0x86200cc9), uint32(0x25b56857), uint32(0xb3856f20), uint32(0x09d466b9), uint32(0x9fe461ce), 3951 uint32(0x0ef9de5e), uint32(0x98c9d929), uint32(0x2298d0b0), uint32(0xb4a8d7c7), uint32(0x173db359), 3952 uint32(0x810db42e), uint32(0x3b5cbdb7), uint32(0xad6cbac0), uint32(0x2083b8ed), uint32(0xb6b3bf9a), 3953 uint32(0x0ce2b603), uint32(0x9ad2b174), uint32(0x3947d5ea), uint32(0xaf77d29d), uint32(0x1526db04), 3954 uint32(0x8316dc73), uint32(0x120b63e3), uint32(0x843b6494), uint32(0x3e6a6d0d), uint32(0xa85a6a7a), 3955 uint32(0x0bcf0ee4), uint32(0x9dff0993), uint32(0x27ae000a), uint32(0xb19e077d), uint32(0x44930ff0), 3956 uint32(0xd2a30887), uint32(0x68f2011e), uint32(0xfec20669), uint32(0x5d5762f7), uint32(0xcb676580), 3957 uint32(0x71366c19), uint32(0xe7066b6e), uint32(0x761bd4fe), uint32(0xe02bd389), uint32(0x5a7ada10), 3958 uint32(0xcc4add67), uint32(0x6fdfb9f9), uint32(0xf9efbe8e), uint32(0x43beb717), uint32(0xd58eb060), 3959 uint32(0xe8a3d6d6), uint32(0x7e93d1a1), uint32(0xc4c2d838), uint32(0x52f2df4f), uint32(0xf167bbd1), 3960 uint32(0x6757bca6), uint32(0xdd06b53f), uint32(0x4b36b248), uint32(0xda2b0dd8), uint32(0x4c1b0aaf), 3961 uint32(0xf64a0336), uint32(0x607a0441), uint32(0xc3ef60df), uint32(0x55df67a8), uint32(0xef8e6e31), 3962 uint32(0x79be6946), uint32(0x8cb361cb), uint32(0x1a8366bc), uint32(0xa0d26f25), uint32(0x36e26852), 3963 uint32(0x95770ccc), uint32(0x03470bbb), uint32(0xb9160222), uint32(0x2f260555), uint32(0xbe3bbac5), 3964 uint32(0x280bbdb2), uint32(0x925ab42b), uint32(0x046ab35c), uint32(0xa7ffd7c2), uint32(0x31cfd0b5), 3965 uint32(0x8b9ed92c), uint32(0x1daede5b), uint32(0xb0c2649b), uint32(0x26f263ec), uint32(0x9ca36a75), 3966 uint32(0x0a936d02), uint32(0xa906099c), uint32(0x3f360eeb), uint32(0x85670772), uint32(0x13570005), 3967 uint32(0x824abf95), uint32(0x147ab8e2), uint32(0xae2bb17b), uint32(0x381bb60c), uint32(0x9b8ed292), 3968 uint32(0x0dbed5e5), uint32(0xb7efdc7c), uint32(0x21dfdb0b), uint32(0xd4d2d386), uint32(0x42e2d4f1), 3969 uint32(0xf8b3dd68), uint32(0x6e83da1f), uint32(0xcd16be81), uint32(0x5b26b9f6), uint32(0xe177b06f), 3970 uint32(0x7747b718), uint32(0xe65a0888), uint32(0x706a0fff), uint32(0xca3b0666), uint32(0x5c0b0111), 3971 uint32(0xff9e658f), uint32(0x69ae62f8), uint32(0xd3ff6b61), uint32(0x45cf6c16), uint32(0x78e20aa0), 3972 uint32(0xeed20dd7), uint32(0x5483044e), uint32(0xc2b30339), uint32(0x612667a7), uint32(0xf71660d0), 3973 uint32(0x4d476949), uint32(0xdb776e3e), uint32(0x4a6ad1ae), uint32(0xdc5ad6d9), uint32(0x660bdf40), 3974 uint32(0xf03bd837), uint32(0x53aebca9), uint32(0xc59ebbde), uint32(0x7fcfb247), uint32(0xe9ffb530), 3975 uint32(0x1cf2bdbd), uint32(0x8ac2baca), uint32(0x3093b353), uint32(0xa6a3b424), uint32(0x0536d0ba), 3976 uint32(0x9306d7cd), uint32(0x2957de54), uint32(0xbf67d923), uint32(0x2e7a66b3), uint32(0xb84a61c4), 3977 uint32(0x021b685d), uint32(0x942b6f2a), uint32(0x37be0bb4), uint32(0xa18e0cc3), uint32(0x1bdf055a), 3978 uint32(0x8def022d), 3979 }, 3980 { 3981 uint32(0x00000000), uint32(0x41311b19), uint32(0x82623632), uint32(0xc3532d2b), uint32(0x04c56c64), 3982 uint32(0x45f4777d), uint32(0x86a75a56), uint32(0xc796414f), uint32(0x088ad9c8), uint32(0x49bbc2d1), 3983 uint32(0x8ae8effa), uint32(0xcbd9f4e3), uint32(0x0c4fb5ac), uint32(0x4d7eaeb5), uint32(0x8e2d839e), 3984 uint32(0xcf1c9887), uint32(0x5112c24a), uint32(0x1023d953), uint32(0xd370f478), uint32(0x9241ef61), 3985 uint32(0x55d7ae2e), uint32(0x14e6b537), uint32(0xd7b5981c), uint32(0x96848305), uint32(0x59981b82), 3986 uint32(0x18a9009b), uint32(0xdbfa2db0), uint32(0x9acb36a9), uint32(0x5d5d77e6), uint32(0x1c6c6cff), 3987 uint32(0xdf3f41d4), uint32(0x9e0e5acd), uint32(0xa2248495), uint32(0xe3159f8c), uint32(0x2046b2a7), 3988 uint32(0x6177a9be), uint32(0xa6e1e8f1), uint32(0xe7d0f3e8), uint32(0x2483dec3), uint32(0x65b2c5da), 3989 uint32(0xaaae5d5d), uint32(0xeb9f4644), uint32(0x28cc6b6f), uint32(0x69fd7076), uint32(0xae6b3139), 3990 uint32(0xef5a2a20), uint32(0x2c09070b), uint32(0x6d381c12), uint32(0xf33646df), uint32(0xb2075dc6), 3991 uint32(0x715470ed), uint32(0x30656bf4), uint32(0xf7f32abb), uint32(0xb6c231a2), uint32(0x75911c89), 3992 uint32(0x34a00790), uint32(0xfbbc9f17), uint32(0xba8d840e), uint32(0x79dea925), uint32(0x38efb23c), 3993 uint32(0xff79f373), uint32(0xbe48e86a), uint32(0x7d1bc541), uint32(0x3c2ade58), uint32(0x054f79f0), 3994 uint32(0x447e62e9), uint32(0x872d4fc2), uint32(0xc61c54db), uint32(0x018a1594), uint32(0x40bb0e8d), 3995 uint32(0x83e823a6), uint32(0xc2d938bf), uint32(0x0dc5a038), uint32(0x4cf4bb21), uint32(0x8fa7960a), 3996 uint32(0xce968d13), uint32(0x0900cc5c), uint32(0x4831d745), uint32(0x8b62fa6e), uint32(0xca53e177), 3997 uint32(0x545dbbba), uint32(0x156ca0a3), uint32(0xd63f8d88), uint32(0x970e9691), uint32(0x5098d7de), 3998 uint32(0x11a9ccc7), uint32(0xd2fae1ec), uint32(0x93cbfaf5), uint32(0x5cd76272), uint32(0x1de6796b), 3999 uint32(0xdeb55440), uint32(0x9f844f59), uint32(0x58120e16), uint32(0x1923150f), uint32(0xda703824), 4000 uint32(0x9b41233d), uint32(0xa76bfd65), uint32(0xe65ae67c), uint32(0x2509cb57), uint32(0x6438d04e), 4001 uint32(0xa3ae9101), uint32(0xe29f8a18), uint32(0x21cca733), uint32(0x60fdbc2a), uint32(0xafe124ad), 4002 uint32(0xeed03fb4), uint32(0x2d83129f), uint32(0x6cb20986), uint32(0xab2448c9), uint32(0xea1553d0), 4003 uint32(0x29467efb), uint32(0x687765e2), uint32(0xf6793f2f), uint32(0xb7482436), uint32(0x741b091d), 4004 uint32(0x352a1204), uint32(0xf2bc534b), uint32(0xb38d4852), uint32(0x70de6579), uint32(0x31ef7e60), 4005 uint32(0xfef3e6e7), uint32(0xbfc2fdfe), uint32(0x7c91d0d5), uint32(0x3da0cbcc), uint32(0xfa368a83), 4006 uint32(0xbb07919a), uint32(0x7854bcb1), uint32(0x3965a7a8), uint32(0x4b98833b), uint32(0x0aa99822), 4007 uint32(0xc9fab509), uint32(0x88cbae10), uint32(0x4f5def5f), uint32(0x0e6cf446), uint32(0xcd3fd96d), 4008 uint32(0x8c0ec274), uint32(0x43125af3), uint32(0x022341ea), uint32(0xc1706cc1), uint32(0x804177d8), 4009 uint32(0x47d73697), uint32(0x06e62d8e), uint32(0xc5b500a5), uint32(0x84841bbc), uint32(0x1a8a4171), 4010 uint32(0x5bbb5a68), uint32(0x98e87743), uint32(0xd9d96c5a), uint32(0x1e4f2d15), uint32(0x5f7e360c), 4011 uint32(0x9c2d1b27), uint32(0xdd1c003e), uint32(0x120098b9), uint32(0x533183a0), uint32(0x9062ae8b), 4012 uint32(0xd153b592), uint32(0x16c5f4dd), uint32(0x57f4efc4), uint32(0x94a7c2ef), uint32(0xd596d9f6), 4013 uint32(0xe9bc07ae), uint32(0xa88d1cb7), uint32(0x6bde319c), uint32(0x2aef2a85), uint32(0xed796bca), 4014 uint32(0xac4870d3), uint32(0x6f1b5df8), uint32(0x2e2a46e1), uint32(0xe136de66), uint32(0xa007c57f), 4015 uint32(0x6354e854), uint32(0x2265f34d), uint32(0xe5f3b202), uint32(0xa4c2a91b), uint32(0x67918430), 4016 uint32(0x26a09f29), uint32(0xb8aec5e4), uint32(0xf99fdefd), uint32(0x3accf3d6), uint32(0x7bfde8cf), 4017 uint32(0xbc6ba980), uint32(0xfd5ab299), uint32(0x3e099fb2), uint32(0x7f3884ab), uint32(0xb0241c2c), 4018 uint32(0xf1150735), uint32(0x32462a1e), uint32(0x73773107), uint32(0xb4e17048), uint32(0xf5d06b51), 4019 uint32(0x3683467a), uint32(0x77b25d63), uint32(0x4ed7facb), uint32(0x0fe6e1d2), uint32(0xccb5ccf9), 4020 uint32(0x8d84d7e0), uint32(0x4a1296af), uint32(0x0b238db6), uint32(0xc870a09d), uint32(0x8941bb84), 4021 uint32(0x465d2303), uint32(0x076c381a), uint32(0xc43f1531), uint32(0x850e0e28), uint32(0x42984f67), 4022 uint32(0x03a9547e), uint32(0xc0fa7955), uint32(0x81cb624c), uint32(0x1fc53881), uint32(0x5ef42398), 4023 uint32(0x9da70eb3), uint32(0xdc9615aa), uint32(0x1b0054e5), uint32(0x5a314ffc), uint32(0x996262d7), 4024 uint32(0xd85379ce), uint32(0x174fe149), uint32(0x567efa50), uint32(0x952dd77b), uint32(0xd41ccc62), 4025 uint32(0x138a8d2d), uint32(0x52bb9634), uint32(0x91e8bb1f), uint32(0xd0d9a006), uint32(0xecf37e5e), 4026 uint32(0xadc26547), uint32(0x6e91486c), uint32(0x2fa05375), uint32(0xe836123a), uint32(0xa9070923), 4027 uint32(0x6a542408), uint32(0x2b653f11), uint32(0xe479a796), uint32(0xa548bc8f), uint32(0x661b91a4), 4028 uint32(0x272a8abd), uint32(0xe0bccbf2), uint32(0xa18dd0eb), uint32(0x62defdc0), uint32(0x23efe6d9), 4029 uint32(0xbde1bc14), uint32(0xfcd0a70d), uint32(0x3f838a26), uint32(0x7eb2913f), uint32(0xb924d070), 4030 uint32(0xf815cb69), uint32(0x3b46e642), uint32(0x7a77fd5b), uint32(0xb56b65dc), uint32(0xf45a7ec5), 4031 uint32(0x370953ee), uint32(0x763848f7), uint32(0xb1ae09b8), uint32(0xf09f12a1), uint32(0x33cc3f8a), 4032 uint32(0x72fd2493), 4033 }, 4034 { 4035 uint32(0x00000000), uint32(0x376ac201), uint32(0x6ed48403), uint32(0x59be4602), uint32(0xdca80907), 4036 uint32(0xebc2cb06), uint32(0xb27c8d04), uint32(0x85164f05), uint32(0xb851130e), uint32(0x8f3bd10f), 4037 uint32(0xd685970d), uint32(0xe1ef550c), uint32(0x64f91a09), uint32(0x5393d808), uint32(0x0a2d9e0a), 4038 uint32(0x3d475c0b), uint32(0x70a3261c), uint32(0x47c9e41d), uint32(0x1e77a21f), uint32(0x291d601e), 4039 uint32(0xac0b2f1b), uint32(0x9b61ed1a), uint32(0xc2dfab18), uint32(0xf5b56919), uint32(0xc8f23512), 4040 uint32(0xff98f713), uint32(0xa626b111), uint32(0x914c7310), uint32(0x145a3c15), uint32(0x2330fe14), 4041 uint32(0x7a8eb816), uint32(0x4de47a17), uint32(0xe0464d38), uint32(0xd72c8f39), uint32(0x8e92c93b), 4042 uint32(0xb9f80b3a), uint32(0x3cee443f), uint32(0x0b84863e), uint32(0x523ac03c), uint32(0x6550023d), 4043 uint32(0x58175e36), uint32(0x6f7d9c37), uint32(0x36c3da35), uint32(0x01a91834), uint32(0x84bf5731), 4044 uint32(0xb3d59530), uint32(0xea6bd332), uint32(0xdd011133), uint32(0x90e56b24), uint32(0xa78fa925), 4045 uint32(0xfe31ef27), uint32(0xc95b2d26), uint32(0x4c4d6223), uint32(0x7b27a022), uint32(0x2299e620), 4046 uint32(0x15f32421), uint32(0x28b4782a), uint32(0x1fdeba2b), uint32(0x4660fc29), uint32(0x710a3e28), 4047 uint32(0xf41c712d), uint32(0xc376b32c), uint32(0x9ac8f52e), uint32(0xada2372f), uint32(0xc08d9a70), 4048 uint32(0xf7e75871), uint32(0xae591e73), uint32(0x9933dc72), uint32(0x1c259377), uint32(0x2b4f5176), 4049 uint32(0x72f11774), uint32(0x459bd575), uint32(0x78dc897e), uint32(0x4fb64b7f), uint32(0x16080d7d), 4050 uint32(0x2162cf7c), uint32(0xa4748079), uint32(0x931e4278), uint32(0xcaa0047a), uint32(0xfdcac67b), 4051 uint32(0xb02ebc6c), uint32(0x87447e6d), uint32(0xdefa386f), uint32(0xe990fa6e), uint32(0x6c86b56b), 4052 uint32(0x5bec776a), uint32(0x02523168), uint32(0x3538f369), uint32(0x087faf62), uint32(0x3f156d63), 4053 uint32(0x66ab2b61), uint32(0x51c1e960), uint32(0xd4d7a665), uint32(0xe3bd6464), uint32(0xba032266), 4054 uint32(0x8d69e067), uint32(0x20cbd748), uint32(0x17a11549), uint32(0x4e1f534b), uint32(0x7975914a), 4055 uint32(0xfc63de4f), uint32(0xcb091c4e), uint32(0x92b75a4c), uint32(0xa5dd984d), uint32(0x989ac446), 4056 uint32(0xaff00647), uint32(0xf64e4045), uint32(0xc1248244), uint32(0x4432cd41), uint32(0x73580f40), 4057 uint32(0x2ae64942), uint32(0x1d8c8b43), uint32(0x5068f154), uint32(0x67023355), uint32(0x3ebc7557), 4058 uint32(0x09d6b756), uint32(0x8cc0f853), uint32(0xbbaa3a52), uint32(0xe2147c50), uint32(0xd57ebe51), 4059 uint32(0xe839e25a), uint32(0xdf53205b), uint32(0x86ed6659), uint32(0xb187a458), uint32(0x3491eb5d), 4060 uint32(0x03fb295c), uint32(0x5a456f5e), uint32(0x6d2fad5f), uint32(0x801b35e1), uint32(0xb771f7e0), 4061 uint32(0xeecfb1e2), uint32(0xd9a573e3), uint32(0x5cb33ce6), uint32(0x6bd9fee7), uint32(0x3267b8e5), 4062 uint32(0x050d7ae4), uint32(0x384a26ef), uint32(0x0f20e4ee), uint32(0x569ea2ec), uint32(0x61f460ed), 4063 uint32(0xe4e22fe8), uint32(0xd388ede9), uint32(0x8a36abeb), uint32(0xbd5c69ea), uint32(0xf0b813fd), 4064 uint32(0xc7d2d1fc), uint32(0x9e6c97fe), uint32(0xa90655ff), uint32(0x2c101afa), uint32(0x1b7ad8fb), 4065 uint32(0x42c49ef9), uint32(0x75ae5cf8), uint32(0x48e900f3), uint32(0x7f83c2f2), uint32(0x263d84f0), 4066 uint32(0x115746f1), uint32(0x944109f4), uint32(0xa32bcbf5), uint32(0xfa958df7), uint32(0xcdff4ff6), 4067 uint32(0x605d78d9), uint32(0x5737bad8), uint32(0x0e89fcda), uint32(0x39e33edb), uint32(0xbcf571de), 4068 uint32(0x8b9fb3df), uint32(0xd221f5dd), uint32(0xe54b37dc), uint32(0xd80c6bd7), uint32(0xef66a9d6), 4069 uint32(0xb6d8efd4), uint32(0x81b22dd5), uint32(0x04a462d0), uint32(0x33cea0d1), uint32(0x6a70e6d3), 4070 uint32(0x5d1a24d2), uint32(0x10fe5ec5), uint32(0x27949cc4), uint32(0x7e2adac6), uint32(0x494018c7), 4071 uint32(0xcc5657c2), uint32(0xfb3c95c3), uint32(0xa282d3c1), uint32(0x95e811c0), uint32(0xa8af4dcb), 4072 uint32(0x9fc58fca), uint32(0xc67bc9c8), uint32(0xf1110bc9), uint32(0x740744cc), uint32(0x436d86cd), 4073 uint32(0x1ad3c0cf), uint32(0x2db902ce), uint32(0x4096af91), uint32(0x77fc6d90), uint32(0x2e422b92), 4074 uint32(0x1928e993), uint32(0x9c3ea696), uint32(0xab546497), uint32(0xf2ea2295), uint32(0xc580e094), 4075 uint32(0xf8c7bc9f), uint32(0xcfad7e9e), uint32(0x9613389c), uint32(0xa179fa9d), uint32(0x246fb598), 4076 uint32(0x13057799), uint32(0x4abb319b), uint32(0x7dd1f39a), uint32(0x3035898d), uint32(0x075f4b8c), 4077 uint32(0x5ee10d8e), uint32(0x698bcf8f), uint32(0xec9d808a), uint32(0xdbf7428b), uint32(0x82490489), 4078 uint32(0xb523c688), uint32(0x88649a83), uint32(0xbf0e5882), uint32(0xe6b01e80), uint32(0xd1dadc81), 4079 uint32(0x54cc9384), uint32(0x63a65185), uint32(0x3a181787), uint32(0x0d72d586), uint32(0xa0d0e2a9), 4080 uint32(0x97ba20a8), uint32(0xce0466aa), uint32(0xf96ea4ab), uint32(0x7c78ebae), uint32(0x4b1229af), 4081 uint32(0x12ac6fad), uint32(0x25c6adac), uint32(0x1881f1a7), uint32(0x2feb33a6), uint32(0x765575a4), 4082 uint32(0x413fb7a5), uint32(0xc429f8a0), uint32(0xf3433aa1), uint32(0xaafd7ca3), uint32(0x9d97bea2), 4083 uint32(0xd073c4b5), uint32(0xe71906b4), uint32(0xbea740b6), uint32(0x89cd82b7), uint32(0x0cdbcdb2), 4084 uint32(0x3bb10fb3), uint32(0x620f49b1), uint32(0x55658bb0), uint32(0x6822d7bb), uint32(0x5f4815ba), 4085 uint32(0x06f653b8), uint32(0x319c91b9), uint32(0xb48adebc), uint32(0x83e01cbd), uint32(0xda5e5abf), 4086 uint32(0xed3498be), 4087 }, 4088 { 4089 uint32(0x00000000), uint32(0x6567bcb8), uint32(0x8bc809aa), uint32(0xeeafb512), uint32(0x5797628f), 4090 uint32(0x32f0de37), uint32(0xdc5f6b25), uint32(0xb938d79d), uint32(0xef28b4c5), uint32(0x8a4f087d), 4091 uint32(0x64e0bd6f), uint32(0x018701d7), uint32(0xb8bfd64a), uint32(0xddd86af2), uint32(0x3377dfe0), 4092 uint32(0x56106358), uint32(0x9f571950), uint32(0xfa30a5e8), uint32(0x149f10fa), uint32(0x71f8ac42), 4093 uint32(0xc8c07bdf), uint32(0xada7c767), uint32(0x43087275), uint32(0x266fcecd), uint32(0x707fad95), 4094 uint32(0x1518112d), uint32(0xfbb7a43f), uint32(0x9ed01887), uint32(0x27e8cf1a), uint32(0x428f73a2), 4095 uint32(0xac20c6b0), uint32(0xc9477a08), uint32(0x3eaf32a0), uint32(0x5bc88e18), uint32(0xb5673b0a), 4096 uint32(0xd00087b2), uint32(0x6938502f), uint32(0x0c5fec97), uint32(0xe2f05985), uint32(0x8797e53d), 4097 uint32(0xd1878665), uint32(0xb4e03add), uint32(0x5a4f8fcf), uint32(0x3f283377), uint32(0x8610e4ea), 4098 uint32(0xe3775852), uint32(0x0dd8ed40), uint32(0x68bf51f8), uint32(0xa1f82bf0), uint32(0xc49f9748), 4099 uint32(0x2a30225a), uint32(0x4f579ee2), uint32(0xf66f497f), uint32(0x9308f5c7), uint32(0x7da740d5), 4100 uint32(0x18c0fc6d), uint32(0x4ed09f35), uint32(0x2bb7238d), uint32(0xc518969f), uint32(0xa07f2a27), 4101 uint32(0x1947fdba), uint32(0x7c204102), uint32(0x928ff410), uint32(0xf7e848a8), uint32(0x3d58149b), 4102 uint32(0x583fa823), uint32(0xb6901d31), uint32(0xd3f7a189), uint32(0x6acf7614), uint32(0x0fa8caac), 4103 uint32(0xe1077fbe), uint32(0x8460c306), uint32(0xd270a05e), uint32(0xb7171ce6), uint32(0x59b8a9f4), 4104 uint32(0x3cdf154c), uint32(0x85e7c2d1), uint32(0xe0807e69), uint32(0x0e2fcb7b), uint32(0x6b4877c3), 4105 uint32(0xa20f0dcb), uint32(0xc768b173), uint32(0x29c70461), uint32(0x4ca0b8d9), uint32(0xf5986f44), 4106 uint32(0x90ffd3fc), uint32(0x7e5066ee), uint32(0x1b37da56), uint32(0x4d27b90e), uint32(0x284005b6), 4107 uint32(0xc6efb0a4), uint32(0xa3880c1c), uint32(0x1ab0db81), uint32(0x7fd76739), uint32(0x9178d22b), 4108 uint32(0xf41f6e93), uint32(0x03f7263b), uint32(0x66909a83), uint32(0x883f2f91), uint32(0xed589329), 4109 uint32(0x546044b4), uint32(0x3107f80c), uint32(0xdfa84d1e), uint32(0xbacff1a6), uint32(0xecdf92fe), 4110 uint32(0x89b82e46), uint32(0x67179b54), uint32(0x027027ec), uint32(0xbb48f071), uint32(0xde2f4cc9), 4111 uint32(0x3080f9db), uint32(0x55e74563), uint32(0x9ca03f6b), uint32(0xf9c783d3), uint32(0x176836c1), 4112 uint32(0x720f8a79), uint32(0xcb375de4), uint32(0xae50e15c), uint32(0x40ff544e), uint32(0x2598e8f6), 4113 uint32(0x73888bae), uint32(0x16ef3716), uint32(0xf8408204), uint32(0x9d273ebc), uint32(0x241fe921), 4114 uint32(0x41785599), uint32(0xafd7e08b), uint32(0xcab05c33), uint32(0x3bb659ed), uint32(0x5ed1e555), 4115 uint32(0xb07e5047), uint32(0xd519ecff), uint32(0x6c213b62), uint32(0x094687da), uint32(0xe7e932c8), 4116 uint32(0x828e8e70), uint32(0xd49eed28), uint32(0xb1f95190), uint32(0x5f56e482), uint32(0x3a31583a), 4117 uint32(0x83098fa7), uint32(0xe66e331f), uint32(0x08c1860d), uint32(0x6da63ab5), uint32(0xa4e140bd), 4118 uint32(0xc186fc05), uint32(0x2f294917), uint32(0x4a4ef5af), uint32(0xf3762232), uint32(0x96119e8a), 4119 uint32(0x78be2b98), uint32(0x1dd99720), uint32(0x4bc9f478), uint32(0x2eae48c0), uint32(0xc001fdd2), 4120 uint32(0xa566416a), uint32(0x1c5e96f7), uint32(0x79392a4f), uint32(0x97969f5d), uint32(0xf2f123e5), 4121 uint32(0x05196b4d), uint32(0x607ed7f5), uint32(0x8ed162e7), uint32(0xebb6de5f), uint32(0x528e09c2), 4122 uint32(0x37e9b57a), uint32(0xd9460068), uint32(0xbc21bcd0), uint32(0xea31df88), uint32(0x8f566330), 4123 uint32(0x61f9d622), uint32(0x049e6a9a), uint32(0xbda6bd07), uint32(0xd8c101bf), uint32(0x366eb4ad), 4124 uint32(0x53090815), uint32(0x9a4e721d), uint32(0xff29cea5), uint32(0x11867bb7), uint32(0x74e1c70f), 4125 uint32(0xcdd91092), uint32(0xa8beac2a), uint32(0x46111938), uint32(0x2376a580), uint32(0x7566c6d8), 4126 uint32(0x10017a60), uint32(0xfeaecf72), uint32(0x9bc973ca), uint32(0x22f1a457), uint32(0x479618ef), 4127 uint32(0xa939adfd), uint32(0xcc5e1145), uint32(0x06ee4d76), uint32(0x6389f1ce), uint32(0x8d2644dc), 4128 uint32(0xe841f864), uint32(0x51792ff9), uint32(0x341e9341), uint32(0xdab12653), uint32(0xbfd69aeb), 4129 uint32(0xe9c6f9b3), uint32(0x8ca1450b), uint32(0x620ef019), uint32(0x07694ca1), uint32(0xbe519b3c), 4130 uint32(0xdb362784), uint32(0x35999296), uint32(0x50fe2e2e), uint32(0x99b95426), uint32(0xfcdee89e), 4131 uint32(0x12715d8c), uint32(0x7716e134), uint32(0xce2e36a9), uint32(0xab498a11), uint32(0x45e63f03), 4132 uint32(0x208183bb), uint32(0x7691e0e3), uint32(0x13f65c5b), uint32(0xfd59e949), uint32(0x983e55f1), 4133 uint32(0x2106826c), uint32(0x44613ed4), uint32(0xaace8bc6), uint32(0xcfa9377e), uint32(0x38417fd6), 4134 uint32(0x5d26c36e), uint32(0xb389767c), uint32(0xd6eecac4), uint32(0x6fd61d59), uint32(0x0ab1a1e1), 4135 uint32(0xe41e14f3), uint32(0x8179a84b), uint32(0xd769cb13), uint32(0xb20e77ab), uint32(0x5ca1c2b9), 4136 uint32(0x39c67e01), uint32(0x80fea99c), uint32(0xe5991524), uint32(0x0b36a036), uint32(0x6e511c8e), 4137 uint32(0xa7166686), uint32(0xc271da3e), uint32(0x2cde6f2c), uint32(0x49b9d394), uint32(0xf0810409), 4138 uint32(0x95e6b8b1), uint32(0x7b490da3), uint32(0x1e2eb11b), uint32(0x483ed243), uint32(0x2d596efb), 4139 uint32(0xc3f6dbe9), uint32(0xa6916751), uint32(0x1fa9b0cc), uint32(0x7ace0c74), uint32(0x9461b966), 4140 uint32(0xf10605de), 4141 }, 4142 } /* crc32.h:5:25 */ 4143 4144 // ========================================================================= 4145 // This function can be used by asm versions of crc32() 4146 func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */ 4147 return uintptr(uintptr(unsafe.Pointer(&crc_table))) 4148 } 4149 4150 // ========================================================================= 4151 4152 // ========================================================================= 4153 func Xcrc32_z(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:202:23: */ 4154 bp := tls.Alloc(4) 4155 defer tls.Free(4) 4156 4157 if buf == uintptr(Z_NULL) { 4158 return 0 4159 } 4160 4161 if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) { 4162 // var endian Z_crc_t at bp, 4 4163 4164 *(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1) 4165 if *(*uint8)(unsafe.Pointer(bp /* &endian */)) != 0 { 4166 return crc32_little(tls, crc, buf, len) 4167 } else { 4168 return crc32_big(tls, crc, buf, len) 4169 } 4170 } 4171 crc = (crc ^ 0xffffffff) 4172 for len >= uint64(8) { 4173 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)) 4174 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)) 4175 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)) 4176 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)) 4177 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)) 4178 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)) 4179 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)) 4180 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)) 4181 len = len - (uint64(8)) 4182 } 4183 if len != 0 { 4184 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 4185 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)) 4186 } 4187 } 4188 return (crc ^ 0xffffffff) 4189 } 4190 4191 // ========================================================================= 4192 func Xcrc32(tls *libc.TLS, crc uint64, buf uintptr, len UInt) uint64 { /* crc32.c:237:23: */ 4193 return Xcrc32_z(tls, crc, buf, uint64(len)) 4194 } 4195 4196 // 4197 // This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit 4198 // integer pointer type. This violates the strict aliasing rule, where a 4199 // compiler can assume, for optimization purposes, that two pointers to 4200 // fundamentally different types won't ever point to the same memory. This can 4201 // manifest as a problem only if one of the pointers is written to. This code 4202 // only reads from those pointers. So long as this code remains isolated in 4203 // this compilation unit, there won't be a problem. For this reason, this code 4204 // should not be copied and pasted into a compilation unit in which other code 4205 // writes to the buffer that is passed to these routines. 4206 // 4207 4208 // ========================================================================= 4209 4210 // ========================================================================= 4211 func crc32_little(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:266:21: */ 4212 var c Z_crc_t 4213 var buf4 uintptr 4214 4215 c = Z_crc_t(crc) 4216 c = ^c 4217 for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) { 4218 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)) 4219 len-- 4220 } 4221 4222 buf4 = buf 4223 for len >= uint64(32) { 4224 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4225 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))) 4226 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4227 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))) 4228 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4229 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))) 4230 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4231 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))) 4232 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4233 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))) 4234 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4235 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))) 4236 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4237 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))) 4238 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4239 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))) 4240 len = len - (uint64(32)) 4241 } 4242 for len >= uint64(4) { 4243 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4244 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))) 4245 len = len - (uint64(4)) 4246 } 4247 buf = buf4 4248 4249 if len != 0 { 4250 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 4251 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)) 4252 } 4253 } 4254 c = ^c 4255 return uint64(c) 4256 } 4257 4258 // ========================================================================= 4259 4260 // ========================================================================= 4261 func crc32_big(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:306:21: */ 4262 var c Z_crc_t 4263 var buf4 uintptr 4264 4265 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)) 4266 c = ^c 4267 for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) { 4268 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)) 4269 len-- 4270 } 4271 4272 buf4 = buf 4273 for len >= uint64(32) { 4274 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4275 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))) 4276 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4277 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))) 4278 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4279 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))) 4280 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4281 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))) 4282 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4283 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))) 4284 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4285 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))) 4286 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4287 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))) 4288 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4289 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))) 4290 len = len - (uint64(32)) 4291 } 4292 for len >= uint64(4) { 4293 c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))) 4294 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))) 4295 len = len - (uint64(4)) 4296 } 4297 buf = buf4 4298 4299 if len != 0 { 4300 for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 { 4301 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)) 4302 } 4303 } 4304 c = ^c 4305 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))) 4306 } 4307 4308 // ========================================================================= 4309 func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint64) uint64 { /* crc32.c:344:21: */ 4310 var sum uint64 4311 4312 sum = uint64(0) 4313 for vec != 0 { 4314 if (vec & uint64(1)) != 0 { 4315 sum = sum ^ (*(*uint64)(unsafe.Pointer(mat))) 4316 } 4317 vec >>= 1 4318 mat += 8 4319 } 4320 return sum 4321 } 4322 4323 // ========================================================================= 4324 func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */ 4325 var n int32 4326 4327 for n = 0; n < GF2_DIM; n++ { 4328 *(*uint64)(unsafe.Pointer(square + uintptr(n)*8)) = gf2_matrix_times(tls, mat, *(*uint64)(unsafe.Pointer(mat + uintptr(n)*8))) 4329 } 4330 } 4331 4332 // ========================================================================= 4333 func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 X__off_t) ULong { /* crc32.c:372:13: */ 4334 bp := tls.Alloc(512) 4335 defer tls.Free(512) 4336 4337 var n int32 4338 var row uint64 4339 // var even [32]uint64 at bp+256, 256 4340 // even-power-of-two zeros operator 4341 // var odd [32]uint64 at bp, 256 4342 // odd-power-of-two zeros operator 4343 4344 // degenerate case (also disallow negative lengths) 4345 if len2 <= int64(0) { 4346 return crc1 4347 } 4348 4349 // put operator for one zero bit in odd 4350 *(*uint64)(unsafe.Pointer(bp /* &odd[0] */)) = 0xedb88320 // CRC-32 polynomial 4351 row = uint64(1) 4352 for n = 1; n < GF2_DIM; n++ { 4353 *(*uint64)(unsafe.Pointer(bp /* &odd[0] */ + uintptr(n)*8)) = row 4354 row <<= 1 4355 } 4356 4357 // put operator for two zero bits in even 4358 gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */) 4359 4360 // put operator for four zero bits in odd 4361 gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */) 4362 4363 // apply len2 zeros to crc1 (first square will put the operator for one 4364 // zero byte, eight zero bits, in even) 4365 for ok := true; ok; ok = (len2 != int64(0)) { 4366 // apply zeros operator for this bit of len2 4367 gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */) 4368 if (len2 & int64(1)) != 0 { 4369 crc1 = gf2_matrix_times(tls, bp+256 /* &even[0] */, crc1) 4370 } 4371 len2 >>= 1 4372 4373 // if no more bits set, then done 4374 if len2 == int64(0) { 4375 break 4376 } 4377 4378 // another iteration of the loop with odd and even swapped 4379 gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */) 4380 if (len2 & int64(1)) != 0 { 4381 crc1 = gf2_matrix_times(tls, bp /* &odd[0] */, crc1) 4382 } 4383 len2 >>= 1 4384 4385 // if no more bits set, then done 4386 } 4387 4388 // return combined crc 4389 crc1 = crc1 ^ (crc2) 4390 return crc1 4391 } 4392 4393 // ========================================================================= 4394 func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 X__off_t) ULong { /* crc32.c:428:15: */ 4395 return crc32_combine_(tls, crc1, crc2, len2) 4396 } 4397 4398 func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 X__off_t) ULong { /* crc32.c:436:15: */ 4399 return crc32_combine_(tls, crc1, crc2, len2) 4400 } 4401 4402 // Reverse the bytes in a 32-bit value 4403 4404 // define NO_GZIP when compiling if you want to disable gzip header and 4405 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 4406 // the crc code when it is not needed. For shared libraries, gzip encoding 4407 // should be left enabled. 4408 4409 // =========================================================================== 4410 // Internal compression state. 4411 4412 // number of length codes, not counting the special END_BLOCK code 4413 4414 // number of literal bytes 0..255 4415 4416 // number of Literal or Length codes, including the END_BLOCK code 4417 4418 // number of distance codes 4419 4420 // number of codes used to transfer the bit lengths 4421 4422 // maximum heap size 4423 4424 // All codes must not exceed MAX_BITS bits 4425 4426 // size of bit buffer in bi_buf 4427 4428 // Stream status 4429 4430 // Data structure describing a single value and its code string. 4431 type Ct_data_s = struct { 4432 Ffc struct{ Ffreq Ush } 4433 Fdl struct{ Fdad Ush } 4434 } /* zlib.h:84:1 */ 4435 4436 // Reverse the bytes in a 32-bit value 4437 4438 // define NO_GZIP when compiling if you want to disable gzip header and 4439 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 4440 // the crc code when it is not needed. For shared libraries, gzip encoding 4441 // should be left enabled. 4442 4443 // =========================================================================== 4444 // Internal compression state. 4445 4446 // number of length codes, not counting the special END_BLOCK code 4447 4448 // number of literal bytes 0..255 4449 4450 // number of Literal or Length codes, including the END_BLOCK code 4451 4452 // number of distance codes 4453 4454 // number of codes used to transfer the bit lengths 4455 4456 // maximum heap size 4457 4458 // All codes must not exceed MAX_BITS bits 4459 4460 // size of bit buffer in bi_buf 4461 4462 // Stream status 4463 4464 // Data structure describing a single value and its code string. 4465 type Ct_data = Ct_data_s /* deflate.h:77:7 */ 4466 4467 type Static_tree_desc_s = struct { 4468 Fstatic_tree uintptr 4469 Fextra_bits uintptr 4470 Fextra_base int32 4471 Felems int32 4472 Fmax_length int32 4473 F__ccgo_pad1 [4]byte 4474 } /* deflate.h:84:9 */ 4475 4476 type Tree_desc_s = struct { 4477 Fdyn_tree uintptr 4478 Fmax_code int32 4479 F__ccgo_pad1 [4]byte 4480 Fstat_desc uintptr 4481 } /* zlib.h:84:1 */ 4482 4483 type Tree_desc = Tree_desc_s /* deflate.h:90:7 */ 4484 4485 type Pos = Ush /* deflate.h:92:13 */ 4486 type Posf = Pos /* deflate.h:93:17 */ 4487 type IPos = uint32 /* deflate.h:94:18 */ 4488 4489 // A Pos is an index in the character window. We use short instead of int to 4490 // save space in the various tables. IPos is used only for parameter passing. 4491 4492 type Deflate_state = Internal_state /* deflate.h:276:7 */ 4493 4494 var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7 /* " deflate 1.2.11 ..." */)) /* deflate.c:54:12 */ 4495 // 4496 // If you use the zlib library in a product, an acknowledgment is welcome 4497 // in the documentation of your product. If for some reason you cannot 4498 // include such an acknowledgment, I would appreciate that you keep this 4499 // copyright string in the executable of your product. 4500 // 4501 4502 // =========================================================================== 4503 // Function prototypes. 4504 type Block_state = uint32 /* deflate.c:71:3 */ 4505 4506 type Compress_func = uintptr /* deflate.c:73:21 */ 4507 4508 // =========================================================================== 4509 // Local data 4510 4511 // Tail of hash chains 4512 4513 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 4514 4515 // Values for max_lazy_match, good_match and max_chain_length, depending on 4516 // the desired pack level (0..9). The values given below have been tuned to 4517 // exclude worst case performance for pathological files. Better values may be 4518 // found for specific files. 4519 type Config_s = struct { 4520 Fgood_length Ush 4521 Fmax_lazy Ush 4522 Fnice_length Ush 4523 Fmax_chain Ush 4524 Ffunc Compress_func 4525 } /* deflate.c:120:9 */ 4526 4527 // =========================================================================== 4528 // Local data 4529 4530 // Tail of hash chains 4531 4532 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 4533 4534 // Values for max_lazy_match, good_match and max_chain_length, depending on 4535 // the desired pack level (0..9). The values given below have been tuned to 4536 // exclude worst case performance for pathological files. Better values may be 4537 // found for specific files. 4538 type Config = Config_s /* deflate.c:126:3 */ 4539 4540 var configuration_table = [10]Config{ 4541 // good lazy nice chain 4542 /* 0 */ {Ffunc: 0}, // store only 4543 /* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches 4544 /* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0}, 4545 /* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 4546 4547 /* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches 4548 /* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 4549 /* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0}, 4550 /* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0}, 4551 /* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0}, 4552 /* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */ 4553 4554 // max compression 4555 4556 // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 4557 // For deflate_fast() (levels <= 3) good is ignored and lazy has a different 4558 // meaning. 4559 4560 // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH 4561 4562 // =========================================================================== 4563 // Update a hash value with the given input byte 4564 // IN assertion: all calls to UPDATE_HASH are made with consecutive input 4565 // characters, so that a running hash key can be computed from the previous 4566 // key instead of complete recalculation each time. 4567 4568 // =========================================================================== 4569 // Insert string str in the dictionary and set match_head to the previous head 4570 // of the hash chain (the most recent string with same hash key). Return 4571 // the previous length of the hash chain. 4572 // If this file is compiled with -DFASTEST, the compression level is forced 4573 // to 1, and no hash chains are maintained. 4574 // IN assertion: all calls to INSERT_STRING are made with consecutive input 4575 // characters and the first MIN_MATCH bytes of str are valid (except for 4576 // the last MIN_MATCH-1 bytes of the input file). 4577 4578 // =========================================================================== 4579 // Initialize the hash table (avoiding 64K overflow for 16 bit systems). 4580 // prev[] will be initialized on the fly. 4581 4582 // =========================================================================== 4583 // Slide the hash table when sliding the window down (could be avoided with 32 4584 // bit values at the expense of memory usage). We slide even when level == 0 to 4585 // keep the hash table consistent if we switch back to level > 0 later. 4586 func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */ 4587 var n uint32 4588 var m uint32 4589 var p uintptr 4590 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4591 4592 n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size 4593 p = ((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2) 4594 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 4595 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 4596 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 4597 if m >= wsize { 4598 return (uint16(m - wsize)) 4599 } 4600 return uint16(NIL) 4601 }() 4602 } 4603 n = wsize 4604 p = ((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2) 4605 for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 { 4606 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 4607 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 4608 if m >= wsize { 4609 return (uint16(m - wsize)) 4610 } 4611 return uint16(NIL) 4612 }() 4613 // If n is not on any hash chain, prev[n] is garbage but 4614 // its value will never be used. 4615 } 4616 } 4617 4618 // ========================================================================= 4619 func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */ 4620 return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, 4621 Z_DEFAULT_STRATEGY, version, stream_size) 4622 // To do: ignore strm->next_in if we use it as window 4623 } 4624 4625 // ========================================================================= 4626 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: */ 4627 var s uintptr 4628 var wrap int32 = 1 4629 var overlay uintptr 4630 // We overlay pending_buf and d_buf+l_buf. This works since the average 4631 // output size for (length,distance) codes is <= 24 bits. 4632 4633 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]))) || (uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{}))) { 4634 return -6 4635 } 4636 if strm == uintptr(Z_NULL) { 4637 return -2 4638 } 4639 4640 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 4641 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 4642 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 4643 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 4644 }{Xzcalloc})) 4645 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 4646 } 4647 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 4648 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 4649 f func(*libc.TLS, Voidpf, Voidpf) 4650 }{Xzcfree})) 4651 } 4652 4653 if level == (-1) { 4654 level = 6 4655 } 4656 4657 if windowBits < 0 { // suppress zlib wrapper 4658 wrap = 0 4659 windowBits = -windowBits 4660 } else if windowBits > 15 { 4661 wrap = 2 // write gzip wrapper instead 4662 windowBits = windowBits - (16) 4663 } 4664 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)) { 4665 return -2 4666 } 4667 if windowBits == 8 { 4668 windowBits = 9 4669 } // until 256-byte window bug fixed 4670 s = (*struct { 4671 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4672 })(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{}))) 4673 if s == uintptr(Z_NULL) { 4674 return -4 4675 } 4676 (*Z_stream)(unsafe.Pointer(strm)).Fstate = s 4677 (*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm 4678 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset() 4679 4680 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 4681 (*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL) 4682 (*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits) 4683 (*Deflate_state)(unsafe.Pointer(s)).Fw_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)) 4684 (*Deflate_state)(unsafe.Pointer(s)).Fw_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)) 4685 4686 (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = (UInt(memLevel) + UInt(7)) 4687 (*Deflate_state)(unsafe.Pointer(s)).Fhash_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)) 4688 (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)) 4689 (*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH)) - UInt(1)) / UInt(MIN_MATCH)) 4690 4691 (*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct { 4692 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4693 })(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)))))) 4694 (*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct { 4695 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4696 })(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)))) 4697 (*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct { 4698 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4699 })(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)))) 4700 4701 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64(0) // nothing written to s->window yet 4702 4703 (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = (UInt(int32(1) << (memLevel + 6))) // 16K elements by default 4704 4705 overlay = (*struct { 4706 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4707 })(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)))) 4708 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay 4709 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2))) 4710 4711 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)) { 4712 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 4713 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-4))] 4714 XdeflateEnd(tls, strm) 4715 return -4 4716 } 4717 (*Deflate_state)(unsafe.Pointer(s)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2) 4718 (*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)))) 4719 4720 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 4721 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 4722 (*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method) 4723 4724 return XdeflateReset(tls, strm) 4725 } 4726 4727 var my_version = *(*[7]int8)(unsafe.Pointer(ts /* "1.2.11" */)) /* deflate.c:253:23 */ 4728 4729 // ========================================================================= 4730 // Check for a valid deflate stream state. Return 0 if ok, 1 if not. 4731 func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */ 4732 var s uintptr 4733 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 4734 return 1 4735 } 4736 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4737 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)) { 4738 return 1 4739 } 4740 return 0 4741 } 4742 4743 // ========================================================================= 4744 func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */ 4745 var s uintptr 4746 var str UInt 4747 var n UInt 4748 var wrap int32 4749 var avail uint32 4750 var next uintptr 4751 4752 if (deflateStateCheck(tls, strm) != 0) || (dictionary == uintptr(Z_NULL)) { 4753 return -2 4754 } 4755 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4756 wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap 4757 if ((wrap == 2) || ((wrap == 1) && ((*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE))) || ((*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0) { 4758 return -2 4759 } 4760 4761 // when using zlib wrappers, compute Adler-32 for provided dictionary 4762 if wrap == 1 { 4763 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) 4764 } 4765 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf 4766 4767 // if dictionary would fill window, just replace the history 4768 if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 4769 if wrap == 0 { // already empty otherwise 4770 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 4771 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))))) 4772 4773 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 4774 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 4775 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 4776 } 4777 dictionary += (uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size)) // use the tail 4778 dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4779 } 4780 4781 // insert dictionary into window and hash 4782 avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 4783 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 4784 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength 4785 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary 4786 fill_window(tls, s) 4787 for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 4788 str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 4789 n = ((*Deflate_state)(unsafe.Pointer(s)).Flookahead - (UInt(MIN_MATCH - 1))) 4790 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 4791 (*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) 4792 *(*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)) 4793 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 4794 str++ 4795 } 4796 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str 4797 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = (UInt(MIN_MATCH - 1)) 4798 fill_window(tls, s) 4799 } 4800 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 4801 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4802 (*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 4803 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 4804 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 4805 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 4806 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 4807 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail 4808 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 4809 return Z_OK 4810 } 4811 4812 // ========================================================================= 4813 func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */ 4814 var s uintptr 4815 var len UInt 4816 4817 if deflateStateCheck(tls, strm) != 0 { 4818 return -2 4819 } 4820 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4821 len = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) 4822 if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 4823 len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4824 } 4825 if (dictionary != uintptr(Z_NULL)) && (len != 0) { 4826 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)) 4827 } 4828 if dictLength != uintptr(Z_NULL) { 4829 *(*UInt)(unsafe.Pointer(dictLength)) = len 4830 } 4831 return Z_OK 4832 } 4833 4834 // ========================================================================= 4835 func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */ 4836 var s uintptr 4837 4838 if deflateStateCheck(tls, strm) != 0 { 4839 return -2 4840 } 4841 4842 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, uint64(0)) 4843 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically 4844 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN 4845 4846 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4847 (*Deflate_state)(unsafe.Pointer(s)).Fpending = uint64(0) 4848 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 4849 4850 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 { 4851 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH); 4852 } 4853 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 { 4854 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 4855 return GZIP_STATE 4856 } 4857 return func() int32 { 4858 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 { 4859 return INIT_STATE 4860 } 4861 return BUSY_STATE 4862 }() 4863 }() 4864 (*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint64 { 4865 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 4866 return Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4867 } 4868 return Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4869 }() 4870 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH 4871 4872 X_tr_init(tls, s) 4873 4874 return Z_OK 4875 } 4876 4877 // ========================================================================= 4878 func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */ 4879 var ret int32 4880 4881 ret = XdeflateResetKeep(tls, strm) 4882 if ret == Z_OK { 4883 lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 4884 } 4885 return ret 4886 } 4887 4888 // ========================================================================= 4889 func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */ 4890 if (deflateStateCheck(tls, strm) != 0) || ((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2) { 4891 return -2 4892 } 4893 (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head 4894 return Z_OK 4895 } 4896 4897 // ========================================================================= 4898 func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */ 4899 if deflateStateCheck(tls, strm) != 0 { 4900 return -2 4901 } 4902 if pending != uintptr(Z_NULL) { 4903 *(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) 4904 } 4905 if bits != uintptr(Z_NULL) { 4906 *(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid 4907 } 4908 return Z_OK 4909 } 4910 4911 // ========================================================================= 4912 func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */ 4913 var s uintptr 4914 var put int32 4915 4916 if deflateStateCheck(tls, strm) != 0 { 4917 return -2 4918 } 4919 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4920 if ((*Deflate_state)(unsafe.Pointer(s)).Fd_buf) < ((*Deflate_state)(unsafe.Pointer(s)).Fpending_out + uintptr((int32((Buf_size + 7)) >> 3))) { 4921 return -5 4922 } 4923 for ok := true; ok; ok = bits != 0 { 4924 put = (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 4925 if put > bits { 4926 put = bits 4927 } 4928 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((value & ((int32(1) << put) - 1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))))) 4929 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (put) 4930 X_tr_flush_bits(tls, s) 4931 value >>= put 4932 bits = bits - (put) 4933 } 4934 return Z_OK 4935 } 4936 4937 // ========================================================================= 4938 func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */ 4939 var s uintptr 4940 var func1 Compress_func 4941 4942 if deflateStateCheck(tls, strm) != 0 { 4943 return -2 4944 } 4945 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4946 4947 if level == (-1) { 4948 level = 6 4949 } 4950 if (((level < 0) || (level > 9)) || (strategy < 0)) || (strategy > Z_FIXED) { 4951 return -2 4952 } 4953 func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc 4954 4955 if ((strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy) || (func1 != configuration_table[level].Ffunc)) && ((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0) { 4956 // Flush the last buffer: 4957 var err int32 = Xdeflate(tls, strm, Z_BLOCK) 4958 if err == (-2) { 4959 return err 4960 } 4961 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 4962 return -5 4963 } 4964 } 4965 if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level { 4966 if ((*Deflate_state)(unsafe.Pointer(s)).Flevel == 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0)) { 4967 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) { 4968 slide_hash(tls, s) 4969 } else { 4970 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 4971 } 4972 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))))) 4973 4974 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0) 4975 } 4976 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 4977 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy) 4978 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length) 4979 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length) 4980 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain) 4981 } 4982 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 4983 return Z_OK 4984 } 4985 4986 // ========================================================================= 4987 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: */ 4988 var s uintptr 4989 4990 if deflateStateCheck(tls, strm) != 0 { 4991 return -2 4992 } 4993 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4994 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length) 4995 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy) 4996 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length 4997 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain) 4998 return Z_OK 4999 } 5000 5001 // ========================================================================= 5002 // For the default windowBits of 15 and memLevel of 8, this function returns 5003 // a close to exact, as well as small, upper bound on the compressed size. 5004 // They are coded as constants here for a reason--if the #define's are 5005 // changed, then this function needs to be changed as well. The return 5006 // value for 15 and 8 only works for those exact settings. 5007 // 5008 // For any setting other than those defaults for windowBits and memLevel, 5009 // the value returned is a conservative worst case for the maximum expansion 5010 // resulting from using fixed blocks instead of stored blocks, which deflate 5011 // can emit on compressed data for some combinations of the parameters. 5012 // 5013 // This function could be more sophisticated to provide closer upper bounds for 5014 // every combination of windowBits and memLevel. But even the conservative 5015 // upper bound of about 14% expansion does not seem onerous for output buffer 5016 // allocation. 5017 func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */ 5018 var s uintptr 5019 var complen ULong 5020 var wraplen ULong 5021 5022 // conservative upper bound for compressed data 5023 complen = (((sourceLen + ((sourceLen + uint64(7)) >> 3)) + ((sourceLen + uint64(63)) >> 6)) + uint64(5)) 5024 5025 // if can't get parameters, return conservative bound plus zlib wrapper 5026 if deflateStateCheck(tls, strm) != 0 { 5027 return (complen + uint64(6)) 5028 } 5029 5030 // compute wrapper length 5031 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5032 switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap { 5033 case 0: // raw deflate 5034 wraplen = uint64(0) 5035 break 5036 case 1: // zlib wrapper 5037 wraplen = (ULong(6 + (func() int32 { 5038 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { 5039 return 4 5040 } 5041 return 0 5042 }()))) 5043 break 5044 case 2: // gzip wrapper 5045 wraplen = uint64(18) 5046 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header 5047 var str uintptr 5048 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 5049 wraplen = wraplen + (ULong(UInt(2) + (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)) 5050 } 5051 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname 5052 if str != uintptr(Z_NULL) { 5053 for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 5054 wraplen++ 5055 } 5056 } 5057 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment 5058 if str != uintptr(Z_NULL) { 5059 for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 5060 wraplen++ 5061 } 5062 } 5063 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 5064 wraplen = wraplen + (uint64(2)) 5065 } 5066 } 5067 break 5068 default: // for compiler happiness 5069 wraplen = uint64(6) 5070 } 5071 5072 // if not default parameters, return conservative bound 5073 if ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15)) || ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != (UInt(8 + 7))) { 5074 return (complen + wraplen) 5075 } 5076 5077 // default settings: return tight bound for that case 5078 return ((((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) - uint64(6)) + wraplen) 5079 } 5080 5081 // ========================================================================= 5082 // Put a short in the pending buffer. The 16-bit value is put in MSB order. 5083 // IN assertion: the stream state is correct and there is enough room in 5084 // pending_buf. 5085 func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */ 5086 { 5087 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b >> 8)) 5088 } 5089 5090 { 5091 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b & UInt(0xff))) 5092 } 5093 5094 } 5095 5096 // ========================================================================= 5097 // Flush as much pending output as possible. All deflate() output, except for 5098 // some deflate_stored() output, goes through this function so some 5099 // applications may wish to modify it to avoid allocating a large 5100 // strm->next_out buffer and copying into it. (See also read_buf()). 5101 func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */ 5102 var len uint32 5103 var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5104 5105 X_tr_flush_bits(tls, s) 5106 len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending) 5107 if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out { 5108 len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 5109 } 5110 if len == uint32(0) { 5111 return 5112 } 5113 5114 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len)) 5115 *(*uintptr)(unsafe.Pointer(strm + 24 /* &.next_out */)) += (uintptr(len)) 5116 *(*uintptr)(unsafe.Pointer(s + 32 /* &.pending_out */)) += (uintptr(len)) 5117 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(len)) 5118 *(*UInt)(unsafe.Pointer(strm + 32 /* &.avail_out */)) -= (len) 5119 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) -= (Ulg(len)) 5120 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == uint64(0) { 5121 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 5122 } 5123 } 5124 5125 // =========================================================================== 5126 // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. 5127 5128 // ========================================================================= 5129 func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */ 5130 var old_flush int32 // value of flush param for previous deflate call 5131 var s uintptr 5132 5133 if ((deflateStateCheck(tls, strm) != 0) || (flush > Z_BLOCK)) || (flush < 0) { 5134 return -2 5135 } 5136 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 5137 5138 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)) { 5139 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-2))]; return -2 }() 5140 } 5141 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 5142 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 5143 } 5144 5145 old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush 5146 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush 5147 5148 // Flush as much pending output as possible 5149 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5150 flush_pending(tls, strm) 5151 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 5152 // Since avail_out is 0, deflate will be called again with 5153 // more output space, but possibly with both pending and 5154 // avail_in equal to zero. There won't be anything to do, 5155 // but this is not an error situation so make sure we 5156 // return OK instead of BUF_ERROR at next call of deflate: 5157 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5158 return Z_OK 5159 } 5160 5161 // Make sure there is something to do and avoid duplicate consecutive 5162 // flushes. For repeated and useless calls with Z_FINISH, we keep 5163 // returning Z_STREAM_END instead of Z_BUF_ERROR. 5164 } else if (((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((((flush) * 2) - (func() int32 { 5165 if (flush) > 4 { 5166 return 9 5167 } 5168 return 0 5169 }())) <= (((old_flush) * 2) - (func() int32 { 5170 if (old_flush) > 4 { 5171 return 9 5172 } 5173 return 0 5174 }())))) && (flush != Z_FINISH) { 5175 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 5176 } 5177 5178 // User must not provide more input after the first FINISH: 5179 if ((*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE) && ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) { 5180 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }() 5181 } 5182 5183 // Write the header 5184 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE { 5185 // zlib header 5186 var header UInt = ((UInt(Z_DEFLATED) + (((*Deflate_state)(unsafe.Pointer(s)).Fw_bits - UInt(8)) << 4)) << 8) 5187 var level_flags UInt 5188 5189 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 5190 level_flags = UInt(0) 5191 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 { 5192 level_flags = UInt(1) 5193 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 { 5194 level_flags = UInt(2) 5195 } else { 5196 level_flags = UInt(3) 5197 } 5198 header = header | (level_flags << 6) 5199 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 5200 header = header | (UInt(PRESET_DICT)) 5201 } 5202 header = header + (UInt(31) - (header % UInt(31))) 5203 5204 putShortMSB(tls, s, header) 5205 5206 // Save the adler32 of the preset dictionary: 5207 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 5208 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 5209 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff)))) 5210 } 5211 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 5212 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 5213 5214 // Compression must start with an empty pending buffer 5215 flush_pending(tls, strm) 5216 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5217 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5218 return Z_OK 5219 } 5220 } 5221 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE { 5222 // gzip header 5223 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 5224 { 5225 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31) 5226 } 5227 5228 { 5229 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139) 5230 } 5231 5232 { 5233 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8) 5234 } 5235 5236 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) { 5237 { 5238 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 5239 } 5240 5241 { 5242 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 5243 } 5244 5245 { 5246 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 5247 } 5248 5249 { 5250 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 5251 } 5252 5253 { 5254 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 5255 } 5256 5257 { 5258 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 5259 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 5260 return uint8(2) 5261 } 5262 return func() uint8 { 5263 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 5264 return uint8(4) 5265 } 5266 return uint8(0) 5267 }() 5268 }() 5269 } 5270 5271 { 5272 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE) 5273 } 5274 5275 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 5276 5277 // Compression must start with an empty pending buffer 5278 flush_pending(tls, strm) 5279 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5280 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5281 return Z_OK 5282 } 5283 } else { 5284 { 5285 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((((func() int32 { 5286 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { 5287 return 1 5288 } 5289 return 0 5290 }()) + (func() int32 { 5291 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 5292 return 2 5293 } 5294 return 0 5295 }())) + (func() int32 { 5296 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) { 5297 return 0 5298 } 5299 return 4 5300 }())) + (func() int32 { 5301 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) { 5302 return 0 5303 } 5304 return 8 5305 }())) + (func() int32 { 5306 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) { 5307 return 0 5308 } 5309 return 16 5310 }()))) 5311 } 5312 5313 { 5314 *(*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))) 5315 } 5316 5317 { 5318 *(*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))) 5319 } 5320 5321 { 5322 *(*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))) 5323 } 5324 5325 { 5326 *(*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))) 5327 } 5328 5329 { 5330 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 5331 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 5332 return uint8(2) 5333 } 5334 return func() uint8 { 5335 if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) { 5336 return uint8(4) 5337 } 5338 return uint8(0) 5339 }() 5340 }() 5341 } 5342 5343 { 5344 *(*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)) 5345 } 5346 5347 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 5348 { 5349 *(*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))) 5350 } 5351 5352 { 5353 *(*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))) 5354 } 5355 5356 } 5357 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 5358 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf, 5359 uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)) 5360 } 5361 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 5362 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE 5363 } 5364 } 5365 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE { 5366 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 5367 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 5368 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)) 5369 for ((*Deflate_state)(unsafe.Pointer(s)).Fpending + Ulg(left)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 5370 var copy UInt = (UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)) 5371 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 5372 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(copy)) 5373 (*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size 5374 for ok := true; ok; ok = 0 != 0 { 5375 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 5376 (*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)))) 5377 } 5378 } 5379 *(*Ulg)(unsafe.Pointer(s + 64 /* &.gzindex */)) += (Ulg(copy)) 5380 flush_pending(tls, strm) 5381 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5382 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5383 return Z_OK 5384 } 5385 beg = uint64(0) 5386 left = left - (copy) 5387 } 5388 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), 5389 ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(left)) 5390 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (Ulg(left)) 5391 for ok1 := true; ok1; ok1 = 0 != 0 { 5392 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 5393 (*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)))) 5394 } 5395 } 5396 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 5397 } 5398 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE 5399 } 5400 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE { 5401 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) { 5402 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 5403 var val int32 5404 for ok2 := true; ok2; ok2 = (val != 0) { 5405 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 5406 for ok3 := true; ok3; ok3 = 0 != 0 { 5407 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 5408 (*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)))) 5409 } 5410 } 5411 flush_pending(tls, strm) 5412 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5413 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5414 return Z_OK 5415 } 5416 beg = uint64(0) 5417 } 5418 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))))) 5419 { 5420 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 5421 } 5422 5423 } 5424 for ok4 := true; ok4; ok4 = 0 != 0 { 5425 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 5426 (*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)))) 5427 } 5428 } 5429 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 5430 } 5431 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE 5432 } 5433 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE { 5434 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) { 5435 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 5436 var val int32 5437 for ok5 := true; ok5; ok5 = (val != 0) { 5438 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 5439 for ok6 := true; ok6; ok6 = 0 != 0 { 5440 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 5441 (*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)))) 5442 } 5443 } 5444 flush_pending(tls, strm) 5445 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5446 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5447 return Z_OK 5448 } 5449 beg = uint64(0) 5450 } 5451 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))))) 5452 { 5453 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 5454 } 5455 5456 } 5457 for ok7 := true; ok7; ok7 = 0 != 0 { 5458 if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) { 5459 (*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)))) 5460 } 5461 } 5462 } 5463 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE 5464 } 5465 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE { 5466 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 5467 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending + uint64(2)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 5468 flush_pending(tls, strm) 5469 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5470 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5471 return Z_OK 5472 } 5473 } 5474 { 5475 *(*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))) 5476 } 5477 5478 { 5479 *(*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))) 5480 } 5481 5482 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 5483 } 5484 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 5485 5486 // Compression must start with an empty pending buffer 5487 flush_pending(tls, strm) 5488 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5489 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 5490 return Z_OK 5491 } 5492 } 5493 5494 // Start a new block or continue the current one. 5495 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)) { 5496 var bstate Block_state 5497 5498 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 { 5499 bstate = deflate_stored(tls, s, flush) 5500 } else { 5501 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY { 5502 bstate = deflate_huff(tls, s, flush) 5503 } else { 5504 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE { 5505 bstate = deflate_rle(tls, s, flush) 5506 } else { 5507 bstate = (*struct { 5508 f func(*libc.TLS, uintptr, int32) Block_state 5509 })(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush) 5510 } 5511 } 5512 } 5513 5514 if (bstate == Finish_started) || (bstate == Finish_done) { 5515 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 5516 } 5517 if (bstate == Need_more) || (bstate == Finish_started) { 5518 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 5519 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above 5520 } 5521 return Z_OK 5522 // If flush != Z_NO_FLUSH && avail_out == 0, the next call 5523 // of deflate should use the same flush parameter to make sure 5524 // that the flush is complete. So we don't have to output an 5525 // empty block here, this will be done at next call. This also 5526 // ensures that for a very small output buffer, we emit at most 5527 // one empty block. 5528 } 5529 if bstate == Block_done { 5530 if flush == Z_PARTIAL_FLUSH { 5531 X_tr_align(tls, s) 5532 } else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH 5533 X_tr_stored_block(tls, s, uintptr(0), uint64(0), 0) 5534 // For a full flush, this empty block will be recognized 5535 // as a special marker by inflate_sync(). 5536 if flush == Z_FULL_FLUSH { 5537 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 5538 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))))) 5539 // forget history 5540 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 5541 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 5542 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 5543 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 5544 } 5545 } 5546 } 5547 flush_pending(tls, strm) 5548 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 5549 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above 5550 return Z_OK 5551 } 5552 } 5553 } 5554 5555 if flush != Z_FINISH { 5556 return Z_OK 5557 } 5558 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { 5559 return Z_STREAM_END 5560 } 5561 5562 // Write the trailer 5563 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 5564 { 5565 *(*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))) 5566 } 5567 5568 { 5569 *(*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))) 5570 } 5571 5572 { 5573 *(*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))) 5574 } 5575 5576 { 5577 *(*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))) 5578 } 5579 5580 { 5581 *(*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))) 5582 } 5583 5584 { 5585 *(*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))) 5586 } 5587 5588 { 5589 *(*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))) 5590 } 5591 5592 { 5593 *(*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))) 5594 } 5595 5596 } else { 5597 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16))) 5598 putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff)))) 5599 } 5600 flush_pending(tls, strm) 5601 // If avail_out is zero, the application will call deflate again 5602 // to flush the rest. 5603 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 { 5604 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap 5605 } // write the trailer only once! 5606 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 5607 return Z_OK 5608 } 5609 return Z_STREAM_END 5610 } 5611 5612 // ========================================================================= 5613 func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */ 5614 var status int32 5615 5616 if deflateStateCheck(tls, strm) != 0 { 5617 return -2 5618 } 5619 5620 status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus 5621 5622 /* Deallocate in reverse order of allocations: */ 5623 { 5624 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { 5625 (*struct { 5626 f func(*libc.TLS, Voidpf, Voidpf) 5627 })(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) 5628 } 5629 } 5630 5631 { 5632 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { 5633 (*struct { 5634 f func(*libc.TLS, Voidpf, Voidpf) 5635 })(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) 5636 } 5637 } 5638 5639 { 5640 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { 5641 (*struct { 5642 f func(*libc.TLS, Voidpf, Voidpf) 5643 })(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) 5644 } 5645 } 5646 5647 { 5648 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { 5649 (*struct { 5650 f func(*libc.TLS, Voidpf, Voidpf) 5651 })(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) 5652 } 5653 } 5654 5655 (*struct { 5656 f func(*libc.TLS, Voidpf, Voidpf) 5657 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 5658 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 5659 5660 if status == BUSY_STATE { 5661 return -3 5662 } 5663 return Z_OK 5664 } 5665 5666 // ========================================================================= 5667 // Copy the source state to the destination state. 5668 // To simplify the source, this is not supported for 16-bit MSDOS (which 5669 // doesn't have enough memory anyway to duplicate compression states). 5670 func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */ 5671 var ds uintptr 5672 var ss uintptr 5673 var overlay uintptr 5674 5675 if (deflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 5676 return -2 5677 } 5678 5679 ss = (*Z_stream)(unsafe.Pointer(source)).Fstate 5680 5681 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 5682 5683 ds = (*struct { 5684 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5685 })(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{}))) 5686 if ds == uintptr(Z_NULL) { 5687 return -4 5688 } 5689 (*Z_stream)(unsafe.Pointer(dest)).Fstate = ds 5690 libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{}))) 5691 (*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest 5692 5693 (*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct { 5694 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5695 })(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)))))) 5696 (*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct { 5697 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5698 })(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)))) 5699 (*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct { 5700 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5701 })(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)))) 5702 overlay = (*struct { 5703 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5704 })(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)))) 5705 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay 5706 5707 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)) { 5708 XdeflateEnd(tls, dest) 5709 return -4 5710 } 5711 // following zmemcpy do not work for 16-bit MSDOS 5712 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))))) 5713 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))))) 5714 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))))) 5715 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))) 5716 5717 (*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))) 5718 (*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2) 5719 (*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)))) 5720 5721 (*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 212 /* &.dyn_ltree */ 5722 (*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2504 /* &.dyn_dtree */ 5723 (*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2748 /* &.bl_tree */ 5724 5725 return Z_OK 5726 } 5727 5728 // =========================================================================== 5729 // Read a new buffer from the current input stream, update the adler32 5730 // and total number of bytes read. All deflate() input goes through 5731 // this function so some applications may wish to modify it to avoid 5732 // allocating a large strm->next_in buffer and copying from it. 5733 // (See also flush_pending()). 5734 func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */ 5735 var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 5736 5737 if len > size { 5738 len = size 5739 } 5740 if len == uint32(0) { 5741 return uint32(0) 5742 } 5743 5744 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len) 5745 5746 libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len)) 5747 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 { 5748 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 5749 } else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 { 5750 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 5751 } 5752 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 5753 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len)) 5754 5755 return len 5756 } 5757 5758 // =========================================================================== 5759 // Initialize the "longest match" routines for a new zlib stream 5760 func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */ 5761 (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = (uint64(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 5762 5763 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL) 5764 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))))) 5765 5766 // Set the default configuration parameters: 5767 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) 5768 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) 5769 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) 5770 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) 5771 5772 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 5773 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 5774 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 5775 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 5776 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1))) 5777 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 5778 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0) 5779 } 5780 5781 // =========================================================================== 5782 // Set match_start to the longest match starting at the given string and 5783 // return its length. Matches shorter or equal to prev_length are discarded, 5784 // in which case the result is equal to prev_length and match_start is 5785 // garbage. 5786 // IN assertions: cur_match is the head of the hash chain for the current 5787 // string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 5788 // OUT assertion: the match length is not greater than s->lookahead. 5789 // For 80x86 and 680x0, an optimized version will be provided in match.asm or 5790 // match.S. The code will be functionally equivalent. 5791 func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */ 5792 var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length // max hash chain length 5793 var scan uintptr = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) // current string 5794 var match uintptr // matched string 5795 var len int32 // length of current match 5796 var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length) // best match length so far 5797 var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match // stop if match long enough 5798 var limit IPos 5799 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1))) { 5800 limit = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) 5801 } else { 5802 limit = uint32(NIL) 5803 } 5804 // Stop when cur_match becomes <= limit. To simplify the code, 5805 // we prevent matches with the string of window index 0. 5806 var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev 5807 var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask 5808 5809 var strend uintptr = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 5810 var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 5811 var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 5812 5813 // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 5814 // It is easy to get rid of this optimization if necessary. 5815 5816 // Do not waste too much time if we already have a good match: 5817 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match { 5818 chain_length >>= 2 5819 } 5820 // Do not look for matches beyond the end of the input. This is necessary 5821 // to make deflate deterministic. 5822 if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 5823 nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 5824 } 5825 5826 for ok := true; ok; ok = (((libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr((cur_match&wmask))*2))))) > limit) && 5827 (libc.PreDecUint32(&chain_length, 1) != uint32(0))) { 5828 5829 match = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match)) 5830 5831 // Skip to next match if the match length cannot increase 5832 // or if the match length is less than 2. Note that the checks below 5833 // for insufficient lookahead only occur occasionally for performance 5834 // reasons. Therefore uninitialized memory will be accessed, and 5835 // conditional jumps will be made that depend on those values. 5836 // However the length of the match is limited to the lookahead, so 5837 // the output of deflate is not affected by the uninitialized values. 5838 5839 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)))) { 5840 continue 5841 } 5842 5843 // The check at best_len-1 can be removed because it will be made 5844 // again later. (This heuristic is not always a win.) 5845 // It is not necessary to compare scan[2] and match[2] since they 5846 // are always equal when the other bytes match, given that 5847 // the hash keys are equal and that HASH_BITS >= 8. 5848 scan += uintptr(2) 5849 match++ 5850 5851 // We check for insufficient lookahead only every 8th comparison; 5852 // the 256th check will be made at strstart+258. 5853 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)) { 5854 } 5855 5856 len = (MAX_MATCH - (int32((int64(strend) - int64(scan)) / 1))) 5857 scan = (strend - uintptr(MAX_MATCH)) 5858 5859 if len > best_len { 5860 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match 5861 best_len = len 5862 if len >= nice_match { 5863 break 5864 } 5865 scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1)))) 5866 scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 5867 } 5868 } 5869 5870 if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 5871 return UInt(best_len) 5872 } 5873 return (*Deflate_state)(unsafe.Pointer(s)).Flookahead 5874 } 5875 5876 // =========================================================================== 5877 // Fill the window when the lookahead becomes insufficient. 5878 // Updates strstart and lookahead. 5879 // 5880 // IN assertion: lookahead < MIN_LOOKAHEAD 5881 // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD 5882 // At least one byte has been read, or avail_in == 0; reads are 5883 // performed for at least two bytes (required for the zip translate_eol 5884 // option -- not supported here). 5885 func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */ 5886 var n uint32 5887 var more uint32 // Amount of free space at the end of the window. 5888 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5889 5890 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))) { 5891 more = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 5892 5893 // Deal with !@#$% 64K limit: 5894 if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) { 5895 if ((more == uint32(0)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0))) && ((*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0)) { 5896 more = wsize 5897 5898 } else if more == libc.Uint32(libc.Uint32FromInt32(-1)) { 5899 // Very unlikely, but possible on 16 bit machine if 5900 // strstart == 0 && lookahead == 1 (input done a byte at time) 5901 more-- 5902 } 5903 } 5904 5905 // If the window is almost full and there is insufficient lookahead, 5906 // move the upper half to the lower one to make room in the upper half. 5907 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= (wsize + ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) { 5908 5909 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(wsize)), (uint64(wsize - more))) 5910 *(*UInt)(unsafe.Pointer(s + 176 /* &.match_start */)) -= (wsize) 5911 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= (wsize) // we now have strstart >= MAX_DIST 5912 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64(wsize)) 5913 slide_hash(tls, s) 5914 more = more + (wsize) 5915 } 5916 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) { 5917 break 5918 } 5919 5920 // If there was no sliding: 5921 // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && 5922 // more == window_size - lookahead - strstart 5923 // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) 5924 // => more >= window_size - 2*WSIZE + 2 5925 // In the BIG_MEM or MMAP case (not yet supported), 5926 // window_size == input_size + MIN_LOOKAHEAD && 5927 // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. 5928 // Otherwise, window_size == 2*WSIZE so more >= 2. 5929 // If there was sliding, more >= WSIZE. So in all cases, more >= 2. 5930 5931 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) 5932 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) += (n) 5933 5934 // Initialize the hash value now that we have some input: 5935 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) >= UInt(MIN_MATCH) { 5936 var str UInt = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 5937 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) 5938 (*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) 5939 for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 { 5940 (*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) 5941 *(*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)) 5942 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 5943 str++ 5944 (*Deflate_state)(unsafe.Pointer(s)).Finsert-- 5945 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) < UInt(MIN_MATCH) { 5946 break 5947 } 5948 } 5949 } 5950 // If the whole input has less than MIN_MATCH bytes, ins_h is garbage, 5951 // but this is not important since only literal bytes will be emitted. 5952 5953 } 5954 5955 // If the WIN_INIT bytes after the end of the current data have never been 5956 // written, then zero those bytes in order to avoid memory check reports of 5957 // the use of uninitialized (or uninitialised as Julian writes) bytes by 5958 // the longest match routines. Update the high water mark for the next 5959 // time through here. WIN_INIT is set to MAX_MATCH since the longest match 5960 // routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. 5961 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size { 5962 var curr Ulg = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead))) 5963 var init1 Ulg 5964 5965 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { 5966 // Previous high water mark below current data -- zero WIN_INIT 5967 // bytes or up to end of window, whichever is less. 5968 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr) 5969 if init1 > uint64(MAX_MATCH) { 5970 init1 = uint64(MAX_MATCH) 5971 } 5972 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(curr)), 0, uint64(uint32(init1))) 5973 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = (curr + init1) 5974 } else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (curr + uint64(MAX_MATCH)) { 5975 // High water mark at or above current data, but below current data 5976 // plus WIN_INIT -- zero out to current data plus WIN_INIT, or up 5977 // to end of window, whichever is less. 5978 init1 = ((curr + uint64(MAX_MATCH)) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 5979 if init1 > ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) { 5980 init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) 5981 } 5982 libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)), 0, uint64(uint32(init1))) 5983 *(*Ulg)(unsafe.Pointer(s + 5944 /* &.high_water */)) += (init1) 5984 } 5985 } 5986 5987 } 5988 5989 // =========================================================================== 5990 // Flush the current block, with given end-of-file flag. 5991 // IN assertion: strstart is set to the end of the current match. 5992 5993 // Same but force premature exit if necessary. 5994 5995 // Maximum stored block length in deflate format (not including header). 5996 5997 // Minimum of a and b. 5998 5999 // =========================================================================== 6000 // Copy without compression as much as possible from the input stream, return 6001 // the current block state. 6002 // 6003 // In case deflateParams() is used to later switch to a non-zero compression 6004 // level, s->matches (otherwise unused when storing) keeps track of the number 6005 // of hash table slides to perform. If s->matches is 1, then one hash table 6006 // slide will be done when switching. If s->matches is 2, the maximum value 6007 // allowed here, then the hash table will be cleared, since two or more slides 6008 // is the same as a clear. 6009 // 6010 // deflate_stored() is written to minimize the number of times an input byte is 6011 // copied. It is most efficient with large input and output buffers, which 6012 // maximizes the opportunites to have a single copy from next_in to next_out. 6013 func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */ 6014 // Smallest worthy block size when not flushing or finishing. By default 6015 // this is 32K. This can be as small as 507 bytes for memLevel == 1. For 6016 // large input and output buffers, the stored block size will be larger. 6017 var min_block uint32 = func() uint32 { 6018 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5)) > (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) { 6019 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6020 } 6021 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5))) 6022 }() 6023 6024 // Copy as many min_block or larger stored blocks directly to next_out as 6025 // possible. If flushing, copy the remaining available input to next_out as 6026 // stored blocks, if there is enough space. 6027 var len uint32 6028 var left uint32 6029 var have uint32 6030 var last uint32 = uint32(0) 6031 var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 6032 for ok := true; ok; ok = (last == uint32(0)) { 6033 // Set len to the maximum size block that we can copy directly with the 6034 // available input data and output space. Set left to how much of that 6035 // would be copied from what's left in the window. 6036 len = uint32(MAX_STORED) // maximum deflate stored block length 6037 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 6038 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header 6039 break 6040 } 6041 // maximum stored block length that will fit in avail_out: 6042 have = ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have) 6043 left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window 6044 if Ulg(len) > (Ulg(left) + Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 6045 len = (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) 6046 } // limit len to the input 6047 if len > have { 6048 len = have 6049 } // limit len to the output 6050 6051 // If the stored block would be less than min_block in length, or if 6052 // unable to copy all of the available input when flushing, then try 6053 // copying to the window and the pending buffer instead. Also don't 6054 // write an empty block when flushing -- deflate() does that. 6055 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))) { 6056 break 6057 } 6058 6059 // Make a dummy stored block in pending to get the header bytes, 6060 // including any pending bits. This also updates the debugging counts. 6061 if (flush == Z_FINISH) && (len == (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) { 6062 last = uint32(1) 6063 } else { 6064 last = uint32(0) 6065 } 6066 X_tr_stored_block(tls, s, uintptr(0), uint64(0), int32(last)) 6067 6068 // Replace the lengths in the dummy stored block with len. 6069 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(4))))) = Bytef(len) 6070 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(3))))) = (Bytef(len >> 8)) 6071 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(2))))) = Bytef(^len) 6072 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(1))))) = (Bytef(^len >> 8)) 6073 6074 // Write the stored block header bytes. 6075 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6076 6077 // Copy uncompressed bytes from the window to next_out. 6078 if left != 0 { 6079 if left > len { 6080 left = len 6081 } 6082 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)) 6083 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(left)) 6084 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (left) 6085 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(left)) 6086 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(left)) 6087 len = len - (left) 6088 } 6089 6090 // Copy uncompressed bytes directly from next_in to next_out, updating 6091 // the check value. 6092 if len != 0 { 6093 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len) 6094 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(len)) 6095 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (len) 6096 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(len)) 6097 } 6098 } 6099 6100 // Update the sliding window with the last s->w_size bytes of the copied 6101 // data, or append all of the copied data to the existing window if less 6102 // than s->w_size bytes were copied. Also update the number of bytes to 6103 // insert in the hash tables, in the event that deflateParams() switches to 6104 // a non-zero compression level. 6105 used = used - ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) // number of input bytes directly copied 6106 if used != 0 { 6107 // If any input was used, then no unused input remains in the window, 6108 // therefore s->block_start == s->strstart. 6109 if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history 6110 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash 6111 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)) 6112 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6113 } else { 6114 if ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) <= Ulg(used) { 6115 // Slide the window down. 6116 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 6117 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)) 6118 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 6119 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 6120 } // add a pending slide_hash() 6121 } 6122 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)) 6123 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (used) 6124 } 6125 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6126 *(*UInt)(unsafe.Pointer(s + 5932 /* &.insert */)) += (func() uint32 { 6127 if (used) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) { 6128 return ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) 6129 } 6130 return used 6131 }()) 6132 } 6133 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 6134 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6135 } 6136 6137 // If the last block was written to next_out, then done. 6138 if last != 0 { 6139 return Finish_done 6140 } 6141 6142 // If flushing and all input has been consumed, then done. 6143 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) { 6144 return Block_done 6145 } 6146 6147 // Fill the window with any remaining input. 6148 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uint64(1))) 6149 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)) { 6150 // Slide the window down. 6151 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) 6152 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 6153 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)) 6154 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 6155 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 6156 } // add a pending slide_hash() 6157 have = have + ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) // more space now 6158 } 6159 if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 6160 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 6161 } 6162 if have != 0 { 6163 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), have) 6164 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (have) 6165 } 6166 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 6167 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6168 } 6169 6170 // There was not enough avail_out to write a complete worthy or flushed 6171 // stored block to next_out. Write a stored block to pending instead, if we 6172 // have enough input for a worthy block, or if flushing and there is enough 6173 // room for the remaining input as a stored block in the pending buffer. 6174 have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes 6175 // maximum stored block length that will fit in pending: 6176 have = func() uint32 { 6177 if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) > (uint64(MAX_STORED)) { 6178 return uint32(MAX_STORED) 6179 } 6180 return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))) 6181 }() 6182 min_block = func() uint32 { 6183 if (have) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 6184 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 6185 } 6186 return have 6187 }() 6188 left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 6189 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)) { 6190 len = func() uint32 { 6191 if (left) > (have) { 6192 return have 6193 } 6194 return left 6195 }() 6196 if ((flush == Z_FINISH) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (len == left) { 6197 last = uint32(1) 6198 } else { 6199 last = uint32(0) 6200 } 6201 X_tr_stored_block(tls, s, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint64(len), int32(last)) 6202 *(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(len)) 6203 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6204 } 6205 6206 // We've done all we can with the available input and output. 6207 if last != 0 { 6208 return Finish_started 6209 } 6210 return Need_more 6211 } 6212 6213 // =========================================================================== 6214 // Compress as much as possible from the input stream, return the current 6215 // block state. 6216 // This function does not perform lazy evaluation of matches and inserts 6217 // new strings in the dictionary only for unmatched strings or for short 6218 // matches. It is used only for the fast compression options. 6219 func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */ 6220 var hash_head IPos // head of the hash chain 6221 var bflush int32 // set if current block must be flushed 6222 6223 for { 6224 // Make sure that we always have enough lookahead, except 6225 // at the end of the input file. We need MAX_MATCH bytes 6226 // for the next match, plus MIN_MATCH bytes to insert the 6227 // string following the next match. 6228 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 6229 fill_window(tls, s) 6230 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 6231 return Need_more 6232 } 6233 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6234 break 6235 } // flush the current block 6236 } 6237 6238 // Insert the string window[strstart .. strstart+2] in the 6239 // dictionary, and set hash_head to the head of the hash chain: 6240 hash_head = IPos(NIL) 6241 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 6242 (*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) 6243 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)))) 6244 *(*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) 6245 } 6246 6247 // Find the longest match, discarding those <= prev_length. 6248 // At this point we have always match_length < MIN_MATCH 6249 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)))) { 6250 // To simplify the code, we prevent matches with the string 6251 // of window index 0 (in particular we have to avoid a match 6252 // of the string with itself at the start of the input file). 6253 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 6254 // longest_match() sets match_start 6255 } 6256 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 6257 6258 { 6259 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 6260 var dist Ush = (Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)) 6261 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 6262 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 6263 dist-- 6264 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 6265 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 6266 if (int32(dist)) < 256 { 6267 return int32(X_dist_code[dist]) 6268 } 6269 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 6270 }()))*4 /* &.fc */))++ 6271 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6272 } 6273 6274 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 6275 6276 // Insert new strings in the hash table only if the match length 6277 // is not too large. This saves time but degrades compression. 6278 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)) { 6279 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table 6280 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0)) { 6281 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6282 (*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) 6283 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)))) 6284 *(*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) 6285 // strstart never exceeds WSIZE-MAX_MATCH, so there are 6286 // always MIN_MATCH bytes ahead. 6287 } 6288 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6289 } else { 6290 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 6291 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 6292 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))) 6293 (*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) 6294 // If lookahead < MIN_MATCH, ins_h is garbage, but it does not 6295 // matter since it will be recomputed at next deflate call. 6296 } 6297 } else { 6298 // No match, output a literal byte 6299 6300 { 6301 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 6302 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 6303 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 6304 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 6305 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6306 } 6307 6308 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 6309 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6310 } 6311 if bflush != 0 { 6312 { 6313 X_tr_flush_block(tls, s, func() uintptr { 6314 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6315 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6316 } 6317 return uintptr(Z_NULL) 6318 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6319 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6320 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6321 } 6322 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6323 if 0 != 0 { 6324 return Finish_started 6325 } 6326 return Need_more 6327 } 6328 } 6329 6330 } 6331 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 6332 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 6333 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 6334 } 6335 return (uint32(MIN_MATCH - 1)) 6336 }() 6337 if flush == Z_FINISH { 6338 { 6339 { 6340 X_tr_flush_block(tls, s, func() uintptr { 6341 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6342 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6343 } 6344 return uintptr(Z_NULL) 6345 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 6346 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6347 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6348 } 6349 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6350 if 1 != 0 { 6351 return Finish_started 6352 } 6353 return Need_more 6354 } 6355 } 6356 6357 return Finish_done 6358 } 6359 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 6360 { 6361 X_tr_flush_block(tls, s, func() uintptr { 6362 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6363 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6364 } 6365 return uintptr(Z_NULL) 6366 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6367 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6368 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6369 } 6370 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6371 if 0 != 0 { 6372 return Finish_started 6373 } 6374 return Need_more 6375 } 6376 } 6377 6378 return Block_done 6379 } 6380 6381 // =========================================================================== 6382 // Same as above, but achieves better compression. We use a lazy 6383 // evaluation for matches: a match is finally adopted only if there is 6384 // no better match at the next window position. 6385 func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */ 6386 var hash_head IPos // head of hash chain 6387 var bflush int32 // set if current block must be flushed 6388 6389 // Process the input block. 6390 for { 6391 // Make sure that we always have enough lookahead, except 6392 // at the end of the input file. We need MAX_MATCH bytes 6393 // for the next match, plus MIN_MATCH bytes to insert the 6394 // string following the next match. 6395 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) { 6396 fill_window(tls, s) 6397 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) { 6398 return Need_more 6399 } 6400 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6401 break 6402 } // flush the current block 6403 } 6404 6405 // Insert the string window[strstart .. strstart+2] in the 6406 // dictionary, and set hash_head to the head of the hash chain: 6407 hash_head = IPos(NIL) 6408 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 6409 (*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) 6410 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)))) 6411 *(*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) 6412 } 6413 6414 // Find the longest match, discarding those <= prev_length. 6415 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 6416 (*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start 6417 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 6418 6419 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)))) { 6420 // To simplify the code, we prevent matches with the string 6421 // of window index 0 (in particular we have to avoid a match 6422 // of the string with itself at the start of the input file). 6423 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 6424 // longest_match() sets match_start 6425 6426 if ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5)) && (((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED) || 6427 (((*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)))) { 6428 6429 // If prev_match is also MIN_MATCH, match_start is garbage 6430 // but we will ignore the current match anyway. 6431 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 6432 } 6433 } 6434 // If there was a match at the previous step and the current 6435 // match is not better, output the previous match: 6436 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) { 6437 var max_insert UInt = (((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) - UInt(MIN_MATCH)) 6438 // Do not insert strings in hash table beyond this. 6439 6440 { 6441 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))) 6442 var dist Ush = (Ush(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)) 6443 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 6444 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 6445 dist-- 6446 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 6447 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 6448 if (int32(dist)) < 256 { 6449 return int32(X_dist_code[dist]) 6450 } 6451 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 6452 }()))*4 /* &.fc */))++ 6453 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6454 } 6455 6456 // Insert in hash table all strings up to the end of the match. 6457 // strstart-1 and strstart are already inserted. If there is not 6458 // enough lookahead, the last two strings are not inserted in 6459 // the hash table. 6460 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)) 6461 *(*UInt)(unsafe.Pointer(s + 184 /* &.prev_length */)) -= (UInt(2)) 6462 for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0)) { 6463 if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert { 6464 (*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) 6465 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)))) 6466 *(*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) 6467 } 6468 } 6469 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 6470 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1)) 6471 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6472 6473 if bflush != 0 { 6474 { 6475 X_tr_flush_block(tls, s, func() uintptr { 6476 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6477 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6478 } 6479 return uintptr(Z_NULL) 6480 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6481 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6482 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6483 } 6484 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6485 if 0 != 0 { 6486 return Finish_started 6487 } 6488 return Need_more 6489 } 6490 } 6491 6492 } else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 6493 // If there was no match at the previous position, output a 6494 // single literal. If there was a match but the current match 6495 // is longer, truncate the previous match to a single literal. 6496 6497 { 6498 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 6499 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 6500 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 6501 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 6502 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6503 } 6504 6505 if bflush != 0 { 6506 { 6507 X_tr_flush_block(tls, s, func() uintptr { 6508 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6509 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6510 } 6511 return uintptr(Z_NULL) 6512 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6513 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6514 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6515 } 6516 6517 } 6518 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6519 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 6520 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6521 return Need_more 6522 } 6523 } else { 6524 // There is no previous match to compare with, wait for 6525 // the next step to decide. 6526 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1 6527 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6528 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 6529 } 6530 } 6531 6532 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 6533 6534 { 6535 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1))))) 6536 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 6537 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 6538 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 6539 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6540 } 6541 6542 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 6543 } 6544 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 6545 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) { 6546 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 6547 } 6548 return (uint32(MIN_MATCH - 1)) 6549 }() 6550 if flush == Z_FINISH { 6551 { 6552 { 6553 X_tr_flush_block(tls, s, func() uintptr { 6554 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6555 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6556 } 6557 return uintptr(Z_NULL) 6558 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 6559 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6560 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6561 } 6562 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6563 if 1 != 0 { 6564 return Finish_started 6565 } 6566 return Need_more 6567 } 6568 } 6569 6570 return Finish_done 6571 } 6572 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 6573 { 6574 X_tr_flush_block(tls, s, func() uintptr { 6575 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6576 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6577 } 6578 return uintptr(Z_NULL) 6579 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6580 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6581 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6582 } 6583 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6584 if 0 != 0 { 6585 return Finish_started 6586 } 6587 return Need_more 6588 } 6589 } 6590 6591 return Block_done 6592 } 6593 6594 // =========================================================================== 6595 // For Z_RLE, simply look for runs of bytes, generate matches only of distance 6596 // one. Do not maintain a hash table. (It will be regenerated if this run of 6597 // deflate switches away from Z_RLE.) 6598 func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */ 6599 var bflush int32 // set if current block must be flushed 6600 var prev UInt // byte at distance one to match 6601 var scan uintptr 6602 var strend uintptr // scan goes up to strend for length of run 6603 6604 for { 6605 // Make sure that we always have enough lookahead, except 6606 // at the end of the input file. We need MAX_MATCH bytes 6607 // for the longest run, plus one for the unrolled loop. 6608 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) { 6609 fill_window(tls, s) 6610 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH)) && (flush == Z_NO_FLUSH) { 6611 return Need_more 6612 } 6613 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6614 break 6615 } // flush the current block 6616 } 6617 6618 // See how many times the previous byte repeats 6619 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 6620 if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0)) { 6621 scan = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uintptr(1)) 6622 prev = UInt(*(*Bytef)(unsafe.Pointer(scan))) 6623 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))))) { 6624 strend = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH)) 6625 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)) { 6626 } 6627 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MAX_MATCH) - (UInt((int64(strend) - int64(scan)) / 1))) 6628 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 6629 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 6630 } 6631 } 6632 6633 } 6634 6635 // Emit match if have run of MIN_MATCH or longer, else emit literal 6636 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 6637 6638 { 6639 var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))) 6640 var dist Ush = Ush(1) 6641 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 6642 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 6643 dist-- 6644 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++ 6645 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 6646 if (int32(dist)) < 256 { 6647 return int32(X_dist_code[dist]) 6648 } 6649 return int32(X_dist_code[(256 + ((int32(dist)) >> 7))]) 6650 }()))*4 /* &.fc */))++ 6651 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6652 } 6653 6654 *(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 6655 *(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length) 6656 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 6657 } else { 6658 // No match, output a literal byte 6659 6660 { 6661 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 6662 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 6663 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 6664 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 6665 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6666 } 6667 6668 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 6669 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6670 } 6671 if bflush != 0 { 6672 { 6673 X_tr_flush_block(tls, s, func() uintptr { 6674 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6675 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6676 } 6677 return uintptr(Z_NULL) 6678 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6679 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6680 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6681 } 6682 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6683 if 0 != 0 { 6684 return Finish_started 6685 } 6686 return Need_more 6687 } 6688 } 6689 6690 } 6691 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6692 if flush == Z_FINISH { 6693 { 6694 { 6695 X_tr_flush_block(tls, s, func() uintptr { 6696 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6697 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6698 } 6699 return uintptr(Z_NULL) 6700 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 6701 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6702 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6703 } 6704 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6705 if 1 != 0 { 6706 return Finish_started 6707 } 6708 return Need_more 6709 } 6710 } 6711 6712 return Finish_done 6713 } 6714 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 6715 { 6716 X_tr_flush_block(tls, s, func() uintptr { 6717 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6718 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6719 } 6720 return uintptr(Z_NULL) 6721 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6722 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6723 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6724 } 6725 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6726 if 0 != 0 { 6727 return Finish_started 6728 } 6729 return Need_more 6730 } 6731 } 6732 6733 return Block_done 6734 } 6735 6736 // =========================================================================== 6737 // For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. 6738 // (It will be regenerated if this run of deflate switches away from Huffman.) 6739 func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */ 6740 var bflush int32 // set if current block must be flushed 6741 6742 for { 6743 // Make sure that we have a literal to write. 6744 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6745 fill_window(tls, s) 6746 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6747 if flush == Z_NO_FLUSH { 6748 return Need_more 6749 } 6750 break // flush the current block 6751 } 6752 } 6753 6754 // Output a literal byte 6755 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 6756 6757 { 6758 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 6759 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 6760 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 6761 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++ 6762 bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 6763 } 6764 6765 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 6766 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6767 if bflush != 0 { 6768 { 6769 X_tr_flush_block(tls, s, func() uintptr { 6770 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6771 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6772 } 6773 return uintptr(Z_NULL) 6774 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6775 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6776 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6777 } 6778 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6779 if 0 != 0 { 6780 return Finish_started 6781 } 6782 return Need_more 6783 } 6784 } 6785 6786 } 6787 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6788 if flush == Z_FINISH { 6789 { 6790 { 6791 X_tr_flush_block(tls, s, func() uintptr { 6792 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6793 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6794 } 6795 return uintptr(Z_NULL) 6796 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1) 6797 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6798 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6799 } 6800 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6801 if 1 != 0 { 6802 return Finish_started 6803 } 6804 return Need_more 6805 } 6806 } 6807 6808 return Finish_done 6809 } 6810 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 6811 { 6812 X_tr_flush_block(tls, s, func() uintptr { 6813 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6814 return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))) 6815 } 6816 return uintptr(Z_NULL) 6817 }(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0) 6818 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6819 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6820 } 6821 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6822 if 0 != 0 { 6823 return Finish_started 6824 } 6825 return Need_more 6826 } 6827 } 6828 6829 return Block_done 6830 } 6831 6832 // $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ 6833 6834 // Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. 6835 // Public domain. 6836 6837 // This is fairly grotesque, but pure ANSI code must not inspect the 6838 // innards of an fpos_t anyway. The library internally uses off_t, 6839 // which we assume is exactly as big as eight chars. 6840 type X__sfpos = struct { 6841 F_pos X__off_t 6842 F_mbstate_in X__mbstate_t 6843 F_mbstate_out X__mbstate_t 6844 } /* stdio.h:67:9 */ 6845 6846 // $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ 6847 6848 // Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. 6849 // Public domain. 6850 6851 // This is fairly grotesque, but pure ANSI code must not inspect the 6852 // innards of an fpos_t anyway. The library internally uses off_t, 6853 // which we assume is exactly as big as eight chars. 6854 type Fpos_t = X__sfpos /* stdio.h:70:3 */ 6855 6856 // NB: to fit things in six character monocase externals, the stdio 6857 // code uses the prefix `__s' for stdio objects, typically followed 6858 // by a three-character attempt at a mnemonic. 6859 6860 // stdio buffers 6861 type X__sbuf = struct { 6862 F_base uintptr 6863 F_size int32 6864 F__ccgo_pad1 [4]byte 6865 } /* stdio.h:81:1 */ 6866 6867 // stdio state variables. 6868 // 6869 // The following always hold: 6870 // 6871 // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), 6872 // _lbfsize is -_bf._size, else _lbfsize is 0 6873 // if _flags&__SRD, _w is 0 6874 // if _flags&__SWR, _r is 0 6875 // 6876 // This ensures that the getc and putc macros (or inline functions) never 6877 // try to write or read from a file that is in `read' or `write' mode. 6878 // (Moreover, they can, and do, automatically switch from read mode to 6879 // write mode, and back, on "r+" and "w+" files.) 6880 // 6881 // _lbfsize is used only to make the inline line-buffered output stream 6882 // code as compact as possible. 6883 // 6884 // _ub, _up, and _ur are used when ungetc() pushes back more characters 6885 // than fit in the current _bf, or when ungetc() pushes back a character 6886 // that does not match the previous one in _bf. When this happens, 6887 // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff 6888 // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. 6889 // 6890 // NB: see WARNING above before changing the layout of this structure! 6891 type X__sFILE = struct { 6892 F_p uintptr 6893 F_r int32 6894 F_w int32 6895 F_flags uint16 6896 F_file int16 6897 F__ccgo_pad1 [4]byte 6898 F_bf struct { 6899 F_base uintptr 6900 F_size int32 6901 F__ccgo_pad1 [4]byte 6902 } 6903 F_lbfsize int32 6904 F__ccgo_pad2 [4]byte 6905 F_cookie uintptr 6906 F_close uintptr 6907 F_read uintptr 6908 F_seek uintptr 6909 F_write uintptr 6910 F_ext struct { 6911 F_base uintptr 6912 F_size int32 6913 F__ccgo_pad1 [4]byte 6914 } 6915 F_up uintptr 6916 F_ur int32 6917 F_ubuf [3]uint8 6918 F_nbuf [1]uint8 6919 F_flush uintptr 6920 F_lb_unused [8]int8 6921 F_blksize int32 6922 F__ccgo_pad3 [4]byte 6923 F_offset X__off_t 6924 } /* stdio.h:112:9 */ 6925 6926 // stdio state variables. 6927 // 6928 // The following always hold: 6929 // 6930 // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), 6931 // _lbfsize is -_bf._size, else _lbfsize is 0 6932 // if _flags&__SRD, _w is 0 6933 // if _flags&__SWR, _r is 0 6934 // 6935 // This ensures that the getc and putc macros (or inline functions) never 6936 // try to write or read from a file that is in `read' or `write' mode. 6937 // (Moreover, they can, and do, automatically switch from read mode to 6938 // write mode, and back, on "r+" and "w+" files.) 6939 // 6940 // _lbfsize is used only to make the inline line-buffered output stream 6941 // code as compact as possible. 6942 // 6943 // _ub, _up, and _ur are used when ungetc() pushes back more characters 6944 // than fit in the current _bf, or when ungetc() pushes back a character 6945 // that does not match the previous one in _bf. When this happens, 6946 // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff 6947 // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. 6948 // 6949 // NB: see WARNING above before changing the layout of this structure! 6950 type FILE = X__sFILE /* stdio.h:146:3 */ 6951 6952 // $NetBSD: limits.h,v 1.40 2016/08/04 06:43:43 christos Exp $ 6953 6954 // Copyright (c) 1988, 1993 6955 // The Regents of the University of California. All rights reserved. 6956 // 6957 // Redistribution and use in source and binary forms, with or without 6958 // modification, are permitted provided that the following conditions 6959 // are met: 6960 // 1. Redistributions of source code must retain the above copyright 6961 // notice, this list of conditions and the following disclaimer. 6962 // 2. Redistributions in binary form must reproduce the above copyright 6963 // notice, this list of conditions and the following disclaimer in the 6964 // documentation and/or other materials provided with the distribution. 6965 // 3. Neither the name of the University nor the names of its contributors 6966 // may be used to endorse or promote products derived from this software 6967 // without specific prior written permission. 6968 // 6969 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 6970 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6971 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6972 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 6973 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 6974 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 6975 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6976 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 6977 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 6978 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 6979 // SUCH DAMAGE. 6980 // 6981 // @(#)limits.h 8.2 (Berkeley) 1/4/94 6982 6983 // $NetBSD: fcntl.h,v 1.50 2018/02/20 18:20:05 kamil Exp $ 6984 6985 // - 6986 // Copyright (c) 1983, 1990, 1993 6987 // The Regents of the University of California. All rights reserved. 6988 // (c) UNIX System Laboratories, Inc. 6989 // All or some portions of this file are derived from material licensed 6990 // to the University of California by American Telephone and Telegraph 6991 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 6992 // the permission of UNIX System Laboratories, Inc. 6993 // 6994 // Redistribution and use in source and binary forms, with or without 6995 // modification, are permitted provided that the following conditions 6996 // are met: 6997 // 1. Redistributions of source code must retain the above copyright 6998 // notice, this list of conditions and the following disclaimer. 6999 // 2. Redistributions in binary form must reproduce the above copyright 7000 // notice, this list of conditions and the following disclaimer in the 7001 // documentation and/or other materials provided with the distribution. 7002 // 3. Neither the name of the University nor the names of its contributors 7003 // may be used to endorse or promote products derived from this software 7004 // without specific prior written permission. 7005 // 7006 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 7007 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 7008 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7009 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 7010 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 7011 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 7012 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 7013 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 7014 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 7015 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 7016 // SUCH DAMAGE. 7017 // 7018 // @(#)fcntl.h 8.3 (Berkeley) 1/21/94 7019 7020 // This file includes the definitions for open and fcntl 7021 // described by POSIX for <fcntl.h>; it also includes 7022 // related kernel definitions. 7023 7024 // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ 7025 7026 // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998. 7027 // Public domain. 7028 // 7029 // NOTE: Do not protect this header against multiple inclusion. Doing 7030 // so can have subtle side-effects due to header file inclusion order 7031 // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, 7032 // protect each CPP macro that we want to supply. 7033 7034 // Feature-test macros are defined by several standards, and allow an 7035 // application to specify what symbols they want the system headers to 7036 // expose, and hence what standard they want them to conform to. 7037 // There are two classes of feature-test macros. The first class 7038 // specify complete standards, and if one of these is defined, header 7039 // files will try to conform to the relevant standard. They are: 7040 // 7041 // ANSI macros: 7042 // _ANSI_SOURCE ANSI C89 7043 // 7044 // POSIX macros: 7045 // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) 7046 // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 7047 // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 7048 // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 7049 // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 7050 // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 7051 // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 7052 // 7053 // X/Open macros: 7054 // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 7055 // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions 7056 // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 7057 // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 7058 // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option 7059 // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option 7060 // 7061 // NetBSD macros: 7062 // _NETBSD_SOURCE == 1 Make all NetBSD features available. 7063 // 7064 // If more than one of these "major" feature-test macros is defined, 7065 // then the set of facilities provided (and namespace used) is the 7066 // union of that specified by the relevant standards, and in case of 7067 // conflict, the earlier standard in the above list has precedence (so 7068 // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version 7069 // of rename() that's used is the POSIX one). If none of the "major" 7070 // feature-test macros is defined, _NETBSD_SOURCE is assumed. 7071 // 7072 // There are also "minor" feature-test macros, which enable extra 7073 // functionality in addition to some base standard. They should be 7074 // defined along with one of the "major" macros. The "minor" macros 7075 // are: 7076 // 7077 // _REENTRANT 7078 // _ISOC99_SOURCE 7079 // _ISOC11_SOURCE 7080 // _LARGEFILE_SOURCE Large File Support 7081 // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> 7082 7083 // $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $ 7084 7085 // - 7086 // Copyright (c) 1982, 1986, 1991, 1993, 1994 7087 // The Regents of the University of California. All rights reserved. 7088 // (c) UNIX System Laboratories, Inc. 7089 // All or some portions of this file are derived from material licensed 7090 // to the University of California by American Telephone and Telegraph 7091 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 7092 // the permission of UNIX System Laboratories, Inc. 7093 // 7094 // Redistribution and use in source and binary forms, with or without 7095 // modification, are permitted provided that the following conditions 7096 // are met: 7097 // 1. Redistributions of source code must retain the above copyright 7098 // notice, this list of conditions and the following disclaimer. 7099 // 2. Redistributions in binary form must reproduce the above copyright 7100 // notice, this list of conditions and the following disclaimer in the 7101 // documentation and/or other materials provided with the distribution. 7102 // 3. Neither the name of the University nor the names of its contributors 7103 // may be used to endorse or promote products derived from this software 7104 // without specific prior written permission. 7105 // 7106 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 7107 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 7108 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7109 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 7110 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 7111 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 7112 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 7113 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 7114 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 7115 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 7116 // SUCH DAMAGE. 7117 // 7118 // @(#)types.h 8.4 (Berkeley) 1/21/94 7119 7120 // File status flags: these are used by open(2), fcntl(2). 7121 // They are also used (indirectly) in the kernel file structure f_flags, 7122 // which is a superset of the open/fcntl flags. Open flags and f_flags 7123 // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). 7124 // Open/fcntl flags begin with O_; kernel-internal flags begin with F. 7125 // open-only flags 7126 7127 // Kernel encoding of open mode; separate read and write bits that are 7128 // independently testable: 1 greater than the above. 7129 // 7130 // XXX 7131 // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, 7132 // which was documented to use FREAD/FWRITE, continues to work. 7133 // path component 7134 7135 // defined by POSIX 1003.1; BSD default, but required to be bitwise distinct 7136 7137 // The O_* flags used to have only F* names, which were used in the kernel 7138 // and by fcntl. We retain the F* names for the kernel f_flags field 7139 // and for backward compatibility for fcntl. 7140 7141 // Constants used for fcntl(2) 7142 7143 // command values 7144 7145 // file descriptor flags (F_GETFD, F_SETFD) 7146 7147 // record locking flags (F_GETLK, F_SETLK, F_SETLKW) 7148 7149 // Constants for fcntl's passed to the underlying fs - like ioctl's. 7150 7151 // Define command macros for operations which, if implemented, must be 7152 // the same for all fs's. 7153 7154 // Define command macros for fs-specific commands. 7155 7156 // Advisory file segment locking data type - 7157 // information passed to system by user 7158 type Flock = struct { 7159 Fl_start X__off_t 7160 Fl_len X__off_t 7161 Fl_pid X__pid_t 7162 Fl_type int16 7163 Fl_whence int16 7164 } /* fcntl.h:252:1 */ 7165 7166 // default memLevel 7167 7168 // default i/o buffer size -- double this for output when reading (this and 7169 // twice this must be able to fit in an unsigned type) 7170 7171 // gzip modes, also provide a little integrity check on the passed structure 7172 7173 // values for gz_state how 7174 7175 // internal gzip file state data structure 7176 type Gz_state = struct { 7177 Fx GzFile_s 7178 Fmode int32 7179 Ffd int32 7180 Fpath uintptr 7181 Fsize uint32 7182 Fwant uint32 7183 Fin uintptr 7184 Fout uintptr 7185 Fdirect int32 7186 Fhow int32 7187 Fstart X__off_t 7188 Feof int32 7189 Fpast int32 7190 Flevel int32 7191 Fstrategy int32 7192 Fskip X__off_t 7193 Fseek int32 7194 Ferr int32 7195 Fmsg uintptr 7196 Fstrm Z_stream 7197 } /* gzguts.h:201:3 */ 7198 type Gz_statep = uintptr /* gzguts.h:202:22 */ 7199 7200 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 7201 // value -- needed when comparing unsigned to z_off64_t, which is signed 7202 // (possible z_off64_t types off_t, off64_t, and long are all signed) 7203 7204 // gzclose() is in a separate file so that it is linked in only if it is used. 7205 // That way the other gzclose functions can be used instead to avoid linking in 7206 // unneeded compression or decompression routines. 7207 func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */ 7208 var state Gz_statep 7209 7210 if file == (uintptr(0)) { 7211 return -2 7212 } 7213 state = file 7214 7215 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7216 return Xgzclose_r(tls, file) 7217 } 7218 return Xgzclose_w(tls, file) 7219 } 7220 7221 // Reset gzip file state 7222 func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */ 7223 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) // no output data available 7224 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ... 7225 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 // not at end of file 7226 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 // have not read past end yet 7227 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header 7228 } 7229 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 // no seek request pending 7230 Xgz_error(tls, state, Z_OK, uintptr(0)) // clear error 7231 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0) // no uncompressed data yet 7232 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet 7233 } 7234 7235 // Open a gzip file either by name or file descriptor. 7236 func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */ 7237 bp := tls.Alloc(16) 7238 defer tls.Free(16) 7239 7240 var state Gz_statep 7241 var len Z_size_t 7242 var oflag int32 7243 var cloexec int32 = 0 7244 var exclusive int32 = 0 7245 7246 // check input 7247 if path == (uintptr(0)) { 7248 return uintptr(0) 7249 } 7250 7251 // allocate gzFile structure to return 7252 state = libc.Xmalloc(tls, uint64(unsafe.Sizeof(Gz_state{}))) 7253 if state == (uintptr(0)) { 7254 return uintptr(0) 7255 } 7256 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) // no buffers allocated yet 7257 (*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size 7258 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) // no error message yet 7259 7260 // interpret mode 7261 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE 7262 (*Gz_state)(unsafe.Pointer(state)).Flevel = -1 7263 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY 7264 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 7265 for *(*int8)(unsafe.Pointer(mode)) != 0 { 7266 if (int32(*(*int8)(unsafe.Pointer(mode))) >= '0') && (int32(*(*int8)(unsafe.Pointer(mode))) <= '9') { 7267 (*Gz_state)(unsafe.Pointer(state)).Flevel = (int32(*(*int8)(unsafe.Pointer(mode))) - '0') 7268 } else { 7269 switch int32(*(*int8)(unsafe.Pointer(mode))) { 7270 case 'r': 7271 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ 7272 break 7273 fallthrough 7274 case 'w': 7275 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE 7276 break 7277 fallthrough 7278 case 'a': 7279 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND 7280 break 7281 fallthrough 7282 case '+': // can't read and write at the same time 7283 libc.Xfree(tls, state) 7284 return uintptr(0) 7285 fallthrough 7286 case 'b': // ignore -- will request binary anyway 7287 break 7288 fallthrough 7289 case 'e': 7290 cloexec = 1 7291 break 7292 fallthrough 7293 case 'x': 7294 exclusive = 1 7295 break 7296 fallthrough 7297 case 'f': 7298 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED 7299 break 7300 fallthrough 7301 case 'h': 7302 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY 7303 break 7304 fallthrough 7305 case 'R': 7306 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE 7307 break 7308 fallthrough 7309 case 'F': 7310 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED 7311 break 7312 fallthrough 7313 case 'T': 7314 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 7315 break 7316 fallthrough 7317 default: // could consider as an error, but just ignore 7318 7319 } 7320 } 7321 mode++ 7322 } 7323 7324 // must provide an "r", "w", or "a" 7325 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE { 7326 libc.Xfree(tls, state) 7327 return uintptr(0) 7328 } 7329 7330 // can't force transparent read 7331 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7332 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 7333 libc.Xfree(tls, state) 7334 return uintptr(0) 7335 } 7336 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file 7337 } 7338 7339 // save the path name for error messages 7340 len = libc.Xstrlen(tls, path) 7341 (*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, (len + uint64(1))) 7342 if (*Gz_state)(unsafe.Pointer(state)).Fpath == (uintptr(0)) { 7343 libc.Xfree(tls, state) 7344 return uintptr(0) 7345 } 7346 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, (len + uint64(1)), ts+76 /* "%s" */, libc.VaList(bp, path)) 7347 7348 // compute the flags for open() 7349 oflag = ((func() int32 { 7350 if cloexec != 0 { 7351 return O_CLOEXEC 7352 } 7353 return 0 7354 }()) | (func() int32 { 7355 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7356 return O_RDONLY 7357 } 7358 return (((O_WRONLY | O_CREAT) | (func() int32 { 7359 if exclusive != 0 { 7360 return O_EXCL 7361 } 7362 return 0 7363 }())) | (func() int32 { 7364 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE { 7365 return O_TRUNC 7366 } 7367 return O_APPEND 7368 }())) 7369 }())) 7370 7371 // open the file with the appropriate flags (or just use fd) 7372 (*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 { 7373 if fd > -1 { 7374 return fd 7375 } 7376 return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666)) 7377 }() 7378 if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 { 7379 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 7380 libc.Xfree(tls, state) 7381 return uintptr(0) 7382 } 7383 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND { 7384 libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct 7385 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE // simplify later checks 7386 } 7387 7388 // save the current position for rewinding (only if reading) 7389 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7390 (*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 7391 if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) { 7392 (*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0) 7393 } 7394 } 7395 7396 // initialize stream 7397 gz_reset(tls, state) 7398 7399 // return stream 7400 return state 7401 } 7402 7403 // -- see zlib.h -- 7404 func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */ 7405 return gz_open(tls, path, -1, mode) 7406 } 7407 7408 // -- see zlib.h -- 7409 func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */ 7410 return gz_open(tls, path, -1, mode) 7411 } 7412 7413 // -- see zlib.h -- 7414 func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */ 7415 bp := tls.Alloc(8) 7416 defer tls.Free(8) 7417 7418 var path uintptr // identifier for error messages 7419 var gz GzFile 7420 7421 if (fd == -1) || ((libc.AssignUintptr(&path, libc.Xmalloc(tls, (uint64(7)+(uint64(3)*uint64(unsafe.Sizeof(int32(0)))))))) == (uintptr(0))) { 7422 return uintptr(0) 7423 } 7424 libc.Xsnprintf(tls, path, (uint64(7) + (uint64(3) * uint64(unsafe.Sizeof(int32(0))))), ts+79 /* "<fd:%d>" */, libc.VaList(bp, fd)) 7425 gz = gz_open(tls, path, fd, mode) 7426 libc.Xfree(tls, path) 7427 return gz 7428 } 7429 7430 // -- see zlib.h -- 7431 7432 // -- see zlib.h -- 7433 func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */ 7434 var state Gz_statep 7435 7436 // get internal structure and check integrity 7437 if file == (uintptr(0)) { 7438 return -1 7439 } 7440 state = file 7441 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7442 return -1 7443 } 7444 7445 // make sure we haven't already allocated memory 7446 if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { 7447 return -1 7448 } 7449 7450 // check and set requested size 7451 if (size << 1) < size { 7452 return -1 7453 } // need to be able to double it 7454 if size < uint32(2) { 7455 size = uint32(2) 7456 } // need two bytes to check magic header 7457 (*Gz_state)(unsafe.Pointer(state)).Fwant = size 7458 return 0 7459 } 7460 7461 // -- see zlib.h -- 7462 func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */ 7463 var state Gz_statep 7464 7465 // get internal structure 7466 if file == (uintptr(0)) { 7467 return -1 7468 } 7469 state = file 7470 7471 // check that we're reading and that there's no error 7472 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 7473 return -1 7474 } 7475 7476 // back up and start over 7477 if libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) { 7478 return -1 7479 } 7480 gz_reset(tls, state) 7481 return 0 7482 } 7483 7484 // -- see zlib.h -- 7485 func Xgzseek64(tls *libc.TLS, file GzFile, offset X__off_t, whence int32) X__off_t { /* gzlib.c:366:19: */ 7486 var n uint32 7487 var ret X__off_t 7488 var state Gz_statep 7489 7490 // get internal structure and check integrity 7491 if file == (uintptr(0)) { 7492 return int64(-1) 7493 } 7494 state = file 7495 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7496 return int64(-1) 7497 } 7498 7499 // check that there's no error 7500 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 7501 return int64(-1) 7502 } 7503 7504 // can only seek from start or relative to current position 7505 if (whence != SEEK_SET) && (whence != SEEK_CUR) { 7506 return int64(-1) 7507 } 7508 7509 // normalize offset to a SEEK_CUR specification 7510 if whence == SEEK_SET { 7511 offset = offset - ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 7512 } else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 7513 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fskip) 7514 } 7515 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 7516 7517 // if within raw area while reading, just go there 7518 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)) { 7519 ret = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (offset - X__off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)), SEEK_CUR) 7520 if ret == int64(-1) { 7521 return int64(-1) 7522 } 7523 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 7524 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 7525 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 7526 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 7527 Xgz_error(tls, state, Z_OK, uintptr(0)) 7528 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 7529 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (offset) 7530 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 7531 } 7532 7533 // calculate skip amount, rewinding if needed for back seek when reading 7534 if offset < int64(0) { 7535 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards 7536 return int64(-1) 7537 } 7538 offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos) 7539 if offset < int64(0) { // before start of file! 7540 return int64(-1) 7541 } 7542 if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset 7543 return int64(-1) 7544 } 7545 } 7546 7547 // if reading, skip what's in output buffer (one less gzgetc() check) 7548 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7549 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(X__off_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(INT_MAX))) || (X__off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset) { 7550 n = uint32(offset) 7551 } else { 7552 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 7553 } 7554 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 7555 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 7556 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(n)) 7557 offset = offset - (X__off_t(n)) 7558 } 7559 7560 // request skip (if not zero) 7561 if offset != 0 { 7562 (*Gz_state)(unsafe.Pointer(state)).Fseek = 1 7563 (*Gz_state)(unsafe.Pointer(state)).Fskip = offset 7564 } 7565 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset) 7566 } 7567 7568 // -- see zlib.h -- 7569 func Xgzseek(tls *libc.TLS, file GzFile, offset X__off_t, whence int32) X__off_t { /* gzlib.c:443:17: */ 7570 var ret X__off_t 7571 7572 ret = Xgzseek64(tls, file, offset, whence) 7573 if ret == ret { 7574 return ret 7575 } 7576 return int64(-1) 7577 } 7578 7579 // -- see zlib.h -- 7580 func Xgztell64(tls *libc.TLS, file GzFile) X__off_t { /* gzlib.c:455:19: */ 7581 var state Gz_statep 7582 7583 // get internal structure and check integrity 7584 if file == (uintptr(0)) { 7585 return int64(-1) 7586 } 7587 state = file 7588 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7589 return int64(-1) 7590 } 7591 7592 // return position 7593 return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + (func() int64 { 7594 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 7595 return (*Gz_state)(unsafe.Pointer(state)).Fskip 7596 } 7597 return int64(0) 7598 }())) 7599 } 7600 7601 // -- see zlib.h -- 7602 func Xgztell(tls *libc.TLS, file GzFile) X__off_t { /* gzlib.c:472:17: */ 7603 var ret X__off_t 7604 7605 ret = Xgztell64(tls, file) 7606 if ret == ret { 7607 return ret 7608 } 7609 return int64(-1) 7610 } 7611 7612 // -- see zlib.h -- 7613 func Xgzoffset64(tls *libc.TLS, file GzFile) X__off_t { /* gzlib.c:482:19: */ 7614 var offset X__off_t 7615 var state Gz_statep 7616 7617 // get internal structure and check integrity 7618 if file == (uintptr(0)) { 7619 return int64(-1) 7620 } 7621 state = file 7622 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7623 return int64(-1) 7624 } 7625 7626 // compute and return effective offset in file 7627 offset = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 7628 if offset == int64(-1) { 7629 return int64(-1) 7630 } 7631 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading 7632 offset = offset - (X__off_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) 7633 } // don't count buffered input 7634 return offset 7635 } 7636 7637 // -- see zlib.h -- 7638 func Xgzoffset(tls *libc.TLS, file GzFile) X__off_t { /* gzlib.c:505:17: */ 7639 var ret X__off_t 7640 7641 ret = Xgzoffset64(tls, file) 7642 if ret == ret { 7643 return ret 7644 } 7645 return int64(-1) 7646 } 7647 7648 // -- see zlib.h -- 7649 func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */ 7650 var state Gz_statep 7651 7652 // get internal structure and check integrity 7653 if file == (uintptr(0)) { 7654 return 0 7655 } 7656 state = file 7657 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7658 return 0 7659 } 7660 7661 // return end-of-file state 7662 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7663 return (*Gz_state)(unsafe.Pointer(state)).Fpast 7664 } 7665 return 0 7666 } 7667 7668 // -- see zlib.h -- 7669 func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */ 7670 var state Gz_statep 7671 7672 // get internal structure and check integrity 7673 if file == (uintptr(0)) { 7674 return uintptr(0) 7675 } 7676 state = file 7677 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7678 return uintptr(0) 7679 } 7680 7681 // return error information 7682 if errnum != (uintptr(0)) { 7683 *(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr 7684 } 7685 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-4) { 7686 return ts + 87 /* "out of memory" */ 7687 } 7688 return func() uintptr { 7689 if (*Gz_state)(unsafe.Pointer(state)).Fmsg == (uintptr(0)) { 7690 return ts + 101 /* "" */ 7691 } 7692 return (*Gz_state)(unsafe.Pointer(state)).Fmsg 7693 }() 7694 } 7695 7696 // -- see zlib.h -- 7697 func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */ 7698 var state Gz_statep 7699 7700 // get internal structure and check integrity 7701 if file == (uintptr(0)) { 7702 return 7703 } 7704 state = file 7705 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) { 7706 return 7707 } 7708 7709 // clear error and end-of-file 7710 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 7711 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 7712 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 7713 } 7714 Xgz_error(tls, state, Z_OK, uintptr(0)) 7715 } 7716 7717 // Create an error message in allocated memory and set state->err and 7718 // state->msg accordingly. Free any previous error message already there. Do 7719 // not try to free or allocate space if the error is Z_MEM_ERROR (out of 7720 // memory). Simply save the error message as a static string. If there is an 7721 // allocation failure constructing the error message, then convert the error to 7722 // out of memory. 7723 func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */ 7724 bp := tls.Alloc(24) 7725 defer tls.Free(24) 7726 7727 // free previously allocated message and clear 7728 if (*Gz_state)(unsafe.Pointer(state)).Fmsg != (uintptr(0)) { 7729 if (*Gz_state)(unsafe.Pointer(state)).Ferr != (-4) { 7730 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg) 7731 } 7732 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) 7733 } 7734 7735 // if fatal, set state->x.have to 0 so that the gzgetc() macro fails 7736 if (err != Z_OK) && (err != (-5)) { 7737 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 7738 } 7739 7740 // set error code, and if no message, then done 7741 (*Gz_state)(unsafe.Pointer(state)).Ferr = err 7742 if msg == (uintptr(0)) { 7743 return 7744 } 7745 7746 // for an out of memory error, return literal string when requested 7747 if err == (-4) { 7748 return 7749 } 7750 7751 // construct error message with path 7752 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)) { 7753 (*Gz_state)(unsafe.Pointer(state)).Ferr = -4 7754 return 7755 } 7756 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) + libc.Xstrlen(tls, msg)) + uint64(3)), 7757 ts+102 /* "%s%s%s" */, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109 /* ": " */, msg)) 7758 } 7759 7760 // Use read() to load a buffer -- return -1 on error, otherwise 0. Read from 7761 // state->fd, and update state->eof, state->err, and state->msg as appropriate. 7762 // This function needs to loop on read(), since read() is not guaranteed to 7763 // read the number of bytes requested, depending on the type of descriptor. 7764 func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */ 7765 var ret int32 7766 var get uint32 7767 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 7768 7769 *(*uint32)(unsafe.Pointer(have)) = uint32(0) 7770 for ok := true; ok; ok = (*(*uint32)(unsafe.Pointer(have)) < len) { 7771 get = (len - *(*uint32)(unsafe.Pointer(have))) 7772 if get > max { 7773 get = max 7774 } 7775 ret = int32(libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (buf + uintptr(*(*uint32)(unsafe.Pointer(have)))), uint64(get))) 7776 if ret <= 0 { 7777 break 7778 } 7779 *(*uint32)(unsafe.Pointer(have)) += (uint32(ret)) 7780 } 7781 if ret < 0 { 7782 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno(tls))))) 7783 return -1 7784 } 7785 if ret == 0 { 7786 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 7787 } 7788 return 0 7789 } 7790 7791 // Load up input buffer and set eof flag if last data loaded -- return -1 on 7792 // error, 0 otherwise. Note that the eof flag is set when the end of the input 7793 // file is reached, even though there may be unused data in the buffer. Once 7794 // that data has been used, no more attempts will be made to read the file. 7795 // If strm->avail_in != 0, then the current data is moved to the beginning of 7796 // the input buffer, and then the remainder of the buffer is loaded with the 7797 // available data from the input file. 7798 func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */ 7799 bp := tls.Alloc(4) 7800 defer tls.Free(4) 7801 7802 // var got uint32 at bp, 4 7803 7804 var strm Z_streamp = (state + 120 /* &.strm */) 7805 7806 if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 7807 return -1 7808 } 7809 if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 { 7810 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start 7811 var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin 7812 var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 7813 var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 7814 for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 { 7815 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) 7816 } 7817 } 7818 if gz_load(tls, state, ((*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)), 7819 ((*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in), bp /* &got */) == -1 { 7820 return -1 7821 } 7822 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (*(*uint32)(unsafe.Pointer(bp /* got */))) 7823 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 7824 } 7825 return 0 7826 } 7827 7828 // Look for gzip header, set up for inflate or copy. state->x.have must be 0. 7829 // If this is the first time in, allocate required memory. state->how will be 7830 // left unchanged if there is no more input data available, will be set to COPY 7831 // if there is no gzip header and direct copying will be performed, or it will 7832 // be set to GZIP for decompression. If direct copying, then leftover input 7833 // data from the input buffer will be copied to the output buffer. In that 7834 // case, all further file reads will be directly to either the output buffer or 7835 // a user buffer. If decompressing, the inflate state will be initialized. 7836 // gz_look() will return 0 on success or -1 on failure. 7837 func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */ 7838 var strm Z_streamp = (state + 120 /* &.strm */) 7839 7840 // allocate read buffers and inflate memory 7841 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { 7842 // allocate buffers 7843 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 7844 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))) 7845 if ((*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0))) || ((*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0))) { 7846 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 7847 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7848 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 7849 return -1 7850 } 7851 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 7852 7853 // allocate inflate memory 7854 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL) 7855 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL) 7856 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL) 7857 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 7858 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL) 7859 if (XinflateInit2_(tls, (state+120 /* &.strm */), (15+16), ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) { // gunzip 7860 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 7861 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7862 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) 7863 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 7864 return -1 7865 } 7866 } 7867 7868 // get at least the magic bytes in the input buffer 7869 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) { 7870 if gz_avail(tls, state) == -1 { 7871 return -1 7872 } 7873 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 7874 return 0 7875 } 7876 } 7877 7878 // look for gzip magic bytes -- if there, do gzip decoding (note: there is 7879 // a logical dilemma here when considering the case of a partially written 7880 // gzip file, to wit, if a single 31 byte is written, then we cannot tell 7881 // whether this is a single-byte file, or just a partially written gzip 7882 // file -- for here we assume that if a gzip file is being written, then 7883 // the header will be written in a single operation, so that reading a 7884 // single byte is sufficient indication that it is not a gzip file) 7885 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) { 7886 XinflateReset(tls, strm) 7887 (*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2 7888 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 7889 return 0 7890 } 7891 7892 // no gzip header -- if we were decoding gzip before, then this is trailing 7893 // garbage. Ignore the trailing garbage and finish. 7894 if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 { 7895 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 7896 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 7897 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 7898 return 0 7899 } 7900 7901 // doing raw i/o, copy any leftover input to output -- this assumes that 7902 // the output buffer is larger than the input buffer, which also assures 7903 // space for gzungetc() 7904 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 7905 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 7906 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)) 7907 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 7908 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 7909 } 7910 (*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1 7911 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 7912 return 0 7913 } 7914 7915 // Decompress from input to the provided next_out and avail_out in the state. 7916 // On return, state->x.have and state->x.next point to the just decompressed 7917 // data. If the gzip stream completes, state->how is reset to LOOK to look for 7918 // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 7919 // on success, -1 on failure. 7920 func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */ 7921 var ret int32 = Z_OK 7922 var had uint32 7923 var strm Z_streamp = (state + 120 /* &.strm */) 7924 7925 // fill output buffer up to end of deflate stream 7926 had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 7927 for ok := true; ok; ok = (((*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0) && (ret != Z_STREAM_END)) { 7928 // get more input for inflate() 7929 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && (gz_avail(tls, state) == -1) { 7930 return -1 7931 } 7932 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 7933 Xgz_error(tls, state, -5, ts+112 /* "unexpected end o..." */) 7934 break 7935 } 7936 7937 // decompress and handle errors 7938 ret = Xinflate(tls, strm, Z_NO_FLUSH) 7939 if (ret == (-2)) || (ret == Z_NEED_DICT) { 7940 Xgz_error(tls, state, -2, 7941 ts+135 /* "internal error: ..." */) 7942 return -1 7943 } 7944 if ret == (-4) { 7945 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 7946 return -1 7947 } 7948 if ret == (-3) { // deflate stream invalid 7949 Xgz_error(tls, state, -3, 7950 func() uintptr { 7951 if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == (uintptr(0)) { 7952 return ts + 174 /* "compressed data ..." */ 7953 } 7954 return (*Z_stream)(unsafe.Pointer(strm)).Fmsg 7955 }()) 7956 return -1 7957 } 7958 } 7959 7960 // update available output 7961 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out) 7962 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 7963 7964 // if the gzip stream completed successfully, look for another 7965 if ret == Z_STREAM_END { 7966 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK 7967 } 7968 7969 // good decompression 7970 return 0 7971 } 7972 7973 // Fetch data and put it in the output buffer. Assumes state->x.have is 0. 7974 // Data is either copied from the input file or decompressed from the input 7975 // file depending on state->how. If state->how is LOOK, then a gzip header is 7976 // looked for to determine whether to copy or decompress. Returns -1 on error, 7977 // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the 7978 // end of the input file has been reached and all data has been processed. 7979 func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */ 7980 var strm Z_streamp = (state + 120 /* &.strm */) 7981 7982 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))) { 7983 switch (*Gz_state)(unsafe.Pointer(state)).Fhow { 7984 case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP 7985 if gz_look(tls, state) == -1 { 7986 return -1 7987 } 7988 if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK { 7989 return 0 7990 } 7991 break 7992 case COPY1: // -> COPY 7993 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, ((*Gz_state)(unsafe.Pointer(state)).Fsize<<1), (state /* &.x */ /* &.have */)) == 7994 -1 { 7995 return -1 7996 } 7997 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 7998 return 0 7999 case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream) 8000 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) 8001 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 8002 if gz_decomp(tls, state) == -1 { 8003 return -1 8004 } 8005 } 8006 } 8007 return 0 8008 } 8009 8010 // Skip len uncompressed bytes of output. Return -1 on error, 0 on success. 8011 func gz_skip(tls *libc.TLS, state Gz_statep, len X__off_t) int32 { /* gzread.c:259:11: */ 8012 var n uint32 8013 8014 // skip over len bytes or reach end-of-file, whichever comes first 8015 for len != 0 { 8016 // skip over whatever is in output buffer 8017 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 8018 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(X__off_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(INT_MAX))) || (X__off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len) { 8019 n = uint32(len) 8020 } else { 8021 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8022 } 8023 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 8024 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 8025 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(n)) 8026 len = len - (X__off_t(n)) 8027 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 8028 break 8029 } else { 8030 // get more output, looking for header if required 8031 if gz_fetch(tls, state) == -1 { 8032 return -1 8033 } 8034 } 8035 } 8036 return 0 8037 } 8038 8039 // Read len bytes into buf from file, or less than len up to the end of the 8040 // input. Return the number of bytes read. If zero is returned, either the 8041 // end of file was reached, or there was an error. state->err must be 8042 // consulted in that case to determine which. 8043 func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */ 8044 bp := tls.Alloc(4) 8045 defer tls.Free(4) 8046 8047 var got Z_size_t 8048 // var n uint32 at bp, 4 8049 8050 // if len is zero, avoid unnecessary operations 8051 if len == uint64(0) { 8052 return uint64(0) 8053 } 8054 8055 // process a skip request 8056 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8057 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8058 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8059 return uint64(0) 8060 } 8061 } 8062 8063 // get len bytes to buf, or less than len if at the end 8064 got = uint64(0) 8065 for ok := true; ok; ok = len != 0 { 8066 // set n to the maximum amount of len that fits in an unsigned int 8067 *(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1) 8068 if Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */))) > len { 8069 *(*uint32)(unsafe.Pointer(bp /* n */)) = uint32(len) 8070 } 8071 8072 // first just try copying data from the output buffer 8073 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 8074 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp /* n */)) { 8075 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8076 } 8077 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp /* n */)))) 8078 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 8079 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (*(*uint32)(unsafe.Pointer(bp /* n */))) 8080 } else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) { 8081 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end 8082 break 8083 } else if ((*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK) || (*(*uint32)(unsafe.Pointer(bp /* n */)) < ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)) { 8084 // get more output, looking for header if required 8085 if gz_fetch(tls, state) == -1 { 8086 return uint64(0) 8087 } 8088 continue // no progress yet -- go back to copy above 8089 // the copy above assures that we will leave with space in the 8090 // output buffer, allowing at least one gzungetc() to succeed 8091 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly 8092 if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp /* n */)), bp /* &n */) == -1 { 8093 return uint64(0) 8094 } 8095 } else { // state->how == GZIP 8096 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */)) 8097 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf 8098 if gz_decomp(tls, state) == -1 { 8099 return uint64(0) 8100 } 8101 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8102 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 8103 } 8104 8105 // update progress 8106 len = len - (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 8107 buf = (buf + uintptr(*(*uint32)(unsafe.Pointer(bp /* n */)))) 8108 got = got + (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 8109 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(*(*uint32)(unsafe.Pointer(bp /* n */)))) 8110 } 8111 8112 // return number of bytes read into user buffer 8113 return got 8114 } 8115 8116 // -- see zlib.h -- 8117 func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */ 8118 var state Gz_statep 8119 8120 // get internal structure 8121 if file == (uintptr(0)) { 8122 return -1 8123 } 8124 state = file 8125 8126 // check that we're reading and that there's no (serious) error 8127 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8128 return -1 8129 } 8130 8131 // since an int is returned, make sure len fits in one, otherwise return 8132 // with an error (this avoids a flaw in the interface) 8133 if int32(len) < 0 { 8134 Xgz_error(tls, state, -2, ts+196 /* "request does not..." */) 8135 return -1 8136 } 8137 8138 // read len or fewer bytes to buf 8139 len = uint32(gz_read(tls, state, buf, uint64(len))) 8140 8141 // check for an error 8142 if ((len == uint32(0)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) { 8143 return -1 8144 } 8145 8146 // return the number of bytes read (this is assured to fit in an int) 8147 return int32(len) 8148 } 8149 8150 // -- see zlib.h -- 8151 func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */ 8152 var len Z_size_t 8153 var state Gz_statep 8154 8155 // get internal structure 8156 if file == (uintptr(0)) { 8157 return uint64(0) 8158 } 8159 state = file 8160 8161 // check that we're reading and that there's no (serious) error 8162 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8163 return uint64(0) 8164 } 8165 8166 // compute bytes to read -- error on overflow 8167 len = (nitems * size) 8168 if (size != 0) && ((len / size) != nitems) { 8169 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 8170 return uint64(0) 8171 } 8172 8173 // read len or fewer bytes to buf, return the number of full items read 8174 if len != 0 { 8175 return (gz_read(tls, state, buf, len) / size) 8176 } 8177 return uint64(0) 8178 } 8179 8180 // -- see zlib.h -- 8181 func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */ 8182 bp := tls.Alloc(1) 8183 defer tls.Free(1) 8184 8185 var ret int32 8186 // var buf [1]uint8 at bp, 1 8187 8188 var state Gz_statep 8189 8190 // get internal structure 8191 if file == (uintptr(0)) { 8192 return -1 8193 } 8194 state = file 8195 8196 // check that we're reading and that there's no (serious) error 8197 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8198 return -1 8199 } 8200 8201 // try output buffer (no need to check for skip request) 8202 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 8203 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave-- 8204 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 8205 return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext), 1)))) 8206 } 8207 8208 // nothing there -- try gz_read() 8209 ret = int32(gz_read(tls, state, bp /* &buf[0] */, uint64(1))) 8210 if ret < 1 { 8211 return -1 8212 } 8213 return int32(*(*uint8)(unsafe.Pointer(bp /* &buf[0] */))) 8214 } 8215 8216 func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */ 8217 return Xgzgetc(tls, file) 8218 } 8219 8220 // -- see zlib.h -- 8221 func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */ 8222 var state Gz_statep 8223 8224 // get internal structure 8225 if file == (uintptr(0)) { 8226 return -1 8227 } 8228 state = file 8229 8230 // check that we're reading and that there's no (serious) error 8231 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8232 return -1 8233 } 8234 8235 // process a skip request 8236 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8237 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8238 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8239 return -1 8240 } 8241 } 8242 8243 // can't push EOF 8244 if c < 0 { 8245 return -1 8246 } 8247 8248 // if output buffer empty, put byte at end (allows more pushing) 8249 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 8250 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) 8251 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) - uintptr(1)) 8252 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 8253 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 8254 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 8255 return c 8256 } 8257 8258 // if no room, give up (must have already done a gzungetc()) 8259 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) { 8260 Xgz_error(tls, state, -3, ts+260 /* "out of room to p..." */) 8261 return -1 8262 } 8263 8264 // slide output data if needed and insert byte before existing data 8265 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout { 8266 var src uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)) 8267 var dest uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) 8268 for src > (*Gz_state)(unsafe.Pointer(state)).Fout { 8269 *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1))) 8270 } 8271 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest 8272 } 8273 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++ 8274 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext-- 8275 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 8276 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 8277 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 8278 return c 8279 } 8280 8281 // -- see zlib.h -- 8282 func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */ 8283 var left uint32 8284 var n uint32 8285 var str uintptr 8286 var eol uintptr 8287 var state Gz_statep 8288 8289 // check parameters and get internal structure 8290 if ((file == (uintptr(0))) || (buf == (uintptr(0)))) || (len < 1) { 8291 return uintptr(0) 8292 } 8293 state = file 8294 8295 // check that we're reading and that there's no (serious) error 8296 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) { 8297 return uintptr(0) 8298 } 8299 8300 // process a skip request 8301 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8302 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8303 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8304 return uintptr(0) 8305 } 8306 } 8307 8308 // copy output bytes up to new line or len - 1, whichever comes first -- 8309 // append a terminating zero to the string (we don't check for a zero in 8310 // the contents, let the user worry about that) 8311 str = buf 8312 left = (uint32(len) - uint32(1)) 8313 if left != 0 { 8314 for ok := true; ok; ok = ((left != 0) && (eol == (uintptr(0)))) { 8315 // assure that something is in the output buffer 8316 if ((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0)) && (gz_fetch(tls, state) == -1) { 8317 return uintptr(0) 8318 } // error 8319 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file 8320 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end 8321 break // return what we have 8322 } 8323 8324 // look for end-of-line in current output buffer 8325 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left { 8326 n = left 8327 } else { 8328 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 8329 } 8330 eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', uint64(n)) 8331 if eol != (uintptr(0)) { 8332 n = ((uint32((int64(eol) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) + uint32(1)) 8333 } 8334 8335 // copy through end-of-line, or remainder if not found 8336 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n)) 8337 *(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n) 8338 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n)) 8339 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(n)) 8340 left = left - (n) 8341 buf += uintptr(n) 8342 } 8343 } 8344 8345 // return terminated string, or if nothing, end of file 8346 if buf == str { 8347 return uintptr(0) 8348 } 8349 *(*int8)(unsafe.Pointer(buf)) = int8(0) 8350 return str 8351 } 8352 8353 // -- see zlib.h -- 8354 func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */ 8355 var state Gz_statep 8356 8357 // get internal structure 8358 if file == (uintptr(0)) { 8359 return 0 8360 } 8361 state = file 8362 8363 // if the state is not known, but we can find out, then do so (this is 8364 // mainly for right after a gzopen() or gzdopen()) 8365 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)) { 8366 gz_look(tls, state) 8367 } 8368 8369 // return 1 if transparent, 0 if processing a gzip stream 8370 return (*Gz_state)(unsafe.Pointer(state)).Fdirect 8371 } 8372 8373 // -- see zlib.h -- 8374 func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */ 8375 var ret int32 8376 var err int32 8377 var state Gz_statep 8378 8379 // get internal structure 8380 if file == (uintptr(0)) { 8381 return -2 8382 } 8383 state = file 8384 8385 // check that we're reading 8386 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { 8387 return -2 8388 } 8389 8390 // free memory and close file 8391 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 8392 XinflateEnd(tls, (state + 120 /* &.strm */)) 8393 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 8394 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 8395 } 8396 if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-5) { 8397 err = -5 8398 } else { 8399 err = Z_OK 8400 } 8401 Xgz_error(tls, state, Z_OK, uintptr(0)) 8402 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 8403 ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) 8404 libc.Xfree(tls, state) 8405 if ret != 0 { 8406 return -1 8407 } 8408 return err 8409 } 8410 8411 // Initialize state for writing a gzip file. Mark initialization by setting 8412 // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on 8413 // success. 8414 func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */ 8415 var ret int32 8416 var strm Z_streamp = (state + 120 /* &.strm */) 8417 8418 // allocate input buffer (double size for gzprintf) 8419 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))) 8420 if (*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0)) { 8421 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 8422 return -1 8423 } 8424 8425 // only need output buffer and deflate state if compressing 8426 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 8427 // allocate output buffer 8428 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 8429 if (*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0)) { 8430 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 8431 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 8432 return -1 8433 } 8434 8435 // allocate deflate memory, set up for gzip compression 8436 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL) 8437 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL) 8438 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL) 8439 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{}))) 8440 if ret != Z_OK { 8441 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 8442 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 8443 Xgz_error(tls, state, -4, ts+87 /* "out of memory" */) 8444 return -1 8445 } 8446 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0) 8447 } 8448 8449 // mark state as initialized 8450 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 8451 8452 // initialize write buffer if compressing 8453 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 8454 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 8455 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 8456 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 8457 } 8458 return 0 8459 } 8460 8461 // Compress whatever is at avail_in and next_in and write to the output file. 8462 // Return -1 if there is an error writing to the output file or if gz_init() 8463 // fails to allocate memory, otherwise 0. flush is assumed to be a valid 8464 // deflate() flush value. If flush is Z_FINISH, then the deflate() state is 8465 // reset to start a new gzip stream. If gz->direct is true, then simply write 8466 // to the output file without compressing, and ignore flush. 8467 func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */ 8468 var ret int32 8469 var writ int32 8470 var have uint32 8471 var put uint32 8472 var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1)) 8473 var strm Z_streamp = (state + 120 /* &.strm */) 8474 8475 // allocate memory if this is the first time through 8476 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 8477 return -1 8478 } 8479 8480 // write directly if requested 8481 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 8482 for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 8483 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max { 8484 put = max 8485 } else { 8486 put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 8487 } 8488 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(put))) 8489 if writ < 0 { 8490 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno(tls))))) 8491 return -1 8492 } 8493 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (uint32(writ)) 8494 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(writ)) 8495 } 8496 return 0 8497 } 8498 8499 // run deflate() on provided input until it produces no more output 8500 ret = Z_OK 8501 for ok := true; ok; ok = have != 0 { 8502 // write out current buffer contents if full, or if flushing, but if 8503 // doing Z_FINISH then don't write until we get to Z_STREAM_END 8504 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0)) || ((flush != Z_NO_FLUSH) && ((flush != Z_FINISH) || (ret == Z_STREAM_END))) { 8505 for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext { 8506 if ((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) > int64(int32(max)) { 8507 put = max 8508 } else { 8509 put = (uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) 8510 } 8511 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(put))) 8512 if writ < 0 { 8513 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno(tls))))) 8514 return -1 8515 } 8516 *(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(writ)) 8517 } 8518 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 8519 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 8520 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 8521 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 8522 } 8523 } 8524 8525 // compress 8526 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 8527 ret = Xdeflate(tls, strm, flush) 8528 if ret == (-2) { 8529 Xgz_error(tls, state, -2, 8530 ts+291 /* "internal error: ..." */) 8531 return -1 8532 } 8533 have = have - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 8534 } 8535 8536 // if that completed a deflate stream, allow another to start 8537 if flush == Z_FINISH { 8538 XdeflateReset(tls, strm) 8539 } 8540 8541 // all done, no errors 8542 return 0 8543 } 8544 8545 // Compress len zeros to output. Return -1 on a write error or memory 8546 // allocation failure by gz_comp(), or 0 on success. 8547 func gz_zero(tls *libc.TLS, state Gz_statep, len X__off_t) int32 { /* gzwrite.c:145:11: */ 8548 var first int32 8549 var n uint32 8550 var strm Z_streamp = (state + 120 /* &.strm */) 8551 8552 // consume whatever's left in the input buffer 8553 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 8554 return -1 8555 } 8556 8557 // compress len zeros (len guaranteed > 0) 8558 first = 1 8559 for len != 0 { 8560 if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(X__off_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fsize) > uint32(INT_MAX))) || (X__off_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len) { 8561 n = uint32(len) 8562 } else { 8563 n = (*Gz_state)(unsafe.Pointer(state)).Fsize 8564 } 8565 if first != 0 { 8566 libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n)) 8567 first = 0 8568 } 8569 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = n 8570 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8571 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(n)) 8572 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 8573 return -1 8574 } 8575 len = len - (X__off_t(n)) 8576 } 8577 return 0 8578 } 8579 8580 // Write len bytes from buf to file. Return the number of bytes written. If 8581 // the returned value is less than len, then there was an error. 8582 func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */ 8583 var put Z_size_t = len 8584 8585 // if len is zero, avoid unnecessary operations 8586 if len == uint64(0) { 8587 return uint64(0) 8588 } 8589 8590 // allocate memory if this is the first time through 8591 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 8592 return uint64(0) 8593 } 8594 8595 // check for seek request 8596 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8597 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8598 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8599 return uint64(0) 8600 } 8601 } 8602 8603 // for small len, copy to input buffer, otherwise compress directly 8604 if len < Z_size_t((*Gz_state)(unsafe.Pointer(state)).Fsize) { 8605 // copy to input buffer, compress when full 8606 for ok := true; ok; ok = len != 0 { 8607 var have uint32 8608 var copy uint32 8609 8610 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 8611 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8612 } 8613 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)) 8614 copy = ((*Gz_state)(unsafe.Pointer(state)).Fsize - have) 8615 if Z_size_t(copy) > len { 8616 copy = uint32(len) 8617 } 8618 libc.Xmemcpy(tls, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have)), buf, uint64(copy)) 8619 *(*UInt)(unsafe.Pointer(state + 120 /* &.strm */ + 8 /* &.avail_in */)) += (copy) 8620 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(copy)) 8621 buf = (buf + uintptr(copy)) 8622 len = len - (Z_size_t(copy)) 8623 if (len != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 8624 return uint64(0) 8625 } 8626 } 8627 } else { 8628 // consume whatever's left in the input buffer 8629 if ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) { 8630 return uint64(0) 8631 } 8632 8633 // directly compress user buffer to file 8634 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf 8635 for ok1 := true; ok1; ok1 = len != 0 { 8636 var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1)) 8637 if Z_size_t(n) > len { 8638 n = uint32(len) 8639 } 8640 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n 8641 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(n)) 8642 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 8643 return uint64(0) 8644 } 8645 len = len - (Z_size_t(n)) 8646 } 8647 } 8648 8649 // input was all buffered or compressed 8650 return put 8651 } 8652 8653 // -- see zlib.h -- 8654 func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */ 8655 var state Gz_statep 8656 8657 // get internal structure 8658 if file == (uintptr(0)) { 8659 return 0 8660 } 8661 state = file 8662 8663 // check that we're writing and that there's no error 8664 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8665 return 0 8666 } 8667 8668 // since an int is returned, make sure len fits in one, otherwise return 8669 // with an error (this avoids a flaw in the interface) 8670 if int32(len) < 0 { 8671 Xgz_error(tls, state, -3, ts+330 /* "requested length..." */) 8672 return 0 8673 } 8674 8675 // write len bytes from buf (the return value will fit in an int) 8676 return int32(gz_write(tls, state, buf, uint64(len))) 8677 } 8678 8679 // -- see zlib.h -- 8680 func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */ 8681 var len Z_size_t 8682 var state Gz_statep 8683 8684 // get internal structure 8685 if file == (uintptr(0)) { 8686 return uint64(0) 8687 } 8688 state = file 8689 8690 // check that we're writing and that there's no error 8691 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8692 return uint64(0) 8693 } 8694 8695 // compute bytes to read -- error on overflow 8696 len = (nitems * size) 8697 if (size != 0) && ((len / size) != nitems) { 8698 Xgz_error(tls, state, -2, ts+227 /* "request does not..." */) 8699 return uint64(0) 8700 } 8701 8702 // write len bytes to buf, return the number of full items written 8703 if len != 0 { 8704 return (gz_write(tls, state, buf, len) / size) 8705 } 8706 return uint64(0) 8707 } 8708 8709 // -- see zlib.h -- 8710 func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */ 8711 bp := tls.Alloc(1) 8712 defer tls.Free(1) 8713 8714 var have uint32 8715 // var buf [1]uint8 at bp, 1 8716 8717 var state Gz_statep 8718 var strm Z_streamp 8719 8720 // get internal structure 8721 if file == (uintptr(0)) { 8722 return -1 8723 } 8724 state = file 8725 strm = (state + 120 /* &.strm */) 8726 8727 // check that we're writing and that there's no error 8728 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8729 return -1 8730 } 8731 8732 // check for seek request 8733 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8734 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8735 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8736 return -1 8737 } 8738 } 8739 8740 // try writing to input buffer for speed (state->size == 0 if buffer not 8741 // initialized) 8742 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 8743 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 8744 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8745 } 8746 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)) 8747 if have < (*Gz_state)(unsafe.Pointer(state)).Fsize { 8748 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c) 8749 (*Z_stream)(unsafe.Pointer(strm)).Favail_in++ 8750 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 8751 return (c & 0xff) 8752 } 8753 } 8754 8755 // no room in buffer or not initialized, use gz_write() 8756 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */)) = uint8(c) 8757 if gz_write(tls, state, bp /* &buf[0] */, uint64(1)) != uint64(1) { 8758 return -1 8759 } 8760 return (c & 0xff) 8761 } 8762 8763 // -- see zlib.h -- 8764 func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */ 8765 var ret int32 8766 var len Z_size_t 8767 var state Gz_statep 8768 8769 // get internal structure 8770 if file == (uintptr(0)) { 8771 return -1 8772 } 8773 state = file 8774 8775 // check that we're writing and that there's no error 8776 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8777 return -1 8778 } 8779 8780 // write string 8781 len = libc.Xstrlen(tls, str) 8782 ret = int32(gz_write(tls, state, str, len)) 8783 if (ret == 0) && (len != uint64(0)) { 8784 return -1 8785 } 8786 return ret 8787 } 8788 8789 // $NetBSD: stdarg.h,v 1.4.24.1 2020/04/02 19:17:04 martin Exp $ 8790 8791 // - 8792 // Copyright (c) 1991, 1993 8793 // The Regents of the University of California. All rights reserved. 8794 // 8795 // Redistribution and use in source and binary forms, with or without 8796 // modification, are permitted provided that the following conditions 8797 // are met: 8798 // 1. Redistributions of source code must retain the above copyright 8799 // notice, this list of conditions and the following disclaimer. 8800 // 2. Redistributions in binary form must reproduce the above copyright 8801 // notice, this list of conditions and the following disclaimer in the 8802 // documentation and/or other materials provided with the distribution. 8803 // 3. Neither the name of the University nor the names of its contributors 8804 // may be used to endorse or promote products derived from this software 8805 // without specific prior written permission. 8806 // 8807 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 8808 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 8809 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 8810 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 8811 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 8812 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 8813 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 8814 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 8815 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 8816 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 8817 // SUCH DAMAGE. 8818 // 8819 // @(#)stdarg.h 8.1 (Berkeley) 6/10/93 8820 8821 // -- see zlib.h -- 8822 func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */ 8823 var len int32 8824 var left uint32 8825 var next uintptr 8826 var state Gz_statep 8827 var strm Z_streamp 8828 8829 // get internal structure 8830 if file == (uintptr(0)) { 8831 return -2 8832 } 8833 state = file 8834 strm = (state + 120 /* &.strm */) 8835 8836 // check that we're writing and that there's no error 8837 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8838 return -2 8839 } 8840 8841 // make sure we have some buffer space 8842 if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) { 8843 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8844 } 8845 8846 // check for seek request 8847 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8848 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8849 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8850 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8851 } 8852 } 8853 8854 // do the printf() into the input buffer, put length in len -- the input 8855 // buffer is double-sized just for this function, so there is guaranteed to 8856 // be state->size bytes available after the current contents 8857 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 8858 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8859 } 8860 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)) 8861 *(*int8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1))))) = int8(0) 8862 len = libc.Xvsnprintf(tls, next, uint64((*Gz_state)(unsafe.Pointer(state)).Fsize), format, va) 8863 8864 // check that printf() results fit in buffer 8865 if ((len == 0) || (uint32(len) >= (*Gz_state)(unsafe.Pointer(state)).Fsize)) || (int32(*(*int8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1)))))) != 0) { 8866 return 0 8867 } 8868 8869 // update buffer and position, compress first half if past that 8870 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (uint32(len)) 8871 *(*X__off_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (X__off_t(len)) 8872 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize { 8873 left = ((*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize) 8874 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize 8875 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 8876 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8877 } 8878 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize)), uint64(left)) 8879 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8880 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = left 8881 } 8882 return len 8883 } 8884 8885 func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */ 8886 var va1 Va_list 8887 _ = va1 8888 var ret int32 8889 8890 (va1) = va 8891 ret = Xgzvprintf(tls, file, format, va1) 8892 _ = va1 8893 return ret 8894 } 8895 8896 // -- see zlib.h -- 8897 func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */ 8898 var state Gz_statep 8899 8900 // get internal structure 8901 if file == (uintptr(0)) { 8902 return -2 8903 } 8904 state = file 8905 8906 // check that we're writing and that there's no error 8907 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8908 return -2 8909 } 8910 8911 // check flush parameter 8912 if (flush < 0) || (flush > Z_FINISH) { 8913 return -2 8914 } 8915 8916 // check for seek request 8917 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8918 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8919 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8920 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8921 } 8922 } 8923 8924 // compress remaining data with requested flush 8925 gz_comp(tls, state, flush) 8926 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8927 } 8928 8929 // -- see zlib.h -- 8930 func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */ 8931 var state Gz_statep 8932 var strm Z_streamp 8933 8934 // get internal structure 8935 if file == (uintptr(0)) { 8936 return -2 8937 } 8938 state = file 8939 strm = (state + 120 /* &.strm */) 8940 8941 // check that we're writing and that there's no error 8942 if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) { 8943 return -2 8944 } 8945 8946 // if no change is requested, then do nothing 8947 if (level == (*Gz_state)(unsafe.Pointer(state)).Flevel) && (strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy) { 8948 return Z_OK 8949 } 8950 8951 // check for seek request 8952 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8953 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8954 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8955 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8956 } 8957 } 8958 8959 // change compression parameters for subsequent input 8960 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 8961 // flush previous input with previous parameters before changing 8962 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_BLOCK) == -1) { 8963 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8964 } 8965 XdeflateParams(tls, strm, level, strategy) 8966 } 8967 (*Gz_state)(unsafe.Pointer(state)).Flevel = level 8968 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy 8969 return Z_OK 8970 } 8971 8972 // -- see zlib.h -- 8973 func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */ 8974 var ret int32 = Z_OK 8975 var state Gz_statep 8976 8977 // get internal structure 8978 if file == (uintptr(0)) { 8979 return -2 8980 } 8981 state = file 8982 8983 // check that we're writing 8984 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 8985 return -2 8986 } 8987 8988 // check for seek request 8989 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8990 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8991 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8992 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 8993 } 8994 } 8995 8996 // flush, free memory, and close file 8997 if gz_comp(tls, state, Z_FINISH) == -1 { 8998 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 8999 } 9000 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 9001 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 9002 XdeflateEnd(tls, (state + 120 /* &.strm */)) 9003 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 9004 } 9005 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 9006 } 9007 Xgz_error(tls, state, Z_OK, uintptr(0)) 9008 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 9009 if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 { 9010 ret = -1 9011 } 9012 libc.Xfree(tls, state) 9013 return ret 9014 } 9015 9016 // Reverse the bytes in a 32-bit value 9017 9018 // inftrees.h -- header to use inftrees.c 9019 // Copyright (C) 1995-2005, 2010 Mark Adler 9020 // For conditions of distribution and use, see copyright notice in zlib.h 9021 9022 // WARNING: this file should *not* be used by applications. It is 9023 // part of the implementation of the compression library and is 9024 // subject to change. Applications should only use zlib.h. 9025 // 9026 9027 // Structure for decoding tables. Each entry provides either the 9028 // information needed to do the operation requested by the code that 9029 // indexed that table entry, or it provides a pointer to another 9030 // table that indexes more bits of the code. op indicates whether 9031 // the entry is a pointer to another table, a literal, a length or 9032 // distance, an end-of-block, or an invalid code. For a table 9033 // pointer, the low four bits of op is the number of index bits of 9034 // that table. For a length or distance, the low four bits of op 9035 // is the number of extra bits to get after the code. bits is 9036 // the number of bits in this code or part of the code to drop off 9037 // of the bit buffer. val is the actual byte to output in the case 9038 // of a literal, the base length or distance, or the offset from 9039 // the current table to the next table. Each entry is four bytes. 9040 type Code = struct { 9041 Fop uint8 9042 Fbits uint8 9043 Fval uint16 9044 } /* inftrees.h:28:3 */ 9045 9046 // op values as set by inflate_table(): 9047 // 00000000 - literal 9048 // 0000tttt - table link, tttt != 0 is the number of table index bits 9049 // 0001eeee - length or distance, eeee is the number of extra bits 9050 // 01100000 - end of block 9051 // 01000000 - invalid code 9052 // 9053 9054 // Maximum size of the dynamic table. The maximum number of code structures is 9055 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 9056 // codes. These values were found by exhaustive searches using the program 9057 // examples/enough.c found in the zlib distribtution. The arguments to that 9058 // program are the number of symbols, the initial root table size, and the 9059 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 9060 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 9061 // The initial root table size (9 or 6) is found in the fifth argument of the 9062 // inflate_table() calls in inflate.c and infback.c. If the root table size is 9063 // changed, then these maximum sizes would be need to be recalculated and 9064 // updated. 9065 9066 // Type of code to build for inflate_table() 9067 type Codetype = uint32 /* inftrees.h:58:3 */ 9068 // inflate.h -- internal inflate state definition 9069 // Copyright (C) 1995-2016 Mark Adler 9070 // For conditions of distribution and use, see copyright notice in zlib.h 9071 9072 // WARNING: this file should *not* be used by applications. It is 9073 // part of the implementation of the compression library and is 9074 // subject to change. Applications should only use zlib.h. 9075 // 9076 9077 // define NO_GZIP when compiling if you want to disable gzip header and 9078 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 9079 // the crc code when it is not needed. For shared libraries, gzip decoding 9080 // should be left enabled. 9081 9082 // Possible inflate modes between inflate() calls 9083 type Inflate_mode = uint32 /* inflate.h:53:3 */ 9084 9085 // 9086 // State transitions between above modes - 9087 // 9088 // (most modes can go to BAD or MEM on error -- not shown for clarity) 9089 // 9090 // Process header: 9091 // HEAD -> (gzip) or (zlib) or (raw) 9092 // (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> 9093 // HCRC -> TYPE 9094 // (zlib) -> DICTID or TYPE 9095 // DICTID -> DICT -> TYPE 9096 // (raw) -> TYPEDO 9097 // Read deflate blocks: 9098 // TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK 9099 // STORED -> COPY_ -> COPY -> TYPE 9100 // TABLE -> LENLENS -> CODELENS -> LEN_ 9101 // LEN_ -> LEN 9102 // Read deflate codes in fixed or dynamic block: 9103 // LEN -> LENEXT or LIT or TYPE 9104 // LENEXT -> DIST -> DISTEXT -> MATCH -> LEN 9105 // LIT -> LEN 9106 // Process trailer: 9107 // CHECK -> LENGTH -> DONE 9108 // 9109 9110 // State maintained between inflate() calls -- approximately 7K bytes, not 9111 // including the allocated sliding window, which is up to 32K bytes. 9112 type Inflate_state = struct { 9113 Fstrm Z_streamp 9114 Fmode Inflate_mode 9115 Flast int32 9116 Fwrap int32 9117 Fhavedict int32 9118 Fflags int32 9119 Fdmax uint32 9120 Fcheck uint64 9121 Ftotal uint64 9122 Fhead Gz_headerp 9123 Fwbits uint32 9124 Fwsize uint32 9125 Fwhave uint32 9126 Fwnext uint32 9127 Fwindow uintptr 9128 Fhold uint64 9129 Fbits uint32 9130 Flength uint32 9131 Foffset uint32 9132 Fextra uint32 9133 Flencode uintptr 9134 Fdistcode uintptr 9135 Flenbits uint32 9136 Fdistbits uint32 9137 Fncode uint32 9138 Fnlen uint32 9139 Fndist uint32 9140 Fhave uint32 9141 Fnext uintptr 9142 Flens [320]uint16 9143 Fwork [288]uint16 9144 Fcodes [1444]Code 9145 Fsane int32 9146 Fback int32 9147 Fwas uint32 9148 F__ccgo_pad1 [4]byte 9149 } /* inflate.h:82:1 */ 9150 9151 // 9152 // strm provides memory allocation functions in zalloc and zfree, or 9153 // Z_NULL to use the library memory allocation functions. 9154 // 9155 // windowBits is in the range 8..15, and window is a user-supplied 9156 // window and output buffer that is 2**windowBits bytes. 9157 // 9158 func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */ 9159 var state uintptr 9160 9161 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) { 9162 return -6 9163 } 9164 if (((strm == uintptr(Z_NULL)) || (window == uintptr(Z_NULL))) || (windowBits < 8)) || (windowBits > 15) { 9165 return -2 9166 } 9167 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 9168 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 9169 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 9170 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 9171 }{Xzcalloc})) 9172 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 9173 } 9174 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 9175 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 9176 f func(*libc.TLS, Voidpf, Voidpf) 9177 }{Xzcfree})) 9178 } 9179 state = (*struct { 9180 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 9181 })(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{}))) 9182 if state == uintptr(Z_NULL) { 9183 return -4 9184 } 9185 9186 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 9187 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 9188 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits) 9189 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << windowBits) 9190 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = window 9191 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 9192 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 9193 return Z_OK 9194 } 9195 9196 // 9197 // Return state with length and distance decoding tables and index sizes set to 9198 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 9199 // If BUILDFIXED is defined, then instead this routine builds the tables the 9200 // first time it's called, and returns those tables the first time and 9201 // thereafter. This reduces the size of the code by about 2K bytes, in 9202 // exchange for a little execution time. However, BUILDFIXED should not be 9203 // used for threaded applications, since the rewriting of the tables and virgin 9204 // may not be thread-safe. 9205 // 9206 func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */ 9207 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix)) 9208 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 9209 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix)) 9210 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 9211 } 9212 9213 var lenfix = [512]Code{ 9214 {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)}, 9215 {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)}, 9216 {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)}, 9217 {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)}, 9218 {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)}, 9219 {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)}, 9220 {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)}, 9221 {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)}, 9222 {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)}, 9223 {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)}, 9224 {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)}, 9225 {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)}, 9226 {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)}, 9227 {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)}, 9228 {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)}, 9229 {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)}, 9230 {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)}, 9231 {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)}, 9232 {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)}, 9233 {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)}, 9234 {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)}, 9235 {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)}, 9236 {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)}, 9237 {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)}, 9238 {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)}, 9239 {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)}, 9240 {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)}, 9241 {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)}, 9242 {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)}, 9243 {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)}, 9244 {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)}, 9245 {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)}, 9246 {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)}, 9247 {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)}, 9248 {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)}, 9249 {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)}, 9250 {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)}, 9251 {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)}, 9252 {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)}, 9253 {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)}, 9254 {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)}, 9255 {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)}, 9256 {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)}, 9257 {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)}, 9258 {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)}, 9259 {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)}, 9260 {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)}, 9261 {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)}, 9262 {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)}, 9263 {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)}, 9264 {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)}, 9265 {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)}, 9266 {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)}, 9267 {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)}, 9268 {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)}, 9269 {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)}, 9270 {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)}, 9271 {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)}, 9272 {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)}, 9273 {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)}, 9274 {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)}, 9275 {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)}, 9276 {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)}, 9277 {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)}, 9278 {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)}, 9279 {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)}, 9280 {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)}, 9281 {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)}, 9282 {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)}, 9283 {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)}, 9284 {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)}, 9285 {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)}, 9286 {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)}, 9287 {Fbits: uint8(9), Fval: uint16(255)}, 9288 } /* inffixed.h:10:23 */ 9289 var distfix = [32]Code{ 9290 {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)}, 9291 {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)}, 9292 {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)}, 9293 {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)}, 9294 {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)}, 9295 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 9296 } /* inffixed.h:87:23 */ 9297 9298 // Macros for inflateBack(): 9299 9300 // Load returned state from inflate_fast() 9301 9302 // Set state from registers for inflate_fast() 9303 9304 // Clear the input bit accumulator 9305 9306 // Assure that some input is available. If input is requested, but denied, 9307 // then return a Z_BUF_ERROR from inflateBack(). 9308 9309 // Get a byte of input into the bit accumulator, or return from inflateBack() 9310 // with an error if there is no input available. 9311 9312 // Assure that there are at least n bits in the bit accumulator. If there is 9313 // not enough available input to do that, then return from inflateBack() with 9314 // an error. 9315 9316 // Return the low n bits of the bit accumulator (n < 16) 9317 9318 // Remove n bits from the bit accumulator 9319 9320 // Remove zero to seven bits as needed to go to a byte boundary 9321 9322 // Assure that some output space is available, by writing out the window 9323 // if it's full. If the write fails, return from inflateBack() with a 9324 // Z_BUF_ERROR. 9325 9326 // 9327 // strm provides the memory allocation functions and window buffer on input, 9328 // and provides information on the unused input on return. For Z_DATA_ERROR 9329 // returns, strm will also provide an error message. 9330 // 9331 // in() and out() are the call-back input and output functions. When 9332 // inflateBack() needs more input, it calls in(). When inflateBack() has 9333 // filled the window with output, or when it completes with data in the 9334 // window, it calls out() to write out the data. The application must not 9335 // change the provided input until in() is called again or inflateBack() 9336 // returns. The application must not change the window/output buffer until 9337 // inflateBack() returns. 9338 // 9339 // in() and out() are called with a descriptor parameter provided in the 9340 // inflateBack() call. This parameter can be a structure that provides the 9341 // information required to do the read or write, as well as accumulated 9342 // information on the input and output such as totals and check values. 9343 // 9344 // in() should return zero on failure. out() should return non-zero on 9345 // failure. If either in() or out() fails, than inflateBack() returns a 9346 // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it 9347 // was in() or out() that caused in the error. Otherwise, inflateBack() 9348 // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format 9349 // error, or Z_MEM_ERROR if it could not allocate memory for the state. 9350 // inflateBack() can also return Z_STREAM_ERROR if the input parameters 9351 // are not correct, i.e. strm is Z_NULL or the state was not initialized. 9352 // 9353 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: */ 9354 bp := tls.Alloc(8) 9355 defer tls.Free(8) 9356 9357 var state uintptr 9358 // var next uintptr at bp, 8 9359 // next input 9360 var put uintptr // next output 9361 var have uint32 9362 var left uint32 // available input and output 9363 var hold uint64 // bit buffer 9364 var bits uint32 // bits in bit buffer 9365 var copy uint32 // number of stored or match bytes to copy 9366 var from uintptr // where to copy match bytes from 9367 var here Code // current decoding table entry 9368 var last Code // parent table entry 9369 var len uint32 // length to copy for repeats, bits to drop 9370 var ret int32 9371 9372 // Check that the strm exists and that the state was initialized 9373 if !((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) { 9374 goto __1 9375 } 9376 return -2 9377 __1: 9378 ; 9379 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 9380 9381 // Reset the state 9382 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 9383 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 9384 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 9385 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 9386 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 9387 if *(*uintptr)(unsafe.Pointer(bp /* next */)) != uintptr(Z_NULL) { 9388 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9389 } else { 9390 have = uint32(0) 9391 } 9392 hold = uint64(0) 9393 bits = uint32(0) 9394 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 9395 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 9396 9397 // Inflate until end of block marked as last 9398 __2: 9399 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 9400 case TYPE: 9401 goto __6 9402 9403 case STORED: 9404 goto __7 9405 9406 case TABLE: 9407 goto __8 9408 9409 case LEN: 9410 goto __9 9411 9412 case DONE: 9413 goto __10 9414 9415 case BAD: 9416 goto __11 9417 9418 default: 9419 goto __12 9420 } 9421 goto __5 9422 __6: 9423 // determine and dispatch block type 9424 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 9425 goto __13 9426 } 9427 __14: 9428 hold >>= (bits & uint32(7)) 9429 bits = bits - (bits & uint32(7)) 9430 goto __15 9431 __15: 9432 if 0 != 0 { 9433 goto __14 9434 } 9435 goto __16 9436 __16: 9437 ; 9438 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 9439 goto __5 9440 __13: 9441 ; 9442 __17: 9443 __20: 9444 if !(bits < (uint32(3))) { 9445 goto __21 9446 } 9447 __22: 9448 __25: 9449 if !(have == uint32(0)) { 9450 goto __28 9451 } 9452 have = (*struct { 9453 f func(*libc.TLS, uintptr, uintptr) uint32 9454 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9455 if !(have == uint32(0)) { 9456 goto __29 9457 } 9458 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9459 ret = -5 9460 goto inf_leave 9461 __29: 9462 ; 9463 __28: 9464 ; 9465 goto __26 9466 __26: 9467 if 0 != 0 { 9468 goto __25 9469 } 9470 goto __27 9471 __27: 9472 ; 9473 have-- 9474 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 9475 bits = bits + (uint32(8)) 9476 goto __23 9477 __23: 9478 if 0 != 0 { 9479 goto __22 9480 } 9481 goto __24 9482 __24: 9483 ; 9484 goto __20 9485 __21: 9486 ; 9487 goto __18 9488 __18: 9489 if 0 != 0 { 9490 goto __17 9491 } 9492 goto __19 9493 __19: 9494 ; 9495 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 9496 __30: 9497 hold >>= 1 9498 bits = bits - (uint32(1)) 9499 goto __31 9500 __31: 9501 if 0 != 0 { 9502 goto __30 9503 } 9504 goto __32 9505 __32: 9506 ; 9507 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 9508 case uint32(0): 9509 goto __34 9510 case uint32(1): 9511 goto __35 9512 case uint32(2): 9513 goto __36 9514 case uint32(3): 9515 goto __37 9516 } 9517 goto __33 9518 __34: // stored block 9519 ; 9520 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 9521 goto __33 9522 __35: // fixed block 9523 fixedtables(tls, state) 9524 9525 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes 9526 goto __33 9527 __36: // dynamic block 9528 ; 9529 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 9530 goto __33 9531 __37: 9532 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 9533 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9534 __33: 9535 ; 9536 __38: 9537 hold >>= 2 9538 bits = bits - (uint32(2)) 9539 goto __39 9540 __39: 9541 if 0 != 0 { 9542 goto __38 9543 } 9544 goto __40 9545 __40: 9546 ; 9547 goto __5 9548 9549 __7: 9550 // get and verify stored block length 9551 __41: 9552 hold >>= (bits & uint32(7)) 9553 bits = bits - (bits & uint32(7)) 9554 goto __42 9555 __42: 9556 if 0 != 0 { 9557 goto __41 9558 } 9559 goto __43 9560 __43: 9561 ; // go to byte boundary 9562 __44: 9563 __47: 9564 if !(bits < (uint32(32))) { 9565 goto __48 9566 } 9567 __49: 9568 __52: 9569 if !(have == uint32(0)) { 9570 goto __55 9571 } 9572 have = (*struct { 9573 f func(*libc.TLS, uintptr, uintptr) uint32 9574 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9575 if !(have == uint32(0)) { 9576 goto __56 9577 } 9578 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9579 ret = -5 9580 goto inf_leave 9581 __56: 9582 ; 9583 __55: 9584 ; 9585 goto __53 9586 __53: 9587 if 0 != 0 { 9588 goto __52 9589 } 9590 goto __54 9591 __54: 9592 ; 9593 have-- 9594 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 9595 bits = bits + (uint32(8)) 9596 goto __50 9597 __50: 9598 if 0 != 0 { 9599 goto __49 9600 } 9601 goto __51 9602 __51: 9603 ; 9604 goto __47 9605 __48: 9606 ; 9607 goto __45 9608 __45: 9609 if 0 != 0 { 9610 goto __44 9611 } 9612 goto __46 9613 __46: 9614 ; 9615 if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) { 9616 goto __57 9617 } 9618 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 9619 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9620 goto __5 9621 __57: 9622 ; 9623 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 9624 9625 __58: 9626 hold = uint64(0) 9627 bits = uint32(0) 9628 goto __59 9629 __59: 9630 if 0 != 0 { 9631 goto __58 9632 } 9633 goto __60 9634 __60: 9635 ; 9636 9637 // copy stored block from input to output 9638 __61: 9639 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) { 9640 goto __62 9641 } 9642 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 9643 __63: 9644 if !(have == uint32(0)) { 9645 goto __66 9646 } 9647 have = (*struct { 9648 f func(*libc.TLS, uintptr, uintptr) uint32 9649 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9650 if !(have == uint32(0)) { 9651 goto __67 9652 } 9653 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9654 ret = -5 9655 goto inf_leave 9656 __67: 9657 ; 9658 __66: 9659 ; 9660 goto __64 9661 __64: 9662 if 0 != 0 { 9663 goto __63 9664 } 9665 goto __65 9666 __65: 9667 ; 9668 __68: 9669 if !(left == uint32(0)) { 9670 goto __71 9671 } 9672 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 9673 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 9674 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 9675 if !((*struct { 9676 f func(*libc.TLS, uintptr, uintptr, uint32) int32 9677 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 9678 goto __72 9679 } 9680 ret = -5 9681 goto inf_leave 9682 __72: 9683 ; 9684 __71: 9685 ; 9686 goto __69 9687 __69: 9688 if 0 != 0 { 9689 goto __68 9690 } 9691 goto __70 9692 __70: 9693 ; 9694 if !(copy > have) { 9695 goto __73 9696 } 9697 copy = have 9698 __73: 9699 ; 9700 if !(copy > left) { 9701 goto __74 9702 } 9703 copy = left 9704 __74: 9705 ; 9706 libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy)) 9707 have = have - (copy) 9708 *(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy) 9709 left = left - (copy) 9710 put += uintptr(copy) 9711 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 9712 goto __61 9713 __62: 9714 ; 9715 9716 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 9717 goto __5 9718 9719 __8: 9720 // get dynamic table entries descriptor 9721 __75: 9722 __78: 9723 if !(bits < (uint32(14))) { 9724 goto __79 9725 } 9726 __80: 9727 __83: 9728 if !(have == uint32(0)) { 9729 goto __86 9730 } 9731 have = (*struct { 9732 f func(*libc.TLS, uintptr, uintptr) uint32 9733 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9734 if !(have == uint32(0)) { 9735 goto __87 9736 } 9737 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9738 ret = -5 9739 goto inf_leave 9740 __87: 9741 ; 9742 __86: 9743 ; 9744 goto __84 9745 __84: 9746 if 0 != 0 { 9747 goto __83 9748 } 9749 goto __85 9750 __85: 9751 ; 9752 have-- 9753 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 9754 bits = bits + (uint32(8)) 9755 goto __81 9756 __81: 9757 if 0 != 0 { 9758 goto __80 9759 } 9760 goto __82 9761 __82: 9762 ; 9763 goto __78 9764 __79: 9765 ; 9766 goto __76 9767 __76: 9768 if 0 != 0 { 9769 goto __75 9770 } 9771 goto __77 9772 __77: 9773 ; 9774 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 9775 __88: 9776 hold >>= 5 9777 bits = bits - (uint32(5)) 9778 goto __89 9779 __89: 9780 if 0 != 0 { 9781 goto __88 9782 } 9783 goto __90 9784 __90: 9785 ; 9786 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 9787 __91: 9788 hold >>= 5 9789 bits = bits - (uint32(5)) 9790 goto __92 9791 __92: 9792 if 0 != 0 { 9793 goto __91 9794 } 9795 goto __93 9796 __93: 9797 ; 9798 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 9799 __94: 9800 hold >>= 4 9801 bits = bits - (uint32(4)) 9802 goto __95 9803 __95: 9804 if 0 != 0 { 9805 goto __94 9806 } 9807 goto __96 9808 __96: 9809 ; 9810 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 9811 goto __97 9812 } 9813 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 9814 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9815 goto __5 9816 __97: 9817 ; 9818 9819 // get code length code lengths (not a typo) 9820 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 9821 __98: 9822 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 9823 goto __99 9824 } 9825 __100: 9826 __103: 9827 if !(bits < (uint32(3))) { 9828 goto __104 9829 } 9830 __105: 9831 __108: 9832 if !(have == uint32(0)) { 9833 goto __111 9834 } 9835 have = (*struct { 9836 f func(*libc.TLS, uintptr, uintptr) uint32 9837 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9838 if !(have == uint32(0)) { 9839 goto __112 9840 } 9841 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9842 ret = -5 9843 goto inf_leave 9844 __112: 9845 ; 9846 __111: 9847 ; 9848 goto __109 9849 __109: 9850 if 0 != 0 { 9851 goto __108 9852 } 9853 goto __110 9854 __110: 9855 ; 9856 have-- 9857 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 9858 bits = bits + (uint32(8)) 9859 goto __106 9860 __106: 9861 if 0 != 0 { 9862 goto __105 9863 } 9864 goto __107 9865 __107: 9866 ; 9867 goto __103 9868 __104: 9869 ; 9870 goto __101 9871 __101: 9872 if 0 != 0 { 9873 goto __100 9874 } 9875 goto __102 9876 __102: 9877 ; 9878 *(*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)))) 9879 __113: 9880 hold >>= 3 9881 bits = bits - (uint32(3)) 9882 goto __114 9883 __114: 9884 if 0 != 0 { 9885 goto __113 9886 } 9887 goto __115 9888 __115: 9889 ; 9890 goto __98 9891 __99: 9892 ; 9893 __116: 9894 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 9895 goto __117 9896 } 9897 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 9898 goto __116 9899 __117: 9900 ; 9901 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 9902 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 9903 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 9904 ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */), 9905 (state + 120 /* &.lenbits */), state+792 /* &.work */) 9906 if !(ret != 0) { 9907 goto __118 9908 } 9909 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 9910 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9911 goto __5 9912 __118: 9913 ; 9914 9915 // get length and distance code code lengths 9916 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 9917 __119: 9918 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 9919 goto __120 9920 } 9921 __121: 9922 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 9923 if !((uint32(here.Fbits)) <= bits) { 9924 goto __124 9925 } 9926 goto __123 9927 __124: 9928 ; 9929 __125: 9930 __128: 9931 if !(have == uint32(0)) { 9932 goto __131 9933 } 9934 have = (*struct { 9935 f func(*libc.TLS, uintptr, uintptr) uint32 9936 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9937 if !(have == uint32(0)) { 9938 goto __132 9939 } 9940 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9941 ret = -5 9942 goto inf_leave 9943 __132: 9944 ; 9945 __131: 9946 ; 9947 goto __129 9948 __129: 9949 if 0 != 0 { 9950 goto __128 9951 } 9952 goto __130 9953 __130: 9954 ; 9955 have-- 9956 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 9957 bits = bits + (uint32(8)) 9958 goto __126 9959 __126: 9960 if 0 != 0 { 9961 goto __125 9962 } 9963 goto __127 9964 __127: 9965 ; 9966 goto __122 9967 __122: 9968 goto __121 9969 goto __123 9970 __123: 9971 ; 9972 if !(int32(here.Fval) < 16) { 9973 goto __133 9974 } 9975 __135: 9976 hold >>= int32(here.Fbits) 9977 bits = bits - (uint32(here.Fbits)) 9978 goto __136 9979 __136: 9980 if 0 != 0 { 9981 goto __135 9982 } 9983 goto __137 9984 __137: 9985 ; 9986 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 9987 goto __134 9988 __133: 9989 if !(int32(here.Fval) == 16) { 9990 goto __138 9991 } 9992 __140: 9993 __143: 9994 if !(bits < (uint32(int32(here.Fbits) + 2))) { 9995 goto __144 9996 } 9997 __145: 9998 __148: 9999 if !(have == uint32(0)) { 10000 goto __151 10001 } 10002 have = (*struct { 10003 f func(*libc.TLS, uintptr, uintptr) uint32 10004 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10005 if !(have == uint32(0)) { 10006 goto __152 10007 } 10008 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10009 ret = -5 10010 goto inf_leave 10011 __152: 10012 ; 10013 __151: 10014 ; 10015 goto __149 10016 __149: 10017 if 0 != 0 { 10018 goto __148 10019 } 10020 goto __150 10021 __150: 10022 ; 10023 have-- 10024 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10025 bits = bits + (uint32(8)) 10026 goto __146 10027 __146: 10028 if 0 != 0 { 10029 goto __145 10030 } 10031 goto __147 10032 __147: 10033 ; 10034 goto __143 10035 __144: 10036 ; 10037 goto __141 10038 __141: 10039 if 0 != 0 { 10040 goto __140 10041 } 10042 goto __142 10043 __142: 10044 ; 10045 __153: 10046 hold >>= int32(here.Fbits) 10047 bits = bits - (uint32(here.Fbits)) 10048 goto __154 10049 __154: 10050 if 0 != 0 { 10051 goto __153 10052 } 10053 goto __155 10054 __155: 10055 ; 10056 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 10057 goto __156 10058 } 10059 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 10060 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10061 goto __120 10062 __156: 10063 ; 10064 len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 10065 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 10066 __157: 10067 hold >>= 2 10068 bits = bits - (uint32(2)) 10069 goto __158 10070 __158: 10071 if 0 != 0 { 10072 goto __157 10073 } 10074 goto __159 10075 __159: 10076 ; 10077 goto __139 10078 __138: 10079 if !(int32(here.Fval) == 17) { 10080 goto __160 10081 } 10082 __162: 10083 __165: 10084 if !(bits < (uint32(int32(here.Fbits) + 3))) { 10085 goto __166 10086 } 10087 __167: 10088 __170: 10089 if !(have == uint32(0)) { 10090 goto __173 10091 } 10092 have = (*struct { 10093 f func(*libc.TLS, uintptr, uintptr) uint32 10094 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10095 if !(have == uint32(0)) { 10096 goto __174 10097 } 10098 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10099 ret = -5 10100 goto inf_leave 10101 __174: 10102 ; 10103 __173: 10104 ; 10105 goto __171 10106 __171: 10107 if 0 != 0 { 10108 goto __170 10109 } 10110 goto __172 10111 __172: 10112 ; 10113 have-- 10114 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10115 bits = bits + (uint32(8)) 10116 goto __168 10117 __168: 10118 if 0 != 0 { 10119 goto __167 10120 } 10121 goto __169 10122 __169: 10123 ; 10124 goto __165 10125 __166: 10126 ; 10127 goto __163 10128 __163: 10129 if 0 != 0 { 10130 goto __162 10131 } 10132 goto __164 10133 __164: 10134 ; 10135 __175: 10136 hold >>= int32(here.Fbits) 10137 bits = bits - (uint32(here.Fbits)) 10138 goto __176 10139 __176: 10140 if 0 != 0 { 10141 goto __175 10142 } 10143 goto __177 10144 __177: 10145 ; 10146 len = uint32(0) 10147 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 10148 __178: 10149 hold >>= 3 10150 bits = bits - (uint32(3)) 10151 goto __179 10152 __179: 10153 if 0 != 0 { 10154 goto __178 10155 } 10156 goto __180 10157 __180: 10158 ; 10159 goto __161 10160 __160: 10161 __181: 10162 __184: 10163 if !(bits < (uint32(int32(here.Fbits) + 7))) { 10164 goto __185 10165 } 10166 __186: 10167 __189: 10168 if !(have == uint32(0)) { 10169 goto __192 10170 } 10171 have = (*struct { 10172 f func(*libc.TLS, uintptr, uintptr) uint32 10173 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10174 if !(have == uint32(0)) { 10175 goto __193 10176 } 10177 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10178 ret = -5 10179 goto inf_leave 10180 __193: 10181 ; 10182 __192: 10183 ; 10184 goto __190 10185 __190: 10186 if 0 != 0 { 10187 goto __189 10188 } 10189 goto __191 10190 __191: 10191 ; 10192 have-- 10193 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10194 bits = bits + (uint32(8)) 10195 goto __187 10196 __187: 10197 if 0 != 0 { 10198 goto __186 10199 } 10200 goto __188 10201 __188: 10202 ; 10203 goto __184 10204 __185: 10205 ; 10206 goto __182 10207 __182: 10208 if 0 != 0 { 10209 goto __181 10210 } 10211 goto __183 10212 __183: 10213 ; 10214 __194: 10215 hold >>= int32(here.Fbits) 10216 bits = bits - (uint32(here.Fbits)) 10217 goto __195 10218 __195: 10219 if 0 != 0 { 10220 goto __194 10221 } 10222 goto __196 10223 __196: 10224 ; 10225 len = uint32(0) 10226 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 10227 __197: 10228 hold >>= 7 10229 bits = bits - (uint32(7)) 10230 goto __198 10231 __198: 10232 if 0 != 0 { 10233 goto __197 10234 } 10235 goto __199 10236 __199: 10237 ; 10238 __161: 10239 ; 10240 __139: 10241 ; 10242 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 10243 goto __200 10244 } 10245 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 10246 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10247 goto __120 10248 __200: 10249 ; 10250 __201: 10251 if !(libc.PostDecUint32(©, 1) != 0) { 10252 goto __202 10253 } 10254 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 10255 goto __201 10256 __202: 10257 ; 10258 __134: 10259 ; 10260 goto __119 10261 __120: 10262 ; 10263 10264 // handle error breaks in while 10265 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 10266 goto __203 10267 } 10268 goto __5 10269 __203: 10270 ; 10271 10272 // check for end-of-block code (better have one) 10273 if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) { 10274 goto __204 10275 } 10276 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 10277 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10278 goto __5 10279 __204: 10280 ; 10281 10282 // build code tables -- note: do not change the lenbits or distbits 10283 // values here (9 and 6) without reading the comments in inftrees.h 10284 // concerning the ENOUGH constants, which depend on those values 10285 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 10286 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 10287 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 10288 ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */), 10289 (state + 120 /* &.lenbits */), state+792 /* &.work */) 10290 if !(ret != 0) { 10291 goto __205 10292 } 10293 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 10294 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10295 goto __5 10296 __205: 10297 ; 10298 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 10299 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 10300 ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 10301 (state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */) 10302 if !(ret != 0) { 10303 goto __206 10304 } 10305 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 10306 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10307 goto __5 10308 __206: 10309 ; 10310 10311 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 10312 10313 __9: 10314 // use inflate_fast() if we have enough input and output 10315 if !((have >= uint32(6)) && (left >= uint32(258))) { 10316 goto __207 10317 } 10318 __208: 10319 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 10320 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 10321 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 10322 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 10323 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 10324 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 10325 goto __209 10326 __209: 10327 if 0 != 0 { 10328 goto __208 10329 } 10330 goto __210 10331 __210: 10332 ; 10333 if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 10334 goto __211 10335 } 10336 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - left) 10337 __211: 10338 ; 10339 Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 10340 __212: 10341 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 10342 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 10343 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 10344 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 10345 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 10346 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 10347 goto __213 10348 __213: 10349 if 0 != 0 { 10350 goto __212 10351 } 10352 goto __214 10353 __214: 10354 ; 10355 goto __5 10356 __207: 10357 ; 10358 10359 // get a literal, length, or end-of-block code 10360 __215: 10361 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 10362 if !((uint32(here.Fbits)) <= bits) { 10363 goto __218 10364 } 10365 goto __217 10366 __218: 10367 ; 10368 __219: 10369 __222: 10370 if !(have == uint32(0)) { 10371 goto __225 10372 } 10373 have = (*struct { 10374 f func(*libc.TLS, uintptr, uintptr) uint32 10375 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10376 if !(have == uint32(0)) { 10377 goto __226 10378 } 10379 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10380 ret = -5 10381 goto inf_leave 10382 __226: 10383 ; 10384 __225: 10385 ; 10386 goto __223 10387 __223: 10388 if 0 != 0 { 10389 goto __222 10390 } 10391 goto __224 10392 __224: 10393 ; 10394 have-- 10395 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10396 bits = bits + (uint32(8)) 10397 goto __220 10398 __220: 10399 if 0 != 0 { 10400 goto __219 10401 } 10402 goto __221 10403 __221: 10404 ; 10405 goto __216 10406 __216: 10407 goto __215 10408 goto __217 10409 __217: 10410 ; 10411 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 10412 goto __227 10413 } 10414 last = here 10415 __228: 10416 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)) 10417 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 10418 goto __231 10419 } 10420 goto __230 10421 __231: 10422 ; 10423 __232: 10424 __235: 10425 if !(have == uint32(0)) { 10426 goto __238 10427 } 10428 have = (*struct { 10429 f func(*libc.TLS, uintptr, uintptr) uint32 10430 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10431 if !(have == uint32(0)) { 10432 goto __239 10433 } 10434 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10435 ret = -5 10436 goto inf_leave 10437 __239: 10438 ; 10439 __238: 10440 ; 10441 goto __236 10442 __236: 10443 if 0 != 0 { 10444 goto __235 10445 } 10446 goto __237 10447 __237: 10448 ; 10449 have-- 10450 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10451 bits = bits + (uint32(8)) 10452 goto __233 10453 __233: 10454 if 0 != 0 { 10455 goto __232 10456 } 10457 goto __234 10458 __234: 10459 ; 10460 goto __229 10461 __229: 10462 goto __228 10463 goto __230 10464 __230: 10465 ; 10466 __240: 10467 hold >>= int32(last.Fbits) 10468 bits = bits - (uint32(last.Fbits)) 10469 goto __241 10470 __241: 10471 if 0 != 0 { 10472 goto __240 10473 } 10474 goto __242 10475 __242: 10476 ; 10477 __227: 10478 ; 10479 __243: 10480 hold >>= int32(here.Fbits) 10481 bits = bits - (uint32(here.Fbits)) 10482 goto __244 10483 __244: 10484 if 0 != 0 { 10485 goto __243 10486 } 10487 goto __245 10488 __245: 10489 ; 10490 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 10491 10492 // process literal 10493 if !(int32(here.Fop) == 0) { 10494 goto __246 10495 } 10496 10497 __247: 10498 if !(left == uint32(0)) { 10499 goto __250 10500 } 10501 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10502 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10503 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 10504 if !((*struct { 10505 f func(*libc.TLS, uintptr, uintptr, uint32) int32 10506 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 10507 goto __251 10508 } 10509 ret = -5 10510 goto inf_leave 10511 __251: 10512 ; 10513 __250: 10514 ; 10515 goto __248 10516 __248: 10517 if 0 != 0 { 10518 goto __247 10519 } 10520 goto __249 10521 __249: 10522 ; 10523 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 10524 left-- 10525 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 10526 goto __5 10527 __246: 10528 ; 10529 10530 // process end of block 10531 if !((int32(here.Fop) & 32) != 0) { 10532 goto __252 10533 } 10534 10535 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10536 goto __5 10537 __252: 10538 ; 10539 10540 // invalid code 10541 if !((int32(here.Fop) & 64) != 0) { 10542 goto __253 10543 } 10544 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 10545 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10546 goto __5 10547 __253: 10548 ; 10549 10550 // length code -- get extra bits, if any 10551 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 10552 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 10553 goto __254 10554 } 10555 __255: 10556 __258: 10557 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 10558 goto __259 10559 } 10560 __260: 10561 __263: 10562 if !(have == uint32(0)) { 10563 goto __266 10564 } 10565 have = (*struct { 10566 f func(*libc.TLS, uintptr, uintptr) uint32 10567 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10568 if !(have == uint32(0)) { 10569 goto __267 10570 } 10571 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10572 ret = -5 10573 goto inf_leave 10574 __267: 10575 ; 10576 __266: 10577 ; 10578 goto __264 10579 __264: 10580 if 0 != 0 { 10581 goto __263 10582 } 10583 goto __265 10584 __265: 10585 ; 10586 have-- 10587 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10588 bits = bits + (uint32(8)) 10589 goto __261 10590 __261: 10591 if 0 != 0 { 10592 goto __260 10593 } 10594 goto __262 10595 __262: 10596 ; 10597 goto __258 10598 __259: 10599 ; 10600 goto __256 10601 __256: 10602 if 0 != 0 { 10603 goto __255 10604 } 10605 goto __257 10606 __257: 10607 ; 10608 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 10609 __268: 10610 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 10611 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 10612 goto __269 10613 __269: 10614 if 0 != 0 { 10615 goto __268 10616 } 10617 goto __270 10618 __270: 10619 ; 10620 __254: 10621 ; 10622 10623 // get distance code 10624 __271: 10625 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 10626 if !((uint32(here.Fbits)) <= bits) { 10627 goto __274 10628 } 10629 goto __273 10630 __274: 10631 ; 10632 __275: 10633 __278: 10634 if !(have == uint32(0)) { 10635 goto __281 10636 } 10637 have = (*struct { 10638 f func(*libc.TLS, uintptr, uintptr) uint32 10639 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10640 if !(have == uint32(0)) { 10641 goto __282 10642 } 10643 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10644 ret = -5 10645 goto inf_leave 10646 __282: 10647 ; 10648 __281: 10649 ; 10650 goto __279 10651 __279: 10652 if 0 != 0 { 10653 goto __278 10654 } 10655 goto __280 10656 __280: 10657 ; 10658 have-- 10659 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10660 bits = bits + (uint32(8)) 10661 goto __276 10662 __276: 10663 if 0 != 0 { 10664 goto __275 10665 } 10666 goto __277 10667 __277: 10668 ; 10669 goto __272 10670 __272: 10671 goto __271 10672 goto __273 10673 __273: 10674 ; 10675 if !((int32(here.Fop) & 0xf0) == 0) { 10676 goto __283 10677 } 10678 last = here 10679 __284: 10680 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)) 10681 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 10682 goto __287 10683 } 10684 goto __286 10685 __287: 10686 ; 10687 __288: 10688 __291: 10689 if !(have == uint32(0)) { 10690 goto __294 10691 } 10692 have = (*struct { 10693 f func(*libc.TLS, uintptr, uintptr) uint32 10694 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10695 if !(have == uint32(0)) { 10696 goto __295 10697 } 10698 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10699 ret = -5 10700 goto inf_leave 10701 __295: 10702 ; 10703 __294: 10704 ; 10705 goto __292 10706 __292: 10707 if 0 != 0 { 10708 goto __291 10709 } 10710 goto __293 10711 __293: 10712 ; 10713 have-- 10714 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10715 bits = bits + (uint32(8)) 10716 goto __289 10717 __289: 10718 if 0 != 0 { 10719 goto __288 10720 } 10721 goto __290 10722 __290: 10723 ; 10724 goto __285 10725 __285: 10726 goto __284 10727 goto __286 10728 __286: 10729 ; 10730 __296: 10731 hold >>= int32(last.Fbits) 10732 bits = bits - (uint32(last.Fbits)) 10733 goto __297 10734 __297: 10735 if 0 != 0 { 10736 goto __296 10737 } 10738 goto __298 10739 __298: 10740 ; 10741 __283: 10742 ; 10743 __299: 10744 hold >>= int32(here.Fbits) 10745 bits = bits - (uint32(here.Fbits)) 10746 goto __300 10747 __300: 10748 if 0 != 0 { 10749 goto __299 10750 } 10751 goto __301 10752 __301: 10753 ; 10754 if !((int32(here.Fop) & 64) != 0) { 10755 goto __302 10756 } 10757 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 10758 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10759 goto __5 10760 __302: 10761 ; 10762 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 10763 10764 // get distance extra bits, if any 10765 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 10766 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 10767 goto __303 10768 } 10769 __304: 10770 __307: 10771 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 10772 goto __308 10773 } 10774 __309: 10775 __312: 10776 if !(have == uint32(0)) { 10777 goto __315 10778 } 10779 have = (*struct { 10780 f func(*libc.TLS, uintptr, uintptr) uint32 10781 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10782 if !(have == uint32(0)) { 10783 goto __316 10784 } 10785 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10786 ret = -5 10787 goto inf_leave 10788 __316: 10789 ; 10790 __315: 10791 ; 10792 goto __313 10793 __313: 10794 if 0 != 0 { 10795 goto __312 10796 } 10797 goto __314 10798 __314: 10799 ; 10800 have-- 10801 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits) 10802 bits = bits + (uint32(8)) 10803 goto __310 10804 __310: 10805 if 0 != 0 { 10806 goto __309 10807 } 10808 goto __311 10809 __311: 10810 ; 10811 goto __307 10812 __308: 10813 ; 10814 goto __305 10815 __305: 10816 if 0 != 0 { 10817 goto __304 10818 } 10819 goto __306 10820 __306: 10821 ; 10822 *(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 10823 __317: 10824 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 10825 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 10826 goto __318 10827 __318: 10828 if 0 != 0 { 10829 goto __317 10830 } 10831 goto __319 10832 __319: 10833 ; 10834 __303: 10835 ; 10836 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (func() uint32 { 10837 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 10838 return left 10839 } 10840 return uint32(0) 10841 }()))) { 10842 goto __320 10843 } 10844 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 10845 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10846 goto __5 10847 __320: 10848 ; 10849 10850 // copy match from window to output 10851 __321: 10852 __324: 10853 if !(left == uint32(0)) { 10854 goto __327 10855 } 10856 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10857 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10858 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 10859 if !((*struct { 10860 f func(*libc.TLS, uintptr, uintptr, uint32) int32 10861 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 10862 goto __328 10863 } 10864 ret = -5 10865 goto inf_leave 10866 __328: 10867 ; 10868 __327: 10869 ; 10870 goto __325 10871 __325: 10872 if 0 != 0 { 10873 goto __324 10874 } 10875 goto __326 10876 __326: 10877 ; 10878 copy = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset) 10879 if !(copy < left) { 10880 goto __329 10881 } 10882 from = (put + uintptr(copy)) 10883 copy = (left - copy) 10884 goto __330 10885 __329: 10886 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 10887 copy = left 10888 __330: 10889 ; 10890 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 10891 goto __331 10892 } 10893 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 10894 __331: 10895 ; 10896 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 10897 left = left - (copy) 10898 __332: 10899 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10900 goto __333 10901 __333: 10902 if libc.PreDecUint32(©, 1) != 0 { 10903 goto __332 10904 } 10905 goto __334 10906 __334: 10907 ; 10908 goto __322 10909 __322: 10910 if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { 10911 goto __321 10912 } 10913 goto __323 10914 __323: 10915 ; 10916 goto __5 10917 10918 __10: 10919 // inflate stream terminated properly -- write leftover output 10920 ret = Z_STREAM_END 10921 if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 10922 goto __335 10923 } 10924 if !((*struct { 10925 f func(*libc.TLS, uintptr, uintptr, uint32) int32 10926 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, ((*Inflate_state)(unsafe.Pointer(state)).Fwsize-left)) != 0) { 10927 goto __336 10928 } 10929 ret = -5 10930 __336: 10931 ; 10932 __335: 10933 ; 10934 goto inf_leave 10935 10936 __11: 10937 ret = -3 10938 goto inf_leave 10939 10940 __12: // can't happen, but makes compilers happy 10941 ret = -2 10942 goto inf_leave 10943 __5: 10944 ; 10945 goto __3 10946 __3: 10947 goto __2 10948 goto __4 10949 __4: 10950 ; 10951 10952 // Return unused input 10953 inf_leave: 10954 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 10955 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 10956 return ret 10957 } 10958 10959 var order = // permutation of code lengths 10960 [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 */ 10961 10962 func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */ 10963 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 10964 return -2 10965 } 10966 (*struct { 10967 f func(*libc.TLS, Voidpf, Voidpf) 10968 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 10969 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 10970 10971 return Z_OK 10972 } 10973 10974 // 10975 // Decode literal, length, and distance codes and write out the resulting 10976 // literal and match bytes until either not enough input or output is 10977 // available, an end-of-block is encountered, or a data error is encountered. 10978 // When large enough input and output buffers are supplied to inflate(), for 10979 // example, a 16K input buffer and a 64K output buffer, more than 95% of the 10980 // inflate execution time is spent in this routine. 10981 // 10982 // Entry assumptions: 10983 // 10984 // state->mode == LEN 10985 // strm->avail_in >= 6 10986 // strm->avail_out >= 258 10987 // start >= strm->avail_out 10988 // state->bits < 8 10989 // 10990 // On return, state->mode is one of: 10991 // 10992 // LEN -- ran out of enough output space or enough available input 10993 // TYPE -- reached end of block code, inflate() to interpret next block 10994 // BAD -- error in block data 10995 // 10996 // Notes: 10997 // 10998 // - The maximum input bits used by a length/distance pair is 15 bits for the 10999 // length code, 5 bits for the length extra, 15 bits for the distance code, 11000 // and 13 bits for the distance extra. This totals 48 bits, or six bytes. 11001 // Therefore if strm->avail_in >= 6, then there is enough input to avoid 11002 // checking for available input while decoding. 11003 // 11004 // - The maximum bytes that a single length/distance pair can output is 258 11005 // bytes, which is the maximum length that can be coded. inflate_fast() 11006 // requires strm->avail_out >= 258 for each loop to avoid checking for 11007 // output space. 11008 // 11009 func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */ 11010 var state uintptr 11011 var in uintptr // local strm->next_in 11012 var last uintptr // have enough input while in < last 11013 var out uintptr // local strm->next_out 11014 var beg uintptr // inflate()'s initial strm->next_out 11015 var end uintptr // while out < end, enough space available 11016 var wsize uint32 // window size or zero if not using window 11017 var whave uint32 // valid bytes in the window 11018 var wnext uint32 // window write index 11019 var window uintptr // allocated sliding window, if wsize != 0 11020 var hold uint64 // local strm->hold 11021 var bits uint32 // local strm->bits 11022 var lcode uintptr // local strm->lencode 11023 var dcode uintptr // local strm->distcode 11024 var lmask uint32 // mask for first level of length codes 11025 var dmask uint32 // mask for first level of distance codes 11026 var here Code // retrieved table entry 11027 var op uint32 // code bits, operation, extra bits, or 11028 // window position, window bytes to copy 11029 var len uint32 // match length, unused bytes 11030 var dist uint32 // match distance 11031 var from uintptr // where to copy match from 11032 11033 // copy state to local variables 11034 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11035 in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11036 last = (in + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_in - UInt(5)))) 11037 out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11038 beg = (out - uintptr((start - (*Z_stream)(unsafe.Pointer(strm)).Favail_out))) 11039 end = (out + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_out - UInt(257)))) 11040 wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11041 whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 11042 wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext 11043 window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 11044 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11045 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11046 lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode 11047 dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode 11048 lmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Flenbits) - uint32(1)) 11049 dmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fdistbits) - uint32(1)) 11050 11051 // decode literals and length/distances until end-of-block or not enough 11052 // input data or output space 11053 __1: 11054 if !(bits < uint32(15)) { 11055 goto __4 11056 } 11057 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11058 bits = bits + (uint32(8)) 11059 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11060 bits = bits + (uint32(8)) 11061 __4: 11062 ; 11063 here = *(*Code)(unsafe.Pointer(lcode + uintptr((hold&uint64(lmask)))*4)) 11064 dolen: 11065 op = uint32(here.Fbits) 11066 hold >>= op 11067 bits = bits - (op) 11068 op = uint32(here.Fop) 11069 if !(op == uint32(0)) { 11070 goto __5 11071 } // literal 11072 11073 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval) 11074 goto __6 11075 __5: 11076 if !((op & uint32(16)) != 0) { 11077 goto __7 11078 } // length base 11079 len = uint32(here.Fval) 11080 op = op & (uint32(15)) // number of extra bits 11081 if !(op != 0) { 11082 goto __9 11083 } 11084 if !(bits < op) { 11085 goto __10 11086 } 11087 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11088 bits = bits + (uint32(8)) 11089 __10: 11090 ; 11091 len = len + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 11092 hold >>= op 11093 bits = bits - (op) 11094 __9: 11095 ; 11096 11097 if !(bits < uint32(15)) { 11098 goto __11 11099 } 11100 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11101 bits = bits + (uint32(8)) 11102 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11103 bits = bits + (uint32(8)) 11104 __11: 11105 ; 11106 here = *(*Code)(unsafe.Pointer(dcode + uintptr((hold&uint64(dmask)))*4)) 11107 dodist: 11108 op = uint32(here.Fbits) 11109 hold >>= op 11110 bits = bits - (op) 11111 op = uint32(here.Fop) 11112 if !((op & uint32(16)) != 0) { 11113 goto __12 11114 } // distance base 11115 dist = uint32(here.Fval) 11116 op = op & (uint32(15)) // number of extra bits 11117 if !(bits < op) { 11118 goto __14 11119 } 11120 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11121 bits = bits + (uint32(8)) 11122 if !(bits < op) { 11123 goto __15 11124 } 11125 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits) 11126 bits = bits + (uint32(8)) 11127 __15: 11128 ; 11129 __14: 11130 ; 11131 dist = dist + (uint32(hold) & ((uint32(1) << op) - uint32(1))) 11132 hold >>= op 11133 bits = bits - (op) 11134 11135 op = (uint32((int64(out) - int64(beg)) / 1)) // max distance in output 11136 if !(dist > op) { 11137 goto __16 11138 } // see if copy from window 11139 op = (dist - op) // distance back in window 11140 if !(op > whave) { 11141 goto __18 11142 } 11143 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 11144 goto __19 11145 } 11146 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 11147 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11148 goto __3 11149 __19: 11150 ; 11151 __18: 11152 ; 11153 from = window 11154 if !(wnext == uint32(0)) { 11155 goto __20 11156 } // very common case 11157 from += (uintptr(wsize - op)) 11158 if !(op < len) { 11159 goto __22 11160 } // some from window 11161 len = len - (op) 11162 __23: 11163 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11164 goto __24 11165 __24: 11166 if libc.PreDecUint32(&op, 1) != 0 { 11167 goto __23 11168 } 11169 goto __25 11170 __25: 11171 ; 11172 from = (out - uintptr(dist)) // rest from output 11173 __22: 11174 ; 11175 goto __21 11176 __20: 11177 if !(wnext < op) { 11178 goto __26 11179 } // wrap around window 11180 from += (uintptr((wsize + wnext) - op)) 11181 op = op - (wnext) 11182 if !(op < len) { 11183 goto __28 11184 } // some from end of window 11185 len = len - (op) 11186 __29: 11187 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11188 goto __30 11189 __30: 11190 if libc.PreDecUint32(&op, 1) != 0 { 11191 goto __29 11192 } 11193 goto __31 11194 __31: 11195 ; 11196 from = window 11197 if !(wnext < len) { 11198 goto __32 11199 } // some from start of window 11200 op = wnext 11201 len = len - (op) 11202 __33: 11203 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11204 goto __34 11205 __34: 11206 if libc.PreDecUint32(&op, 1) != 0 { 11207 goto __33 11208 } 11209 goto __35 11210 __35: 11211 ; 11212 from = (out - uintptr(dist)) // rest from output 11213 __32: 11214 ; 11215 __28: 11216 ; 11217 goto __27 11218 __26: // contiguous in window 11219 from += (uintptr(wnext - op)) 11220 if !(op < len) { 11221 goto __36 11222 } // some from window 11223 len = len - (op) 11224 __37: 11225 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11226 goto __38 11227 __38: 11228 if libc.PreDecUint32(&op, 1) != 0 { 11229 goto __37 11230 } 11231 goto __39 11232 __39: 11233 ; 11234 from = (out - uintptr(dist)) // rest from output 11235 __36: 11236 ; 11237 __27: 11238 ; 11239 __21: 11240 ; 11241 __40: 11242 if !(len > uint32(2)) { 11243 goto __41 11244 } 11245 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11246 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11247 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11248 len = len - (uint32(3)) 11249 goto __40 11250 __41: 11251 ; 11252 if !(len != 0) { 11253 goto __42 11254 } 11255 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11256 if !(len > uint32(1)) { 11257 goto __43 11258 } 11259 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11260 __43: 11261 ; 11262 __42: 11263 ; 11264 goto __17 11265 __16: 11266 from = (out - uintptr(dist)) // copy direct from output 11267 __44: // minimum length is three 11268 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11269 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11270 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11271 len = len - (uint32(3)) 11272 goto __45 11273 __45: 11274 if len > uint32(2) { 11275 goto __44 11276 } 11277 goto __46 11278 __46: 11279 ; 11280 if !(len != 0) { 11281 goto __47 11282 } 11283 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11284 if !(len > uint32(1)) { 11285 goto __48 11286 } 11287 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 11288 __48: 11289 ; 11290 __47: 11291 ; 11292 __17: 11293 ; 11294 goto __13 11295 __12: 11296 if !((op & uint32(64)) == uint32(0)) { 11297 goto __49 11298 } // 2nd level distance code 11299 here = *(*Code)(unsafe.Pointer(dcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4)) 11300 goto dodist 11301 goto __50 11302 __49: 11303 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 11304 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11305 goto __3 11306 __50: 11307 ; 11308 __13: 11309 ; 11310 goto __8 11311 __7: 11312 if !((op & uint32(64)) == uint32(0)) { 11313 goto __51 11314 } // 2nd level length code 11315 here = *(*Code)(unsafe.Pointer(lcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4)) 11316 goto dolen 11317 goto __52 11318 __51: 11319 if !((op & uint32(32)) != 0) { 11320 goto __53 11321 } // end-of-block 11322 11323 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11324 goto __3 11325 goto __54 11326 __53: 11327 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 11328 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11329 goto __3 11330 __54: 11331 ; 11332 __52: 11333 ; 11334 __8: 11335 ; 11336 __6: 11337 ; 11338 goto __2 11339 __2: 11340 if (in < last) && (out < end) { 11341 goto __1 11342 } 11343 goto __3 11344 __3: 11345 ; 11346 11347 // return unused bytes (on entry, bits < 8, so in won't go too far back) 11348 len = (bits >> 3) 11349 in -= uintptr(len) 11350 bits = bits - (len << 3) 11351 hold = hold & (uint64((uint32(1) << bits) - uint32(1))) 11352 11353 // update state and return 11354 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in 11355 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out 11356 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 { 11357 if in < last { 11358 return (uint32(int64(5) + ((int64(last) - int64(in)) / 1))) 11359 } 11360 return (uint32(int64(5) - ((int64(in) - int64(last)) / 1))) 11361 }() 11362 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 { 11363 if out < end { 11364 return (uint32(int64(257) + ((int64(end) - int64(out)) / 1))) 11365 } 11366 return (uint32(int64(257) - ((int64(out) - int64(end)) / 1))) 11367 }() 11368 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11369 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11370 return 11371 } 11372 11373 // 11374 // inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): 11375 // - Using bit fields for code structure 11376 // - Different op definition to avoid & for extra bits (do & for table bits) 11377 // - Three separate decoding do-loops for direct, window, and wnext == 0 11378 // - Special case for distance > 1 copies to do overlapped load and store copy 11379 // - Explicit branch predictions (based on measured branch probabilities) 11380 // - Deferring match copy and interspersed it with decoding subsequent codes 11381 // - Swapping literal/length else 11382 // - Swapping window/direct else 11383 // - Larger unrolled copy loops (three is about right) 11384 // - Moving len -= 3 statement into middle of loop 11385 // 11386 11387 func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */ 11388 var state uintptr 11389 if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) { 11390 return 1 11391 } 11392 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11393 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) { 11394 return 1 11395 } 11396 return 0 11397 } 11398 11399 func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */ 11400 var state uintptr 11401 11402 if inflateStateCheck(tls, strm) != 0 { 11403 return -2 11404 } 11405 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11406 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, libc.AssignPtrUint64(state+40 /* &.total */, uint64(0))) 11407 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 11408 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite 11409 (*Z_stream)(unsafe.Pointer(strm)).Fadler = (ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)) 11410 } 11411 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD 11412 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 11413 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0 11414 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 11415 (*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL) 11416 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 11417 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 11418 (*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+112 /* &.distcode */, libc.AssignPtrUintptr(state+144 /* &.next */, state+1368 /* &.codes */)) 11419 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 11420 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 11421 11422 return Z_OK 11423 } 11424 11425 func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */ 11426 var state uintptr 11427 11428 if inflateStateCheck(tls, strm) != 0 { 11429 return -2 11430 } 11431 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11432 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) 11433 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 11434 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 11435 return XinflateResetKeep(tls, strm) 11436 } 11437 11438 func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */ 11439 var wrap int32 11440 var state uintptr 11441 11442 // get the state 11443 if inflateStateCheck(tls, strm) != 0 { 11444 return -2 11445 } 11446 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11447 11448 // extract wrap request from windowBits parameter 11449 if windowBits < 0 { 11450 wrap = 0 11451 windowBits = -windowBits 11452 } else { 11453 wrap = ((windowBits >> 4) + 5) 11454 if windowBits < 48 { 11455 windowBits = windowBits & (15) 11456 } 11457 } 11458 11459 // set number of window bits, free window if different 11460 if (windowBits != 0) && ((windowBits < 8) || (windowBits > 15)) { 11461 return -2 11462 } 11463 if ((*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL)) && ((*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits)) { 11464 (*struct { 11465 f func(*libc.TLS, Voidpf, Voidpf) 11466 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 11467 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 11468 } 11469 11470 // update state and reset the rest of it 11471 (*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap 11472 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits) 11473 return XinflateReset(tls, strm) 11474 } 11475 11476 func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */ 11477 var ret int32 11478 var state uintptr 11479 11480 if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) { 11481 return -6 11482 } 11483 if strm == uintptr(Z_NULL) { 11484 return -2 11485 } 11486 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 11487 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 11488 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 11489 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 11490 }{Xzcalloc})) 11491 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 11492 } 11493 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 11494 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 11495 f func(*libc.TLS, Voidpf, Voidpf) 11496 }{Xzcfree})) 11497 } 11498 state = (*struct { 11499 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 11500 })(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{}))) 11501 if state == uintptr(Z_NULL) { 11502 return -4 11503 } 11504 11505 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 11506 (*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm 11507 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 11508 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2() 11509 ret = XinflateReset2(tls, strm, windowBits) 11510 if ret != Z_OK { 11511 (*struct { 11512 f func(*libc.TLS, Voidpf, Voidpf) 11513 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state) 11514 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 11515 } 11516 return ret 11517 } 11518 11519 func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */ 11520 return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size) 11521 } 11522 11523 func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */ 11524 var state uintptr 11525 11526 if inflateStateCheck(tls, strm) != 0 { 11527 return -2 11528 } 11529 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11530 if bits < 0 { 11531 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 11532 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 11533 return Z_OK 11534 } 11535 if (bits > 16) || (((*Inflate_state)(unsafe.Pointer(state)).Fbits + UInt(bits)) > uint32(32)) { 11536 return -2 11537 } 11538 value = int32(int64(value) & ((int64(1) << bits) - int64(1))) 11539 *(*uint64)(unsafe.Pointer(state + 80 /* &.hold */)) += (uint64(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)) 11540 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) += (UInt(bits)) 11541 return Z_OK 11542 } 11543 11544 // 11545 // Return state with length and distance decoding tables and index sizes set to 11546 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 11547 // If BUILDFIXED is defined, then instead this routine builds the tables the 11548 // first time it's called, and returns those tables the first time and 11549 // thereafter. This reduces the size of the code by about 2K bytes, in 11550 // exchange for a little execution time. However, BUILDFIXED should not be 11551 // used for threaded applications, since the rewriting of the tables and virgin 11552 // may not be thread-safe. 11553 // 11554 func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */ 11555 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1)) 11556 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 11557 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1)) 11558 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 11559 } 11560 11561 var lenfix1 = [512]Code{ 11562 {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)}, 11563 {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)}, 11564 {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)}, 11565 {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)}, 11566 {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)}, 11567 {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)}, 11568 {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)}, 11569 {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)}, 11570 {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)}, 11571 {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)}, 11572 {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)}, 11573 {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)}, 11574 {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)}, 11575 {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)}, 11576 {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)}, 11577 {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)}, 11578 {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)}, 11579 {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)}, 11580 {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)}, 11581 {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)}, 11582 {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)}, 11583 {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)}, 11584 {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)}, 11585 {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)}, 11586 {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)}, 11587 {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)}, 11588 {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)}, 11589 {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)}, 11590 {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)}, 11591 {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)}, 11592 {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)}, 11593 {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)}, 11594 {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)}, 11595 {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)}, 11596 {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)}, 11597 {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)}, 11598 {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)}, 11599 {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)}, 11600 {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)}, 11601 {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)}, 11602 {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)}, 11603 {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)}, 11604 {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)}, 11605 {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)}, 11606 {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)}, 11607 {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)}, 11608 {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)}, 11609 {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)}, 11610 {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)}, 11611 {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)}, 11612 {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)}, 11613 {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)}, 11614 {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)}, 11615 {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)}, 11616 {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)}, 11617 {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)}, 11618 {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)}, 11619 {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)}, 11620 {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)}, 11621 {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)}, 11622 {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)}, 11623 {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)}, 11624 {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)}, 11625 {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)}, 11626 {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)}, 11627 {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)}, 11628 {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)}, 11629 {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)}, 11630 {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)}, 11631 {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)}, 11632 {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)}, 11633 {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)}, 11634 {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)}, 11635 {Fbits: uint8(9), Fval: uint16(255)}, 11636 } /* inffixed.h:10:23 */ 11637 var distfix1 = [32]Code{ 11638 {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)}, 11639 {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)}, 11640 {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)}, 11641 {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)}, 11642 {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)}, 11643 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 11644 } /* inffixed.h:87:23 */ 11645 11646 // 11647 // Update the window with the last wsize (normally 32K) bytes written before 11648 // returning. If window does not exist yet, create it. This is only called 11649 // when a window is already in use, or when output has been written during this 11650 // inflate call, but the end of the deflate stream has not been reached yet. 11651 // It is also called to create a window for dictionary data when a dictionary 11652 // is loaded. 11653 // 11654 // Providing output buffers larger than 32K to inflate() should provide a speed 11655 // advantage, since only the last 32K of output is copied to the sliding window 11656 // upon return from inflate(), and since all distances after the first 32K of 11657 // output will fall in the output data, making match copies simpler and faster. 11658 // The advantage may be dependent on the size of the processor's data caches. 11659 // 11660 func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */ 11661 var state uintptr 11662 var dist uint32 11663 11664 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11665 11666 // if it hasn't been done already, allocate space for the window 11667 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 11668 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct { 11669 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 11670 })(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)))) 11671 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 11672 return 1 11673 } 11674 } 11675 11676 // if window not in use yet, initialize 11677 if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) { 11678 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 11679 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 11680 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 11681 } 11682 11683 // copy state->wsize or less output bytes into the circular window 11684 if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 11685 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize)), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize)) 11686 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 11687 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11688 } else { 11689 dist = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext) 11690 if dist > copy { 11691 dist = copy 11692 } 11693 libc.Xmemcpy(tls, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), (end - uintptr(copy)), uint64(dist)) 11694 copy = copy - (dist) 11695 if copy != 0 { 11696 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr(copy)), uint64(copy)) 11697 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy 11698 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 11699 } else { 11700 *(*uint32)(unsafe.Pointer(state + 68 /* &.wnext */)) += (dist) 11701 if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 11702 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 11703 } 11704 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 11705 *(*uint32)(unsafe.Pointer(state + 64 /* &.whave */)) += (dist) 11706 } 11707 } 11708 } 11709 return 0 11710 } 11711 11712 // Macros for inflate(): 11713 11714 // check function to use adler32() for zlib or crc32() for gzip 11715 11716 // check macros for header crc 11717 11718 // Load registers with state in inflate() for speed 11719 11720 // Restore state from registers in inflate() 11721 11722 // Clear the input bit accumulator 11723 11724 // Get a byte of input into the bit accumulator, or return from inflate() 11725 // if there is no input available. 11726 11727 // Assure that there are at least n bits in the bit accumulator. If there is 11728 // not enough available input to do that, then return from inflate(). 11729 11730 // Return the low n bits of the bit accumulator (n < 16) 11731 11732 // Remove n bits from the bit accumulator 11733 11734 // Remove zero to seven bits as needed to go to a byte boundary 11735 11736 // 11737 // inflate() uses a state machine to process as much input data and generate as 11738 // much output data as possible before returning. The state machine is 11739 // structured roughly as follows: 11740 // 11741 // for (;;) switch (state) { 11742 // ... 11743 // case STATEn: 11744 // if (not enough input data or output space to make progress) 11745 // return; 11746 // ... make progress ... 11747 // state = STATEm; 11748 // break; 11749 // ... 11750 // } 11751 // 11752 // so when inflate() is called again, the same case is attempted again, and 11753 // if the appropriate resources are provided, the machine proceeds to the 11754 // next state. The NEEDBITS() macro is usually the way the state evaluates 11755 // whether it can proceed or should return. NEEDBITS() does the return if 11756 // the requested bits are not available. The typical use of the BITS macros 11757 // is: 11758 // 11759 // NEEDBITS(n); 11760 // ... do something with BITS(n) ... 11761 // DROPBITS(n); 11762 // 11763 // where NEEDBITS(n) either returns from inflate() if there isn't enough 11764 // input left to load n bits into the accumulator, or it continues. BITS(n) 11765 // gives the low n bits in the accumulator. When done, DROPBITS(n) drops 11766 // the low n bits off the accumulator. INITBITS() clears the accumulator 11767 // and sets the number of available bits to zero. BYTEBITS() discards just 11768 // enough bits to put the accumulator on a byte boundary. After BYTEBITS() 11769 // and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. 11770 // 11771 // NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return 11772 // if there is no input available. The decoding of variable length codes uses 11773 // PULLBYTE() directly in order to pull just enough bytes to decode the next 11774 // code, and no more. 11775 // 11776 // Some states loop until they get enough input, making sure that enough 11777 // state information is maintained to continue the loop where it left off 11778 // if NEEDBITS() returns in the loop. For example, want, need, and keep 11779 // would all have to actually be part of the saved state in case NEEDBITS() 11780 // returns: 11781 // 11782 // case STATEw: 11783 // while (want < need) { 11784 // NEEDBITS(n); 11785 // keep[want++] = BITS(n); 11786 // DROPBITS(n); 11787 // } 11788 // state = STATEx; 11789 // case STATEx: 11790 // 11791 // As shown above, if the next state is also the next case, then the break 11792 // is omitted. 11793 // 11794 // A state may also return if there is not enough output space available to 11795 // complete that state. Those states are copying stored data, writing a 11796 // literal byte, and copying a matching string. 11797 // 11798 // When returning, a "goto inf_leave" is used to update the total counters, 11799 // update the check value, and determine whether any progress has been made 11800 // during that inflate() call in order to return the proper return code. 11801 // Progress is defined as a change in either strm->avail_in or strm->avail_out. 11802 // When there is a window, goto inf_leave will update the window with the last 11803 // output written. If a goto inf_leave occurs in the middle of decompression 11804 // and there is no window currently, goto inf_leave will create one and copy 11805 // output to the window for the next call of inflate(). 11806 // 11807 // In this implementation, the flush parameter of inflate() only affects the 11808 // return code (per zlib.h). inflate() always writes as much as possible to 11809 // strm->next_out, given the space available and the provided input--the effect 11810 // documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers 11811 // the allocation of and copying into a sliding window until necessary, which 11812 // provides the effect documented in zlib.h for Z_FINISH when the entire input 11813 // stream available. So the only thing the flush parameter actually does is: 11814 // when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it 11815 // will return Z_BUF_ERROR if it has not reached the end of the stream. 11816 // 11817 11818 func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */ 11819 bp := tls.Alloc(4) 11820 defer tls.Free(4) 11821 11822 var state uintptr 11823 var next uintptr // next input 11824 var put uintptr // next output 11825 var have uint32 11826 var left uint32 // available input and output 11827 var hold uint64 // bit buffer 11828 var bits uint32 // bits in bit buffer 11829 var in uint32 11830 var out uint32 // save starting available input and output 11831 var copy uint32 // number of stored or match bytes to copy 11832 var from uintptr // where to copy match bytes from 11833 var here Code // current decoding table entry 11834 var last Code // parent table entry 11835 var len uint32 // length to copy for repeats, bits to drop 11836 var ret int32 // return code 11837 // var hbuf [4]uint8 at bp, 4 11838 11839 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)))) { 11840 goto __1 11841 } 11842 return -2 11843 __1: 11844 ; 11845 11846 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11847 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 11848 goto __2 11849 } 11850 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 11851 __2: 11852 ; // skip check 11853 __3: 11854 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11855 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11856 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11857 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11858 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11859 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11860 goto __4 11861 __4: 11862 if 0 != 0 { 11863 goto __3 11864 } 11865 goto __5 11866 __5: 11867 ; 11868 in = have 11869 out = left 11870 ret = Z_OK 11871 __6: 11872 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 11873 case HEAD: 11874 goto __10 11875 case FLAGS: 11876 goto __11 11877 case TIME: 11878 goto __12 11879 case OS: 11880 goto __13 11881 case EXLEN: 11882 goto __14 11883 case EXTRA: 11884 goto __15 11885 case NAME: 11886 goto __16 11887 case COMMENT: 11888 goto __17 11889 case HCRC: 11890 goto __18 11891 case DICTID: 11892 goto __19 11893 case DICT: 11894 goto __20 11895 case TYPE: 11896 goto __21 11897 case TYPEDO: 11898 goto __22 11899 case STORED: 11900 goto __23 11901 case COPY_: 11902 goto __24 11903 case COPY: 11904 goto __25 11905 case TABLE: 11906 goto __26 11907 case LENLENS: 11908 goto __27 11909 case CODELENS: 11910 goto __28 11911 case LEN_: 11912 goto __29 11913 case LEN: 11914 goto __30 11915 case LENEXT: 11916 goto __31 11917 case DIST: 11918 goto __32 11919 case DISTEXT: 11920 goto __33 11921 case MATCH: 11922 goto __34 11923 case LIT: 11924 goto __35 11925 case CHECK: 11926 goto __36 11927 case LENGTH: 11928 goto __37 11929 case DONE: 11930 goto __38 11931 case BAD: 11932 goto __39 11933 case MEM: 11934 goto __40 11935 case SYNC: 11936 goto __41 11937 default: 11938 goto __42 11939 } 11940 goto __9 11941 __10: 11942 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) { 11943 goto __43 11944 } 11945 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 11946 goto __9 11947 __43: 11948 ; 11949 __44: 11950 __47: 11951 if !(bits < (uint32(16))) { 11952 goto __48 11953 } 11954 __49: 11955 if !(have == uint32(0)) { 11956 goto __52 11957 } 11958 goto inf_leave 11959 __52: 11960 ; 11961 have-- 11962 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 11963 bits = bits + (uint32(8)) 11964 goto __50 11965 __50: 11966 if 0 != 0 { 11967 goto __49 11968 } 11969 goto __51 11970 __51: 11971 ; 11972 goto __47 11973 __48: 11974 ; 11975 goto __45 11976 __45: 11977 if 0 != 0 { 11978 goto __44 11979 } 11980 goto __46 11981 __46: 11982 ; 11983 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) != 0) && (hold == uint64(0x8b1f))) { 11984 goto __53 11985 } // gzip header 11986 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 11987 goto __54 11988 } 11989 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) 11990 __54: 11991 ; 11992 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 11993 __55: 11994 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 11995 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 11996 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 11997 goto __56 11998 __56: 11999 if 0 != 0 { 12000 goto __55 12001 } 12002 goto __57 12003 __57: 12004 ; 12005 __58: 12006 hold = uint64(0) 12007 bits = uint32(0) 12008 goto __59 12009 __59: 12010 if 0 != 0 { 12011 goto __58 12012 } 12013 goto __60 12014 __60: 12015 ; 12016 (*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS 12017 goto __9 12018 __53: 12019 ; 12020 (*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header 12021 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12022 goto __61 12023 } 12024 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1 12025 __61: 12026 ; 12027 if !(!(((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) != 0) || ((((uint64((uint32(hold) & ((uint32(1) << (8)) - uint32(1))) << 8)) + (hold >> 8)) % uint64(31)) != 0)) { 12028 goto __62 12029 } 12030 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */ 12031 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12032 goto __9 12033 __62: 12034 ; 12035 if !((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) != uint32(Z_DEFLATED)) { 12036 goto __63 12037 } 12038 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 12039 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12040 goto __9 12041 __63: 12042 ; 12043 __64: 12044 hold >>= 4 12045 bits = bits - (uint32(4)) 12046 goto __65 12047 __65: 12048 if 0 != 0 { 12049 goto __64 12050 } 12051 goto __66 12052 __66: 12053 ; 12054 len = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(8)) 12055 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 12056 goto __67 12057 } 12058 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = len 12059 __67: 12060 ; 12061 if !((len > uint32(15)) || (len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits)) { 12062 goto __68 12063 } 12064 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */ 12065 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12066 goto __9 12067 __68: 12068 ; 12069 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = (uint32(1) << len) 12070 12071 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 12072 (*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 { 12073 if (hold & uint64(0x200)) != 0 { 12074 return DICTID 12075 } 12076 return TYPE 12077 }() 12078 __69: 12079 hold = uint64(0) 12080 bits = uint32(0) 12081 goto __70 12082 __70: 12083 if 0 != 0 { 12084 goto __69 12085 } 12086 goto __71 12087 __71: 12088 ; 12089 goto __9 12090 __11: 12091 __72: 12092 __75: 12093 if !(bits < (uint32(16))) { 12094 goto __76 12095 } 12096 __77: 12097 if !(have == uint32(0)) { 12098 goto __80 12099 } 12100 goto inf_leave 12101 __80: 12102 ; 12103 have-- 12104 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12105 bits = bits + (uint32(8)) 12106 goto __78 12107 __78: 12108 if 0 != 0 { 12109 goto __77 12110 } 12111 goto __79 12112 __79: 12113 ; 12114 goto __75 12115 __76: 12116 ; 12117 goto __73 12118 __73: 12119 if 0 != 0 { 12120 goto __72 12121 } 12122 goto __74 12123 __74: 12124 ; 12125 (*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold) 12126 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xff) != Z_DEFLATED) { 12127 goto __81 12128 } 12129 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 12130 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12131 goto __9 12132 __81: 12133 ; 12134 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xe000) != 0) { 12135 goto __82 12136 } 12137 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */ 12138 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12139 goto __9 12140 __82: 12141 ; 12142 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12143 goto __83 12144 } 12145 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = (int32((hold >> 8) & uint64(1))) 12146 __83: 12147 ; 12148 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12149 goto __84 12150 } 12151 __85: 12152 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 12153 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 12154 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 12155 goto __86 12156 __86: 12157 if 0 != 0 { 12158 goto __85 12159 } 12160 goto __87 12161 __87: 12162 ; 12163 __84: 12164 ; 12165 __88: 12166 hold = uint64(0) 12167 bits = uint32(0) 12168 goto __89 12169 __89: 12170 if 0 != 0 { 12171 goto __88 12172 } 12173 goto __90 12174 __90: 12175 ; 12176 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME 12177 __12: 12178 __91: 12179 __94: 12180 if !(bits < (uint32(32))) { 12181 goto __95 12182 } 12183 __96: 12184 if !(have == uint32(0)) { 12185 goto __99 12186 } 12187 goto inf_leave 12188 __99: 12189 ; 12190 have-- 12191 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12192 bits = bits + (uint32(8)) 12193 goto __97 12194 __97: 12195 if 0 != 0 { 12196 goto __96 12197 } 12198 goto __98 12199 __98: 12200 ; 12201 goto __94 12202 __95: 12203 ; 12204 goto __92 12205 __92: 12206 if 0 != 0 { 12207 goto __91 12208 } 12209 goto __93 12210 __93: 12211 ; 12212 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12213 goto __100 12214 } 12215 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold 12216 __100: 12217 ; 12218 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12219 goto __101 12220 } 12221 __102: 12222 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 12223 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 12224 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 2)) = (uint8((hold) >> 16)) 12225 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 3)) = (uint8((hold) >> 24)) 12226 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(4)) 12227 goto __103 12228 __103: 12229 if 0 != 0 { 12230 goto __102 12231 } 12232 goto __104 12233 __104: 12234 ; 12235 __101: 12236 ; 12237 __105: 12238 hold = uint64(0) 12239 bits = uint32(0) 12240 goto __106 12241 __106: 12242 if 0 != 0 { 12243 goto __105 12244 } 12245 goto __107 12246 __107: 12247 ; 12248 (*Inflate_state)(unsafe.Pointer(state)).Fmode = OS 12249 __13: 12250 __108: 12251 __111: 12252 if !(bits < (uint32(16))) { 12253 goto __112 12254 } 12255 __113: 12256 if !(have == uint32(0)) { 12257 goto __116 12258 } 12259 goto inf_leave 12260 __116: 12261 ; 12262 have-- 12263 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12264 bits = bits + (uint32(8)) 12265 goto __114 12266 __114: 12267 if 0 != 0 { 12268 goto __113 12269 } 12270 goto __115 12271 __115: 12272 ; 12273 goto __111 12274 __112: 12275 ; 12276 goto __109 12277 __109: 12278 if 0 != 0 { 12279 goto __108 12280 } 12281 goto __110 12282 __110: 12283 ; 12284 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12285 goto __117 12286 } 12287 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = (int32(hold & uint64(0xff))) 12288 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = (int32(hold >> 8)) 12289 __117: 12290 ; 12291 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12292 goto __118 12293 } 12294 __119: 12295 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 12296 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 12297 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 12298 goto __120 12299 __120: 12300 if 0 != 0 { 12301 goto __119 12302 } 12303 goto __121 12304 __121: 12305 ; 12306 __118: 12307 ; 12308 __122: 12309 hold = uint64(0) 12310 bits = uint32(0) 12311 goto __123 12312 __123: 12313 if 0 != 0 { 12314 goto __122 12315 } 12316 goto __124 12317 __124: 12318 ; 12319 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN 12320 __14: 12321 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 12322 goto __125 12323 } 12324 __127: 12325 __130: 12326 if !(bits < (uint32(16))) { 12327 goto __131 12328 } 12329 __132: 12330 if !(have == uint32(0)) { 12331 goto __135 12332 } 12333 goto inf_leave 12334 __135: 12335 ; 12336 have-- 12337 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12338 bits = bits + (uint32(8)) 12339 goto __133 12340 __133: 12341 if 0 != 0 { 12342 goto __132 12343 } 12344 goto __134 12345 __134: 12346 ; 12347 goto __130 12348 __131: 12349 ; 12350 goto __128 12351 __128: 12352 if 0 != 0 { 12353 goto __127 12354 } 12355 goto __129 12356 __129: 12357 ; 12358 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) 12359 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12360 goto __136 12361 } 12362 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) 12363 __136: 12364 ; 12365 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12366 goto __137 12367 } 12368 __138: 12369 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold) 12370 *(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8)) 12371 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2)) 12372 goto __139 12373 __139: 12374 if 0 != 0 { 12375 goto __138 12376 } 12377 goto __140 12378 __140: 12379 ; 12380 __137: 12381 ; 12382 __141: 12383 hold = uint64(0) 12384 bits = uint32(0) 12385 goto __142 12386 __142: 12387 if 0 != 0 { 12388 goto __141 12389 } 12390 goto __143 12391 __143: 12392 ; 12393 goto __126 12394 __125: 12395 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12396 goto __144 12397 } 12398 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL) 12399 __144: 12400 ; 12401 __126: 12402 ; 12403 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA 12404 __15: 12405 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) { 12406 goto __145 12407 } 12408 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 12409 if !(copy > have) { 12410 goto __146 12411 } 12412 copy = have 12413 __146: 12414 ; 12415 if !(copy != 0) { 12416 goto __147 12417 } 12418 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) && ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL))) { 12419 goto __148 12420 } 12421 len = ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength) 12422 libc.Xmemcpy(tls, ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra + uintptr(len)), next, 12423 func() uint64 { 12424 if (len + copy) > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { 12425 return (uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len)) 12426 } 12427 return uint64(copy) 12428 }()) 12429 __148: 12430 ; 12431 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12432 goto __149 12433 } 12434 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 12435 __149: 12436 ; 12437 have = have - (copy) 12438 next += uintptr(copy) 12439 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 12440 __147: 12441 ; 12442 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) { 12443 goto __150 12444 } 12445 goto inf_leave 12446 __150: 12447 ; 12448 __145: 12449 ; 12450 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 12451 (*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME 12452 __16: 12453 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0800) != 0) { 12454 goto __151 12455 } 12456 if !(have == uint32(0)) { 12457 goto __153 12458 } 12459 goto inf_leave 12460 __153: 12461 ; 12462 copy = uint32(0) 12463 __154: 12464 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 12465 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)) { 12466 goto __157 12467 } 12468 *(*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) 12469 __157: 12470 ; 12471 goto __155 12472 __155: 12473 if (len != 0) && (copy < have) { 12474 goto __154 12475 } 12476 goto __156 12477 __156: 12478 ; 12479 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12480 goto __158 12481 } 12482 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 12483 __158: 12484 ; 12485 have = have - (copy) 12486 next += uintptr(copy) 12487 if !(len != 0) { 12488 goto __159 12489 } 12490 goto inf_leave 12491 __159: 12492 ; 12493 goto __152 12494 __151: 12495 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12496 goto __160 12497 } 12498 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL) 12499 __160: 12500 ; 12501 __152: 12502 ; 12503 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 12504 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT 12505 __17: 12506 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x1000) != 0) { 12507 goto __161 12508 } 12509 if !(have == uint32(0)) { 12510 goto __163 12511 } 12512 goto inf_leave 12513 __163: 12514 ; 12515 copy = uint32(0) 12516 __164: 12517 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 12518 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)) { 12519 goto __167 12520 } 12521 *(*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) 12522 __167: 12523 ; 12524 goto __165 12525 __165: 12526 if (len != 0) && (copy < have) { 12527 goto __164 12528 } 12529 goto __166 12530 __166: 12531 ; 12532 if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) { 12533 goto __168 12534 } 12535 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 12536 __168: 12537 ; 12538 have = have - (copy) 12539 next += uintptr(copy) 12540 if !(len != 0) { 12541 goto __169 12542 } 12543 goto inf_leave 12544 __169: 12545 ; 12546 goto __162 12547 __161: 12548 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12549 goto __170 12550 } 12551 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL) 12552 __170: 12553 ; 12554 __162: 12555 ; 12556 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC 12557 __18: 12558 if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) { 12559 goto __171 12560 } 12561 __172: 12562 __175: 12563 if !(bits < (uint32(16))) { 12564 goto __176 12565 } 12566 __177: 12567 if !(have == uint32(0)) { 12568 goto __180 12569 } 12570 goto inf_leave 12571 __180: 12572 ; 12573 have-- 12574 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12575 bits = bits + (uint32(8)) 12576 goto __178 12577 __178: 12578 if 0 != 0 { 12579 goto __177 12580 } 12581 goto __179 12582 __179: 12583 ; 12584 goto __175 12585 __176: 12586 ; 12587 goto __173 12588 __173: 12589 if 0 != 0 { 12590 goto __172 12591 } 12592 goto __174 12593 __174: 12594 ; 12595 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (hold != ((*Inflate_state)(unsafe.Pointer(state)).Fcheck & uint64(0xffff)))) { 12596 goto __181 12597 } 12598 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */ 12599 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12600 goto __9 12601 __181: 12602 ; 12603 __182: 12604 hold = uint64(0) 12605 bits = uint32(0) 12606 goto __183 12607 __183: 12608 if 0 != 0 { 12609 goto __182 12610 } 12611 goto __184 12612 __184: 12613 ; 12614 __171: 12615 ; 12616 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 12617 goto __185 12618 } 12619 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (((*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9) & 1) 12620 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1 12621 __185: 12622 ; 12623 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 12624 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12625 goto __9 12626 __19: 12627 __186: 12628 __189: 12629 if !(bits < (uint32(32))) { 12630 goto __190 12631 } 12632 __191: 12633 if !(have == uint32(0)) { 12634 goto __194 12635 } 12636 goto inf_leave 12637 __194: 12638 ; 12639 have-- 12640 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12641 bits = bits + (uint32(8)) 12642 goto __192 12643 __192: 12644 if 0 != 0 { 12645 goto __191 12646 } 12647 goto __193 12648 __193: 12649 ; 12650 goto __189 12651 __190: 12652 ; 12653 goto __187 12654 __187: 12655 if 0 != 0 { 12656 goto __186 12657 } 12658 goto __188 12659 __188: 12660 ; 12661 (*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))) 12662 __195: 12663 hold = uint64(0) 12664 bits = uint32(0) 12665 goto __196 12666 __196: 12667 if 0 != 0 { 12668 goto __195 12669 } 12670 goto __197 12671 __197: 12672 ; 12673 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT 12674 __20: 12675 if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) { 12676 goto __198 12677 } 12678 __199: 12679 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 12680 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 12681 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 12682 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 12683 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 12684 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 12685 goto __200 12686 __200: 12687 if 0 != 0 { 12688 goto __199 12689 } 12690 goto __201 12691 __201: 12692 ; 12693 return Z_NEED_DICT 12694 __198: 12695 ; 12696 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 12697 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12698 __21: 12699 if !((flush == Z_BLOCK) || (flush == Z_TREES)) { 12700 goto __202 12701 } 12702 goto inf_leave 12703 __202: 12704 ; 12705 __22: 12706 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 12707 goto __203 12708 } 12709 __204: 12710 hold >>= (bits & uint32(7)) 12711 bits = bits - (bits & uint32(7)) 12712 goto __205 12713 __205: 12714 if 0 != 0 { 12715 goto __204 12716 } 12717 goto __206 12718 __206: 12719 ; 12720 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK 12721 goto __9 12722 __203: 12723 ; 12724 __207: 12725 __210: 12726 if !(bits < (uint32(3))) { 12727 goto __211 12728 } 12729 __212: 12730 if !(have == uint32(0)) { 12731 goto __215 12732 } 12733 goto inf_leave 12734 __215: 12735 ; 12736 have-- 12737 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12738 bits = bits + (uint32(8)) 12739 goto __213 12740 __213: 12741 if 0 != 0 { 12742 goto __212 12743 } 12744 goto __214 12745 __214: 12746 ; 12747 goto __210 12748 __211: 12749 ; 12750 goto __208 12751 __208: 12752 if 0 != 0 { 12753 goto __207 12754 } 12755 goto __209 12756 __209: 12757 ; 12758 (*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1)))) 12759 __216: 12760 hold >>= 1 12761 bits = bits - (uint32(1)) 12762 goto __217 12763 __217: 12764 if 0 != 0 { 12765 goto __216 12766 } 12767 goto __218 12768 __218: 12769 ; 12770 switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) { 12771 case uint32(0): 12772 goto __220 12773 case uint32(1): 12774 goto __221 12775 case uint32(2): 12776 goto __222 12777 case uint32(3): 12778 goto __223 12779 } 12780 goto __219 12781 __220: // stored block 12782 ; 12783 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 12784 goto __219 12785 __221: // fixed block 12786 fixedtables1(tls, state) 12787 12788 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes 12789 if !(flush == Z_TREES) { 12790 goto __224 12791 } 12792 __225: 12793 hold >>= 2 12794 bits = bits - (uint32(2)) 12795 goto __226 12796 __226: 12797 if 0 != 0 { 12798 goto __225 12799 } 12800 goto __227 12801 __227: 12802 ; 12803 goto inf_leave 12804 __224: 12805 ; 12806 goto __219 12807 __222: // dynamic block 12808 ; 12809 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 12810 goto __219 12811 __223: 12812 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 12813 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12814 __219: 12815 ; 12816 __228: 12817 hold >>= 2 12818 bits = bits - (uint32(2)) 12819 goto __229 12820 __229: 12821 if 0 != 0 { 12822 goto __228 12823 } 12824 goto __230 12825 __230: 12826 ; 12827 goto __9 12828 __23: 12829 __231: 12830 hold >>= (bits & uint32(7)) 12831 bits = bits - (bits & uint32(7)) 12832 goto __232 12833 __232: 12834 if 0 != 0 { 12835 goto __231 12836 } 12837 goto __233 12838 __233: 12839 ; // go to byte boundary 12840 __234: 12841 __237: 12842 if !(bits < (uint32(32))) { 12843 goto __238 12844 } 12845 __239: 12846 if !(have == uint32(0)) { 12847 goto __242 12848 } 12849 goto inf_leave 12850 __242: 12851 ; 12852 have-- 12853 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12854 bits = bits + (uint32(8)) 12855 goto __240 12856 __240: 12857 if 0 != 0 { 12858 goto __239 12859 } 12860 goto __241 12861 __241: 12862 ; 12863 goto __237 12864 __238: 12865 ; 12866 goto __235 12867 __235: 12868 if 0 != 0 { 12869 goto __234 12870 } 12871 goto __236 12872 __236: 12873 ; 12874 if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) { 12875 goto __243 12876 } 12877 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 12878 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12879 goto __9 12880 __243: 12881 ; 12882 (*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff)) 12883 12884 __244: 12885 hold = uint64(0) 12886 bits = uint32(0) 12887 goto __245 12888 __245: 12889 if 0 != 0 { 12890 goto __244 12891 } 12892 goto __246 12893 __246: 12894 ; 12895 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_ 12896 if !(flush == Z_TREES) { 12897 goto __247 12898 } 12899 goto inf_leave 12900 __247: 12901 ; 12902 __24: 12903 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY 12904 __25: 12905 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 12906 if !(copy != 0) { 12907 goto __248 12908 } 12909 if !(copy > have) { 12910 goto __249 12911 } 12912 copy = have 12913 __249: 12914 ; 12915 if !(copy > left) { 12916 goto __250 12917 } 12918 copy = left 12919 __250: 12920 ; 12921 if !(copy == uint32(0)) { 12922 goto __251 12923 } 12924 goto inf_leave 12925 __251: 12926 ; 12927 libc.Xmemcpy(tls, put, next, uint64(copy)) 12928 have = have - (copy) 12929 next += uintptr(copy) 12930 left = left - (copy) 12931 put += uintptr(copy) 12932 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 12933 goto __9 12934 __248: 12935 ; 12936 12937 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12938 goto __9 12939 __26: 12940 __252: 12941 __255: 12942 if !(bits < (uint32(14))) { 12943 goto __256 12944 } 12945 __257: 12946 if !(have == uint32(0)) { 12947 goto __260 12948 } 12949 goto inf_leave 12950 __260: 12951 ; 12952 have-- 12953 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 12954 bits = bits + (uint32(8)) 12955 goto __258 12956 __258: 12957 if 0 != 0 { 12958 goto __257 12959 } 12960 goto __259 12961 __259: 12962 ; 12963 goto __255 12964 __256: 12965 ; 12966 goto __253 12967 __253: 12968 if 0 != 0 { 12969 goto __252 12970 } 12971 goto __254 12972 __254: 12973 ; 12974 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257)) 12975 __261: 12976 hold >>= 5 12977 bits = bits - (uint32(5)) 12978 goto __262 12979 __262: 12980 if 0 != 0 { 12981 goto __261 12982 } 12983 goto __263 12984 __263: 12985 ; 12986 (*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1)) 12987 __264: 12988 hold >>= 5 12989 bits = bits - (uint32(5)) 12990 goto __265 12991 __265: 12992 if 0 != 0 { 12993 goto __264 12994 } 12995 goto __266 12996 __266: 12997 ; 12998 (*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4)) 12999 __267: 13000 hold >>= 4 13001 bits = bits - (uint32(4)) 13002 goto __268 13003 __268: 13004 if 0 != 0 { 13005 goto __267 13006 } 13007 goto __269 13008 __269: 13009 ; 13010 if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) { 13011 goto __270 13012 } 13013 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 13014 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13015 goto __9 13016 __270: 13017 ; 13018 13019 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 13020 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS 13021 __27: 13022 __271: 13023 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 13024 goto __272 13025 } 13026 __273: 13027 __276: 13028 if !(bits < (uint32(3))) { 13029 goto __277 13030 } 13031 __278: 13032 if !(have == uint32(0)) { 13033 goto __281 13034 } 13035 goto inf_leave 13036 __281: 13037 ; 13038 have-- 13039 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13040 bits = bits + (uint32(8)) 13041 goto __279 13042 __279: 13043 if 0 != 0 { 13044 goto __278 13045 } 13046 goto __280 13047 __280: 13048 ; 13049 goto __276 13050 __277: 13051 ; 13052 goto __274 13053 __274: 13054 if 0 != 0 { 13055 goto __273 13056 } 13057 goto __275 13058 __275: 13059 ; 13060 *(*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)))) 13061 __282: 13062 hold >>= 3 13063 bits = bits - (uint32(3)) 13064 goto __283 13065 __283: 13066 if 0 != 0 { 13067 goto __282 13068 } 13069 goto __284 13070 __284: 13071 ; 13072 goto __271 13073 __272: 13074 ; 13075 __285: 13076 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 13077 goto __286 13078 } 13079 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 13080 goto __285 13081 __286: 13082 ; 13083 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 13084 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 13085 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 13086 ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */), 13087 (state + 120 /* &.lenbits */), state+792 /* &.work */) 13088 if !(ret != 0) { 13089 goto __287 13090 } 13091 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 13092 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13093 goto __9 13094 __287: 13095 ; 13096 13097 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 13098 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS 13099 __28: 13100 __288: 13101 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 13102 goto __289 13103 } 13104 __290: 13105 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 13106 if !((uint32(here.Fbits)) <= bits) { 13107 goto __293 13108 } 13109 goto __292 13110 __293: 13111 ; 13112 __294: 13113 if !(have == uint32(0)) { 13114 goto __297 13115 } 13116 goto inf_leave 13117 __297: 13118 ; 13119 have-- 13120 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13121 bits = bits + (uint32(8)) 13122 goto __295 13123 __295: 13124 if 0 != 0 { 13125 goto __294 13126 } 13127 goto __296 13128 __296: 13129 ; 13130 goto __291 13131 __291: 13132 goto __290 13133 goto __292 13134 __292: 13135 ; 13136 if !(int32(here.Fval) < 16) { 13137 goto __298 13138 } 13139 __300: 13140 hold >>= int32(here.Fbits) 13141 bits = bits - (uint32(here.Fbits)) 13142 goto __301 13143 __301: 13144 if 0 != 0 { 13145 goto __300 13146 } 13147 goto __302 13148 __302: 13149 ; 13150 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 13151 goto __299 13152 __298: 13153 if !(int32(here.Fval) == 16) { 13154 goto __303 13155 } 13156 __305: 13157 __308: 13158 if !(bits < (uint32(int32(here.Fbits) + 2))) { 13159 goto __309 13160 } 13161 __310: 13162 if !(have == uint32(0)) { 13163 goto __313 13164 } 13165 goto inf_leave 13166 __313: 13167 ; 13168 have-- 13169 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13170 bits = bits + (uint32(8)) 13171 goto __311 13172 __311: 13173 if 0 != 0 { 13174 goto __310 13175 } 13176 goto __312 13177 __312: 13178 ; 13179 goto __308 13180 __309: 13181 ; 13182 goto __306 13183 __306: 13184 if 0 != 0 { 13185 goto __305 13186 } 13187 goto __307 13188 __307: 13189 ; 13190 __314: 13191 hold >>= int32(here.Fbits) 13192 bits = bits - (uint32(here.Fbits)) 13193 goto __315 13194 __315: 13195 if 0 != 0 { 13196 goto __314 13197 } 13198 goto __316 13199 __316: 13200 ; 13201 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 13202 goto __317 13203 } 13204 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 13205 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13206 goto __289 13207 __317: 13208 ; 13209 len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2))) 13210 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1)))) 13211 __318: 13212 hold >>= 2 13213 bits = bits - (uint32(2)) 13214 goto __319 13215 __319: 13216 if 0 != 0 { 13217 goto __318 13218 } 13219 goto __320 13220 __320: 13221 ; 13222 goto __304 13223 __303: 13224 if !(int32(here.Fval) == 17) { 13225 goto __321 13226 } 13227 __323: 13228 __326: 13229 if !(bits < (uint32(int32(here.Fbits) + 3))) { 13230 goto __327 13231 } 13232 __328: 13233 if !(have == uint32(0)) { 13234 goto __331 13235 } 13236 goto inf_leave 13237 __331: 13238 ; 13239 have-- 13240 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13241 bits = bits + (uint32(8)) 13242 goto __329 13243 __329: 13244 if 0 != 0 { 13245 goto __328 13246 } 13247 goto __330 13248 __330: 13249 ; 13250 goto __326 13251 __327: 13252 ; 13253 goto __324 13254 __324: 13255 if 0 != 0 { 13256 goto __323 13257 } 13258 goto __325 13259 __325: 13260 ; 13261 __332: 13262 hold >>= int32(here.Fbits) 13263 bits = bits - (uint32(here.Fbits)) 13264 goto __333 13265 __333: 13266 if 0 != 0 { 13267 goto __332 13268 } 13269 goto __334 13270 __334: 13271 ; 13272 len = uint32(0) 13273 copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1)))) 13274 __335: 13275 hold >>= 3 13276 bits = bits - (uint32(3)) 13277 goto __336 13278 __336: 13279 if 0 != 0 { 13280 goto __335 13281 } 13282 goto __337 13283 __337: 13284 ; 13285 goto __322 13286 __321: 13287 __338: 13288 __341: 13289 if !(bits < (uint32(int32(here.Fbits) + 7))) { 13290 goto __342 13291 } 13292 __343: 13293 if !(have == uint32(0)) { 13294 goto __346 13295 } 13296 goto inf_leave 13297 __346: 13298 ; 13299 have-- 13300 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13301 bits = bits + (uint32(8)) 13302 goto __344 13303 __344: 13304 if 0 != 0 { 13305 goto __343 13306 } 13307 goto __345 13308 __345: 13309 ; 13310 goto __341 13311 __342: 13312 ; 13313 goto __339 13314 __339: 13315 if 0 != 0 { 13316 goto __338 13317 } 13318 goto __340 13319 __340: 13320 ; 13321 __347: 13322 hold >>= int32(here.Fbits) 13323 bits = bits - (uint32(here.Fbits)) 13324 goto __348 13325 __348: 13326 if 0 != 0 { 13327 goto __347 13328 } 13329 goto __349 13330 __349: 13331 ; 13332 len = uint32(0) 13333 copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1)))) 13334 __350: 13335 hold >>= 7 13336 bits = bits - (uint32(7)) 13337 goto __351 13338 __351: 13339 if 0 != 0 { 13340 goto __350 13341 } 13342 goto __352 13343 __352: 13344 ; 13345 __322: 13346 ; 13347 __304: 13348 ; 13349 if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) { 13350 goto __353 13351 } 13352 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 13353 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13354 goto __289 13355 __353: 13356 ; 13357 __354: 13358 if !(libc.PostDecUint32(©, 1) != 0) { 13359 goto __355 13360 } 13361 *(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 13362 goto __354 13363 __355: 13364 ; 13365 __299: 13366 ; 13367 goto __288 13368 __289: 13369 ; 13370 13371 // handle error breaks in while 13372 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 13373 goto __356 13374 } 13375 goto __9 13376 __356: 13377 ; 13378 13379 // check for end-of-block code (better have one) 13380 if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) { 13381 goto __357 13382 } 13383 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 13384 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13385 goto __9 13386 __357: 13387 ; 13388 13389 // build code tables -- note: do not change the lenbits or distbits 13390 // values here (9 and 6) without reading the comments in inftrees.h 13391 // concerning the ENOUGH constants, which depend on those values 13392 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 13393 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 13394 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 13395 ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */), 13396 (state + 120 /* &.lenbits */), state+792 /* &.work */) 13397 if !(ret != 0) { 13398 goto __358 13399 } 13400 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 13401 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13402 goto __9 13403 __358: 13404 ; 13405 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 13406 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 13407 ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist, 13408 (state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */) 13409 if !(ret != 0) { 13410 goto __359 13411 } 13412 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 13413 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13414 goto __9 13415 __359: 13416 ; 13417 13418 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ 13419 if !(flush == Z_TREES) { 13420 goto __360 13421 } 13422 goto inf_leave 13423 __360: 13424 ; 13425 __29: 13426 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 13427 __30: 13428 if !((have >= uint32(6)) && (left >= uint32(258))) { 13429 goto __361 13430 } 13431 __362: 13432 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 13433 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 13434 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 13435 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 13436 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 13437 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 13438 goto __363 13439 __363: 13440 if 0 != 0 { 13441 goto __362 13442 } 13443 goto __364 13444 __364: 13445 ; 13446 Xinflate_fast(tls, strm, out) 13447 __365: 13448 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 13449 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 13450 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 13451 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 13452 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 13453 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 13454 goto __366 13455 __366: 13456 if 0 != 0 { 13457 goto __365 13458 } 13459 goto __367 13460 __367: 13461 ; 13462 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 13463 goto __368 13464 } 13465 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 13466 __368: 13467 ; 13468 goto __9 13469 __361: 13470 ; 13471 (*Inflate_state)(unsafe.Pointer(state)).Fback = 0 13472 __369: 13473 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4)) 13474 if !((uint32(here.Fbits)) <= bits) { 13475 goto __372 13476 } 13477 goto __371 13478 __372: 13479 ; 13480 __373: 13481 if !(have == uint32(0)) { 13482 goto __376 13483 } 13484 goto inf_leave 13485 __376: 13486 ; 13487 have-- 13488 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13489 bits = bits + (uint32(8)) 13490 goto __374 13491 __374: 13492 if 0 != 0 { 13493 goto __373 13494 } 13495 goto __375 13496 __375: 13497 ; 13498 goto __370 13499 __370: 13500 goto __369 13501 goto __371 13502 __371: 13503 ; 13504 if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) { 13505 goto __377 13506 } 13507 last = here 13508 __378: 13509 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)) 13510 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 13511 goto __381 13512 } 13513 goto __380 13514 __381: 13515 ; 13516 __382: 13517 if !(have == uint32(0)) { 13518 goto __385 13519 } 13520 goto inf_leave 13521 __385: 13522 ; 13523 have-- 13524 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13525 bits = bits + (uint32(8)) 13526 goto __383 13527 __383: 13528 if 0 != 0 { 13529 goto __382 13530 } 13531 goto __384 13532 __384: 13533 ; 13534 goto __379 13535 __379: 13536 goto __378 13537 goto __380 13538 __380: 13539 ; 13540 __386: 13541 hold >>= int32(last.Fbits) 13542 bits = bits - (uint32(last.Fbits)) 13543 goto __387 13544 __387: 13545 if 0 != 0 { 13546 goto __386 13547 } 13548 goto __388 13549 __388: 13550 ; 13551 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits)) 13552 __377: 13553 ; 13554 __389: 13555 hold >>= int32(here.Fbits) 13556 bits = bits - (uint32(here.Fbits)) 13557 goto __390 13558 __390: 13559 if 0 != 0 { 13560 goto __389 13561 } 13562 goto __391 13563 __391: 13564 ; 13565 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits)) 13566 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 13567 if !((int32(here.Fop)) == 0) { 13568 goto __392 13569 } 13570 13571 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT 13572 goto __9 13573 __392: 13574 ; 13575 if !((int32(here.Fop) & 32) != 0) { 13576 goto __393 13577 } 13578 13579 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 13580 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 13581 goto __9 13582 __393: 13583 ; 13584 if !((int32(here.Fop) & 64) != 0) { 13585 goto __394 13586 } 13587 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 13588 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13589 goto __9 13590 __394: 13591 ; 13592 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 13593 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT 13594 __31: 13595 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 13596 goto __395 13597 } 13598 __396: 13599 __399: 13600 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 13601 goto __400 13602 } 13603 __401: 13604 if !(have == uint32(0)) { 13605 goto __404 13606 } 13607 goto inf_leave 13608 __404: 13609 ; 13610 have-- 13611 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13612 bits = bits + (uint32(8)) 13613 goto __402 13614 __402: 13615 if 0 != 0 { 13616 goto __401 13617 } 13618 goto __403 13619 __403: 13620 ; 13621 goto __399 13622 __400: 13623 ; 13624 goto __397 13625 __397: 13626 if 0 != 0 { 13627 goto __396 13628 } 13629 goto __398 13630 __398: 13631 ; 13632 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 13633 __405: 13634 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 13635 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 13636 goto __406 13637 __406: 13638 if 0 != 0 { 13639 goto __405 13640 } 13641 goto __407 13642 __407: 13643 ; 13644 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 13645 __395: 13646 ; 13647 13648 (*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength 13649 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST 13650 __32: 13651 __408: 13652 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4)) 13653 if !((uint32(here.Fbits)) <= bits) { 13654 goto __411 13655 } 13656 goto __410 13657 __411: 13658 ; 13659 __412: 13660 if !(have == uint32(0)) { 13661 goto __415 13662 } 13663 goto inf_leave 13664 __415: 13665 ; 13666 have-- 13667 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13668 bits = bits + (uint32(8)) 13669 goto __413 13670 __413: 13671 if 0 != 0 { 13672 goto __412 13673 } 13674 goto __414 13675 __414: 13676 ; 13677 goto __409 13678 __409: 13679 goto __408 13680 goto __410 13681 __410: 13682 ; 13683 if !((int32(here.Fop) & 0xf0) == 0) { 13684 goto __416 13685 } 13686 last = here 13687 __417: 13688 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)) 13689 if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) { 13690 goto __420 13691 } 13692 goto __419 13693 __420: 13694 ; 13695 __421: 13696 if !(have == uint32(0)) { 13697 goto __424 13698 } 13699 goto inf_leave 13700 __424: 13701 ; 13702 have-- 13703 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13704 bits = bits + (uint32(8)) 13705 goto __422 13706 __422: 13707 if 0 != 0 { 13708 goto __421 13709 } 13710 goto __423 13711 __423: 13712 ; 13713 goto __418 13714 __418: 13715 goto __417 13716 goto __419 13717 __419: 13718 ; 13719 __425: 13720 hold >>= int32(last.Fbits) 13721 bits = bits - (uint32(last.Fbits)) 13722 goto __426 13723 __426: 13724 if 0 != 0 { 13725 goto __425 13726 } 13727 goto __427 13728 __427: 13729 ; 13730 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits)) 13731 __416: 13732 ; 13733 __428: 13734 hold >>= int32(here.Fbits) 13735 bits = bits - (uint32(here.Fbits)) 13736 goto __429 13737 __429: 13738 if 0 != 0 { 13739 goto __428 13740 } 13741 goto __430 13742 __430: 13743 ; 13744 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits)) 13745 if !((int32(here.Fop) & 64) != 0) { 13746 goto __431 13747 } 13748 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 13749 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13750 goto __9 13751 __431: 13752 ; 13753 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 13754 (*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15)) 13755 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT 13756 __33: 13757 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 13758 goto __432 13759 } 13760 __433: 13761 __436: 13762 if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) { 13763 goto __437 13764 } 13765 __438: 13766 if !(have == uint32(0)) { 13767 goto __441 13768 } 13769 goto inf_leave 13770 __441: 13771 ; 13772 have-- 13773 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13774 bits = bits + (uint32(8)) 13775 goto __439 13776 __439: 13777 if 0 != 0 { 13778 goto __438 13779 } 13780 goto __440 13781 __440: 13782 ; 13783 goto __436 13784 __437: 13785 ; 13786 goto __434 13787 __434: 13788 if 0 != 0 { 13789 goto __433 13790 } 13791 goto __435 13792 __435: 13793 ; 13794 *(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1))) 13795 __442: 13796 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 13797 bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra) 13798 goto __443 13799 __443: 13800 if 0 != 0 { 13801 goto __442 13802 } 13803 goto __444 13804 __444: 13805 ; 13806 *(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra)) 13807 __432: 13808 ; 13809 13810 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH 13811 __34: 13812 if !(left == uint32(0)) { 13813 goto __445 13814 } 13815 goto inf_leave 13816 __445: 13817 ; 13818 copy = (out - left) 13819 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) { 13820 goto __446 13821 } // copy from window 13822 copy = ((*Inflate_state)(unsafe.Pointer(state)).Foffset - copy) 13823 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) { 13824 goto __448 13825 } 13826 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 13827 goto __449 13828 } 13829 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 13830 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13831 goto __9 13832 __449: 13833 ; 13834 __448: 13835 ; 13836 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) { 13837 goto __450 13838 } 13839 copy = copy - ((*Inflate_state)(unsafe.Pointer(state)).Fwnext) 13840 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwsize - copy))) 13841 goto __451 13842 __450: 13843 from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwnext - copy))) 13844 __451: 13845 ; 13846 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 13847 goto __452 13848 } 13849 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13850 __452: 13851 ; 13852 goto __447 13853 __446: // copy from output 13854 from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)) 13855 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13856 __447: 13857 ; 13858 if !(copy > left) { 13859 goto __453 13860 } 13861 copy = left 13862 __453: 13863 ; 13864 left = left - (copy) 13865 *(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy) 13866 __454: 13867 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 13868 goto __455 13869 __455: 13870 if libc.PreDecUint32(©, 1) != 0 { 13871 goto __454 13872 } 13873 goto __456 13874 __456: 13875 ; 13876 if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) { 13877 goto __457 13878 } 13879 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 13880 __457: 13881 ; 13882 goto __9 13883 __35: 13884 if !(left == uint32(0)) { 13885 goto __458 13886 } 13887 goto inf_leave 13888 __458: 13889 ; 13890 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 13891 left-- 13892 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 13893 goto __9 13894 __36: 13895 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) { 13896 goto __459 13897 } 13898 __460: 13899 __463: 13900 if !(bits < (uint32(32))) { 13901 goto __464 13902 } 13903 __465: 13904 if !(have == uint32(0)) { 13905 goto __468 13906 } 13907 goto inf_leave 13908 __468: 13909 ; 13910 have-- 13911 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13912 bits = bits + (uint32(8)) 13913 goto __466 13914 __466: 13915 if 0 != 0 { 13916 goto __465 13917 } 13918 goto __467 13919 __467: 13920 ; 13921 goto __463 13922 __464: 13923 ; 13924 goto __461 13925 __461: 13926 if 0 != 0 { 13927 goto __460 13928 } 13929 goto __462 13930 __462: 13931 ; 13932 out = out - (left) 13933 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out)) 13934 *(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out)) 13935 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 13936 goto __469 13937 } 13938 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 { 13939 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 13940 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 13941 } 13942 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out) 13943 }()) 13944 __469: 13945 ; 13946 out = left 13947 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && ((func() uint64 { 13948 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 13949 return hold 13950 } 13951 return ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24)) 13952 }()) != (*Inflate_state)(unsafe.Pointer(state)).Fcheck)) { 13953 goto __470 13954 } 13955 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */ 13956 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13957 goto __9 13958 __470: 13959 ; 13960 __471: 13961 hold = uint64(0) 13962 bits = uint32(0) 13963 goto __472 13964 __472: 13965 if 0 != 0 { 13966 goto __471 13967 } 13968 goto __473 13969 __473: 13970 ; 13971 13972 __459: 13973 ; 13974 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH 13975 __37: 13976 if !(((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fflags != 0)) { 13977 goto __474 13978 } 13979 __475: 13980 __478: 13981 if !(bits < (uint32(32))) { 13982 goto __479 13983 } 13984 __480: 13985 if !(have == uint32(0)) { 13986 goto __483 13987 } 13988 goto inf_leave 13989 __483: 13990 ; 13991 have-- 13992 hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits) 13993 bits = bits + (uint32(8)) 13994 goto __481 13995 __481: 13996 if 0 != 0 { 13997 goto __480 13998 } 13999 goto __482 14000 __482: 14001 ; 14002 goto __478 14003 __479: 14004 ; 14005 goto __476 14006 __476: 14007 if 0 != 0 { 14008 goto __475 14009 } 14010 goto __477 14011 __477: 14012 ; 14013 if !(hold != ((*Inflate_state)(unsafe.Pointer(state)).Ftotal & 0xffffffff)) { 14014 goto __484 14015 } 14016 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */ 14017 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 14018 goto __9 14019 __484: 14020 ; 14021 __485: 14022 hold = uint64(0) 14023 bits = uint32(0) 14024 goto __486 14025 __486: 14026 if 0 != 0 { 14027 goto __485 14028 } 14029 goto __487 14030 __487: 14031 ; 14032 14033 __474: 14034 ; 14035 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 14036 __38: 14037 ret = Z_STREAM_END 14038 goto inf_leave 14039 __39: 14040 ret = -3 14041 goto inf_leave 14042 __40: 14043 return -4 14044 __41: 14045 __42: 14046 return -2 14047 __9: 14048 ; 14049 goto __7 14050 __7: 14051 goto __6 14052 goto __8 14053 __8: 14054 ; 14055 14056 // 14057 // Return from inflate(), updating the total counts and the check value. 14058 // If there was no progress during the inflate() call, return a buffer 14059 // error. Call updatewindow() to create and/or update the window state. 14060 // Note: a memory error from inflate() is non-recoverable. 14061 // 14062 inf_leave: 14063 __488: 14064 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 14065 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 14066 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 14067 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 14068 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 14069 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 14070 goto __489 14071 __489: 14072 if 0 != 0 { 14073 goto __488 14074 } 14075 goto __490 14076 __490: 14077 ; 14078 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)))) { 14079 goto __491 14080 } 14081 if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)) != 0) { 14082 goto __492 14083 } 14084 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 14085 return -4 14086 __492: 14087 ; 14088 __491: 14089 ; 14090 in = in - ((*Z_stream)(unsafe.Pointer(strm)).Favail_in) 14091 out = out - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out) 14092 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(in)) 14093 *(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out)) 14094 *(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out)) 14095 if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) { 14096 goto __493 14097 } 14098 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 { 14099 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 14100 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 14101 } 14102 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out) 14103 }()) 14104 __493: 14105 ; 14106 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = (((int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + (func() int32 { 14107 if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 { 14108 return 64 14109 } 14110 return 0 14111 }())) + (func() int32 { 14112 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE { 14113 return 128 14114 } 14115 return 0 14116 }())) + (func() int32 { 14117 if ((*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_) || ((*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_) { 14118 return 256 14119 } 14120 return 0 14121 }())) 14122 if !((((in == uint32(0)) && (out == uint32(0))) || (flush == Z_FINISH)) && (ret == Z_OK)) { 14123 goto __494 14124 } 14125 ret = -5 14126 __494: 14127 ; 14128 return ret 14129 } 14130 14131 var order1 = // permutation of code lengths 14132 [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 */ 14133 14134 func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */ 14135 var state uintptr 14136 if inflateStateCheck(tls, strm) != 0 { 14137 return -2 14138 } 14139 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14140 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 14141 (*struct { 14142 f func(*libc.TLS, Voidpf, Voidpf) 14143 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 14144 } 14145 (*struct { 14146 f func(*libc.TLS, Voidpf, Voidpf) 14147 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((strm))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 14148 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 14149 14150 return Z_OK 14151 } 14152 14153 func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */ 14154 var state uintptr 14155 14156 // check state 14157 if inflateStateCheck(tls, strm) != 0 { 14158 return -2 14159 } 14160 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14161 14162 // copy dictionary 14163 if ((*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0) && (dictionary != uintptr(Z_NULL)) { 14164 libc.Xmemcpy(tls, dictionary, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 14165 (uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave - (*Inflate_state)(unsafe.Pointer(state)).Fwnext))) 14166 libc.Xmemcpy(tls, ((dictionary + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)) - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), 14167 (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 14168 } 14169 if dictLength != uintptr(Z_NULL) { 14170 *(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 14171 } 14172 return Z_OK 14173 } 14174 14175 func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */ 14176 var state uintptr 14177 var dictid uint64 14178 var ret int32 14179 14180 // check state 14181 if inflateStateCheck(tls, strm) != 0 { 14182 return -2 14183 } 14184 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14185 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT) { 14186 return -2 14187 } 14188 14189 // check for correct dictionary identifier 14190 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT { 14191 dictid = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 14192 dictid = Xadler32(tls, dictid, dictionary, dictLength) 14193 if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck { 14194 return -3 14195 } 14196 } 14197 14198 // copy dictionary to window using updatewindow(), which will amend the 14199 // existing dictionary if appropriate 14200 ret = updatewindow(tls, strm, (dictionary + uintptr(dictLength)), dictLength) 14201 if ret != 0 { 14202 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 14203 return -4 14204 } 14205 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1 14206 14207 return Z_OK 14208 } 14209 14210 func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */ 14211 var state uintptr 14212 14213 // check state 14214 if inflateStateCheck(tls, strm) != 0 { 14215 return -2 14216 } 14217 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14218 if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) == 0 { 14219 return -2 14220 } 14221 14222 // save header structure 14223 (*Inflate_state)(unsafe.Pointer(state)).Fhead = head 14224 (*Gz_header)(unsafe.Pointer(head)).Fdone = 0 14225 return Z_OK 14226 } 14227 14228 // 14229 // Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found 14230 // or when out of input. When called, *have is the number of pattern bytes 14231 // found in order so far, in 0..3. On return *have is updated to the new 14232 // state. If on return *have equals four, then the pattern was found and the 14233 // return value is how many bytes were read including the last byte of the 14234 // pattern. If *have is less than four, then the pattern has not been found 14235 // yet and the return value is len. In the latter case, syncsearch() can be 14236 // called again with more data and the *have state. *have is initialized to 14237 // zero for the first call. 14238 // 14239 func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */ 14240 var got uint32 14241 var next uint32 14242 14243 got = *(*uint32)(unsafe.Pointer(have)) 14244 next = uint32(0) 14245 for (next < len) && (got < uint32(4)) { 14246 if (int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next))))) == (func() int32 { 14247 if got < uint32(2) { 14248 return 0 14249 } 14250 return 0xff 14251 }()) { 14252 got++ 14253 } else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 { 14254 got = uint32(0) 14255 } else { 14256 got = (uint32(4) - got) 14257 } 14258 next++ 14259 } 14260 *(*uint32)(unsafe.Pointer(have)) = got 14261 return next 14262 } 14263 14264 func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */ 14265 bp := tls.Alloc(4) 14266 defer tls.Free(4) 14267 14268 var len uint32 // number of bytes to look at or looked at 14269 var in uint64 14270 var out uint64 // temporary to save total_in and total_out 14271 // var buf [4]uint8 at bp, 4 14272 // to restore bit buffer to byte string 14273 var state uintptr 14274 14275 // check parameters 14276 if inflateStateCheck(tls, strm) != 0 { 14277 return -2 14278 } 14279 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14280 if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8)) { 14281 return -5 14282 } 14283 14284 // if first time, start search in bit buffer 14285 if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC { 14286 (*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC 14287 libc.AssignShlPtrUint64(state+80 /* &.hold */, int(((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)))) 14288 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= ((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)) 14289 len = uint32(0) 14290 for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { 14291 *(*uint8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold) 14292 libc.AssignShrPtrUint64(state+80 /* &.hold */, int(8)) 14293 *(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= (uint32(8)) 14294 } 14295 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 14296 syncsearch(tls, (state + 140 /* &.have */), bp /* &buf[0] */, len) 14297 } 14298 14299 // search available input 14300 len = syncsearch(tls, (state + 140 /* &.have */), (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 14301 *(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len) 14302 *(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len)) 14303 *(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len)) 14304 14305 // return no joy or set up to restart inflate() on a new block 14306 if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { 14307 return -3 14308 } 14309 in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in 14310 out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out 14311 XinflateReset(tls, strm) 14312 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in 14313 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out 14314 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 14315 return Z_OK 14316 } 14317 14318 // 14319 // Returns true if inflate is currently at the end of a block generated by 14320 // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP 14321 // implementation to provide an additional safety check. PPP uses 14322 // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored 14323 // block. When decompressing, PPP checks that at the end of input packet, 14324 // inflate is waiting for these length bytes. 14325 // 14326 func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */ 14327 var state uintptr 14328 14329 if inflateStateCheck(tls, strm) != 0 { 14330 return -2 14331 } 14332 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14333 return (libc.Bool32(((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)))) 14334 } 14335 14336 func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */ 14337 var state uintptr 14338 var copy uintptr 14339 var window uintptr 14340 var wsize uint32 14341 14342 // check input 14343 if (inflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) { 14344 return -2 14345 } 14346 state = (*Z_stream)(unsafe.Pointer(source)).Fstate 14347 14348 // allocate space 14349 copy = (*struct { 14350 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 14351 })(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{}))) 14352 if copy == uintptr(Z_NULL) { 14353 return -4 14354 } 14355 window = uintptr(Z_NULL) 14356 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 14357 window = (*struct { 14358 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 14359 })(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)))) 14360 if window == uintptr(Z_NULL) { 14361 (*struct { 14362 f func(*libc.TLS, Voidpf, Voidpf) 14363 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer((source))).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy) 14364 return -4 14365 } 14366 } 14367 14368 // copy state 14369 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 14370 libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{}))) 14371 (*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest 14372 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)) { 14373 (*Inflate_state)(unsafe.Pointer(copy)).Flencode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1368 /* &.codes */))/4)))*4) 14374 (*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1368 /* &.codes */))/4)))*4) 14375 } 14376 (*Inflate_state)(unsafe.Pointer(copy)).Fnext = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1368 /* &.codes */))/4)))*4) 14377 if window != uintptr(Z_NULL) { 14378 wsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits) 14379 libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize)) 14380 } 14381 (*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window 14382 (*Z_stream)(unsafe.Pointer(dest)).Fstate = copy 14383 return Z_OK 14384 } 14385 14386 func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */ 14387 var state uintptr 14388 14389 if inflateStateCheck(tls, strm) != 0 { 14390 return -2 14391 } 14392 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14393 _ = subvert 14394 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 14395 return -3 14396 } 14397 14398 func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */ 14399 var state uintptr 14400 14401 if inflateStateCheck(tls, strm) != 0 { 14402 return -2 14403 } 14404 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14405 if check != 0 { 14406 *(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) |= (4) 14407 } else { 14408 *(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) &= (libc.CplInt32(4)) 14409 } 14410 return Z_OK 14411 } 14412 14413 func XinflateMark(tls *libc.TLS, strm Z_streamp) int64 { /* inflate.c:1541:14: */ 14414 var state uintptr 14415 14416 if inflateStateCheck(tls, strm) != 0 { 14417 return -(int64(1) << 16) 14418 } 14419 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14420 return ((int64((uint64(int64((*Inflate_state)(unsafe.Pointer(state)).Fback))) << 16)) + (func() int64 { 14421 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY { 14422 return int64((*Inflate_state)(unsafe.Pointer(state)).Flength) 14423 } 14424 return func() int64 { 14425 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH { 14426 return (int64((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)) 14427 } 14428 return int64(0) 14429 }() 14430 }())) 14431 } 14432 14433 func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint64 { /* inflate.c:1554:23: */ 14434 var state uintptr 14435 if inflateStateCheck(tls, strm) != 0 { 14436 return libc.Uint64(libc.Uint64FromInt32(-1)) 14437 } 14438 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 14439 return (uint64(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1368 /* &.codes */)) / 4))) 14440 } 14441 14442 var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828 /* " inflate 1.2.11 ..." */)) /* inftrees.c:11:12 */ 14443 14444 // 14445 // If you use the zlib library in a product, an acknowledgment is welcome 14446 // in the documentation of your product. If for some reason you cannot 14447 // include such an acknowledgment, I would appreciate that you keep this 14448 // copyright string in the executable of your product. 14449 // 14450 14451 // 14452 // Build a set of tables to decode the provided canonical Huffman code. 14453 // The code lengths are lens[0..codes-1]. The result starts at *table, 14454 // whose indices are 0..2^bits-1. work is a writable array of at least 14455 // lens shorts, which is used as a work area. type is the type of code 14456 // to be generated, CODES, LENS, or DISTS. On return, zero is success, 14457 // -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 14458 // on return points to the next available entry's address. bits is the 14459 // requested root table index bits, and on return it is the actual root 14460 // table index bits. It will differ if the request is greater than the 14461 // longest code or if it is less than the shortest code. 14462 // 14463 func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */ 14464 bp := tls.Alloc(64) 14465 defer tls.Free(64) 14466 14467 var len uint32 // a code's length in bits 14468 var sym uint32 // index of code symbols 14469 var min uint32 14470 var max uint32 // minimum and maximum code lengths 14471 var root uint32 // number of index bits for root table 14472 var curr uint32 // number of index bits for current table 14473 var drop uint32 // code bits to drop for sub-table 14474 var left int32 // number of prefix codes available 14475 var used uint32 // code entries in table used 14476 var huff uint32 // Huffman code 14477 var incr uint32 // for incrementing code, index 14478 var fill uint32 // index for replicating entries 14479 var low uint32 // low bits for current root entry 14480 var mask uint32 // mask for low root bits 14481 var here Code // table entry for duplication 14482 var next uintptr // next available space in table 14483 var base uintptr // base value table to use 14484 var extra uintptr // extra bits table to use 14485 var match uint32 // use base and extra for symbol >= match 14486 // var count [16]uint16 at bp, 32 14487 // number of codes of each length 14488 // var offs [16]uint16 at bp+32, 32 14489 14490 // 14491 // Process a set of code lengths to create a canonical Huffman code. The 14492 // code lengths are lens[0..codes-1]. Each length corresponds to the 14493 // symbols 0..codes-1. The Huffman code is generated by first sorting the 14494 // symbols by length from short to long, and retaining the symbol order 14495 // for codes with equal lengths. Then the code starts with all zero bits 14496 // for the first code of the shortest length, and the codes are integer 14497 // increments for the same length, and zeros are appended as the length 14498 // increases. For the deflate format, these bits are stored backwards 14499 // from their more natural integer increment ordering, and so when the 14500 // decoding tables are built in the large loop below, the integer codes 14501 // are incremented backwards. 14502 // 14503 // This routine assumes, but does not check, that all of the entries in 14504 // lens[] are in the range 0..MAXBITS. The caller must assure this. 14505 // 1..MAXBITS is interpreted as that code length. zero means that that 14506 // symbol does not occur in this code. 14507 // 14508 // The codes are sorted by computing a count of codes for each length, 14509 // creating from that a table of starting indices for each length in the 14510 // sorted table, and then entering the symbols in order in the sorted 14511 // table. The sorted table is work[], with that space being provided by 14512 // the caller. 14513 // 14514 // The length counts are used for other purposes as well, i.e. finding 14515 // the minimum and maximum length codes, determining if there are any 14516 // codes at all, checking for a valid set of lengths, and looking ahead 14517 // at length counts to determine sub-table sizes when building the 14518 // decoding tables. 14519 // 14520 14521 // accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) 14522 for len = uint32(0); len <= uint32(MAXBITS); len++ { 14523 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)) = uint16(0) 14524 } 14525 for sym = uint32(0); sym < codes; sym++ { 14526 *(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++ 14527 } 14528 14529 // bound code lengths, force root to be within code lengths 14530 root = *(*uint32)(unsafe.Pointer(bits)) 14531 for max = uint32(MAXBITS); max >= uint32(1); max-- { 14532 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(max)*2))) != 0 { 14533 break 14534 } 14535 } 14536 if root > max { 14537 root = max 14538 } 14539 if max == uint32(0) { // no symbols to code at all 14540 here.Fop = uint8(64) // invalid code marker 14541 here.Fbits = uint8(1) 14542 here.Fval = uint16(0) 14543 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here // make a table to force an error 14544 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here 14545 *(*uint32)(unsafe.Pointer(bits)) = uint32(1) 14546 return 0 // no symbols, but wait for decoding to report error 14547 } 14548 for min = uint32(1); min < max; min++ { 14549 if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(min)*2))) != 0 { 14550 break 14551 } 14552 } 14553 if root < min { 14554 root = min 14555 } 14556 14557 // check for an over-subscribed or incomplete set of lengths 14558 left = 1 14559 for len = uint32(1); len <= uint32(MAXBITS); len++ { 14560 left <<= 1 14561 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)))) 14562 if left < 0 { 14563 return -1 14564 } // over-subscribed 14565 } 14566 if (left > 0) && ((type1 == CODES) || (max != uint32(1))) { 14567 return -1 14568 } // incomplete set 14569 14570 // generate offsets into symbol table for each length for sorting 14571 *(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + 1*2)) = uint16(0) 14572 for len = uint32(1); len < uint32(MAXBITS); len++ { 14573 *(*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))))) 14574 } 14575 14576 // sort symbols by length, by symbol order within each length 14577 for sym = uint32(0); sym < codes; sym++ { 14578 if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { 14579 *(*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) 14580 } 14581 } 14582 14583 // 14584 // Create and fill in decoding tables. In this loop, the table being 14585 // filled is at next and has curr index bits. The code being used is huff 14586 // with length len. That code is converted to an index by dropping drop 14587 // bits off of the bottom. For codes where len is less than drop + curr, 14588 // those top drop + curr - len bits are incremented through all values to 14589 // fill the table with replicated entries. 14590 // 14591 // root is the number of index bits for the root table. When len exceeds 14592 // root, sub-tables are created pointed to by the root entry with an index 14593 // of the low root bits of huff. This is saved in low to check for when a 14594 // new sub-table should be started. drop is zero when the root table is 14595 // being filled, and drop is root when sub-tables are being filled. 14596 // 14597 // When a new sub-table is needed, it is necessary to look ahead in the 14598 // code lengths to determine what size sub-table is needed. The length 14599 // counts are used for this, and so count[] is decremented as codes are 14600 // entered in the tables. 14601 // 14602 // used keeps track of how many table entries have been allocated from the 14603 // provided *table space. It is checked for LENS and DIST tables against 14604 // the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in 14605 // the initial root table size constants. See the comments in inftrees.h 14606 // for more information. 14607 // 14608 // sym increments through all symbols, and the loop terminates when 14609 // all codes of length max, i.e. all codes, have been processed. This 14610 // routine permits incomplete codes, so another loop after this one fills 14611 // in the rest of the decoding tables with invalid code markers. 14612 // 14613 14614 // set up for code type 14615 switch type1 { 14616 case CODES: 14617 base = libc.AssignUintptr(&extra, work) // dummy value--not used 14618 match = uint32(20) 14619 break 14620 case LENS: 14621 base = uintptr(unsafe.Pointer(&lbase)) 14622 extra = uintptr(unsafe.Pointer(&lext)) 14623 match = uint32(257) 14624 break 14625 default: // DISTS 14626 base = uintptr(unsafe.Pointer(&dbase)) 14627 extra = uintptr(unsafe.Pointer(&dext)) 14628 match = uint32(0) 14629 } 14630 14631 // initialize state for loop 14632 huff = uint32(0) // starting code 14633 sym = uint32(0) // starting code symbol 14634 len = min // starting code length 14635 next = *(*uintptr)(unsafe.Pointer(table)) // current table to fill in 14636 curr = root // current table index bits 14637 drop = uint32(0) // current bits to drop from code for index 14638 low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root 14639 used = (uint32(1) << root) // use root table entries 14640 mask = (used - uint32(1)) // mask for comparing low 14641 14642 // check available table space 14643 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 14644 return 1 14645 } 14646 14647 // process all codes and make table entries 14648 for { 14649 // create table entry 14650 here.Fbits = (uint8(len - drop)) 14651 if (uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) + 1) < match { 14652 here.Fop = uint8(0) 14653 here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) 14654 } else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { 14655 here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2))) 14656 here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2)) 14657 } else { 14658 here.Fop = (uint8(32 + 64)) // end of block 14659 here.Fval = uint16(0) 14660 } 14661 14662 // replicate for those indices with low len bits equal to huff 14663 incr = (uint32(1) << (len - drop)) 14664 fill = (uint32(1) << curr) 14665 min = fill // save offset to next table 14666 for ok := true; ok; ok = (fill != uint32(0)) { 14667 fill = fill - (incr) 14668 *(*Code)(unsafe.Pointer(next + uintptr(((huff>>drop)+fill))*4)) = here 14669 } 14670 14671 // backwards increment the len-bit code huff 14672 incr = (uint32(1) << (len - uint32(1))) 14673 for (huff & incr) != 0 { 14674 incr >>= 1 14675 } 14676 if incr != uint32(0) { 14677 huff = huff & (incr - uint32(1)) 14678 huff = huff + (incr) 14679 } else { 14680 huff = uint32(0) 14681 } 14682 14683 // go to next symbol, update count, len 14684 sym++ 14685 if int32(libc.PreDecUint16(&(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))), 1)) == 0 { 14686 if len == max { 14687 break 14688 } 14689 len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) 14690 } 14691 14692 // create new sub-table if needed 14693 if (len > root) && ((huff & mask) != low) { 14694 // if first time, transition to sub-tables 14695 if drop == uint32(0) { 14696 drop = root 14697 } 14698 14699 // increment past last table 14700 next += 4 * (uintptr(min)) // here min is 1 << curr 14701 14702 // determine length of next table 14703 curr = (len - drop) 14704 left = (int32(1) << curr) 14705 for (curr + drop) < max { 14706 left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr((curr+drop))*2)))) 14707 if left <= 0 { 14708 break 14709 } 14710 curr++ 14711 left <<= 1 14712 } 14713 14714 // check for enough space 14715 used = used + (uint32(1) << curr) 14716 if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) { 14717 return 1 14718 } 14719 14720 // point entry in root table to sub-table 14721 low = (huff & mask) 14722 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fop = uint8(curr) 14723 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fbits = uint8(root) 14724 (*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fval = (uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4)) 14725 } 14726 } 14727 14728 // fill in remaining table entry if code is incomplete (guaranteed to have 14729 // at most one remaining entry, since if the code is incomplete, the 14730 // maximum code length that was allowed to get this far is one bit) 14731 if huff != uint32(0) { 14732 here.Fop = uint8(64) // invalid code marker 14733 here.Fbits = (uint8(len - drop)) 14734 here.Fval = uint16(0) 14735 *(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here 14736 } 14737 14738 // set return parameters 14739 *(*uintptr)(unsafe.Pointer(table)) += (uintptr(used)) * 4 14740 *(*uint32)(unsafe.Pointer(bits)) = root 14741 return 0 14742 } 14743 14744 var lbase = [31]uint16{ // Length codes 257..285 base 14745 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), 14746 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 */ 14747 var lext = [31]uint16{ // Length codes 257..285 extra 14748 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), 14749 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 */ 14750 var dbase = [32]uint16{ // Distance codes 0..29 base 14751 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), 14752 uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145), 14753 uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */ 14754 var dext = [32]uint16{ // Distance codes 0..29 extra 14755 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), 14756 uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27), 14757 uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */ 14758 14759 type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */ 14760 14761 // =========================================================================== 14762 // Constants 14763 14764 // Bit length codes must not exceed MAX_BL_BITS bits 14765 14766 // end of block literal code 14767 14768 // repeat previous bit length 3-6 times (2 bits of repeat count) 14769 14770 // repeat a zero length 3-10 times (3 bits of repeat count) 14771 14772 // repeat a zero length 11-138 times (7 bits of repeat count) 14773 14774 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 */ 14775 14776 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 */ 14777 14778 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 */ 14779 14780 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 */ 14781 // The lengths of the bit length codes are sent in order of decreasing 14782 // probability, to avoid transmitting the lengths for unused bit length codes. 14783 14784 // =========================================================================== 14785 // Local data. These are initialized only once. 14786 14787 // header created automatically with -DGEN_TREES_H 14788 14789 var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) { 14790 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 14791 return r 14792 }(), Fdl: func() (r struct{ Fdad Ush }) { 14793 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14794 return r 14795 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14796 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140) 14797 return r 14798 }(), Fdl: func() (r struct{ Fdad Ush }) { 14799 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14800 return r 14801 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14802 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76) 14803 return r 14804 }(), Fdl: func() (r struct{ Fdad Ush }) { 14805 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14806 return r 14807 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14808 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204) 14809 return r 14810 }(), Fdl: func() (r struct{ Fdad Ush }) { 14811 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14812 return r 14813 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14814 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44) 14815 return r 14816 }(), Fdl: func() (r struct{ Fdad Ush }) { 14817 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14818 return r 14819 }()}, 14820 {Ffc: func() (r struct{ Ffreq Ush }) { 14821 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172) 14822 return r 14823 }(), Fdl: func() (r struct{ Fdad Ush }) { 14824 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14825 return r 14826 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14827 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108) 14828 return r 14829 }(), Fdl: func() (r struct{ Fdad Ush }) { 14830 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14831 return r 14832 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14833 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236) 14834 return r 14835 }(), Fdl: func() (r struct{ Fdad Ush }) { 14836 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14837 return r 14838 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14839 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 14840 return r 14841 }(), Fdl: func() (r struct{ Fdad Ush }) { 14842 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14843 return r 14844 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14845 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156) 14846 return r 14847 }(), Fdl: func() (r struct{ Fdad Ush }) { 14848 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14849 return r 14850 }()}, 14851 {Ffc: func() (r struct{ Ffreq Ush }) { 14852 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92) 14853 return r 14854 }(), Fdl: func() (r struct{ Fdad Ush }) { 14855 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14856 return r 14857 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14858 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220) 14859 return r 14860 }(), Fdl: func() (r struct{ Fdad Ush }) { 14861 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14862 return r 14863 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14864 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60) 14865 return r 14866 }(), Fdl: func() (r struct{ Fdad Ush }) { 14867 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14868 return r 14869 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14870 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188) 14871 return r 14872 }(), Fdl: func() (r struct{ Fdad Ush }) { 14873 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14874 return r 14875 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14876 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124) 14877 return r 14878 }(), Fdl: func() (r struct{ Fdad Ush }) { 14879 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14880 return r 14881 }()}, 14882 {Ffc: func() (r struct{ Ffreq Ush }) { 14883 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252) 14884 return r 14885 }(), Fdl: func() (r struct{ Fdad Ush }) { 14886 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14887 return r 14888 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14889 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 14890 return r 14891 }(), Fdl: func() (r struct{ Fdad Ush }) { 14892 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14893 return r 14894 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14895 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130) 14896 return r 14897 }(), Fdl: func() (r struct{ Fdad Ush }) { 14898 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14899 return r 14900 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14901 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66) 14902 return r 14903 }(), Fdl: func() (r struct{ Fdad Ush }) { 14904 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14905 return r 14906 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14907 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194) 14908 return r 14909 }(), Fdl: func() (r struct{ Fdad Ush }) { 14910 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14911 return r 14912 }()}, 14913 {Ffc: func() (r struct{ Ffreq Ush }) { 14914 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34) 14915 return r 14916 }(), Fdl: func() (r struct{ Fdad Ush }) { 14917 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14918 return r 14919 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14920 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162) 14921 return r 14922 }(), Fdl: func() (r struct{ Fdad Ush }) { 14923 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14924 return r 14925 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14926 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98) 14927 return r 14928 }(), Fdl: func() (r struct{ Fdad Ush }) { 14929 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14930 return r 14931 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14932 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226) 14933 return r 14934 }(), Fdl: func() (r struct{ Fdad Ush }) { 14935 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14936 return r 14937 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14938 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 14939 return r 14940 }(), Fdl: func() (r struct{ Fdad Ush }) { 14941 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14942 return r 14943 }()}, 14944 {Ffc: func() (r struct{ Ffreq Ush }) { 14945 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146) 14946 return r 14947 }(), Fdl: func() (r struct{ Fdad Ush }) { 14948 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14949 return r 14950 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14951 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82) 14952 return r 14953 }(), Fdl: func() (r struct{ Fdad Ush }) { 14954 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14955 return r 14956 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14957 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210) 14958 return r 14959 }(), Fdl: func() (r struct{ Fdad Ush }) { 14960 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14961 return r 14962 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14963 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50) 14964 return r 14965 }(), Fdl: func() (r struct{ Fdad Ush }) { 14966 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14967 return r 14968 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14969 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178) 14970 return r 14971 }(), Fdl: func() (r struct{ Fdad Ush }) { 14972 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14973 return r 14974 }()}, 14975 {Ffc: func() (r struct{ Ffreq Ush }) { 14976 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114) 14977 return r 14978 }(), Fdl: func() (r struct{ Fdad Ush }) { 14979 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14980 return r 14981 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14982 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242) 14983 return r 14984 }(), Fdl: func() (r struct{ Fdad Ush }) { 14985 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14986 return r 14987 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14988 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 14989 return r 14990 }(), Fdl: func() (r struct{ Fdad Ush }) { 14991 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14992 return r 14993 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14994 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138) 14995 return r 14996 }(), Fdl: func() (r struct{ Fdad Ush }) { 14997 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14998 return r 14999 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15000 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74) 15001 return r 15002 }(), Fdl: func() (r struct{ Fdad Ush }) { 15003 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15004 return r 15005 }()}, 15006 {Ffc: func() (r struct{ Ffreq Ush }) { 15007 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202) 15008 return r 15009 }(), Fdl: func() (r struct{ Fdad Ush }) { 15010 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15011 return r 15012 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15013 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42) 15014 return r 15015 }(), Fdl: func() (r struct{ Fdad Ush }) { 15016 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15017 return r 15018 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15019 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170) 15020 return r 15021 }(), Fdl: func() (r struct{ Fdad Ush }) { 15022 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15023 return r 15024 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15025 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106) 15026 return r 15027 }(), Fdl: func() (r struct{ Fdad Ush }) { 15028 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15029 return r 15030 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15031 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234) 15032 return r 15033 }(), Fdl: func() (r struct{ Fdad Ush }) { 15034 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15035 return r 15036 }()}, 15037 {Ffc: func() (r struct{ Ffreq Ush }) { 15038 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 15039 return r 15040 }(), Fdl: func() (r struct{ Fdad Ush }) { 15041 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15042 return r 15043 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15044 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154) 15045 return r 15046 }(), Fdl: func() (r struct{ Fdad Ush }) { 15047 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15048 return r 15049 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15050 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90) 15051 return r 15052 }(), Fdl: func() (r struct{ Fdad Ush }) { 15053 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15054 return r 15055 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15056 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218) 15057 return r 15058 }(), Fdl: func() (r struct{ Fdad Ush }) { 15059 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15060 return r 15061 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15062 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58) 15063 return r 15064 }(), Fdl: func() (r struct{ Fdad Ush }) { 15065 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15066 return r 15067 }()}, 15068 {Ffc: func() (r struct{ Ffreq Ush }) { 15069 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186) 15070 return r 15071 }(), Fdl: func() (r struct{ Fdad Ush }) { 15072 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15073 return r 15074 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15075 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122) 15076 return r 15077 }(), Fdl: func() (r struct{ Fdad Ush }) { 15078 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15079 return r 15080 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15081 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250) 15082 return r 15083 }(), Fdl: func() (r struct{ Fdad Ush }) { 15084 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15085 return r 15086 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15087 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 15088 return r 15089 }(), Fdl: func() (r struct{ Fdad Ush }) { 15090 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15091 return r 15092 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15093 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134) 15094 return r 15095 }(), Fdl: func() (r struct{ Fdad Ush }) { 15096 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15097 return r 15098 }()}, 15099 {Ffc: func() (r struct{ Ffreq Ush }) { 15100 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70) 15101 return r 15102 }(), Fdl: func() (r struct{ Fdad Ush }) { 15103 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15104 return r 15105 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15106 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198) 15107 return r 15108 }(), Fdl: func() (r struct{ Fdad Ush }) { 15109 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15110 return r 15111 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15112 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38) 15113 return r 15114 }(), Fdl: func() (r struct{ Fdad Ush }) { 15115 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15116 return r 15117 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15118 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166) 15119 return r 15120 }(), Fdl: func() (r struct{ Fdad Ush }) { 15121 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15122 return r 15123 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15124 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102) 15125 return r 15126 }(), Fdl: func() (r struct{ Fdad Ush }) { 15127 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15128 return r 15129 }()}, 15130 {Ffc: func() (r struct{ Ffreq Ush }) { 15131 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230) 15132 return r 15133 }(), Fdl: func() (r struct{ Fdad Ush }) { 15134 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15135 return r 15136 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15137 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 15138 return r 15139 }(), Fdl: func() (r struct{ Fdad Ush }) { 15140 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15141 return r 15142 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15143 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150) 15144 return r 15145 }(), Fdl: func() (r struct{ Fdad Ush }) { 15146 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15147 return r 15148 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15149 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86) 15150 return r 15151 }(), Fdl: func() (r struct{ Fdad Ush }) { 15152 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15153 return r 15154 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15155 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214) 15156 return r 15157 }(), Fdl: func() (r struct{ Fdad Ush }) { 15158 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15159 return r 15160 }()}, 15161 {Ffc: func() (r struct{ Ffreq Ush }) { 15162 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54) 15163 return r 15164 }(), Fdl: func() (r struct{ Fdad Ush }) { 15165 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15166 return r 15167 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15168 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182) 15169 return r 15170 }(), Fdl: func() (r struct{ Fdad Ush }) { 15171 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15172 return r 15173 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15174 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118) 15175 return r 15176 }(), Fdl: func() (r struct{ Fdad Ush }) { 15177 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15178 return r 15179 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15180 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246) 15181 return r 15182 }(), Fdl: func() (r struct{ Fdad Ush }) { 15183 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15184 return r 15185 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15186 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 15187 return r 15188 }(), Fdl: func() (r struct{ Fdad Ush }) { 15189 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15190 return r 15191 }()}, 15192 {Ffc: func() (r struct{ Ffreq Ush }) { 15193 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142) 15194 return r 15195 }(), Fdl: func() (r struct{ Fdad Ush }) { 15196 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15197 return r 15198 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15199 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78) 15200 return r 15201 }(), Fdl: func() (r struct{ Fdad Ush }) { 15202 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15203 return r 15204 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15205 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206) 15206 return r 15207 }(), Fdl: func() (r struct{ Fdad Ush }) { 15208 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15209 return r 15210 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15211 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46) 15212 return r 15213 }(), Fdl: func() (r struct{ Fdad Ush }) { 15214 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15215 return r 15216 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15217 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174) 15218 return r 15219 }(), Fdl: func() (r struct{ Fdad Ush }) { 15220 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15221 return r 15222 }()}, 15223 {Ffc: func() (r struct{ Ffreq Ush }) { 15224 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110) 15225 return r 15226 }(), Fdl: func() (r struct{ Fdad Ush }) { 15227 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15228 return r 15229 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15230 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238) 15231 return r 15232 }(), Fdl: func() (r struct{ Fdad Ush }) { 15233 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15234 return r 15235 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15236 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 15237 return r 15238 }(), Fdl: func() (r struct{ Fdad Ush }) { 15239 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15240 return r 15241 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15242 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158) 15243 return r 15244 }(), Fdl: func() (r struct{ Fdad Ush }) { 15245 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15246 return r 15247 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15248 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94) 15249 return r 15250 }(), Fdl: func() (r struct{ Fdad Ush }) { 15251 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15252 return r 15253 }()}, 15254 {Ffc: func() (r struct{ Ffreq Ush }) { 15255 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222) 15256 return r 15257 }(), Fdl: func() (r struct{ Fdad Ush }) { 15258 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15259 return r 15260 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15261 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62) 15262 return r 15263 }(), Fdl: func() (r struct{ Fdad Ush }) { 15264 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15265 return r 15266 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15267 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190) 15268 return r 15269 }(), Fdl: func() (r struct{ Fdad Ush }) { 15270 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15271 return r 15272 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15273 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126) 15274 return r 15275 }(), Fdl: func() (r struct{ Fdad Ush }) { 15276 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15277 return r 15278 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15279 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254) 15280 return r 15281 }(), Fdl: func() (r struct{ Fdad Ush }) { 15282 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15283 return r 15284 }()}, 15285 {Ffc: func() (r struct{ Ffreq Ush }) { 15286 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 15287 return r 15288 }(), Fdl: func() (r struct{ Fdad Ush }) { 15289 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15290 return r 15291 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15292 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129) 15293 return r 15294 }(), Fdl: func() (r struct{ Fdad Ush }) { 15295 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15296 return r 15297 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15298 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65) 15299 return r 15300 }(), Fdl: func() (r struct{ Fdad Ush }) { 15301 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15302 return r 15303 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15304 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193) 15305 return r 15306 }(), Fdl: func() (r struct{ Fdad Ush }) { 15307 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15308 return r 15309 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15310 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33) 15311 return r 15312 }(), Fdl: func() (r struct{ Fdad Ush }) { 15313 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15314 return r 15315 }()}, 15316 {Ffc: func() (r struct{ Ffreq Ush }) { 15317 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161) 15318 return r 15319 }(), Fdl: func() (r struct{ Fdad Ush }) { 15320 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15321 return r 15322 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15323 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97) 15324 return r 15325 }(), Fdl: func() (r struct{ Fdad Ush }) { 15326 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15327 return r 15328 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15329 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225) 15330 return r 15331 }(), Fdl: func() (r struct{ Fdad Ush }) { 15332 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15333 return r 15334 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15335 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 15336 return r 15337 }(), Fdl: func() (r struct{ Fdad Ush }) { 15338 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15339 return r 15340 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15341 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145) 15342 return r 15343 }(), Fdl: func() (r struct{ Fdad Ush }) { 15344 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15345 return r 15346 }()}, 15347 {Ffc: func() (r struct{ Ffreq Ush }) { 15348 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81) 15349 return r 15350 }(), Fdl: func() (r struct{ Fdad Ush }) { 15351 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15352 return r 15353 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15354 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209) 15355 return r 15356 }(), Fdl: func() (r struct{ Fdad Ush }) { 15357 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15358 return r 15359 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15360 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49) 15361 return r 15362 }(), Fdl: func() (r struct{ Fdad Ush }) { 15363 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15364 return r 15365 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15366 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177) 15367 return r 15368 }(), Fdl: func() (r struct{ Fdad Ush }) { 15369 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15370 return r 15371 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15372 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113) 15373 return r 15374 }(), Fdl: func() (r struct{ Fdad Ush }) { 15375 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15376 return r 15377 }()}, 15378 {Ffc: func() (r struct{ Ffreq Ush }) { 15379 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241) 15380 return r 15381 }(), Fdl: func() (r struct{ Fdad Ush }) { 15382 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15383 return r 15384 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15385 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15386 return r 15387 }(), Fdl: func() (r struct{ Fdad Ush }) { 15388 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15389 return r 15390 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15391 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137) 15392 return r 15393 }(), Fdl: func() (r struct{ Fdad Ush }) { 15394 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15395 return r 15396 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15397 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73) 15398 return r 15399 }(), Fdl: func() (r struct{ Fdad Ush }) { 15400 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15401 return r 15402 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15403 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201) 15404 return r 15405 }(), Fdl: func() (r struct{ Fdad Ush }) { 15406 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15407 return r 15408 }()}, 15409 {Ffc: func() (r struct{ Ffreq Ush }) { 15410 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41) 15411 return r 15412 }(), Fdl: func() (r struct{ Fdad Ush }) { 15413 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15414 return r 15415 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15416 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169) 15417 return r 15418 }(), Fdl: func() (r struct{ Fdad Ush }) { 15419 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15420 return r 15421 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15422 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105) 15423 return r 15424 }(), Fdl: func() (r struct{ Fdad Ush }) { 15425 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15426 return r 15427 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15428 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233) 15429 return r 15430 }(), Fdl: func() (r struct{ Fdad Ush }) { 15431 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15432 return r 15433 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15434 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 15435 return r 15436 }(), Fdl: func() (r struct{ Fdad Ush }) { 15437 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15438 return r 15439 }()}, 15440 {Ffc: func() (r struct{ Ffreq Ush }) { 15441 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153) 15442 return r 15443 }(), Fdl: func() (r struct{ Fdad Ush }) { 15444 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15445 return r 15446 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15447 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89) 15448 return r 15449 }(), Fdl: func() (r struct{ Fdad Ush }) { 15450 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15451 return r 15452 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15453 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217) 15454 return r 15455 }(), Fdl: func() (r struct{ Fdad Ush }) { 15456 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15457 return r 15458 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15459 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57) 15460 return r 15461 }(), Fdl: func() (r struct{ Fdad Ush }) { 15462 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15463 return r 15464 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15465 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185) 15466 return r 15467 }(), Fdl: func() (r struct{ Fdad Ush }) { 15468 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15469 return r 15470 }()}, 15471 {Ffc: func() (r struct{ Ffreq Ush }) { 15472 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121) 15473 return r 15474 }(), Fdl: func() (r struct{ Fdad Ush }) { 15475 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15476 return r 15477 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15478 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249) 15479 return r 15480 }(), Fdl: func() (r struct{ Fdad Ush }) { 15481 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15482 return r 15483 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15484 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15485 return r 15486 }(), Fdl: func() (r struct{ Fdad Ush }) { 15487 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15488 return r 15489 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15490 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133) 15491 return r 15492 }(), Fdl: func() (r struct{ Fdad Ush }) { 15493 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15494 return r 15495 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15496 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69) 15497 return r 15498 }(), Fdl: func() (r struct{ Fdad Ush }) { 15499 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15500 return r 15501 }()}, 15502 {Ffc: func() (r struct{ Ffreq Ush }) { 15503 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197) 15504 return r 15505 }(), Fdl: func() (r struct{ Fdad Ush }) { 15506 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15507 return r 15508 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15509 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37) 15510 return r 15511 }(), Fdl: func() (r struct{ Fdad Ush }) { 15512 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15513 return r 15514 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15515 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165) 15516 return r 15517 }(), Fdl: func() (r struct{ Fdad Ush }) { 15518 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15519 return r 15520 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15521 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101) 15522 return r 15523 }(), Fdl: func() (r struct{ Fdad Ush }) { 15524 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15525 return r 15526 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15527 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229) 15528 return r 15529 }(), Fdl: func() (r struct{ Fdad Ush }) { 15530 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15531 return r 15532 }()}, 15533 {Ffc: func() (r struct{ Ffreq Ush }) { 15534 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 15535 return r 15536 }(), Fdl: func() (r struct{ Fdad Ush }) { 15537 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15538 return r 15539 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15540 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149) 15541 return r 15542 }(), Fdl: func() (r struct{ Fdad Ush }) { 15543 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15544 return r 15545 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15546 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85) 15547 return r 15548 }(), Fdl: func() (r struct{ Fdad Ush }) { 15549 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15550 return r 15551 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15552 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213) 15553 return r 15554 }(), Fdl: func() (r struct{ Fdad Ush }) { 15555 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15556 return r 15557 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15558 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53) 15559 return r 15560 }(), Fdl: func() (r struct{ Fdad Ush }) { 15561 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15562 return r 15563 }()}, 15564 {Ffc: func() (r struct{ Ffreq Ush }) { 15565 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181) 15566 return r 15567 }(), Fdl: func() (r struct{ Fdad Ush }) { 15568 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15569 return r 15570 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15571 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117) 15572 return r 15573 }(), Fdl: func() (r struct{ Fdad Ush }) { 15574 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15575 return r 15576 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15577 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245) 15578 return r 15579 }(), Fdl: func() (r struct{ Fdad Ush }) { 15580 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15581 return r 15582 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15583 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 15584 return r 15585 }(), Fdl: func() (r struct{ Fdad Ush }) { 15586 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15587 return r 15588 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15589 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141) 15590 return r 15591 }(), Fdl: func() (r struct{ Fdad Ush }) { 15592 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15593 return r 15594 }()}, 15595 {Ffc: func() (r struct{ Ffreq Ush }) { 15596 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77) 15597 return r 15598 }(), Fdl: func() (r struct{ Fdad Ush }) { 15599 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15600 return r 15601 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15602 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205) 15603 return r 15604 }(), Fdl: func() (r struct{ Fdad Ush }) { 15605 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15606 return r 15607 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15608 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45) 15609 return r 15610 }(), Fdl: func() (r struct{ Fdad Ush }) { 15611 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15612 return r 15613 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15614 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173) 15615 return r 15616 }(), Fdl: func() (r struct{ Fdad Ush }) { 15617 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15618 return r 15619 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15620 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109) 15621 return r 15622 }(), Fdl: func() (r struct{ Fdad Ush }) { 15623 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15624 return r 15625 }()}, 15626 {Ffc: func() (r struct{ Ffreq Ush }) { 15627 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237) 15628 return r 15629 }(), Fdl: func() (r struct{ Fdad Ush }) { 15630 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15631 return r 15632 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15633 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 15634 return r 15635 }(), Fdl: func() (r struct{ Fdad Ush }) { 15636 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15637 return r 15638 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15639 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157) 15640 return r 15641 }(), Fdl: func() (r struct{ Fdad Ush }) { 15642 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15643 return r 15644 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15645 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93) 15646 return r 15647 }(), Fdl: func() (r struct{ Fdad Ush }) { 15648 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15649 return r 15650 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15651 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221) 15652 return r 15653 }(), Fdl: func() (r struct{ Fdad Ush }) { 15654 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15655 return r 15656 }()}, 15657 {Ffc: func() (r struct{ Ffreq Ush }) { 15658 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61) 15659 return r 15660 }(), Fdl: func() (r struct{ Fdad Ush }) { 15661 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15662 return r 15663 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15664 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189) 15665 return r 15666 }(), Fdl: func() (r struct{ Fdad Ush }) { 15667 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15668 return r 15669 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15670 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125) 15671 return r 15672 }(), Fdl: func() (r struct{ Fdad Ush }) { 15673 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15674 return r 15675 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15676 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253) 15677 return r 15678 }(), Fdl: func() (r struct{ Fdad Ush }) { 15679 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15680 return r 15681 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15682 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 15683 return r 15684 }(), Fdl: func() (r struct{ Fdad Ush }) { 15685 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15686 return r 15687 }()}, 15688 {Ffc: func() (r struct{ Ffreq Ush }) { 15689 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275) 15690 return r 15691 }(), Fdl: func() (r struct{ Fdad Ush }) { 15692 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15693 return r 15694 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15695 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147) 15696 return r 15697 }(), Fdl: func() (r struct{ Fdad Ush }) { 15698 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15699 return r 15700 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15701 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403) 15702 return r 15703 }(), Fdl: func() (r struct{ Fdad Ush }) { 15704 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15705 return r 15706 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15707 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83) 15708 return r 15709 }(), Fdl: func() (r struct{ Fdad Ush }) { 15710 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15711 return r 15712 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15713 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339) 15714 return r 15715 }(), Fdl: func() (r struct{ Fdad Ush }) { 15716 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15717 return r 15718 }()}, 15719 {Ffc: func() (r struct{ Ffreq Ush }) { 15720 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211) 15721 return r 15722 }(), Fdl: func() (r struct{ Fdad Ush }) { 15723 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15724 return r 15725 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15726 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467) 15727 return r 15728 }(), Fdl: func() (r struct{ Fdad Ush }) { 15729 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15730 return r 15731 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15732 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51) 15733 return r 15734 }(), Fdl: func() (r struct{ Fdad Ush }) { 15735 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15736 return r 15737 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15738 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307) 15739 return r 15740 }(), Fdl: func() (r struct{ Fdad Ush }) { 15741 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15742 return r 15743 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15744 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179) 15745 return r 15746 }(), Fdl: func() (r struct{ Fdad Ush }) { 15747 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15748 return r 15749 }()}, 15750 {Ffc: func() (r struct{ Ffreq Ush }) { 15751 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435) 15752 return r 15753 }(), Fdl: func() (r struct{ Fdad Ush }) { 15754 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15755 return r 15756 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15757 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115) 15758 return r 15759 }(), Fdl: func() (r struct{ Fdad Ush }) { 15760 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15761 return r 15762 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15763 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371) 15764 return r 15765 }(), Fdl: func() (r struct{ Fdad Ush }) { 15766 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15767 return r 15768 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15769 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243) 15770 return r 15771 }(), Fdl: func() (r struct{ Fdad Ush }) { 15772 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15773 return r 15774 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15775 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499) 15776 return r 15777 }(), Fdl: func() (r struct{ Fdad Ush }) { 15778 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15779 return r 15780 }()}, 15781 {Ffc: func() (r struct{ Ffreq Ush }) { 15782 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 15783 return r 15784 }(), Fdl: func() (r struct{ Fdad Ush }) { 15785 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15786 return r 15787 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15788 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267) 15789 return r 15790 }(), Fdl: func() (r struct{ Fdad Ush }) { 15791 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15792 return r 15793 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15794 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139) 15795 return r 15796 }(), Fdl: func() (r struct{ Fdad Ush }) { 15797 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15798 return r 15799 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15800 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395) 15801 return r 15802 }(), Fdl: func() (r struct{ Fdad Ush }) { 15803 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15804 return r 15805 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15806 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75) 15807 return r 15808 }(), Fdl: func() (r struct{ Fdad Ush }) { 15809 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15810 return r 15811 }()}, 15812 {Ffc: func() (r struct{ Ffreq Ush }) { 15813 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331) 15814 return r 15815 }(), Fdl: func() (r struct{ Fdad Ush }) { 15816 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15817 return r 15818 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15819 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203) 15820 return r 15821 }(), Fdl: func() (r struct{ Fdad Ush }) { 15822 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15823 return r 15824 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15825 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459) 15826 return r 15827 }(), Fdl: func() (r struct{ Fdad Ush }) { 15828 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15829 return r 15830 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15831 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43) 15832 return r 15833 }(), Fdl: func() (r struct{ Fdad Ush }) { 15834 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15835 return r 15836 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15837 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299) 15838 return r 15839 }(), Fdl: func() (r struct{ Fdad Ush }) { 15840 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15841 return r 15842 }()}, 15843 {Ffc: func() (r struct{ Ffreq Ush }) { 15844 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171) 15845 return r 15846 }(), Fdl: func() (r struct{ Fdad Ush }) { 15847 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15848 return r 15849 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15850 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427) 15851 return r 15852 }(), Fdl: func() (r struct{ Fdad Ush }) { 15853 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15854 return r 15855 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15856 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107) 15857 return r 15858 }(), Fdl: func() (r struct{ Fdad Ush }) { 15859 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15860 return r 15861 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15862 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363) 15863 return r 15864 }(), Fdl: func() (r struct{ Fdad Ush }) { 15865 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15866 return r 15867 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15868 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235) 15869 return r 15870 }(), Fdl: func() (r struct{ Fdad Ush }) { 15871 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15872 return r 15873 }()}, 15874 {Ffc: func() (r struct{ Ffreq Ush }) { 15875 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491) 15876 return r 15877 }(), Fdl: func() (r struct{ Fdad Ush }) { 15878 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15879 return r 15880 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15881 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 15882 return r 15883 }(), Fdl: func() (r struct{ Fdad Ush }) { 15884 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15885 return r 15886 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15887 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283) 15888 return r 15889 }(), Fdl: func() (r struct{ Fdad Ush }) { 15890 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15891 return r 15892 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15893 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155) 15894 return r 15895 }(), Fdl: func() (r struct{ Fdad Ush }) { 15896 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15897 return r 15898 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15899 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411) 15900 return r 15901 }(), Fdl: func() (r struct{ Fdad Ush }) { 15902 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15903 return r 15904 }()}, 15905 {Ffc: func() (r struct{ Ffreq Ush }) { 15906 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91) 15907 return r 15908 }(), Fdl: func() (r struct{ Fdad Ush }) { 15909 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15910 return r 15911 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15912 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347) 15913 return r 15914 }(), Fdl: func() (r struct{ Fdad Ush }) { 15915 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15916 return r 15917 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15918 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219) 15919 return r 15920 }(), Fdl: func() (r struct{ Fdad Ush }) { 15921 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15922 return r 15923 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15924 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475) 15925 return r 15926 }(), Fdl: func() (r struct{ Fdad Ush }) { 15927 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15928 return r 15929 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15930 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59) 15931 return r 15932 }(), Fdl: func() (r struct{ Fdad Ush }) { 15933 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15934 return r 15935 }()}, 15936 {Ffc: func() (r struct{ Ffreq Ush }) { 15937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315) 15938 return r 15939 }(), Fdl: func() (r struct{ Fdad Ush }) { 15940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15941 return r 15942 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15943 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187) 15944 return r 15945 }(), Fdl: func() (r struct{ Fdad Ush }) { 15946 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15947 return r 15948 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15949 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443) 15950 return r 15951 }(), Fdl: func() (r struct{ Fdad Ush }) { 15952 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15953 return r 15954 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15955 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123) 15956 return r 15957 }(), Fdl: func() (r struct{ Fdad Ush }) { 15958 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15959 return r 15960 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15961 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379) 15962 return r 15963 }(), Fdl: func() (r struct{ Fdad Ush }) { 15964 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15965 return r 15966 }()}, 15967 {Ffc: func() (r struct{ Ffreq Ush }) { 15968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251) 15969 return r 15970 }(), Fdl: func() (r struct{ Fdad Ush }) { 15971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15972 return r 15973 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15974 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507) 15975 return r 15976 }(), Fdl: func() (r struct{ Fdad Ush }) { 15977 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15978 return r 15979 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15980 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15981 return r 15982 }(), Fdl: func() (r struct{ Fdad Ush }) { 15983 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15984 return r 15985 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15986 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263) 15987 return r 15988 }(), Fdl: func() (r struct{ Fdad Ush }) { 15989 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15990 return r 15991 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15992 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135) 15993 return r 15994 }(), Fdl: func() (r struct{ Fdad Ush }) { 15995 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15996 return r 15997 }()}, 15998 {Ffc: func() (r struct{ Ffreq Ush }) { 15999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391) 16000 return r 16001 }(), Fdl: func() (r struct{ Fdad Ush }) { 16002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16003 return r 16004 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16005 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71) 16006 return r 16007 }(), Fdl: func() (r struct{ Fdad Ush }) { 16008 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16009 return r 16010 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16011 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327) 16012 return r 16013 }(), Fdl: func() (r struct{ Fdad Ush }) { 16014 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16015 return r 16016 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16017 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199) 16018 return r 16019 }(), Fdl: func() (r struct{ Fdad Ush }) { 16020 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16021 return r 16022 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16023 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455) 16024 return r 16025 }(), Fdl: func() (r struct{ Fdad Ush }) { 16026 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16027 return r 16028 }()}, 16029 {Ffc: func() (r struct{ Ffreq Ush }) { 16030 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39) 16031 return r 16032 }(), Fdl: func() (r struct{ Fdad Ush }) { 16033 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16034 return r 16035 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16036 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295) 16037 return r 16038 }(), Fdl: func() (r struct{ Fdad Ush }) { 16039 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16040 return r 16041 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16042 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167) 16043 return r 16044 }(), Fdl: func() (r struct{ Fdad Ush }) { 16045 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16046 return r 16047 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16048 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423) 16049 return r 16050 }(), Fdl: func() (r struct{ Fdad Ush }) { 16051 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16052 return r 16053 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16054 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103) 16055 return r 16056 }(), Fdl: func() (r struct{ Fdad Ush }) { 16057 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16058 return r 16059 }()}, 16060 {Ffc: func() (r struct{ Ffreq Ush }) { 16061 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359) 16062 return r 16063 }(), Fdl: func() (r struct{ Fdad Ush }) { 16064 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16065 return r 16066 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16067 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231) 16068 return r 16069 }(), Fdl: func() (r struct{ Fdad Ush }) { 16070 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16071 return r 16072 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16073 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487) 16074 return r 16075 }(), Fdl: func() (r struct{ Fdad Ush }) { 16076 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16077 return r 16078 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16079 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 16080 return r 16081 }(), Fdl: func() (r struct{ Fdad Ush }) { 16082 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16083 return r 16084 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16085 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279) 16086 return r 16087 }(), Fdl: func() (r struct{ Fdad Ush }) { 16088 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16089 return r 16090 }()}, 16091 {Ffc: func() (r struct{ Ffreq Ush }) { 16092 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151) 16093 return r 16094 }(), Fdl: func() (r struct{ Fdad Ush }) { 16095 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16096 return r 16097 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16098 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407) 16099 return r 16100 }(), Fdl: func() (r struct{ Fdad Ush }) { 16101 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16102 return r 16103 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16104 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87) 16105 return r 16106 }(), Fdl: func() (r struct{ Fdad Ush }) { 16107 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16108 return r 16109 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16110 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343) 16111 return r 16112 }(), Fdl: func() (r struct{ Fdad Ush }) { 16113 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16114 return r 16115 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16116 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215) 16117 return r 16118 }(), Fdl: func() (r struct{ Fdad Ush }) { 16119 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16120 return r 16121 }()}, 16122 {Ffc: func() (r struct{ Ffreq Ush }) { 16123 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471) 16124 return r 16125 }(), Fdl: func() (r struct{ Fdad Ush }) { 16126 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16127 return r 16128 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16129 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55) 16130 return r 16131 }(), Fdl: func() (r struct{ Fdad Ush }) { 16132 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16133 return r 16134 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16135 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311) 16136 return r 16137 }(), Fdl: func() (r struct{ Fdad Ush }) { 16138 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16139 return r 16140 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16141 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183) 16142 return r 16143 }(), Fdl: func() (r struct{ Fdad Ush }) { 16144 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16145 return r 16146 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16147 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439) 16148 return r 16149 }(), Fdl: func() (r struct{ Fdad Ush }) { 16150 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16151 return r 16152 }()}, 16153 {Ffc: func() (r struct{ Ffreq Ush }) { 16154 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119) 16155 return r 16156 }(), Fdl: func() (r struct{ Fdad Ush }) { 16157 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16158 return r 16159 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16160 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375) 16161 return r 16162 }(), Fdl: func() (r struct{ Fdad Ush }) { 16163 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16164 return r 16165 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16166 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247) 16167 return r 16168 }(), Fdl: func() (r struct{ Fdad Ush }) { 16169 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16170 return r 16171 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16172 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503) 16173 return r 16174 }(), Fdl: func() (r struct{ Fdad Ush }) { 16175 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16176 return r 16177 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16178 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15) 16179 return r 16180 }(), Fdl: func() (r struct{ Fdad Ush }) { 16181 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16182 return r 16183 }()}, 16184 {Ffc: func() (r struct{ Ffreq Ush }) { 16185 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271) 16186 return r 16187 }(), Fdl: func() (r struct{ Fdad Ush }) { 16188 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16189 return r 16190 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16191 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143) 16192 return r 16193 }(), Fdl: func() (r struct{ Fdad Ush }) { 16194 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16195 return r 16196 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16197 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399) 16198 return r 16199 }(), Fdl: func() (r struct{ Fdad Ush }) { 16200 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16201 return r 16202 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16203 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79) 16204 return r 16205 }(), Fdl: func() (r struct{ Fdad Ush }) { 16206 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16207 return r 16208 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16209 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335) 16210 return r 16211 }(), Fdl: func() (r struct{ Fdad Ush }) { 16212 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16213 return r 16214 }()}, 16215 {Ffc: func() (r struct{ Ffreq Ush }) { 16216 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207) 16217 return r 16218 }(), Fdl: func() (r struct{ Fdad Ush }) { 16219 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16220 return r 16221 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16222 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463) 16223 return r 16224 }(), Fdl: func() (r struct{ Fdad Ush }) { 16225 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16226 return r 16227 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16228 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47) 16229 return r 16230 }(), Fdl: func() (r struct{ Fdad Ush }) { 16231 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16232 return r 16233 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16234 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303) 16235 return r 16236 }(), Fdl: func() (r struct{ Fdad Ush }) { 16237 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16238 return r 16239 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16240 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175) 16241 return r 16242 }(), Fdl: func() (r struct{ Fdad Ush }) { 16243 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16244 return r 16245 }()}, 16246 {Ffc: func() (r struct{ Ffreq Ush }) { 16247 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431) 16248 return r 16249 }(), Fdl: func() (r struct{ Fdad Ush }) { 16250 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16251 return r 16252 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16253 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111) 16254 return r 16255 }(), Fdl: func() (r struct{ Fdad Ush }) { 16256 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16257 return r 16258 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16259 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367) 16260 return r 16261 }(), Fdl: func() (r struct{ Fdad Ush }) { 16262 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16263 return r 16264 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16265 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239) 16266 return r 16267 }(), Fdl: func() (r struct{ Fdad Ush }) { 16268 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16269 return r 16270 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16271 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495) 16272 return r 16273 }(), Fdl: func() (r struct{ Fdad Ush }) { 16274 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16275 return r 16276 }()}, 16277 {Ffc: func() (r struct{ Ffreq Ush }) { 16278 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31) 16279 return r 16280 }(), Fdl: func() (r struct{ Fdad Ush }) { 16281 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16282 return r 16283 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16284 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287) 16285 return r 16286 }(), Fdl: func() (r struct{ Fdad Ush }) { 16287 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16288 return r 16289 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16290 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159) 16291 return r 16292 }(), Fdl: func() (r struct{ Fdad Ush }) { 16293 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16294 return r 16295 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16296 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415) 16297 return r 16298 }(), Fdl: func() (r struct{ Fdad Ush }) { 16299 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16300 return r 16301 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16302 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95) 16303 return r 16304 }(), Fdl: func() (r struct{ Fdad Ush }) { 16305 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16306 return r 16307 }()}, 16308 {Ffc: func() (r struct{ Ffreq Ush }) { 16309 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351) 16310 return r 16311 }(), Fdl: func() (r struct{ Fdad Ush }) { 16312 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16313 return r 16314 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16315 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223) 16316 return r 16317 }(), Fdl: func() (r struct{ Fdad Ush }) { 16318 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16319 return r 16320 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16321 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479) 16322 return r 16323 }(), Fdl: func() (r struct{ Fdad Ush }) { 16324 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16325 return r 16326 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16327 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63) 16328 return r 16329 }(), Fdl: func() (r struct{ Fdad Ush }) { 16330 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16331 return r 16332 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16333 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319) 16334 return r 16335 }(), Fdl: func() (r struct{ Fdad Ush }) { 16336 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16337 return r 16338 }()}, 16339 {Ffc: func() (r struct{ Ffreq Ush }) { 16340 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191) 16341 return r 16342 }(), Fdl: func() (r struct{ Fdad Ush }) { 16343 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16344 return r 16345 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16346 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447) 16347 return r 16348 }(), Fdl: func() (r struct{ Fdad Ush }) { 16349 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16350 return r 16351 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16352 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127) 16353 return r 16354 }(), Fdl: func() (r struct{ Fdad Ush }) { 16355 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16356 return r 16357 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16358 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383) 16359 return r 16360 }(), Fdl: func() (r struct{ Fdad Ush }) { 16361 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16362 return r 16363 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16364 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255) 16365 return r 16366 }(), Fdl: func() (r struct{ Fdad Ush }) { 16367 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16368 return r 16369 }()}, 16370 {Ffc: func() (r struct{ Ffreq Ush }) { 16371 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511) 16372 return r 16373 }(), Fdl: func() (r struct{ Fdad Ush }) { 16374 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16375 return r 16376 }()}, {Fdl: func() (r struct{ Fdad Ush }) { 16377 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16378 return r 16379 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16380 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64) 16381 return r 16382 }(), Fdl: func() (r struct{ Fdad Ush }) { 16383 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16384 return r 16385 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16386 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32) 16387 return r 16388 }(), Fdl: func() (r struct{ Fdad Ush }) { 16389 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16390 return r 16391 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16392 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96) 16393 return r 16394 }(), Fdl: func() (r struct{ Fdad Ush }) { 16395 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16396 return r 16397 }()}, 16398 {Ffc: func() (r struct{ Ffreq Ush }) { 16399 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 16400 return r 16401 }(), Fdl: func() (r struct{ Fdad Ush }) { 16402 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16403 return r 16404 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16405 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80) 16406 return r 16407 }(), Fdl: func() (r struct{ Fdad Ush }) { 16408 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16409 return r 16410 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16411 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48) 16412 return r 16413 }(), Fdl: func() (r struct{ Fdad Ush }) { 16414 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16415 return r 16416 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16417 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112) 16418 return r 16419 }(), Fdl: func() (r struct{ Fdad Ush }) { 16420 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16421 return r 16422 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16423 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16424 return r 16425 }(), Fdl: func() (r struct{ Fdad Ush }) { 16426 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16427 return r 16428 }()}, 16429 {Ffc: func() (r struct{ Ffreq Ush }) { 16430 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72) 16431 return r 16432 }(), Fdl: func() (r struct{ Fdad Ush }) { 16433 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16434 return r 16435 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16436 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40) 16437 return r 16438 }(), Fdl: func() (r struct{ Fdad Ush }) { 16439 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16440 return r 16441 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16442 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104) 16443 return r 16444 }(), Fdl: func() (r struct{ Fdad Ush }) { 16445 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16446 return r 16447 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16448 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 16449 return r 16450 }(), Fdl: func() (r struct{ Fdad Ush }) { 16451 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16452 return r 16453 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16454 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88) 16455 return r 16456 }(), Fdl: func() (r struct{ Fdad Ush }) { 16457 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16458 return r 16459 }()}, 16460 {Ffc: func() (r struct{ Ffreq Ush }) { 16461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56) 16462 return r 16463 }(), Fdl: func() (r struct{ Fdad Ush }) { 16464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16465 return r 16466 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120) 16468 return r 16469 }(), Fdl: func() (r struct{ Fdad Ush }) { 16470 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16471 return r 16472 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16473 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 16474 return r 16475 }(), Fdl: func() (r struct{ Fdad Ush }) { 16476 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16477 return r 16478 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16479 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68) 16480 return r 16481 }(), Fdl: func() (r struct{ Fdad Ush }) { 16482 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16483 return r 16484 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16485 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36) 16486 return r 16487 }(), Fdl: func() (r struct{ Fdad Ush }) { 16488 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16489 return r 16490 }()}, 16491 {Ffc: func() (r struct{ Ffreq Ush }) { 16492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100) 16493 return r 16494 }(), Fdl: func() (r struct{ Fdad Ush }) { 16495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16496 return r 16497 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 16499 return r 16500 }(), Fdl: func() (r struct{ Fdad Ush }) { 16501 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16502 return r 16503 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16504 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84) 16505 return r 16506 }(), Fdl: func() (r struct{ Fdad Ush }) { 16507 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16508 return r 16509 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16510 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52) 16511 return r 16512 }(), Fdl: func() (r struct{ Fdad Ush }) { 16513 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16514 return r 16515 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16516 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116) 16517 return r 16518 }(), Fdl: func() (r struct{ Fdad Ush }) { 16519 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16520 return r 16521 }()}, 16522 {Ffc: func() (r struct{ Ffreq Ush }) { 16523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 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(131) 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(67) 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(195) 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(35) 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(163) 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(99) 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(227) 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 }()}} /* trees.h:3:21 */ 16572 16573 var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) { 16574 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16575 return r 16576 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16577 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 16578 return r 16579 }(), Fdl: func() (r struct{ Fdad Ush }) { 16580 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16581 return r 16582 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16583 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 16584 return r 16585 }(), Fdl: func() (r struct{ Fdad Ush }) { 16586 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16587 return r 16588 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16589 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 16590 return r 16591 }(), Fdl: func() (r struct{ Fdad Ush }) { 16592 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16593 return r 16594 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16595 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 16596 return r 16597 }(), Fdl: func() (r struct{ Fdad Ush }) { 16598 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16599 return r 16600 }()}, 16601 {Ffc: func() (r struct{ Ffreq Ush }) { 16602 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 16603 return r 16604 }(), Fdl: func() (r struct{ Fdad Ush }) { 16605 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16606 return r 16607 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16608 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 16609 return r 16610 }(), Fdl: func() (r struct{ Fdad Ush }) { 16611 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16612 return r 16613 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16614 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 16615 return r 16616 }(), Fdl: func() (r struct{ Fdad Ush }) { 16617 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16618 return r 16619 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16620 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 16621 return r 16622 }(), Fdl: func() (r struct{ Fdad Ush }) { 16623 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16624 return r 16625 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16626 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 16627 return r 16628 }(), Fdl: func() (r struct{ Fdad Ush }) { 16629 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16630 return r 16631 }()}, 16632 {Ffc: func() (r struct{ Ffreq Ush }) { 16633 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 16634 return r 16635 }(), Fdl: func() (r struct{ Fdad Ush }) { 16636 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16637 return r 16638 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16639 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 16640 return r 16641 }(), Fdl: func() (r struct{ Fdad Ush }) { 16642 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16643 return r 16644 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16645 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 16646 return r 16647 }(), Fdl: func() (r struct{ Fdad Ush }) { 16648 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16649 return r 16650 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16651 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 16652 return r 16653 }(), Fdl: func() (r struct{ Fdad Ush }) { 16654 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16655 return r 16656 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16657 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 16658 return r 16659 }(), Fdl: func() (r struct{ Fdad Ush }) { 16660 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16661 return r 16662 }()}, 16663 {Ffc: func() (r struct{ Ffreq Ush }) { 16664 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 16665 return r 16666 }(), Fdl: func() (r struct{ Fdad Ush }) { 16667 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16668 return r 16669 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16670 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 16671 return r 16672 }(), Fdl: func() (r struct{ Fdad Ush }) { 16673 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16674 return r 16675 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16676 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 16677 return r 16678 }(), Fdl: func() (r struct{ Fdad Ush }) { 16679 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16680 return r 16681 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16682 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 16683 return r 16684 }(), Fdl: func() (r struct{ Fdad Ush }) { 16685 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16686 return r 16687 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16688 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 16689 return r 16690 }(), Fdl: func() (r struct{ Fdad Ush }) { 16691 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16692 return r 16693 }()}, 16694 {Ffc: func() (r struct{ Ffreq Ush }) { 16695 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16696 return r 16697 }(), Fdl: func() (r struct{ Fdad Ush }) { 16698 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16699 return r 16700 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16701 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 16702 return r 16703 }(), Fdl: func() (r struct{ Fdad Ush }) { 16704 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16705 return r 16706 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16707 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 16708 return r 16709 }(), Fdl: func() (r struct{ Fdad Ush }) { 16710 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16711 return r 16712 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16713 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 16714 return r 16715 }(), Fdl: func() (r struct{ Fdad Ush }) { 16716 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16717 return r 16718 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16719 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 16720 return r 16721 }(), Fdl: func() (r struct{ Fdad Ush }) { 16722 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16723 return r 16724 }()}, 16725 {Ffc: func() (r struct{ Ffreq Ush }) { 16726 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 16727 return r 16728 }(), Fdl: func() (r struct{ Fdad Ush }) { 16729 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16730 return r 16731 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16732 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 16733 return r 16734 }(), Fdl: func() (r struct{ Fdad Ush }) { 16735 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16736 return r 16737 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16738 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 16739 return r 16740 }(), Fdl: func() (r struct{ Fdad Ush }) { 16741 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16742 return r 16743 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16744 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16745 return r 16746 }(), Fdl: func() (r struct{ Fdad Ush }) { 16747 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16748 return r 16749 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16750 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 16751 return r 16752 }(), Fdl: func() (r struct{ Fdad Ush }) { 16753 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16754 return r 16755 }()}} /* trees.h:64:21 */ 16756 16757 var X_dist_code = [512]Uch{ 16758 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), 16759 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), 16760 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), 16761 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), 16762 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), 16763 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), 16764 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), 16765 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), 16766 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), 16767 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), 16768 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), 16769 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), 16770 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), 16771 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), 16772 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), 16773 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), 16774 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), 16775 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), 16776 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), 16777 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), 16778 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), 16779 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), 16780 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), 16781 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), 16782 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), 16783 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 16784 } /* trees.h:73:25 */ 16785 16786 var X_length_code = [256]Uch{ 16787 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), 16788 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), 16789 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), 16790 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), 16791 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), 16792 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), 16793 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), 16794 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), 16795 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), 16796 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), 16797 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), 16798 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), 16799 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), 16800 } /* trees.h:102:25 */ 16801 16802 var base_length = [29]int32{ 16803 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 16804 64, 80, 96, 112, 128, 160, 192, 224, 0, 16805 } /* trees.h:118:17 */ 16806 16807 var base_dist = [30]int32{ 16808 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 16809 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 16810 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 16811 } /* trees.h:123:17 */ 16812 16813 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 */ 16814 16815 var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */ 16816 16817 var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */ 16818 16819 // Send a code of the given tree. c and tree must not have side effects 16820 16821 // =========================================================================== 16822 // Output a short LSB first on the stream. 16823 // IN assertion: there is enough room in pendingBuf. 16824 16825 // =========================================================================== 16826 // Send a value on a given number of bits. 16827 // IN assertion: length <= 16 and value fits in length bits. 16828 16829 // the arguments must not have side effects 16830 16831 // =========================================================================== 16832 // Initialize the various 'constant' tables. 16833 func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */ 16834 } 16835 16836 // =========================================================================== 16837 // Genererate the file trees.h describing the static trees. 16838 16839 // =========================================================================== 16840 // Initialize the tree data structures for a new zlib stream. 16841 func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */ 16842 tr_static_init(tls) 16843 16844 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 212 /* &.dyn_ltree */ 16845 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc)) 16846 16847 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2504 /* &.dyn_dtree */ 16848 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc)) 16849 16850 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2748 /* &.bl_tree */ 16851 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc)) 16852 16853 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 16854 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 16855 16856 // Initialize the first block of the first file: 16857 init_block(tls, s) 16858 } 16859 16860 // =========================================================================== 16861 // Initialize a new block. 16862 func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */ 16863 var n int32 // iterates over tree elements 16864 16865 // Initialize the trees. 16866 for n = 0; n < ((LITERALS + 1) + LENGTH_CODES); n++ { 16867 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 16868 } 16869 for n = 0; n < D_CODES; n++ { 16870 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 16871 } 16872 for n = 0; n < BL_CODES; n++ { 16873 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(n)*4 /* &.fc */)) = Ush(0) 16874 } 16875 16876 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 256*4 /* &.fc */)) = Ush(1) 16877 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint64(s+5920 /* &.static_len */, uint64(0)) 16878 (*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5928 /* &.matches */, UInt(0)) 16879 } 16880 16881 // Index within the heap array of least frequent node in the Huffman tree 16882 16883 // =========================================================================== 16884 // Remove the smallest element from the heap and recreate the heap with 16885 // one less element. Updates heap and heap_len. 16886 16887 // =========================================================================== 16888 // Compares to subtrees, using the tree depth as tie breaker when 16889 // the subtrees have equal frequency. This minimizes the worst case length. 16890 16891 // =========================================================================== 16892 // Restore the heap property by moving down the tree starting at node k, 16893 // exchanging a node with the smallest of its two sons if necessary, stopping 16894 // when the heap property is re-established (each father smaller than its 16895 // two sons). 16896 func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */ 16897 var v int32 = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) 16898 var j int32 = (k << 1) // left son of k 16899 for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len { 16900 // Set j to the smallest of the two sons: 16901 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))))))))) { 16902 j++ 16903 } 16904 // Exit if v is smaller than both sons 16905 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)))))))) { 16906 break 16907 } 16908 16909 // Exchange v with the smallest son 16910 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)) 16911 k = j 16912 16913 // And continue down the tree, setting j to the left son of k 16914 j <<= 1 16915 } 16916 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = v 16917 } 16918 16919 // =========================================================================== 16920 // Compute the optimal bit lengths for a tree and update the total bit length 16921 // for the current block. 16922 // IN assertion: the fields freq and dad are set, heap[heap_max] and 16923 // above are the tree nodes sorted by increasing frequency. 16924 // OUT assertions: the field len is set to the optimal bit length, the 16925 // array bl_count contains the frequencies for each bit length. 16926 // The length opt_len is updated; static_len is also updated if stree is 16927 // not null. 16928 func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */ 16929 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 16930 var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code 16931 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 16932 var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits 16933 var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base 16934 var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length 16935 var h int32 // heap index 16936 var n int32 16937 var m int32 // iterate over the tree elements 16938 var bits int32 // bit length 16939 var xbits int32 // extra bits 16940 var f Ush // frequency 16941 var overflow int32 = 0 // number of elements with bit length too large 16942 16943 for bits = 0; bits <= MAX_BITS; bits++ { 16944 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2)) = Ush(0) 16945 } 16946 16947 // In a first pass, compute the optimal bit lengths (which may 16948 // overflow in the case of the bit length tree). 16949 *(*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 16950 16951 for h = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1); h < ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1); h++ { 16952 n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(h)*4)) 16953 bits = (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)))*4 + 2 /* &.dl */))) + 1) 16954 if bits > max_length { 16955 bits = max_length 16956 overflow++ 16957 } 16958 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(bits) 16959 // We overwrite tree[n].Dad which is no longer needed 16960 16961 if n > max_code { 16962 continue 16963 } // not a leaf node 16964 16965 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))++ 16966 xbits = 0 16967 if n >= base { 16968 xbits = *(*Intf)(unsafe.Pointer(extra + uintptr((n-base))*4)) 16969 } 16970 f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */)) 16971 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += (Ulg(f) * Ulg((uint32(bits + xbits)))) 16972 if stree != 0 { 16973 *(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) += (Ulg(f) * Ulg((uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2 /* &.dl */))) + xbits)))) 16974 } 16975 } 16976 if overflow == 0 { 16977 return 16978 } 16979 16980 // This happens for example on obj2 and pic of the Calgary corpus 16981 16982 // Find the first bit length which could increase: 16983 for ok := true; ok; ok = (overflow > 0) { 16984 bits = (max_length - 1) 16985 for int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) == 0 { 16986 bits-- 16987 } 16988 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))-- // move one leaf down the tree 16989 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr((bits+1))*2)) += Ush((2)) // move one overflow item as its brother 16990 *(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(max_length)*2))-- 16991 // The brother of the overflow item also moves one step up, 16992 // but this does not affect bl_count[max_length] 16993 overflow = overflow - (2) 16994 } 16995 16996 // Now recompute all bit lengths, scanning in increasing frequency. 16997 // h is still equal to HEAP_SIZE. (It is simpler to reconstruct all 16998 // lengths instead of fixing only the wrong ones. This idea is taken 16999 // from 'ar' written by Haruhiko Okumura.) 17000 for bits = max_length; bits != 0; bits-- { 17001 n = int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) 17002 for n != 0 { 17003 m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&h, 1))*4)) 17004 if m > max_code { 17005 continue 17006 } 17007 if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */))) != uint32(bits) { 17008 17009 *(*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 */)))) 17010 *(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)) = Ush(bits) 17011 } 17012 n-- 17013 } 17014 } 17015 } 17016 17017 // =========================================================================== 17018 // Generate the codes for a given tree and bit counts (which need not be 17019 // optimal). 17020 // IN assertion: the array bl_count contains the bit length statistics for 17021 // the given tree and the field len is set for all tree elements. 17022 // OUT assertion: the field code is set for all tree elements of non 17023 // zero code length. 17024 func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */ 17025 bp := tls.Alloc(32) 17026 defer tls.Free(32) 17027 17028 // var next_code [16]Ush at bp, 32 17029 // next code value for each bit length 17030 var code uint32 = uint32(0) // running code value 17031 var bits int32 // bit index 17032 var n int32 // code index 17033 17034 // The distribution counts are first used to generate the code values 17035 // without bit reversal. 17036 for bits = 1; bits <= MAX_BITS; bits++ { 17037 code = ((code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr((bits-1))*2)))) << 1) 17038 *(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(bits)*2)) = Ush(code) 17039 } 17040 // Check that the bit counts in bl_count are consistent. The last code 17041 // must be all ones. 17042 17043 for n = 0; n <= max_code; n++ { 17044 var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */))) 17045 if len == 0 { 17046 continue 17047 } 17048 // Now reverse the bits 17049 *(*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)) 17050 17051 } 17052 } 17053 17054 // =========================================================================== 17055 // Construct one Huffman tree and assigns the code bit strings and lengths. 17056 // Update the total bit length for the current block. 17057 // IN assertion: the field freq is set for all tree elements. 17058 // OUT assertions: the fields len and code are set to the optimal bit length 17059 // and corresponding code. The length opt_len is updated; static_len is 17060 // also updated if stree is not null. The field max_code is set. 17061 func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */ 17062 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 17063 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 17064 var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems 17065 var n int32 17066 var m int32 // iterate over heap elements 17067 var max_code int32 = -1 // largest code with non zero frequency 17068 var node int32 // new node being created 17069 17070 // Construct the initial heap, with least frequent element in 17071 // heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. 17072 // heap[0] is not used. 17073 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0 17074 (*Deflate_state)(unsafe.Pointer(s)).Fheap_max = ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1) 17075 17076 for n = 0; n < elems; n++ { 17077 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) != 0 { 17078 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4)) = libc.AssignInt32(&max_code, n) 17079 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n))) = Uch(0) 17080 } else { 17081 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(0) 17082 } 17083 } 17084 17085 // The pkzip format requires that at least one distance code exists, 17086 // and that at least one bit should be sent even if there is only one 17087 // possible code. So to avoid special checks later on we force at least 17088 // two codes of non zero frequency. 17089 for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 { 17090 node = libc.AssignPtrInt32((s+3008 /* &.heap */)+uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4, func() int32 { 17091 if max_code < 2 { 17092 return libc.PreIncInt32(&max_code, 1) 17093 } 17094 return 0 17095 }()) 17096 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = Ush(1) 17097 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = Uch(0) 17098 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len-- 17099 if stree != 0 { 17100 *(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) -= (Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2 /* &.dl */)))) 17101 } 17102 // node is 0 or 1 so it does not have extra bits 17103 } 17104 (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code 17105 17106 // The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, 17107 // establish sub-heaps of increasing lengths: 17108 for n = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2); n >= 1; n-- { 17109 pqdownheap(tls, s, tree, n) 17110 } 17111 17112 // Construct the Huffman tree by repeatedly combining the least two 17113 // frequent nodes. 17114 node = elems // next internal node of the tree 17115 for ok := true; ok; ok = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2) { 17116 { 17117 n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) 17118 *(*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)) 17119 pqdownheap(tls, s, tree, SMALLEST) 17120 } 17121 // n = node of least frequency 17122 m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) // m = node of next least frequency 17123 17124 *(*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 17125 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = m 17126 17127 // Create a new node father of n and m 17128 *(*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 */))))) 17129 *(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = (Uch((func() int32 { 17130 if int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) { 17131 return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) 17132 } 17133 return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) 17134 }()) + 1)) 17135 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2 /* &.dl */ /* &.dad */, Ush(node)) 17136 // and insert the new node in the heap 17137 *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = libc.PostIncInt32(&node, 1) 17138 pqdownheap(tls, s, tree, SMALLEST) 17139 17140 } 17141 17142 *(*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)) 17143 17144 // At this point, the fields freq and dad are set. We can now 17145 // generate the bit lengths. 17146 gen_bitlen(tls, s, desc) 17147 17148 // The field len is now set, we can generate the bit codes 17149 gen_codes(tls, tree, max_code, s+2976 /* &.bl_count */) 17150 } 17151 17152 // =========================================================================== 17153 // Scan a literal or distance tree to determine the frequencies of the codes 17154 // in the bit length tree. 17155 func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */ 17156 var n int32 // iterates over all tree elements 17157 var prevlen int32 = -1 // last emitted length 17158 var curlen int32 // length of current code 17159 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 17160 var count int32 = 0 // repeat count of the current code 17161 var max_count int32 = 7 // max repeat count 17162 var min_count int32 = 4 // min repeat count 17163 17164 if nextlen == 0 { 17165 max_count = 138 17166 min_count = 3 17167 } 17168 *(*Ush)(unsafe.Pointer(tree + uintptr((max_code+1))*4 + 2 /* &.dl */)) = Ush(0xffff) // guard 17169 17170 for n = 0; n <= max_code; n++ { 17171 curlen = nextlen 17172 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 17173 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 17174 continue 17175 } else if count < min_count { 17176 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */ /* &.freq */)) += Ush((count)) 17177 } else if curlen != 0 { 17178 if curlen != prevlen { 17179 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))++ 17180 } 17181 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))++ 17182 } else if count <= 10 { 17183 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))++ 17184 } else { 17185 *(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))++ 17186 } 17187 count = 0 17188 prevlen = curlen 17189 if nextlen == 0 { 17190 max_count = 138 17191 min_count = 3 17192 } else if curlen == nextlen { 17193 max_count = 6 17194 min_count = 3 17195 } else { 17196 max_count = 7 17197 min_count = 4 17198 } 17199 } 17200 } 17201 17202 // =========================================================================== 17203 // Send a literal or distance tree in compressed form, using the codes in 17204 // bl_tree. 17205 func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */ 17206 var n int32 // iterates over all tree elements 17207 var prevlen int32 = -1 // last emitted length 17208 var curlen int32 // length of current code 17209 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code 17210 var count int32 = 0 // repeat count of the current code 17211 var max_count int32 = 7 // max repeat count 17212 var min_count int32 = 4 // min repeat count 17213 17214 /* tree[max_code+1].Len = -1; */ // guard already set 17215 if nextlen == 0 { 17216 max_count = 138 17217 min_count = 3 17218 } 17219 17220 for n = 0; n <= max_code; n++ { 17221 curlen = nextlen 17222 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */))) 17223 if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) { 17224 continue 17225 } else if count < min_count { 17226 for ok := true; ok; ok = (libc.PreDecInt32(&count, 1) != 0) { 17227 { 17228 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 17229 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17230 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 17231 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17232 { 17233 { 17234 *(*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)) 17235 } 17236 { 17237 *(*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)) 17238 } 17239 17240 } 17241 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17242 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17243 } else { 17244 *(*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)) 17245 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17246 } 17247 } 17248 } 17249 17250 } else if curlen != 0 { 17251 if curlen != prevlen { 17252 { 17253 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */))) 17254 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17255 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))) 17256 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17257 { 17258 { 17259 *(*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)) 17260 } 17261 { 17262 *(*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)) 17263 } 17264 17265 } 17266 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17267 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17268 } else { 17269 *(*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)) 17270 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17271 } 17272 } 17273 count-- 17274 } 17275 17276 { 17277 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 + 2 /* &.dl */))) 17278 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17279 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))) 17280 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17281 { 17282 { 17283 *(*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)) 17284 } 17285 { 17286 *(*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)) 17287 } 17288 17289 } 17290 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17291 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17292 } else { 17293 *(*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)) 17294 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17295 } 17296 } 17297 { 17298 var len int32 = 2 17299 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17300 var val int32 = (count - 3) 17301 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17302 { 17303 { 17304 *(*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)) 17305 } 17306 { 17307 *(*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)) 17308 } 17309 17310 } 17311 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17312 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17313 } else { 17314 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17315 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17316 } 17317 } 17318 17319 } else if count <= 10 { 17320 { 17321 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 + 2 /* &.dl */))) 17322 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17323 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))) 17324 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17325 { 17326 { 17327 *(*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)) 17328 } 17329 { 17330 *(*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)) 17331 } 17332 17333 } 17334 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17335 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17336 } else { 17337 *(*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)) 17338 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17339 } 17340 } 17341 { 17342 var len int32 = 3 17343 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17344 var val int32 = (count - 3) 17345 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17346 { 17347 { 17348 *(*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)) 17349 } 17350 { 17351 *(*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)) 17352 } 17353 17354 } 17355 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17356 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17357 } else { 17358 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17359 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17360 } 17361 } 17362 17363 } else { 17364 { 17365 var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 + 2 /* &.dl */))) 17366 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17367 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))) 17368 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17369 { 17370 { 17371 *(*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)) 17372 } 17373 { 17374 *(*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)) 17375 } 17376 17377 } 17378 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17379 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17380 } else { 17381 *(*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)) 17382 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17383 } 17384 } 17385 { 17386 var len int32 = 7 17387 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17388 var val int32 = (count - 11) 17389 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17390 { 17391 { 17392 *(*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)) 17393 } 17394 { 17395 *(*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)) 17396 } 17397 17398 } 17399 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17400 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17401 } else { 17402 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 11))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17403 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17404 } 17405 } 17406 17407 } 17408 count = 0 17409 prevlen = curlen 17410 if nextlen == 0 { 17411 max_count = 138 17412 min_count = 3 17413 } else if curlen == nextlen { 17414 max_count = 6 17415 min_count = 3 17416 } else { 17417 max_count = 7 17418 min_count = 4 17419 } 17420 } 17421 } 17422 17423 // =========================================================================== 17424 // Construct the Huffman tree for the bit lengths and return the index in 17425 // bl_order of the last bit length code to send. 17426 func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */ 17427 var max_blindex int32 // index of last bit length code of non zero freq 17428 17429 // Determine the bit length frequencies for literal and distance trees 17430 scan_tree(tls, s, s+212 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) 17431 scan_tree(tls, s, s+2504 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) 17432 17433 // Build the bit length tree: 17434 build_tree(tls, s, (s + 2952 /* &.bl_desc */)) 17435 // opt_len now includes the length of the tree representations, except 17436 // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. 17437 17438 // Determine the number of bit length codes to send. The pkzip format 17439 // requires that at least 4 bit length codes be sent. (appnote.txt says 17440 // 3 but the actual value used is 4.) 17441 for max_blindex = (BL_CODES - 1); max_blindex >= 3; max_blindex-- { 17442 if int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[max_blindex])*4 + 2 /* &.dl */))) != 0 { 17443 break 17444 } 17445 } 17446 // Update opt_len to include the bit length tree and counts 17447 *(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((((uint64(3) * (Ulg(max_blindex) + uint64(1))) + uint64(5)) + uint64(5)) + uint64(4)) 17448 17449 return max_blindex 17450 } 17451 17452 // =========================================================================== 17453 // Send the header for a block using dynamic Huffman trees: the counts, the 17454 // lengths of the bit length codes, the literal tree and the distance tree. 17455 // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. 17456 func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */ 17457 var rank int32 // index in bl_order 17458 17459 { 17460 var len int32 = 5 17461 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17462 var val int32 = (lcodes - 257) 17463 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17464 { 17465 { 17466 *(*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)) 17467 } 17468 { 17469 *(*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)) 17470 } 17471 17472 } 17473 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17474 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17475 } else { 17476 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lcodes - 257))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17477 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17478 } 17479 } 17480 /* not +255 as stated in appnote.txt */ 17481 { 17482 var len int32 = 5 17483 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17484 var val int32 = (dcodes - 1) 17485 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17486 { 17487 { 17488 *(*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)) 17489 } 17490 { 17491 *(*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)) 17492 } 17493 17494 } 17495 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17496 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17497 } else { 17498 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dcodes - 1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17499 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17500 } 17501 } 17502 17503 { 17504 var len int32 = 4 17505 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17506 var val int32 = (blcodes - 4) 17507 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17508 { 17509 { 17510 *(*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)) 17511 } 17512 { 17513 *(*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)) 17514 } 17515 17516 } 17517 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17518 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17519 } else { 17520 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(blcodes - 4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17521 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17522 } 17523 } 17524 // not -3 as stated in appnote.txt 17525 for rank = 0; rank < blcodes; rank++ { 17526 17527 { 17528 var len int32 = 3 17529 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17530 var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */))) 17531 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17532 { 17533 { 17534 *(*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)) 17535 } 17536 { 17537 *(*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)) 17538 } 17539 17540 } 17541 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17542 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17543 } else { 17544 *(*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)) 17545 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17546 } 17547 } 17548 17549 } 17550 17551 send_tree(tls, s, s+212 /* &.dyn_ltree */, (lcodes - 1)) // literal tree 17552 17553 send_tree(tls, s, s+2504 /* &.dyn_dtree */, (dcodes - 1)) // distance tree 17554 17555 } 17556 17557 // =========================================================================== 17558 // Send a stored block 17559 func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */ 17560 { 17561 var len int32 = 3 17562 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17563 var val int32 = ((int32(STORED_BLOCK) << 1) + last) 17564 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17565 { 17566 { 17567 *(*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)) 17568 } 17569 { 17570 *(*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)) 17571 } 17572 17573 } 17574 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17575 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17576 } else { 17577 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STORED_BLOCK) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17578 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17579 } 17580 } 17581 // send block type 17582 bi_windup(tls, s) /* align on byte boundary */ 17583 { 17584 { 17585 *(*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)) 17586 } 17587 { 17588 *(*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)) 17589 } 17590 17591 } 17592 17593 { 17594 { 17595 *(*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)) 17596 } 17597 { 17598 *(*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)) 17599 } 17600 17601 } 17602 17603 libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), buf, stored_len) 17604 *(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (stored_len) 17605 } 17606 17607 // =========================================================================== 17608 // Flush the bits in the bit buffer to pending output (leaves at most 7 bits) 17609 func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */ 17610 bi_flush(tls, s) 17611 } 17612 17613 // =========================================================================== 17614 // Send one empty static block to give enough lookahead for inflate. 17615 // This takes 10 bits, of which 7 may remain in the bit buffer. 17616 func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */ 17617 { 17618 var len int32 = 3 17619 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17620 var val int32 = (int32(STATIC_TREES) << 1) 17621 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17622 { 17623 { 17624 *(*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)) 17625 } 17626 { 17627 *(*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)) 17628 } 17629 17630 } 17631 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17632 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17633 } else { 17634 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(int32((Ush(int32(STATIC_TREES) << 1)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17635 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17636 } 17637 } 17638 17639 { 17640 var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2 /* &.dl */))) 17641 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17642 var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */))) 17643 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17644 { 17645 { 17646 *(*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)) 17647 } 17648 { 17649 *(*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)) 17650 } 17651 17652 } 17653 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17654 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17655 } else { 17656 *(*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)) 17657 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17658 } 17659 } 17660 17661 bi_flush(tls, s) 17662 } 17663 17664 // =========================================================================== 17665 // Determine the best encoding for the current block: dynamic trees, static 17666 // trees or store, and write out the encoded block. 17667 func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */ 17668 var opt_lenb Ulg 17669 var static_lenb Ulg // opt_len and static_len in bytes 17670 var max_blindex int32 = 0 // index of last bit length code of non zero freq 17671 17672 // Build the Huffman trees unless a stored block is forced 17673 if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 { 17674 17675 // Check if the file is binary or text 17676 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN { 17677 (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s) 17678 } 17679 17680 // Construct the literal and distance trees 17681 build_tree(tls, s, (s + 2904 /* &.l_desc */)) 17682 17683 build_tree(tls, s, (s + 2928 /* &.d_desc */)) 17684 17685 // At this point, opt_len and static_len are the total bit lengths of 17686 // the compressed block data, excluding the tree representations. 17687 17688 // Build the bit length tree for the above two trees, and get the index 17689 // in bl_order of the last bit length code to send. 17690 max_blindex = build_bl_tree(tls, s) 17691 17692 // Determine the best encoding. Compute the block lengths in bytes. 17693 opt_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + uint64(3)) + uint64(7)) >> 3) 17694 static_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + uint64(3)) + uint64(7)) >> 3) 17695 17696 if static_lenb <= opt_lenb { 17697 opt_lenb = static_lenb 17698 } 17699 17700 } else { 17701 17702 opt_lenb = libc.AssignUint64(&static_lenb, (stored_len + uint64(5))) // force a stored block 17703 } 17704 17705 if ((stored_len + uint64(4)) <= opt_lenb) && (buf != uintptr(0)) { 17706 // 4: two words for the lengths 17707 // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. 17708 // Otherwise we can't have processed more than WSIZE input bytes since 17709 // the last block flush, because compression would have been 17710 // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 17711 // transform a block into a stored block. 17712 X_tr_stored_block(tls, s, buf, stored_len, last) 17713 17714 } else if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED) || (static_lenb == opt_lenb) { 17715 { 17716 var len int32 = 3 17717 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17718 var val int32 = ((int32(STATIC_TREES) << 1) + last) 17719 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17720 { 17721 { 17722 *(*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)) 17723 } 17724 { 17725 *(*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)) 17726 } 17727 17728 } 17729 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17730 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17731 } else { 17732 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STATIC_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17733 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17734 } 17735 } 17736 17737 compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))), 17738 uintptr(uintptr(unsafe.Pointer(&static_dtree)))) 17739 } else { 17740 { 17741 var len int32 = 3 17742 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17743 var val int32 = ((int32(DYN_TREES) << 1) + last) 17744 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17745 { 17746 { 17747 *(*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)) 17748 } 17749 { 17750 *(*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)) 17751 } 17752 17753 } 17754 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17755 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17756 } else { 17757 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(DYN_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17758 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17759 } 17760 } 17761 17762 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), 17763 (max_blindex + 1)) 17764 compress_block(tls, s, s+212, /* &.dyn_ltree */ 17765 s+2504 /* &.dyn_dtree */) 17766 } 17767 17768 // The above check is made mod 2^32, for files larger than 512 MB 17769 // and uLong implemented on 32 bits. 17770 init_block(tls, s) 17771 17772 if last != 0 { 17773 bi_windup(tls, s) 17774 } 17775 17776 } 17777 17778 // =========================================================================== 17779 // Save the match info and tally the frequency counts. Return true if 17780 // the current block must be flushed. 17781 func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */ 17782 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist) 17783 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc) 17784 if dist == uint32(0) { 17785 // lc is the unmatched char 17786 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(lc)*4 /* &.fc */))++ 17787 } else { 17788 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 17789 // Here, lc is the match length - MIN_MATCH 17790 dist-- // dist = match distance - 1 17791 17792 *(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[lc])+LITERALS)+1))*4 /* &.fc */))++ 17793 *(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 { 17794 if (dist) < uint32(256) { 17795 return int32(X_dist_code[dist]) 17796 } 17797 return int32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 17798 }()))*4 /* &.fc */))++ 17799 } 17800 17801 return (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1)))) 17802 // We avoid equality with lit_bufsize because of wraparound at 64K 17803 // on 16 bit machines and because stored blocks are restricted to 17804 // 64K-1 bytes. 17805 } 17806 17807 // =========================================================================== 17808 // Send the block data compressed using the given Huffman trees 17809 func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */ 17810 var dist uint32 // distance of matched string 17811 var lc int32 // match length or unmatched char (if dist == 0) 17812 var lx uint32 = uint32(0) // running index in l_buf 17813 var code uint32 // the code to send 17814 var extra int32 // number of extra bits to send 17815 17816 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) { 17817 for ok := true; ok; ok = (lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit) { 17818 dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2))) 17819 lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1))))) 17820 if dist == uint32(0) { 17821 { 17822 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2 /* &.dl */))) 17823 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17824 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */))) 17825 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17826 { 17827 { 17828 *(*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)) 17829 } 17830 { 17831 *(*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)) 17832 } 17833 17834 } 17835 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17836 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17837 } else { 17838 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17839 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17840 } 17841 } 17842 // send a literal byte 17843 17844 } else { 17845 // Here, lc is the match length - MIN_MATCH 17846 code = uint32(X_length_code[lc]) 17847 { 17848 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 + 2 /* &.dl */))) 17849 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17850 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */))) 17851 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17852 { 17853 { 17854 *(*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)) 17855 } 17856 { 17857 *(*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)) 17858 } 17859 17860 } 17861 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17862 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17863 } else { 17864 *(*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)) 17865 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17866 } 17867 } 17868 // send the length code 17869 extra = extra_lbits[code] 17870 if extra != 0 { 17871 lc = lc - (base_length[code]) 17872 { 17873 var len int32 = extra 17874 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17875 var val int32 = lc 17876 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17877 { 17878 { 17879 *(*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)) 17880 } 17881 { 17882 *(*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)) 17883 } 17884 17885 } 17886 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17887 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17888 } else { 17889 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lc))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17890 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17891 } 17892 } 17893 // send the extra length bits 17894 } 17895 dist-- // dist is now the match distance - 1 17896 code = func() uint32 { 17897 if (dist) < uint32(256) { 17898 return uint32(X_dist_code[dist]) 17899 } 17900 return uint32(X_dist_code[(uint32(256) + ((dist) >> 7))]) 17901 }() 17902 17903 { 17904 var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2 /* &.dl */))) 17905 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17906 var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */))) 17907 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17908 { 17909 { 17910 *(*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)) 17911 } 17912 { 17913 *(*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)) 17914 } 17915 17916 } 17917 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17918 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17919 } else { 17920 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17921 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17922 } 17923 } 17924 // send the distance code 17925 extra = extra_dbits[code] 17926 if extra != 0 { 17927 dist = dist - (uint32(base_dist[code])) 17928 { 17929 var len int32 = extra 17930 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17931 var val int32 = int32(dist) 17932 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17933 { 17934 { 17935 *(*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)) 17936 } 17937 { 17938 *(*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)) 17939 } 17940 17941 } 17942 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17943 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17944 } else { 17945 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dist))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17946 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17947 } 17948 } 17949 // send the extra distance bits 17950 } 17951 } // literal or match pair ? 17952 17953 // Check that the overlay between pending_buf and d_buf+l_buf is ok: 17954 17955 } 17956 } 17957 17958 { 17959 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2 /* &.dl */))) 17960 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) { 17961 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */))) 17962 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17963 { 17964 { 17965 *(*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)) 17966 } 17967 { 17968 *(*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)) 17969 } 17970 17971 } 17972 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 17973 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size) 17974 } else { 17975 *(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17976 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len) 17977 } 17978 } 17979 17980 } 17981 17982 // =========================================================================== 17983 // Check if the data type is TEXT or BINARY, using the following algorithm: 17984 // - TEXT if the two conditions below are satisfied: 17985 // a) There are no non-portable control characters belonging to the 17986 // "black list" (0..6, 14..25, 28..31). 17987 // b) There is at least one printable character belonging to the 17988 // "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). 17989 // - BINARY otherwise. 17990 // - The following partially-portable control characters form a 17991 // "gray list" that is ignored in this detection algorithm: 17992 // (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). 17993 // IN assertion: the fields Freq of dyn_ltree are set. 17994 func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */ 17995 // black_mask is the bit mask of black-listed bytes 17996 // set bits 0..6, 14..25, and 28..31 17997 // 0xf3ffc07f = binary 11110011111111111100000001111111 17998 var black_mask uint64 = 0xf3ffc07f 17999 var n int32 18000 18001 // Check for non-textual ("black-listed") bytes. 18002 n = 0 18003 __1: 18004 if !(n <= 31) { 18005 goto __3 18006 } 18007 if ((black_mask & uint64(1)) != 0) && (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0) { 18008 return Z_BINARY 18009 } 18010 goto __2 18011 __2: 18012 n++ 18013 black_mask >>= 1 18014 goto __1 18015 goto __3 18016 __3: 18017 ; 18018 18019 // Check for textual ("white-listed") bytes. 18020 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)) || 18021 (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 13*4 /* &.fc */))) != 0) { 18022 return Z_TEXT 18023 } 18024 for n = 32; n < LITERALS; n++ { 18025 if int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0 { 18026 return Z_TEXT 18027 } 18028 } 18029 18030 // There are no "black-listed" or "white-listed" bytes: 18031 // this stream either is empty or has tolerated ("gray-listed") bytes only. 18032 return Z_BINARY 18033 } 18034 18035 // =========================================================================== 18036 // Reverse the first len bits of a code, using straightforward code (a faster 18037 // method would use a table) 18038 // IN assertion: 1 <= len <= 15 18039 func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */ 18040 var res uint32 = uint32(0) 18041 for ok := true; ok; ok = (libc.PreDecInt32(&len, 1) > 0) { 18042 res = res | (code & uint32(1)) 18043 code >>= 1 18044 res <<= 1 18045 } 18046 return (res >> 1) 18047 } 18048 18049 // =========================================================================== 18050 // Flush the bit buffer, keeping at most 7 bits in it. 18051 func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */ 18052 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 { 18053 { 18054 { 18055 *(*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)) 18056 } 18057 { 18058 *(*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)) 18059 } 18060 18061 } 18062 18063 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 18064 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 18065 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 { 18066 { 18067 *(*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) 18068 } 18069 18070 libc.AssignShrPtrUint16(s+5936 /* &.bi_buf */, int(8)) 18071 *(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) -= (8) 18072 } 18073 } 18074 18075 // =========================================================================== 18076 // Flush the bit buffer and align the output on a byte boundary 18077 func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */ 18078 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 { 18079 { 18080 { 18081 *(*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)) 18082 } 18083 { 18084 *(*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)) 18085 } 18086 18087 } 18088 18089 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { 18090 { 18091 *(*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) 18092 } 18093 18094 } 18095 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 18096 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 18097 } 18098 18099 // =========================================================================== 18100 // Decompresses the source buffer into the destination buffer. *sourceLen is 18101 // the byte length of the source buffer. Upon entry, *destLen is the total size 18102 // of the destination buffer, which must be large enough to hold the entire 18103 // uncompressed data. (The size of the uncompressed data must have been saved 18104 // previously by the compressor and transmitted to the decompressor by some 18105 // mechanism outside the scope of this compression library.) Upon exit, 18106 // *destLen is the size of the decompressed data and *sourceLen is the number 18107 // of source bytes consumed. Upon return, source + *sourceLen points to the 18108 // first unused input byte. 18109 // 18110 // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough 18111 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or 18112 // Z_DATA_ERROR if the input data was corrupted, including if the input data is 18113 // an incomplete zlib stream. 18114 func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */ 18115 bp := tls.Alloc(120) 18116 defer tls.Free(120) 18117 18118 // var stream Z_stream at bp+8, 112 18119 18120 var err int32 18121 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 18122 var len ULong 18123 var left ULong 18124 // var buf [1]Byte at bp, 1 18125 // for detection of incomplete stream when *destLen == 0 18126 18127 len = *(*ULong)(unsafe.Pointer(sourceLen)) 18128 if *(*ULongf)(unsafe.Pointer(destLen)) != 0 { 18129 left = *(*ULongf)(unsafe.Pointer(destLen)) 18130 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 18131 } else { 18132 left = uint64(1) 18133 dest = bp /* &buf[0] */ 18134 } 18135 18136 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source 18137 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0) 18138 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0) 18139 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0) 18140 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0) 18141 18142 err = XinflateInit_(tls, bp+8 /* &stream */, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) 18143 if err != Z_OK { 18144 return err 18145 } 18146 18147 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest 18148 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0) 18149 18150 for ok := true; ok; ok = (err == Z_OK) { 18151 if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out == UInt(0) { 18152 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 { 18153 if left > ULong(max) { 18154 return max 18155 } 18156 return UInt(left) 18157 }() 18158 left = left - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out)) 18159 } 18160 if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in == UInt(0) { 18161 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 { 18162 if len > ULong(max) { 18163 return max 18164 } 18165 return UInt(len) 18166 }() 18167 len = len - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in)) 18168 } 18169 err = Xinflate(tls, bp+8 /* &stream */, Z_NO_FLUSH) 18170 } 18171 18172 *(*ULong)(unsafe.Pointer(sourceLen)) -= (len + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in)) 18173 if dest != bp /* buf */ { 18174 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out 18175 } else if ((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Ftotal_out != 0) && (err == (-5)) { 18176 left = uint64(1) 18177 } 18178 18179 XinflateEnd(tls, bp+8 /* &stream */) 18180 if err == Z_STREAM_END { 18181 return Z_OK 18182 } 18183 if err == Z_NEED_DICT { 18184 return -3 18185 } 18186 if (err == (-5)) && ((left + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out)) != 0) { 18187 return -3 18188 } 18189 return err 18190 } 18191 18192 func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */ 18193 bp := tls.Alloc(8) 18194 defer tls.Free(8) 18195 *(*ULong)(unsafe.Pointer(bp)) = sourceLen 18196 18197 return Xuncompress2(tls, dest, destLen, source, bp /* &sourceLen */) 18198 } 18199 18200 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 18201 // value -- needed when comparing unsigned to z_off64_t, which is signed 18202 // (possible z_off64_t types off_t, off64_t, and long are all signed) 18203 18204 var Xz_errmsg = [10]uintptr{ 18205 uintptr(ts + 876 /* "need dictionary" */), // Z_NEED_DICT 2 18206 uintptr(ts + 892 /* "stream end" */), // Z_STREAM_END 1 18207 uintptr(ts + 101 /* "" */), // Z_OK 0 18208 uintptr(ts + 903 /* "file error" */), // Z_ERRNO (-1) 18209 uintptr(ts + 914 /* "stream error" */), // Z_STREAM_ERROR (-2) 18210 uintptr(ts + 927 /* "data error" */), // Z_DATA_ERROR (-3) 18211 uintptr(ts + 938 /* "insufficient mem..." */), // Z_MEM_ERROR (-4) 18212 uintptr(ts + 958 /* "buffer error" */), // Z_BUF_ERROR (-5) 18213 uintptr(ts + 971 /* "incompatible ver..." */), // Z_VERSION_ERROR (-6) 18214 uintptr(ts + 101 /* "" */), 18215 } /* zutil.c:13:14 */ 18216 18217 func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */ 18218 return ts /* "1.2.11" */ 18219 } 18220 18221 func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */ 18222 var flags ULong 18223 18224 flags = uint64(0) 18225 switch int32(unsafe.Sizeof(UInt(0))) { 18226 case 2: 18227 break 18228 case 4: 18229 flags = flags + (uint64(1)) 18230 break 18231 case 8: 18232 flags = flags + (uint64(2)) 18233 break 18234 default: 18235 flags = flags + (uint64(3)) 18236 } 18237 switch int32(unsafe.Sizeof(ULong(0))) { 18238 case 2: 18239 break 18240 case 4: 18241 flags = flags + (uint64(int32(1) << 2)) 18242 break 18243 case 8: 18244 flags = flags + (uint64(int32(2) << 2)) 18245 break 18246 default: 18247 flags = flags + (uint64(int32(3) << 2)) 18248 } 18249 switch int32(unsafe.Sizeof(Voidpf(0))) { 18250 case 2: 18251 break 18252 case 4: 18253 flags = flags + (uint64(int32(1) << 4)) 18254 break 18255 case 8: 18256 flags = flags + (uint64(int32(2) << 4)) 18257 break 18258 default: 18259 flags = flags + (uint64(int32(3) << 4)) 18260 } 18261 switch int32(unsafe.Sizeof(X__off_t(0))) { 18262 case 2: 18263 break 18264 case 4: 18265 flags = flags + (uint64(int32(1) << 6)) 18266 break 18267 case 8: 18268 flags = flags + (uint64(int32(2) << 6)) 18269 break 18270 default: 18271 flags = flags + (uint64(int32(3) << 6)) 18272 } 18273 return flags 18274 } 18275 18276 // exported to allow conversion of error code to string for compress() and 18277 // uncompress() 18278 func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */ 18279 return Xz_errmsg[(Z_NEED_DICT - (err))] 18280 } 18281 18282 func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */ 18283 _ = opaque 18284 if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) { 18285 return libc.Xmalloc(tls, (uint64(items * size))) 18286 } 18287 return libc.Xcalloc(tls, uint64(items), uint64(size)) 18288 } 18289 18290 func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */ 18291 _ = opaque 18292 libc.Xfree(tls, ptr) 18293 } 18294 18295 func init() { 18296 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8 /* .func */)) = deflate_stored // deflate.c:136:29: 18297 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24 /* .func */)) = deflate_fast // deflate.c:137:29: 18298 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40 /* .func */)) = deflate_fast // deflate.c:138:29: 18299 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56 /* .func */)) = deflate_fast // deflate.c:139:29: 18300 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72 /* .func */)) = deflate_slow // deflate.c:141:29: 18301 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88 /* .func */)) = deflate_slow // deflate.c:142:29: 18302 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104 /* .func */)) = deflate_slow // deflate.c:143:29: 18303 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120 /* .func */)) = deflate_slow // deflate.c:144:29: 18304 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136 /* .func */)) = deflate_slow // deflate.c:145:30: 18305 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152 /* .func */)) = deflate_slow // deflate.c:146:30: 18306 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22: 18307 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2: 18308 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits)) // trees.c:129:16: 18309 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2: 18310 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits)) // trees.c:126:16: 18311 } 18312 18313 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" 18314 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data